From 85a29e1bd42fb29fef7e82c071d8ec84c87e970e Mon Sep 17 00:00:00 2001 From: jiasheng Date: Sat, 1 Aug 2026 11:23:23 +0800 Subject: [PATCH 1/2] chore: auto format the code using husky --- .husky/pre-commit | 1 + package.json | 11 +- packages/cli/src/actions/check.ts | 3 +- packages/cli/src/actions/db.ts | 79 +- packages/cli/src/actions/generate.ts | 3 +- packages/cli/src/actions/pull/index.ts | 64 +- .../cli/src/actions/pull/provider/mysql.ts | 65 +- .../cli/src/actions/pull/provider/provider.ts | 5 +- .../cli/src/actions/pull/provider/sqlite.ts | 27 +- packages/cli/src/actions/pull/utils.ts | 11 +- packages/cli/test/ts-schema-gen.test.ts | 178 +- .../clients/client-helpers/src/transaction.ts | 1 - .../client-helpers/test/mutator.test.ts | 11 +- .../test/schemas/basic/schema-lite.ts | 88 +- .../test/schemas/no-procs/schema-lite.ts | 22 +- .../fetch-client/test/typing.test-d.ts | 6 +- packages/clients/tanstack-query/src/vue.ts | 5 +- .../test/schemas/basic/schema-lite.ts | 174 +- .../common-helpers/src/single-debounce.ts | 8 +- .../common-helpers/test/enumerable.test.ts | 10 +- packages/common-helpers/test/zip.test.ts | 20 +- packages/language/src/document.ts | 1 - packages/language/src/validator.ts | 1 - packages/language/src/validators/common.ts | 15 +- .../src/validators/datamodel-validator.ts | 3 +- .../src/validators/datasource-validator.ts | 3 +- .../src/validators/procedure-validator.ts | 6 +- packages/orm/src/client/crud-types.ts | 24 +- .../src/client/crud/dialects/base-dialect.ts | 8 +- .../dialects/lateral-join-dialect-base.ts | 8 +- .../src/client/crud/dialects/postgresql.ts | 4 +- .../src/client/crud/operations/aggregate.ts | 3 +- .../orm/src/client/crud/operations/base.ts | 21 +- .../src/client/crud/operations/group-by.ts | 7 +- packages/orm/src/client/zod/factory.ts | 21 +- packages/plugins/soft-delete/README.md | 2 +- .../sdk/src/prisma/prisma-schema-generator.ts | 32 +- packages/sdk/src/tsconfig-utils.ts | 5 +- packages/server/src/api/common/spec-utils.ts | 4 +- packages/server/src/api/common/utils.ts | 6 +- packages/server/src/api/rest/index.ts | 47 +- packages/server/src/api/rest/openapi.ts | 22 +- .../server/test/api/procedures.e2e.test.ts | 31 +- packages/zod/src/utils.ts | 5 +- pnpm-lock.yaml | 371 +- samples/next.js/zenstack/schema-lite.ts | 126 +- samples/nuxt/README.md | 11 +- samples/nuxt/zenstack/schema-lite.ts | 126 +- samples/sveltekit/.prettierrc | 6 +- samples/sveltekit/src/zenstack/input.ts | 63 +- samples/sveltekit/src/zenstack/schema-lite.ts | 224 +- samples/sveltekit/src/zenstack/schema.ts | 286 +- samples/taskforge/src/db.ts | 16 +- tests/e2e/apps/rally/zenstack/input.ts | 1243 +- tests/e2e/apps/rally/zenstack/models.ts | 58 +- tests/e2e/apps/rally/zenstack/schema.ts | 4441 +++-- tests/e2e/github-repos/cal.com/input.ts | 4537 +++-- tests/e2e/github-repos/cal.com/models.ts | 207 +- tests/e2e/github-repos/cal.com/schema.ts | 16403 ++++++++++------ tests/e2e/github-repos/formbricks/input.ts | 1603 +- tests/e2e/github-repos/formbricks/models.ts | 77 +- tests/e2e/github-repos/formbricks/schema.ts | 5368 +++-- tests/e2e/github-repos/trigger.dev/input.ts | 2353 ++- tests/e2e/github-repos/trigger.dev/models.ts | 106 +- tests/e2e/github-repos/trigger.dev/schema.ts | 11183 +++++++---- .../orm/client-api/computed-fields.test.ts | 65 +- tests/e2e/orm/client-api/exists.test.ts | 158 +- .../orm/client-api/full-text-search.test.ts | 15 +- .../pg-computed-multischema.test.ts | 13 +- tests/e2e/orm/client-api/transaction.test.ts | 9 +- .../orm/plugin-infra/ext-query-args/input.ts | 73 +- .../orm/plugin-infra/ext-query-args/models.ts | 6 +- .../orm/plugin-infra/ext-query-args/schema.ts | 33 +- .../e2e/orm/plugin-infra/ext-result/input.ts | 118 +- .../e2e/orm/plugin-infra/ext-result/models.ts | 8 +- .../e2e/orm/plugin-infra/ext-result/schema.ts | 100 +- .../orm/policy/isempty-function-pg.test.ts | 14 +- tests/e2e/orm/schemas/auth-type/input.ts | 73 +- tests/e2e/orm/schemas/auth-type/models.ts | 10 +- tests/e2e/orm/schemas/auth-type/schema.ts | 64 +- tests/e2e/orm/schemas/basic/input.ts | 297 +- tests/e2e/orm/schemas/basic/models.ts | 16 +- tests/e2e/orm/schemas/basic/schema.ts | 567 +- tests/e2e/orm/schemas/default-auth/input.ts | 163 +- tests/e2e/orm/schemas/default-auth/models.ts | 10 +- tests/e2e/orm/schemas/default-auth/schema.ts | 171 +- tests/e2e/orm/schemas/delegate/input.ts | 343 +- tests/e2e/orm/schemas/delegate/models.ts | 18 +- tests/e2e/orm/schemas/delegate/schema.ts | 720 +- tests/e2e/orm/schemas/delegate/typecheck.ts | 18 +- .../orm/schemas/full-text-search/schema.ts | 51 +- tests/e2e/orm/schemas/fuzzy-search/schema.ts | 45 +- tests/e2e/orm/schemas/json/input.ts | 73 +- tests/e2e/orm/schemas/json/models.ts | 6 +- tests/e2e/orm/schemas/json/schema.ts | 37 +- tests/e2e/orm/schemas/name-mapping/input.ts | 118 +- tests/e2e/orm/schemas/name-mapping/models.ts | 8 +- tests/e2e/orm/schemas/name-mapping/schema.ts | 156 +- tests/e2e/orm/schemas/omit/input.ts | 208 +- tests/e2e/orm/schemas/omit/models.ts | 12 +- tests/e2e/orm/schemas/omit/schema.ts | 151 +- tests/e2e/orm/schemas/petstore/input.ts | 163 +- tests/e2e/orm/schemas/petstore/models.ts | 10 +- tests/e2e/orm/schemas/petstore/schema.ts | 283 +- tests/e2e/orm/schemas/procedures/input.ts | 73 +- tests/e2e/orm/schemas/procedures/models.ts | 8 +- tests/e2e/orm/schemas/procedures/schema.ts | 119 +- tests/e2e/orm/schemas/todo/input.ts | 253 +- tests/e2e/orm/schemas/todo/models.ts | 14 +- tests/e2e/orm/schemas/todo/schema.ts | 957 +- tests/e2e/orm/schemas/typed-json/input.ts | 73 +- tests/e2e/orm/schemas/typed-json/models.ts | 12 +- tests/e2e/orm/schemas/typed-json/schema.ts | 111 +- tests/e2e/orm/schemas/typing/input.ts | 298 +- tests/e2e/orm/schemas/typing/models.ts | 20 +- tests/e2e/orm/schemas/typing/schema.ts | 476 +- tests/e2e/orm/schemas/unsupported/input.ts | 208 +- tests/e2e/orm/schemas/unsupported/models.ts | 12 +- tests/e2e/orm/schemas/unsupported/schema.ts | 174 +- tests/e2e/performance/tsc-torture/main.ts | 4 +- .../tsc-torture/zenstack/schema.ts | 4953 +++-- tests/regression/test/issue-2433.test.ts | 8 +- tests/regression/test/issue-2460.test.ts | 5 +- tests/regression/test/issue-2757.test.ts | 24 +- tests/regression/test/issue-2768.test.ts | 12 +- tests/regression/test/issue-423.test.ts | 9 +- tests/runtimes/bun/schemas/input.ts | 118 +- tests/runtimes/bun/schemas/models.ts | 8 +- tests/runtimes/bun/schemas/schema.ts | 182 +- tests/runtimes/edge-runtime/schemas/input.ts | 118 +- tests/runtimes/edge-runtime/schemas/models.ts | 8 +- tests/runtimes/edge-runtime/schemas/schema.ts | 182 +- 132 files changed, 39388 insertions(+), 23333 deletions(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..dff836dfc --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +pnpm exec lint-staged \ No newline at end of file diff --git a/package.json b/package.json index 9a390dc5e..734bd0ec6 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,8 @@ "publish-all": "pnpm --filter \"./packages/**\" -r publish --access public", "publish-canary": "pnpm --filter \"./packages/**\" -r publish --access public --tag canary --no-git-checks", "publish-preview": "pnpm --filter \"./packages/**\" -r publish --force --registry https://preview.registry.zenstack.dev/", - "unpublish-preview": "pnpm --filter \"./packages/**\" -r --shell-mode exec -- npm unpublish -f --registry https://preview.registry.zenstack.dev/ \"\\$PNPM_PACKAGE_NAME\"" + "unpublish-preview": "pnpm --filter \"./packages/**\" -r --shell-mode exec -- npm unpublish -f --registry https://preview.registry.zenstack.dev/ \"\\$PNPM_PACKAGE_NAME\"", + "prepare": "husky" }, "keywords": [], "devDependencies": { @@ -42,8 +43,11 @@ "@vitest/coverage-v8": "^4.0.16", "eslint": "~9.29.0", "glob": "^11.1.0", + "husky": "^9.1.7", + "lint-staged": "^17.3.0", "npm-run-all": "^4.1.5", "prettier": "^3.5.3", + "prettier-plugin-tailwindcss": "^0.7.2", "prisma": "catalog:", "tsdown": "^0.21.8", "tsx": "catalog:", @@ -66,5 +70,8 @@ "@better-auth/core": "1.4.19" } }, + "lint-staged": { + "*.{ts,tsx,md}": "prettier --write" + }, "funding": "https://github.com/sponsors/zenstackhq" -} +} \ No newline at end of file diff --git a/packages/cli/src/actions/check.ts b/packages/cli/src/actions/check.ts index c22e65468..559f736c6 100644 --- a/packages/cli/src/actions/check.ts +++ b/packages/cli/src/actions/check.ts @@ -29,8 +29,7 @@ async function checkPluginResolution(schemaFile: string, model: Model) { for (const plugin of plugins) { const provider = getPluginProvider(plugin); if (!provider.startsWith('@core/')) { - const pluginSourcePath = - plugin.$cstNode?.container?.astNode.$document?.uri?.fsPath ?? schemaFile; + const pluginSourcePath = plugin.$cstNode?.container?.astNode.$document?.uri?.fsPath ?? schemaFile; await loadPluginModule(provider, path.dirname(pluginSourcePath)); } } diff --git a/packages/cli/src/actions/db.ts b/packages/cli/src/actions/db.ts index c8e0f8204..e9842cd36 100644 --- a/packages/cli/src/actions/db.ts +++ b/packages/cli/src/actions/db.ts @@ -14,7 +14,14 @@ import { } from './action-utils'; import { consolidateEnums, syncEnums, syncRelation, syncTable, type Relation } from './pull'; import { providers as pullProviders } from './pull/provider'; -import { getDatasource, getDbName, getRelationFieldsKey, getRelationFkName, getRelationName, isDatabaseManagedAttribute } from './pull/utils'; +import { + getDatasource, + getDbName, + getRelationFieldsKey, + getRelationFkName, + getRelationName, + isDatabaseManagedAttribute, +} from './pull/utils'; import type { DataSourceProviderType } from '@zenstackhq/schema'; import { CliError } from '../cli-error'; @@ -109,8 +116,7 @@ async function runPull(options: PullOptions) { // Determine early if `--out` is a single file output (combined schema) or a directory export. const outPath = options.output ? path.resolve(options.output) : undefined; const treatAsFile = - !!outPath && - ((fs.existsSync(outPath) && fs.lstatSync(outPath).isFile()) || path.extname(outPath) !== ''); + !!outPath && ((fs.existsSync(outPath) && fs.lstatSync(outPath).isFile()) || path.extname(outPath) !== ''); const { model, services } = await loadSchemaDocument(schemaFile, { returnServices: true, @@ -131,7 +137,10 @@ async function runPull(options: PullOptions) { } spinner.start('Introspecting database...'); - const { enums, tables } = await provider.introspect(datasource.url, { schemas: datasource.allSchemas, modelCasing: options.modelCasing }); + const { enums, tables } = await provider.introspect(datasource.url, { + schemas: datasource.allSchemas, + modelCasing: options.modelCasing, + }); spinner.succeed('Database introspected'); console.log(colors.blue('Syncing schema...')); @@ -170,8 +179,7 @@ async function runPull(options: PullOptions) { } // Normalize schema values: MySQL uses null for references.schema but '' for table.schema; // treat null, undefined, and '' as equivalent when comparing schemas. - const schemasMatch = (a: string | null | undefined, b: string | null | undefined) => - (a ?? '') === (b ?? ''); + const schemasMatch = (a: string | null | undefined, b: string | null | undefined) => (a ?? '') === (b ?? ''); // sync relation fields for (const relation of resolvedRelations) { @@ -276,11 +284,13 @@ async function runPull(options: PullOptions) { .filter((d) => d.$type === DataModel.$type || d.$type === Enum.$type) .forEach((_declaration) => { const newDataModel = _declaration as DataModel | Enum; - const declarations = services.shared.workspace.IndexManager.allElements(newDataModel.$type, docsSet).toArray(); + const declarations = services.shared.workspace.IndexManager.allElements( + newDataModel.$type, + docsSet, + ).toArray(); const originalDataModel = declarations.find((d) => getDbName(d.node as any) === getDbName(newDataModel)) ?.node as DataModel | Enum | undefined; if (!originalDataModel) { - if (newDataModel.$type === 'DataModel') { addedModels.push(colors.green(`+ Model ${newDataModel.name} added`)); } else if (newDataModel.$type === 'Enum') { @@ -339,9 +349,7 @@ async function runPull(options: PullOptions) { if (newRelName) { originalFields = originalDataModel.fields.filter( (d) => - isDataField(d) && - isDataField(f) && - matchesRelationNameFallback(f, newRelName, d), + isDataField(d) && isDataField(f) && matchesRelationNameFallback(f, newRelName, d), ); } } @@ -395,7 +403,9 @@ async function runPull(options: PullOptions) { const newRefName = getDbName(newType.reference.ref); const oldRefName = getDbName(oldType.reference.ref); if (newRefName !== oldRefName) { - fieldUpdates.push(`reference: ${oldType.reference.$refText} -> ${newType.reference.$refText}`); + fieldUpdates.push( + `reference: ${oldType.reference.$refText} -> ${newType.reference.$refText}`, + ); // Replace the entire reference object — Langium References // from parsed documents expose `ref` as a getter-only property. (oldType as any).reference = { @@ -444,21 +454,28 @@ async function runPull(options: PullOptions) { if (newDefaultAttr && oldDefaultAttr) { // Compare attribute arguments by serializing them (avoid circular refs with $type fallback) const serializeArgs = (args: any[]) => - args.map((arg) => { - if (arg.value?.$type === 'StringLiteral') return `"${arg.value.value}"`; - if (arg.value?.$type === 'NumberLiteral') return String(arg.value.value); - if (arg.value?.$type === 'BooleanLiteral') return String(arg.value.value); - if (arg.value?.$type === 'InvocationExpr') return arg.value.function?.$refText ?? ''; - if (arg.value?.$type === 'ReferenceExpr') return arg.value.target?.$refText ?? ''; - if (arg.value?.$type === 'ArrayExpr') { - return `[${(arg.value.items ?? []).map((item: any) => { - if (item.$type === 'ReferenceExpr') return item.target?.$refText ?? ''; - return item.$type ?? 'unknown'; - }).join(',')}]`; - } - // Fallback: use $type to avoid circular reference issues - return arg.value?.$type ?? 'unknown'; - }).join(','); + args + .map((arg) => { + if (arg.value?.$type === 'StringLiteral') return `"${arg.value.value}"`; + if (arg.value?.$type === 'NumberLiteral') return String(arg.value.value); + if (arg.value?.$type === 'BooleanLiteral') return String(arg.value.value); + if (arg.value?.$type === 'InvocationExpr') + return arg.value.function?.$refText ?? ''; + if (arg.value?.$type === 'ReferenceExpr') + return arg.value.target?.$refText ?? ''; + if (arg.value?.$type === 'ArrayExpr') { + return `[${(arg.value.items ?? []) + .map((item: any) => { + if (item.$type === 'ReferenceExpr') + return item.target?.$refText ?? ''; + return item.$type ?? 'unknown'; + }) + .join(',')}]`; + } + // Fallback: use $type to avoid circular reference issues + return arg.value?.$type ?? 'unknown'; + }) + .join(','); const newArgsStr = serializeArgs(newDefaultAttr.args ?? []); const oldArgsStr = serializeArgs(oldDefaultAttr.args ?? []); @@ -500,7 +517,7 @@ async function runPull(options: PullOptions) { originalField.attributes .filter( (attr) => - !f.attributes.find((d) => d.decl.$refText === attr.decl.$refText) && + !f.attributes.find((d) => d.decl.$refText === attr.decl.$refText) && isDatabaseManagedAttribute(attr.decl.$refText), ) .forEach((attr) => { @@ -508,7 +525,9 @@ async function runPull(options: PullOptions) { const index = field.attributes.findIndex((d) => d === attr); field.attributes.splice(index, 1); getModelChanges(originalDataModel.name).deletedAttributes.push( - colors.yellow(`- ${attr.decl.$refText} from field: ${originalDataModel.name}.${field.name}`), + colors.yellow( + `- ${attr.decl.$refText} from field: ${originalDataModel.name}.${field.name}`, + ), ); }); @@ -520,7 +539,7 @@ async function runPull(options: PullOptions) { isDatabaseManagedAttribute(attr.decl.$refText), ) .forEach((attr) => { - // attach the new attribute to the original field + // attach the new attribute to the original field const cloned = { ...attr, $container: originalField } as typeof attr; originalField.attributes.push(cloned); getModelChanges(originalDataModel.name).addedAttributes.push( diff --git a/packages/cli/src/actions/generate.ts b/packages/cli/src/actions/generate.ts index 8291d4d9d..2f7543e2f 100644 --- a/packages/cli/src/actions/generate.ts +++ b/packages/cli/src/actions/generate.ts @@ -188,8 +188,7 @@ async function runPlugins(schemaFile: string, model: Model, outputPath: string, } else { // resolve relative plugin paths against the schema file where the plugin is declared, // not the entry schema file - const pluginSourcePath = - plugin.$cstNode?.container?.astNode.$document?.uri?.fsPath ?? schemaFile; + const pluginSourcePath = plugin.$cstNode?.container?.astNode.$document?.uri?.fsPath ?? schemaFile; cliPlugin = await loadPluginModule(provider, path.dirname(pluginSourcePath)); } diff --git a/packages/cli/src/actions/pull/index.ts b/packages/cli/src/actions/pull/index.ts index 998852cb6..7d5c18f28 100644 --- a/packages/cli/src/actions/pull/index.ts +++ b/packages/cli/src/actions/pull/index.ts @@ -1,12 +1,6 @@ import type { ZModelServices } from '@zenstackhq/language'; import colors from 'colors'; -import { - isEnum, - type DataField, - type DataModel, - type Enum, - type Model, -} from '@zenstackhq/language/ast'; +import { isEnum, type DataField, type DataModel, type Enum, type Model } from '@zenstackhq/language/ast'; import { DataFieldAttributeFactory, DataFieldFactory, @@ -79,8 +73,12 @@ export function syncEnums({ // For providers that don't support native enums (e.g., SQLite), carry over // enum declarations from the existing schema as-is by deep-cloning the AST nodes. // A dummy buildReference is used since we don't need cross-reference resolution. - const dummyBuildReference = (_node: AstNode, _property: string, _refNode: CstNode | undefined, refText: string): Reference => - ({ $refText: refText }) as Reference; + const dummyBuildReference = ( + _node: AstNode, + _property: string, + _refNode: CstNode | undefined, + refText: string, + ): Reference => ({ $refText: refText }) as Reference; oldModel.declarations .filter((d) => isEnum(d)) @@ -181,7 +179,6 @@ export function syncTable({ } table.columns.forEach((column) => { - const { name, modified } = resolveNameCasing(options.fieldCasing, column.name); const builtinType = provider.getBuiltinType(column.datatype); @@ -259,9 +256,10 @@ export function syncTable({ b.setDecl(uniqueAttribute); // Only add map if the unique constraint name differs from default patterns // Default patterns: TableName_columnName_key (Prisma) or just columnName (MySQL) - const isDefaultName = !column.unique_name - || column.unique_name === `${table.name}_${column.name}_key` - || column.unique_name === column.name; + const isDefaultName = + !column.unique_name || + column.unique_name === `${table.name}_${column.name}_key` || + column.unique_name === column.name; if (!isDefaultName) { b.addArg((ab) => ab.StringLiteral.setValue(column.unique_name!), 'map'); } @@ -296,9 +294,7 @@ export function syncTable({ ); } - const hasUniqueConstraint = - table.columns.some((c) => c.unique || c.pk) || - table.indexes.some((i) => i.unique); + const hasUniqueConstraint = table.columns.some((c) => c.unique || c.pk) || table.indexes.some((i) => i.unique); if (!hasUniqueConstraint) { modelFactory.addAttribute((a) => a.setDecl(getAttributeRef('@@ignore', services))); modelFactory.addComment( @@ -342,8 +338,7 @@ export function syncTable({ return; } - modelFactory.addAttribute((builder) => - { + modelFactory.addAttribute((builder) => { const attr = builder .setDecl(index.unique ? modelUniqueAttribute : modelindexAttribute) .addArg((argBuilder) => { @@ -364,16 +359,14 @@ export function syncTable({ return arrayExpr; }); - const suffix = index.unique ? '_key' : '_idx'; + const suffix = index.unique ? '_key' : '_idx'; - if(index.name !== `${table.name}_${index.columns.map(c => c.name).join('_')}${suffix}`){ - attr.addArg((argBuilder) => argBuilder.StringLiteral.setValue(index.name), 'map'); - } - - return attr - } + if (index.name !== `${table.name}_${index.columns.map((c) => c.name).join('_')}${suffix}`) { + attr.addArg((argBuilder) => argBuilder.StringLiteral.setValue(index.name), 'map'); + } - ); + return attr; + }); }); if (table.schema && table.schema !== '' && table.schema !== defaultSchema) { modelFactory.addAttribute((b) => @@ -450,7 +443,9 @@ export function syncRelation({ // Derive a relation field name from the FK scalar field: if the field ends with "Id", // strip the suffix and use the remainder (e.g., "authorId" -> "author"). - const sourceNameFromReference = firstSourceField.name.toLowerCase().endsWith('id') ? `${resolveNameCasing(options.fieldCasing, firstSourceField.name.slice(0, -2)).name}${relation.type === 'many'? 's' : ''}` : undefined; + const sourceNameFromReference = firstSourceField.name.toLowerCase().endsWith('id') + ? `${resolveNameCasing(options.fieldCasing, firstSourceField.name.slice(0, -2)).name}${relation.type === 'many' ? 's' : ''}` + : undefined; // Check if the derived name would clash with an existing field const sourceFieldFromReference = sourceModel.fields.find((f) => f.name === sourceNameFromReference); @@ -462,7 +457,7 @@ export function syncRelation({ options.fieldCasing, similarRelations > 0 ? `${fieldPrefix}${lowerCaseFirst(sourceModel.name)}_${firstColumn}` - : `${(!sourceFieldFromReference? sourceNameFromReference : undefined) || lowerCaseFirst(resolveNameCasing(options.fieldCasing, targetModel.name).name)}${relation.type === 'many'? 's' : ''}`, + : `${(!sourceFieldFromReference ? sourceNameFromReference : undefined) || lowerCaseFirst(resolveNameCasing(options.fieldCasing, targetModel.name).name)}${relation.type === 'many' ? 's' : ''}`, ); if (sourceModel.fields.find((f) => f.name === sourceFieldName)) { @@ -525,7 +520,8 @@ export function syncRelation({ // Check if the FK constraint name differs from the default pattern const defaultFkName = `${relation.table}_${relation.columns.join('_')}_fkey`; - if (relation.fk_name && relation.fk_name !== defaultFkName) ab.addArg((ab) => ab.StringLiteral.setValue(relation.fk_name), 'map'); + if (relation.fk_name && relation.fk_name !== defaultFkName) + ab.addArg((ab) => ab.StringLiteral.setValue(relation.fk_name), 'map'); return ab; }); @@ -537,7 +533,7 @@ export function syncRelation({ options.fieldCasing, similarRelations > 0 ? `${oppositeFieldPrefix}${lowerCaseFirst(sourceModel.name)}_${firstColumn}` - : `${lowerCaseFirst(resolveNameCasing(options.fieldCasing, sourceModel.name).name)}${relation.references.type === 'many'? 's' : ''}`, + : `${lowerCaseFirst(resolveNameCasing(options.fieldCasing, sourceModel.name).name)}${relation.references.type === 'many' ? 's' : ''}`, ); if (targetModel.fields.find((f) => f.name === oppositeFieldName)) { @@ -573,13 +569,7 @@ export function syncRelation({ * mapping via field references and consolidates the synthetic enums back into * the original shared enum so the merge phase can match them correctly. */ -export function consolidateEnums({ - newModel, - oldModel, -}: { - newModel: Model; - oldModel: Model; -}) { +export function consolidateEnums({ newModel, oldModel }: { newModel: Model; oldModel: Model }) { const newEnums = newModel.declarations.filter((d) => isEnum(d)) as Enum[]; const newDataModels = newModel.declarations.filter((d) => d.$type === 'DataModel') as DataModel[]; const oldDataModels = oldModel.declarations.filter((d) => d.$type === 'DataModel') as DataModel[]; diff --git a/packages/cli/src/actions/pull/provider/mysql.ts b/packages/cli/src/actions/pull/provider/mysql.ts index 1c8124435..a7d129eff 100644 --- a/packages/cli/src/actions/pull/provider/mysql.ts +++ b/packages/cli/src/actions/pull/provider/mysql.ts @@ -130,7 +130,10 @@ export const mysql: IntrospectionProvider = { return { type: 'longblob' }; } }, - async introspect(connectionString: string, options: { schemas: string[]; modelCasing: 'pascal' | 'camel' | 'snake' | 'none' }): Promise { + async introspect( + connectionString: string, + options: { schemas: string[]; modelCasing: 'pascal' | 'camel' | 'snake' | 'none' }, + ): Promise { const mysql = await import('mysql2/promise'); const connection = await mysql.createConnection(connectionString); @@ -155,29 +158,32 @@ export const mysql: IntrospectionProvider = { const indexes = typeof row.indexes === 'string' ? JSON.parse(row.indexes) : row.indexes; // Sort columns by ordinal_position to preserve database column order - const sortedColumns = (columns || []) - .sort( - (a: { ordinal_position?: number }, b: { ordinal_position?: number }) => - (a.ordinal_position ?? 0) - (b.ordinal_position ?? 0) - ) - .map((col: any) => { - // MySQL enum datatype_name is synthetic (TableName_ColumnName). - // Apply model casing so it matches the cased enum_type. - if (col.datatype === 'enum' && col.datatype_name) { - return { ...col, datatype_name: resolveNameCasing(options.modelCasing, col.datatype_name).name }; - } - // Normalize generated column expressions for stable output. - if (col.computed && typeof col.datatype === 'string') { - return { ...col, datatype: normalizeGenerationExpression(col.datatype) }; - } - return col; - }); + const sortedColumns = (columns || []) + .sort( + (a: { ordinal_position?: number }, b: { ordinal_position?: number }) => + (a.ordinal_position ?? 0) - (b.ordinal_position ?? 0), + ) + .map((col: any) => { + // MySQL enum datatype_name is synthetic (TableName_ColumnName). + // Apply model casing so it matches the cased enum_type. + if (col.datatype === 'enum' && col.datatype_name) { + return { + ...col, + datatype_name: resolveNameCasing(options.modelCasing, col.datatype_name).name, + }; + } + // Normalize generated column expressions for stable output. + if (col.computed && typeof col.datatype === 'string') { + return { ...col, datatype: normalizeGenerationExpression(col.datatype) }; + } + return col; + }); // Filter out auto-generated FK indexes (MySQL creates these automatically) // Pattern: {Table}_{column}_fkey for single-column FK indexes const filteredIndexes = (indexes || []).filter( (idx: { name: string; columns: { name: string }[] }) => - !(idx.columns.length === 1 && idx.name === `${row.name}_${idx.columns[0]?.name}_fkey`) + !(idx.columns.length === 1 && idx.name === `${row.name}_${idx.columns[0]?.name}_fkey`), ); tables.push({ @@ -239,7 +245,11 @@ export const mysql: IntrospectionProvider = { switch (fieldType) { case 'DateTime': - if (/^CURRENT_TIMESTAMP(\(\d*\))?$/i.test(val) || val.toLowerCase() === 'current_timestamp()' || val.toLowerCase() === 'now()') { + if ( + /^CURRENT_TIMESTAMP(\(\d*\))?$/i.test(val) || + val.toLowerCase() === 'current_timestamp()' || + val.toLowerCase() === 'now()' + ) { return (ab) => ab.InvocationExpr.setFunction(getFunctionRef('now', services)); } // Fallback to string literal for other DateTime defaults @@ -259,7 +269,8 @@ export const mysql: IntrospectionProvider = { return normalizeDecimalDefault(val); case 'Boolean': - return (ab) => ab.BooleanLiteral.setValue(val.toLowerCase() === 'true' || val === '1' || val === "b'1'"); + return (ab) => + ab.BooleanLiteral.setValue(val.toLowerCase() === 'true' || val === '1' || val === "b'1'"); case 'String': if (val.toLowerCase() === 'uuid()') { @@ -280,7 +291,9 @@ export const mysql: IntrospectionProvider = { ); } - console.warn(`Unsupported default value type: "${defaultValue}" for field type "${fieldType}". Skipping default value.`); + console.warn( + `Unsupported default value type: "${defaultValue}" for field type "${fieldType}". Skipping default value.`, + ); return null; }, @@ -288,7 +301,10 @@ export const mysql: IntrospectionProvider = { const factories: DataFieldAttributeFactory[] = []; // Add @updatedAt for DateTime fields named updatedAt or updated_at - if (fieldType === 'DateTime' && (fieldName.toLowerCase() === 'updatedat' || fieldName.toLowerCase() === 'updated_at')) { + if ( + fieldType === 'DateTime' && + (fieldName.toLowerCase() === 'updatedat' || fieldName.toLowerCase() === 'updated_at') + ) { factories.push(new DataFieldAttributeFactory().setDecl(getAttributeRef('@updatedAt', services))); } @@ -303,8 +319,7 @@ export const mysql: IntrospectionProvider = { dbAttr && defaultDatabaseType && (defaultDatabaseType.type !== datatype || - (defaultDatabaseType.precision && - defaultDatabaseType.precision !== (length ?? precision))) + (defaultDatabaseType.precision && defaultDatabaseType.precision !== (length ?? precision))) ) { const dbAttrFactory = new DataFieldAttributeFactory().setDecl(dbAttr); const sizeValue = length ?? precision; diff --git a/packages/cli/src/actions/pull/provider/provider.ts b/packages/cli/src/actions/pull/provider/provider.ts index 7b3127132..ae8325d4c 100644 --- a/packages/cli/src/actions/pull/provider/provider.ts +++ b/packages/cli/src/actions/pull/provider/provider.ts @@ -61,7 +61,10 @@ export type IntrospectedSchema = { export type DatabaseFeature = 'Schema' | 'NativeEnum'; export interface IntrospectionProvider { - introspect(connectionString: string, options: { schemas: string[]; modelCasing: 'pascal' | 'camel' | 'snake' | 'none' }): Promise; + introspect( + connectionString: string, + options: { schemas: string[]; modelCasing: 'pascal' | 'camel' | 'snake' | 'none' }, + ): Promise; getBuiltinType(type: string): { type: BuiltinType | 'Unsupported'; isArray: boolean; diff --git a/packages/cli/src/actions/pull/provider/sqlite.ts b/packages/cli/src/actions/pull/provider/sqlite.ts index 435da9766..3308b72df 100644 --- a/packages/cli/src/actions/pull/provider/sqlite.ts +++ b/packages/cli/src/actions/pull/provider/sqlite.ts @@ -21,7 +21,11 @@ export const sqlite: IntrospectionProvider = { }, getBuiltinType(type) { // Strip parenthesized constraints (e.g., VARCHAR(255) → varchar, DECIMAL(10,2) → decimal) - const t = (type || '').toLowerCase().trim().replace(/\(.*\)$/, '').trim(); + const t = (type || '') + .toLowerCase() + .trim() + .replace(/\(.*\)$/, '') + .trim(); // SQLite has no array types const isArray = false; @@ -122,7 +126,10 @@ export const sqlite: IntrospectionProvider = { return undefined; }, - async introspect(connectionString: string, _options: { schemas: string[]; modelCasing: 'pascal' | 'camel' | 'snake' | 'none' }): Promise { + async introspect( + connectionString: string, + _options: { schemas: string[]; modelCasing: 'pascal' | 'camel' | 'snake' | 'none' }, + ): Promise { const SQLite = (await import('better-sqlite3')).default; const db = new SQLite(connectionString, { readonly: true }); @@ -256,7 +263,9 @@ export const sqlite: IntrospectionProvider = { if (constraintName && columnList) { // Split the column list on commas and strip quotes/whitespace // to extract each individual column name. - const columns = columnList.split(',').map((col) => col.trim().replace(/^["'`]|["'`]$/g, '')); + const columns = columnList + .split(',') + .map((col) => col.trim().replace(/^["'`]|["'`]$/g, '')); for (const col of columns) { if (col) { fkConstraintNames.set(col, constraintName); @@ -358,7 +367,8 @@ export const sqlite: IntrospectionProvider = { } }, - getDefaultValue({ defaultValue, fieldType, services, enums }) { // datatype and datatype_name not used for SQLite + getDefaultValue({ defaultValue, fieldType, services, enums }) { + // datatype and datatype_name not used for SQLite const val = defaultValue.trim(); switch (fieldType) { @@ -401,7 +411,9 @@ export const sqlite: IntrospectionProvider = { return (ab) => ab.StringLiteral.setValue(val); } - console.warn(`Unsupported default value type: "${defaultValue}" for field type "${fieldType}". Skipping default value.`); + console.warn( + `Unsupported default value type: "${defaultValue}" for field type "${fieldType}". Skipping default value.`, + ); return null; }, @@ -409,7 +421,10 @@ export const sqlite: IntrospectionProvider = { const factories: DataFieldAttributeFactory[] = []; // Add @updatedAt for DateTime fields named updatedAt or updated_at - if (fieldType === 'DateTime' && (fieldName.toLowerCase() === 'updatedat' || fieldName.toLowerCase() === 'updated_at')) { + if ( + fieldType === 'DateTime' && + (fieldName.toLowerCase() === 'updatedat' || fieldName.toLowerCase() === 'updated_at') + ) { factories.push(new DataFieldAttributeFactory().setDecl(getAttributeRef('@updatedAt', services))); } diff --git a/packages/cli/src/actions/pull/utils.ts b/packages/cli/src/actions/pull/utils.ts index 04e565e31..ab4225515 100644 --- a/packages/cli/src/actions/pull/utils.ts +++ b/packages/cli/src/actions/pull/utils.ts @@ -71,14 +71,9 @@ export function getDatasource(model: Model) { const schemasField = datasource.fields.find((f) => f.name === 'schemas'); const schemas = - (schemasField && - getLiteralArray(schemasField.value) - ?.filter((s) => s !== undefined)) as string[] || - []; - - const provider = getStringLiteral( - datasource.fields.find((f) => f.name === 'provider')?.value, - ); + ((schemasField && getLiteralArray(schemasField.value)?.filter((s) => s !== undefined)) as string[]) || []; + + const provider = getStringLiteral(datasource.fields.find((f) => f.name === 'provider')?.value); if (!provider) { throw new CliError(`Datasource "${datasource.name}" is missing a "provider" field.`); } diff --git a/packages/cli/test/ts-schema-gen.test.ts b/packages/cli/test/ts-schema-gen.test.ts index 0bf7af48c..38a0e5cc6 100644 --- a/packages/cli/test/ts-schema-gen.test.ts +++ b/packages/cli/test/ts-schema-gen.test.ts @@ -491,7 +491,7 @@ model Post { expect(schema).toMatchObject({ provider: { - type: 'sqlite' + type: 'sqlite', }, models: { User: { @@ -503,7 +503,7 @@ model Post { id: true, attributes: [ { - name: '@id' + name: '@id', }, { name: '@default', @@ -512,20 +512,20 @@ model Post { name: 'value', value: { kind: 'call', - function: 'uuid' - } - } - ] - } + function: 'uuid', + }, + }, + ], + }, ], default: { kind: 'call', - function: 'uuid' - } + function: 'uuid', + }, }, name: { name: 'name', - type: 'String' + type: 'String', }, email: { name: 'email', @@ -533,9 +533,9 @@ model Post { unique: true, attributes: [ { - name: '@unique' - } - ] + name: '@unique', + }, + ], }, createdAt: { name: 'createdAt', @@ -548,24 +548,22 @@ model Post { name: 'value', value: { kind: 'call', - function: 'now' - } - } - ] - } + function: 'now', + }, + }, + ], + }, ], default: { kind: 'call', - function: 'now' - } + function: 'now', + }, }, updatedAt: { name: 'updatedAt', type: 'DateTime', updatedAt: { - ignore: [ - 'email' - ] + ignore: ['email'], }, attributes: [ { @@ -578,23 +576,23 @@ model Post { items: [ { kind: 'field', - field: 'email' - } - ] - } - } - ] - } - ] + field: 'email', + }, + ], + }, + }, + ], + }, + ], }, posts: { name: 'posts', type: 'Post', array: true, relation: { - opposite: 'author' - } - } + opposite: 'author', + }, + }, }, attributes: [ { @@ -604,23 +602,21 @@ model Post { name: 'name', value: { kind: 'literal', - value: 'users' - } - } - ] - } - ], - idFields: [ - 'id' + value: 'users', + }, + }, + ], + }, ], + idFields: ['id'], uniqueFields: { id: { - type: 'String' + type: 'String', }, email: { - type: 'String' - } - } + type: 'String', + }, + }, }, Post: { name: 'Post', @@ -631,7 +627,7 @@ model Post { id: true, attributes: [ { - name: '@id' + name: '@id', }, { name: '@default', @@ -640,20 +636,20 @@ model Post { name: 'value', value: { kind: 'call', - function: 'cuid' - } - } - ] - } + function: 'cuid', + }, + }, + ], + }, ], default: { kind: 'call', - function: 'cuid' - } + function: 'cuid', + }, }, title: { name: 'title', - type: 'String' + type: 'String', }, published: { name: 'published', @@ -666,13 +662,13 @@ model Post { name: 'value', value: { kind: 'literal', - value: false - } - } - ] - } + value: false, + }, + }, + ], + }, ], - default: false + default: false, }, author: { name: 'author', @@ -688,10 +684,10 @@ model Post { items: [ { kind: 'field', - field: 'authorId' - } - ] - } + field: 'authorId', + }, + ], + }, }, { name: 'references', @@ -700,52 +696,44 @@ model Post { items: [ { kind: 'field', - field: 'id' - } - ] - } + field: 'id', + }, + ], + }, }, { name: 'onDelete', value: { kind: 'literal', - value: 'Cascade' - } - } - ] - } + value: 'Cascade', + }, + }, + ], + }, ], relation: { opposite: 'posts', - fields: [ - 'authorId' - ], - references: [ - 'id' - ], - onDelete: 'Cascade' - } + fields: ['authorId'], + references: ['id'], + onDelete: 'Cascade', + }, }, authorId: { name: 'authorId', type: 'String', - foreignKeyFor: [ - 'author' - ] - } + foreignKeyFor: ['author'], + }, }, - idFields: [ - 'id' - ], + idFields: ['id'], uniqueFields: { id: { - type: 'String' - } - } - } + type: 'String', + }, + }, + }, }, authType: 'User', - plugins: {} + plugins: {}, }); - }) + }); }); diff --git a/packages/clients/client-helpers/src/transaction.ts b/packages/clients/client-helpers/src/transaction.ts index dfbd69e6d..6f6ac436b 100644 --- a/packages/clients/client-helpers/src/transaction.ts +++ b/packages/clients/client-helpers/src/transaction.ts @@ -67,4 +67,3 @@ export type TransactionResults< : never : never; }; - diff --git a/packages/clients/client-helpers/test/mutator.test.ts b/packages/clients/client-helpers/test/mutator.test.ts index f5006e46a..5c1531751 100644 --- a/packages/clients/client-helpers/test/mutator.test.ts +++ b/packages/clients/client-helpers/test/mutator.test.ts @@ -1242,7 +1242,16 @@ describe('applyMutation', () => { const logger = vi.fn() as Logger; const queryData = { id: '1', name: 'John' }; - await applyMutation('User', 'findUnique', queryData, 'User', 'delete', { where: { id: '1' } }, schema, logger); + await applyMutation( + 'User', + 'findUnique', + queryData, + 'User', + 'delete', + { where: { id: '1' } }, + schema, + logger, + ); expect(logger).toHaveBeenCalledWith(expect.stringContaining('Applying optimistic delete')); }); diff --git a/packages/clients/fetch-client/test/schemas/basic/schema-lite.ts b/packages/clients/fetch-client/test/schemas/basic/schema-lite.ts index 39cbdc765..9c6a36748 100644 --- a/packages/clients/fetch-client/test/schemas/basic/schema-lite.ts +++ b/packages/clients/fetch-client/test/schemas/basic/schema-lite.ts @@ -5,91 +5,89 @@ /* eslint-disable */ -import { type SchemaDef, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, email: { - name: "email", - type: "String", - unique: true + name: 'email', + type: 'String', + unique: true, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, author: { - name: "author", - type: "User", + name: 'author', + type: 'User', optional: true, - relation: { opposite: "posts", fields: ["authorId"], references: ["id"] } + relation: { opposite: 'posts', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "String", + name: 'authorId', + type: 'String', optional: true, - foreignKeyFor: [ - "author" - ] as readonly string[] - } + foreignKeyFor: ['author'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; procedures = { getStats: { params: {}, - returnType: "Int" + returnType: 'Int', }, sendNotification: { params: { - message: { name: "message", type: "String" } + message: { name: 'message', type: 'String' }, }, - returnType: "Boolean", - mutation: true - } + returnType: 'Boolean', + mutation: true, + }, } as const; plugins = {}; } diff --git a/packages/clients/fetch-client/test/schemas/no-procs/schema-lite.ts b/packages/clients/fetch-client/test/schemas/no-procs/schema-lite.ts index 6c42484a0..459cee042 100644 --- a/packages/clients/fetch-client/test/schemas/no-procs/schema-lite.ts +++ b/packages/clients/fetch-client/test/schemas/no-procs/schema-lite.ts @@ -5,27 +5,27 @@ /* eslint-disable */ -import { type SchemaDef, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { Item: { - name: "Item", + name: 'Item', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault - } + default: ExpressionUtils.call('cuid') as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; plugins = {}; } diff --git a/packages/clients/fetch-client/test/typing.test-d.ts b/packages/clients/fetch-client/test/typing.test-d.ts index 5c143c8d3..882bc0908 100644 --- a/packages/clients/fetch-client/test/typing.test-d.ts +++ b/packages/clients/fetch-client/test/typing.test-d.ts @@ -188,9 +188,9 @@ describe('Extended result fields (ExtResult)', () => { it('adds the computed field to read results', () => { const client = createClient(schema, { endpoint: ENDPOINT }); - expectTypeOf(client.user.findUnique({ where: { id: '1' } })).resolves.toMatchTypeOf< - { displayName: string } | null - >(); + expectTypeOf(client.user.findUnique({ where: { id: '1' } })).resolves.toMatchTypeOf<{ + displayName: string; + } | null>(); expectTypeOf(client.user.findMany()).resolves.toMatchTypeOf>(); }); diff --git a/packages/clients/tanstack-query/src/vue.ts b/packages/clients/tanstack-query/src/vue.ts index 674bcbe87..c037d02a2 100644 --- a/packages/clients/tanstack-query/src/vue.ts +++ b/packages/clients/tanstack-query/src/vue.ts @@ -323,7 +323,10 @@ export type ModelQueryHooks< >, ): ModelQueryResult[]>; - useInfiniteFindMany, TPageParam = unknown>( + useInfiniteFindMany< + T extends FindManyArgs, + TPageParam = unknown, + >( args?: MaybeRefOrGetter>>, options?: MaybeRefOrGetter< ModelInfiniteQueryOptions[], TPageParam> diff --git a/packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts b/packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts index 4ea2da51e..2237da7ea 100644 --- a/packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts +++ b/packages/clients/tanstack-query/test/schemas/basic/schema-lite.ts @@ -5,168 +5,164 @@ /* eslint-disable */ -import { type SchemaDef, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, email: { - name: "email", - type: "String", - unique: true + name: 'email', + type: 'String', + unique: true, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "owner" } - } + relation: { opposite: 'owner' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, owner: { - name: "owner", - type: "User", + name: 'owner', + type: 'User', optional: true, - relation: { opposite: "posts", fields: ["ownerId"], references: ["id"] } + relation: { opposite: 'posts', fields: ['ownerId'], references: ['id'] }, }, ownerId: { - name: "ownerId", - type: "String", + name: 'ownerId', + type: 'String', optional: true, - foreignKeyFor: [ - "owner" - ] as readonly string[] + foreignKeyFor: ['owner'] as readonly string[], }, category: { - name: "category", - type: "Category", + name: 'category', + type: 'Category', optional: true, - relation: { opposite: "posts", fields: ["categoryId"], references: ["id"] } + relation: { opposite: 'posts', fields: ['categoryId'], references: ['id'] }, }, categoryId: { - name: "categoryId", - type: "String", + name: 'categoryId', + type: 'String', optional: true, - foreignKeyFor: [ - "category" - ] as readonly string[] - } + foreignKeyFor: ['category'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Category: { - name: "Category", + name: 'Category', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String", - unique: true + name: 'name', + type: 'String', + unique: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "category" } - } + relation: { opposite: 'category' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - name: { type: "String" } - } + id: { type: 'String' }, + name: { type: 'String' }, + }, }, Foo: { - name: "Foo", + name: 'Foo', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, type: { - name: "type", - type: "String", - isDiscriminator: true - } + name: 'type', + type: 'String', + isDiscriminator: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } + id: { type: 'String' }, }, isDelegate: true, - subModels: ["Bar"] + subModels: ['Bar'], }, Bar: { - name: "Bar", - baseModel: "Foo", + name: 'Bar', + baseModel: 'Foo', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, type: { - name: "type", - type: "String", - originModel: "Foo", - isDiscriminator: true + name: 'type', + type: 'String', + originModel: 'Foo', + isDiscriminator: true, }, title: { - name: "title", - type: "String" - } + name: 'title', + type: 'String', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/packages/common-helpers/src/single-debounce.ts b/packages/common-helpers/src/single-debounce.ts index f16091e5c..b8a4b2b07 100644 --- a/packages/common-helpers/src/single-debounce.ts +++ b/packages/common-helpers/src/single-debounce.ts @@ -1,4 +1,8 @@ -export function singleDebounce(cb: () => void | PromiseLike, debounceMc: number, reRunOnInProgressCall: boolean = false) { +export function singleDebounce( + cb: () => void | PromiseLike, + debounceMc: number, + reRunOnInProgressCall: boolean = false, +) { let timeout: ReturnType | undefined; let inProgress = false; let pendingInProgress = false; @@ -30,5 +34,5 @@ export function singleDebounce(cb: () => void | PromiseLike, debounceMc: n clearTimeout(timeout); timeout = setTimeout(run, debounceMc); - } + }; } diff --git a/packages/common-helpers/test/enumerable.test.ts b/packages/common-helpers/test/enumerable.test.ts index fbe61f8b1..5044dae8a 100644 --- a/packages/common-helpers/test/enumerable.test.ts +++ b/packages/common-helpers/test/enumerable.test.ts @@ -35,9 +35,15 @@ describe('enumerate tests', () => { }); it('should handle nested arrays', () => { - const arr = [[1, 2], [3, 4]]; + const arr = [ + [1, 2], + [3, 4], + ]; expect(enumerate(arr)).toBe(arr); - expect(enumerate(arr)).toEqual([[1, 2], [3, 4]]); + expect(enumerate(arr)).toEqual([ + [1, 2], + [3, 4], + ]); }); it('should handle functions', () => { diff --git a/packages/common-helpers/test/zip.test.ts b/packages/common-helpers/test/zip.test.ts index 4fe8e9b3c..e84bee85d 100644 --- a/packages/common-helpers/test/zip.test.ts +++ b/packages/common-helpers/test/zip.test.ts @@ -60,11 +60,23 @@ describe('zip tests', () => { }); it('should handle nested arrays', () => { - const arr1 = [[1, 2], [3, 4]]; - const arr2 = [['a', 'b'], ['c', 'd']]; + const arr1 = [ + [1, 2], + [3, 4], + ]; + const arr2 = [ + ['a', 'b'], + ['c', 'd'], + ]; expect(zip(arr1, arr2)).toEqual([ - [[1, 2], ['a', 'b']], - [[3, 4], ['c', 'd']], + [ + [1, 2], + ['a', 'b'], + ], + [ + [3, 4], + ['c', 'd'], + ], ]); }); diff --git a/packages/language/src/document.ts b/packages/language/src/document.ts index dc58f93a7..acc667e97 100644 --- a/packages/language/src/document.ts +++ b/packages/language/src/document.ts @@ -261,4 +261,3 @@ export async function formatDocument(content: string) { const edits = await formatter.formatDocument(document, { options, textDocument: identifier }); return TextDocument.applyEdits(document.textDocument, edits); } - diff --git a/packages/language/src/validator.ts b/packages/language/src/validator.ts index 8663e90f0..03a37fe70 100644 --- a/packages/language/src/validator.ts +++ b/packages/language/src/validator.ts @@ -97,4 +97,3 @@ export class ZModelValidator { new ProcedureValidator().validate(node, accept); } } - diff --git a/packages/language/src/validators/common.ts b/packages/language/src/validators/common.ts index 01aad460d..b39bcea9d 100644 --- a/packages/language/src/validators/common.ts +++ b/packages/language/src/validators/common.ts @@ -19,12 +19,15 @@ export function validateDuplicatedDeclarations( decls: Array, accept: ValidationAcceptor, ): void { - const groupByName = decls.reduce>>((group, decl) => { - // Use a null-prototype map to avoid issues with names like "__proto__"/"constructor". - group[decl.name] = group[decl.name] ?? []; - group[decl.name]!.push(decl); - return group; - }, Object.create(null) as Record>); + const groupByName = decls.reduce>>( + (group, decl) => { + // Use a null-prototype map to avoid issues with names like "__proto__"/"constructor". + group[decl.name] = group[decl.name] ?? []; + group[decl.name]!.push(decl); + return group; + }, + Object.create(null) as Record>, + ); for (const [name, decls] of Object.entries(groupByName)) { if (decls.length > 1) { diff --git a/packages/language/src/validators/datamodel-validator.ts b/packages/language/src/validators/datamodel-validator.ts index c7963bf3c..577599390 100644 --- a/packages/language/src/validators/datamodel-validator.ts +++ b/packages/language/src/validators/datamodel-validator.ts @@ -609,7 +609,8 @@ export default class DataModelValidator implements AstValidator { const delegateAttr = getAttribute(baseModel, '@@delegate'); const discriminatorArg = delegateAttr && getAttributeArg(delegateAttr, 'discriminator'); - const discriminatorRef = discriminatorArg && isReferenceExpr(discriminatorArg) ? discriminatorArg.target.ref : undefined; + const discriminatorRef = + discriminatorArg && isReferenceExpr(discriminatorArg) ? discriminatorArg.target.ref : undefined; if (!discriminatorRef || !isDataField(discriminatorRef)) { return; diff --git a/packages/language/src/validators/datasource-validator.ts b/packages/language/src/validators/datasource-validator.ts index 745d2773c..0eed87322 100644 --- a/packages/language/src/validators/datasource-validator.ts +++ b/packages/language/src/validators/datasource-validator.ts @@ -84,7 +84,8 @@ export default class DataSourceValidator implements AstValidator { // if no explicit default schema is specified, and there are models or enums without '@@schema', // "public" is implicitly used, so it must be included in the "schemas" array const hasImplicitPublicSchema = ds.$container.declarations.some( - (d) => (isDataModel(d) || isEnum(d)) && !d.attributes.some((a) => a.decl.$refText === '@@schema'), + (d) => + (isDataModel(d) || isEnum(d)) && !d.attributes.some((a) => a.decl.$refText === '@@schema'), ); if (hasImplicitPublicSchema && !schemasArray.includes('public')) { accept('error', `"public" must be included in the "schemas" array`, { diff --git a/packages/language/src/validators/procedure-validator.ts b/packages/language/src/validators/procedure-validator.ts index b35a5b264..90c1b260d 100644 --- a/packages/language/src/validators/procedure-validator.ts +++ b/packages/language/src/validators/procedure-validator.ts @@ -3,11 +3,7 @@ import type { Procedure } from '../generated/ast'; import { validateAttributeApplication } from './attribute-application-validator'; import type { AstValidator } from './common'; -const RESERVED_PROCEDURE_NAMES = new Set([ - '__proto__', - 'prototype', - 'constructor', -]); +const RESERVED_PROCEDURE_NAMES = new Set(['__proto__', 'prototype', 'constructor']); /** * Validates procedure declarations. diff --git a/packages/orm/src/client/crud-types.ts b/packages/orm/src/client/crud-types.ts index 6ee33d99e..15ffae83a 100644 --- a/packages/orm/src/client/crud-types.ts +++ b/packages/orm/src/client/crud-types.ts @@ -1183,9 +1183,7 @@ export type FieldHasComputedArgs< * referenced by name, with no slot to carry `args` (groupBy `by`, `distinct`). */ export type NonParamComputedNonRelationFields> = keyof { - [Key in NonRelationFields as FieldHasComputedArgs extends true - ? never - : Key]: 0; + [Key in NonRelationFields as FieldHasComputedArgs extends true ? never : Key]: 0; }; export type OrderBy< @@ -2405,8 +2403,7 @@ type MinMaxInput, Valu ? never : FieldIsRelation extends true ? never - : Key]?: // a parameterized computed field is aggregated by supplying its query-time `args` - FieldHasComputedArgs extends true + : Key]?: FieldHasComputedArgs extends true // a parameterized computed field is aggregated by supplying its query-time `args` ? { args: ComputedFieldArgs } : ValueType; }; @@ -2476,12 +2473,15 @@ type GroupByHaving< // `args` (a plain field name can't carry args). The map is keyed by the parameterized computed // fields; indexing it yields the union of `{ field, args }` entries (or `never` when there are none). type ParamComputedByEntryMap> = { - [Key in NonRelationFields as FieldHasComputedArgs extends true - ? Key - : never]: { field: Key; args: ComputedFieldArgs }; + [Key in NonRelationFields as FieldHasComputedArgs extends true ? Key : never]: { + field: Key; + args: ComputedFieldArgs; + }; }; -type GroupByComputedByEntry> = - ParamComputedByEntryMap[keyof ParamComputedByEntryMap]; +type GroupByComputedByEntry> = ParamComputedByEntryMap< + Schema, + Model +>[keyof ParamComputedByEntryMap]; // Extracts the grouped field name from a `by` entry (a plain name or a `{ field, args }` object). type ByFieldName = By extends { field: infer F } ? F : By; @@ -2508,9 +2508,7 @@ export type GroupByArgs< by: | NonParamComputedNonRelationFields | GroupByComputedByEntry - | NonEmptyArray< - NonParamComputedNonRelationFields | GroupByComputedByEntry - >; + | NonEmptyArray | GroupByComputedByEntry>; /** * Filter conditions for the grouped records diff --git a/packages/orm/src/client/crud/dialects/base-dialect.ts b/packages/orm/src/client/crud/dialects/base-dialect.ts index 38126cd7d..5ae4c13eb 100644 --- a/packages/orm/src/client/crud/dialects/base-dialect.ts +++ b/packages/orm/src/client/crud/dialects/base-dialect.ts @@ -240,7 +240,13 @@ export abstract class BaseCrudDialect { // operators; pull them out so they reach the implementation, and filter on the rest let computedArgs: unknown; let filterPayload = payload; - if (fieldDef.computed && fieldDef.params && payload && typeof payload === 'object' && 'args' in payload) { + if ( + fieldDef.computed && + fieldDef.params && + payload && + typeof payload === 'object' && + 'args' in payload + ) { computedArgs = (payload as any).args; const { args: _args, ...rest } = payload as any; filterPayload = rest; diff --git a/packages/orm/src/client/crud/dialects/lateral-join-dialect-base.ts b/packages/orm/src/client/crud/dialects/lateral-join-dialect-base.ts index efe0ae3fc..c6d59c1d4 100644 --- a/packages/orm/src/client/crud/dialects/lateral-join-dialect-base.ts +++ b/packages/orm/src/client/crud/dialects/lateral-join-dialect-base.ts @@ -322,7 +322,13 @@ export abstract class LateralJoinDialectBase extends B if (fieldDef.computed && fieldDef.params) { // parameterized computed field included on the relation: inline with args return { - [field]: this.fieldRef(relationModel, field, relationModelAlias, true, (value as any).args), + [field]: this.fieldRef( + relationModel, + field, + relationModelAlias, + true, + (value as any).args, + ), }; } return { [field]: eb.ref(`${parentResultName}$${field}.$data`) }; diff --git a/packages/orm/src/client/crud/dialects/postgresql.ts b/packages/orm/src/client/crud/dialects/postgresql.ts index 25345ada0..67887729d 100644 --- a/packages/orm/src/client/crud/dialects/postgresql.ts +++ b/packages/orm/src/client/crud/dialects/postgresql.ts @@ -734,9 +734,7 @@ export class PostgresCrudDialect extends LateralJoinDi // Multi-field uses a single ts_rank over the combined document (matches // Prisma; ensures AND queries match terms spread across fields). const document = - fieldRefs.length === 1 - ? sql`coalesce(${fieldRefs[0]!}, '')` - : sql`concat_ws(' ', ${sql.join(fieldRefs)})`; + fieldRefs.length === 1 ? sql`coalesce(${fieldRefs[0]!}, '')` : sql`concat_ws(' ', ${sql.join(fieldRefs)})`; if (config === undefined) { // No regconfig — Postgres uses default_text_search_config. diff --git a/packages/orm/src/client/crud/operations/aggregate.ts b/packages/orm/src/client/crud/operations/aggregate.ts index 9eabfa2ca..53e8e3640 100644 --- a/packages/orm/src/client/crud/operations/aggregate.ts +++ b/packages/orm/src/client/crud/operations/aggregate.ts @@ -33,7 +33,8 @@ export class AggregateOperationHandler extends BaseOpe Object.entries(value) .filter(([field]) => field !== '_all') .forEach(([field, val]) => { - const args = val && typeof val === 'object' && 'args' in val ? (val as any).args : undefined; + const args = + val && typeof val === 'object' && 'args' in val ? (val as any).args : undefined; if (val !== true && args === undefined) { return; } diff --git a/packages/orm/src/client/crud/operations/base.ts b/packages/orm/src/client/crud/operations/base.ts index 8e16031e9..2ef4ca043 100644 --- a/packages/orm/src/client/crud/operations/base.ts +++ b/packages/orm/src/client/crud/operations/base.ts @@ -444,7 +444,12 @@ export abstract class BaseOperationHandler { Array.isArray(value.set) ) { // deal with nested "set" for scalar lists - createFields[field] = this.dialect.transformInput(value.set, fieldDef.type as BuiltinType, true, fieldDef); + createFields[field] = this.dialect.transformInput( + value.set, + fieldDef.type as BuiltinType, + true, + fieldDef, + ); } else { createFields[field] = this.dialect.transformInput( value, @@ -893,7 +898,12 @@ export abstract class BaseOperationHandler { for (const [name, value] of Object.entries(item)) { const fieldDef = this.requireField(model, name); invariant(!fieldDef.relation, 'createMany does not support relations'); - newItem[name] = this.dialect.transformInput(value, fieldDef.type as BuiltinType, !!fieldDef.array, fieldDef); + newItem[name] = this.dialect.transformInput( + value, + fieldDef.type as BuiltinType, + !!fieldDef.array, + fieldDef, + ); } if (fromRelation) { for (const { fk, pk } of relationKeyPairs) { @@ -1080,7 +1090,12 @@ export abstract class BaseOperationHandler { value = JSON.parse(value); } } - values[field] = this.dialect.transformInput(value, fieldDef.type as BuiltinType, !!fieldDef.array, fieldDef); + values[field] = this.dialect.transformInput( + value, + fieldDef.type as BuiltinType, + !!fieldDef.array, + fieldDef, + ); } } } diff --git a/packages/orm/src/client/crud/operations/group-by.ts b/packages/orm/src/client/crud/operations/group-by.ts index aef96feee..377519454 100644 --- a/packages/orm/src/client/crud/operations/group-by.ts +++ b/packages/orm/src/client/crud/operations/group-by.ts @@ -71,7 +71,8 @@ export class GroupByOperationHandler extends BaseOpera query = query.select((eb) => this.dialect.castInt(eb.fn.countAll()).as('_count')); } else { Object.entries(value).forEach(([field, val]) => { - const args = val && typeof val === 'object' && 'args' in val ? (val as any).args : undefined; + const args = + val && typeof val === 'object' && 'args' in val ? (val as any).args : undefined; if (val === true || args !== undefined) { if (field === '_all') { query = query.select((eb) => @@ -95,7 +96,9 @@ export class GroupByOperationHandler extends BaseOpera Object.entries(value).forEach(([field, val]) => { const args = val && typeof val === 'object' && 'args' in val ? (val as any).args : undefined; if (val === true || args !== undefined) { - query = query.select((eb) => aggregate(eb, fieldRef(field, args), key).as(`${key}.${field}`)); + query = query.select((eb) => + aggregate(eb, fieldRef(field, args), key).as(`${key}.${field}`), + ); } }); break; diff --git a/packages/orm/src/client/zod/factory.ts b/packages/orm/src/client/zod/factory.ts index 8da8c66b9..322fa7721 100644 --- a/packages/orm/src/client/zod/factory.ts +++ b/packages/orm/src/client/zod/factory.ts @@ -103,16 +103,19 @@ export function coercedDateTimeSchema(): ZodType { // parses — including non-ISO formats like `"2024/01/15"` for Prisma // compatibility (rejected with the standard error if `new Date(...)` // returns Invalid Date). - return z.preprocess((val) => { - if (typeof val !== 'string') return val; - if (/^\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d\d(?::\d\d)?)?$/.test(val)) { - const hasTz = val.endsWith('Z') || /[+-]\d\d(?::\d\d)?$/.test(val); - const d = new Date(`1970-01-01T${val}${hasTz ? '' : 'Z'}`); + return z.preprocess( + (val) => { + if (typeof val !== 'string') return val; + if (/^\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d\d(?::\d\d)?)?$/.test(val)) { + const hasTz = val.endsWith('Z') || /[+-]\d\d(?::\d\d)?$/.test(val); + const d = new Date(`1970-01-01T${val}${hasTz ? '' : 'Z'}`); + return isNaN(d.getTime()) ? val : d; + } + const d = new Date(val); return isNaN(d.getTime()) ? val : d; - } - const d = new Date(val); - return isNaN(d.getTime()) ? val : d; - }, z.union([z.iso.datetime(), z.iso.date(), z.date()])); + }, + z.union([z.iso.datetime(), z.iso.date(), z.date()]), + ); } /** diff --git a/packages/plugins/soft-delete/README.md b/packages/plugins/soft-delete/README.md index ebd094ab5..bececf9b6 100644 --- a/packages/plugins/soft-delete/README.md +++ b/packages/plugins/soft-delete/README.md @@ -71,7 +71,7 @@ await db.user.findUnique({ where: { id: user.id } }); ## Caveats -- **Soft deletes do not cascade.** Children of a soft-deleted parent are left untouched — managing them is up to you. (Note that a *hard* delete on a model without `@deletedAt` still triggers database-level `onDelete: Cascade` as usual.) +- **Soft deletes do not cascade.** Children of a soft-deleted parent are left untouched — managing them is up to you. (Note that a _hard_ delete on a model without `@deletedAt` still triggers database-level `onDelete: Cascade` as usual.) - **Multi-table / joined deletes can't be rewritten.** A joined or multi-table `DELETE` that targets a soft-delete model is rejected rather than silently hard-deleting rows. Use a single-table delete instead. - **Unique constraints and tombstones.** Because soft-deleted rows physically remain, a plain `@unique` field will reject reusing a value held by a tombstone. The common mitigation is a partial unique index scoped to live rows (e.g. `... WHERE "deletedAt" IS NULL` on PostgreSQL/SQLite, or a functional index over a `CASE` expression on MySQL). diff --git a/packages/sdk/src/prisma/prisma-schema-generator.ts b/packages/sdk/src/prisma/prisma-schema-generator.ts index 0eefb28c8..8034900ad 100644 --- a/packages/sdk/src/prisma/prisma-schema-generator.ts +++ b/packages/sdk/src/prisma/prisma-schema-generator.ts @@ -396,19 +396,25 @@ export class PrismaSchemaGenerator { node.function.ref!.name, // strip format args from id functions - node.args.filter((_, i) => ( - !(ID_FUNCTIONS.includes(node.function.ref!.name) && (node.function.ref!.name === 'ulid' && i === 0 || i === 1)) - )).map((arg) => { - const val = match(arg.value) - .when(isStringLiteral, (v) => `"${v.value}"`) - .when(isLiteralExpr, (v) => v.value.toString()) - .when(isNullExpr, () => 'null') - .otherwise(() => { - throw new Error('Function call argument must be literal or null'); - }); - - return new PrismaFunctionCallArg(val); - }), + node.args + .filter( + (_, i) => + !( + ID_FUNCTIONS.includes(node.function.ref!.name) && + ((node.function.ref!.name === 'ulid' && i === 0) || i === 1) + ), + ) + .map((arg) => { + const val = match(arg.value) + .when(isStringLiteral, (v) => `"${v.value}"`) + .when(isLiteralExpr, (v) => v.value.toString()) + .when(isNullExpr, () => 'null') + .otherwise(() => { + throw new Error('Function call argument must be literal or null'); + }); + + return new PrismaFunctionCallArg(val); + }), ); } diff --git a/packages/sdk/src/tsconfig-utils.ts b/packages/sdk/src/tsconfig-utils.ts index c294114c3..a8b66c280 100644 --- a/packages/sdk/src/tsconfig-utils.ts +++ b/packages/sdk/src/tsconfig-utils.ts @@ -43,10 +43,7 @@ export function detectImportFileExtension(fromDir: string): string | undefined { } // node16/nodenext resolution requires explicit extensions on relative imports - if ( - moduleResolution === ts.ModuleResolutionKind.Node16 || - moduleResolution === ts.ModuleResolutionKind.NodeNext - ) { + if (moduleResolution === ts.ModuleResolutionKind.Node16 || moduleResolution === ts.ModuleResolutionKind.NodeNext) { return '.js'; } diff --git a/packages/server/src/api/common/spec-utils.ts b/packages/server/src/api/common/spec-utils.ts index f0f7ec38c..7713ce833 100644 --- a/packages/server/src/api/common/spec-utils.ts +++ b/packages/server/src/api/common/spec-utils.ts @@ -108,9 +108,7 @@ export function isFilterKindIncluded( export function mayDenyAccess(modelDef: ModelDef, operation: string, respectAccessPolicies?: boolean): boolean { if (!respectAccessPolicies) return false; - const policyAttrs = (modelDef.attributes ?? []).filter( - (attr) => attr.name === '@@allow' || attr.name === '@@deny', - ); + const policyAttrs = (modelDef.attributes ?? []).filter((attr) => attr.name === '@@allow' || attr.name === '@@deny'); // No policy rules at all means default-deny if (policyAttrs.length === 0) return true; diff --git a/packages/server/src/api/common/utils.ts b/packages/server/src/api/common/utils.ts index ff42a3f93..c2a0cf3fd 100644 --- a/packages/server/src/api/common/utils.ts +++ b/packages/server/src/api/common/utils.ts @@ -4,7 +4,9 @@ import SuperJSON from 'superjson'; * Supports the SuperJSON request payload format used by api handlers * `{ meta: { serialization }, ...json }`. */ -export async function processSuperJsonRequestPayload(payload: unknown) : Promise<{ result: unknown; error: string | undefined; }> { +export async function processSuperJsonRequestPayload( + payload: unknown, +): Promise<{ result: unknown; error: string | undefined }> { if (!payload || typeof payload !== 'object' || Array.isArray(payload) || !('meta' in (payload as any))) { return { result: payload, error: undefined }; } @@ -53,4 +55,4 @@ export function unmarshalQ(value: string, meta: string | undefined) { } return parsedValue; -} \ No newline at end of file +} diff --git a/packages/server/src/api/rest/index.ts b/packages/server/src/api/rest/index.ts index cd8d0f66a..24b2541b5 100644 --- a/packages/server/src/api/rest/index.ts +++ b/packages/server/src/api/rest/index.ts @@ -484,7 +484,11 @@ export class RestApiHandler implements Api // /:type/:id/:relationship/:childId — nested single read match = this.matchUrlPattern(path, UrlPatterns.NESTED_SINGLE); - if (match && this.nestedRoutes && this.resolveNestedRelation(match.type, match.relationship)?.isCollection) { + if ( + match && + this.nestedRoutes && + this.resolveNestedRelation(match.type, match.relationship)?.isCollection + ) { return await this.processNestedSingleRead( client, match.type, @@ -509,7 +513,11 @@ export class RestApiHandler implements Api } // /:type/:id/:relationship — nested create const nestedMatch = this.matchUrlPattern(path, UrlPatterns.FETCH_RELATIONSHIP); - if (nestedMatch && this.nestedRoutes && this.resolveNestedRelation(nestedMatch.type, nestedMatch.relationship)?.isCollection) { + if ( + nestedMatch && + this.nestedRoutes && + this.resolveNestedRelation(nestedMatch.type, nestedMatch.relationship)?.isCollection + ) { return await this.processNestedCreate( client, nestedMatch.type, @@ -1264,11 +1272,15 @@ export class RestApiHandler implements Api // Reject attempts to change the parent relation via the nested endpoint if (relationships && Object.prototype.hasOwnProperty.call(relationships, rev)) { - return { error: this.makeError('invalidPayload', `Relation "${rev}" cannot be changed via a nested route`) }; + return { + error: this.makeError('invalidPayload', `Relation "${rev}" cannot be changed via a nested route`), + }; } const fkFields = Object.values(typeInfo!.fields).filter((f) => f.foreignKeyFor?.includes(rev)); if (fkFields.some((f) => Object.prototype.hasOwnProperty.call(updateData, f.name))) { - return { error: this.makeError('invalidPayload', `Relation "${rev}" cannot be changed via a nested route`) }; + return { + error: this.makeError('invalidPayload', `Relation "${rev}" cannot be changed via a nested route`), + }; } // Turn relationship payload into connect/set objects @@ -1323,14 +1335,23 @@ export class RestApiHandler implements Api const childType = resolved.childType; const typeInfo = this.getModelInfo(childType)!; - const { updateData, error } = this.buildNestedUpdatePayload(childType, typeInfo, resolved.reverseRelation, requestBody); + const { updateData, error } = this.buildNestedUpdatePayload( + childType, + typeInfo, + resolved.reverseRelation, + requestBody, + ); if (error) return error; if (childId) { // to-many: ORM requires a where filter to identify the child within the collection await (client as any)[parentType].update({ where: this.makeIdFilter(parentInfo.idFields, parentId), - data: { [parentRelation]: { update: { where: this.makeIdFilter(typeInfo.idFields, childId), data: updateData } } }, + data: { + [parentRelation]: { + update: { where: this.makeIdFilter(typeInfo.idFields, childId), data: updateData }, + }, + }, }); const fetchArgs: any = { where: this.makeIdFilter(typeInfo.idFields, childId) }; this.includeRelationshipIds(childType, fetchArgs, 'include'); @@ -1338,7 +1359,12 @@ export class RestApiHandler implements Api if (!entity) return this.makeError('notFound'); const linkUrl = this.makeLinkUrl(this.makeNestedLinkUrl(parentType, parentId, parentRelation, childId)); const nestedLinker = new tsjapi.Linker(() => linkUrl); - return { status: 200, body: await this.serializeItems(childType, entity, { linkers: { document: nestedLinker, resource: nestedLinker } }) }; + return { + status: 200, + body: await this.serializeItems(childType, entity, { + linkers: { document: nestedLinker, resource: nestedLinker }, + }), + }; } else { // to-one: no where filter needed; fetch via parent select await (client as any)[parentType].update({ @@ -1356,7 +1382,12 @@ export class RestApiHandler implements Api if (!entity) return this.makeError('notFound'); const linkUrl = this.makeLinkUrl(this.makeNestedLinkUrl(parentType, parentId, parentRelation)); const nestedLinker = new tsjapi.Linker(() => linkUrl); - return { status: 200, body: await this.serializeItems(childType, entity, { linkers: { document: nestedLinker, resource: nestedLinker } }) }; + return { + status: 200, + body: await this.serializeItems(childType, entity, { + linkers: { document: nestedLinker, resource: nestedLinker }, + }), + }; } } diff --git a/packages/server/src/api/rest/openapi.ts b/packages/server/src/api/rest/openapi.ts index d4770e7cf..c16d2801d 100644 --- a/packages/server/src/api/rest/openapi.ts +++ b/packages/server/src/api/rest/openapi.ts @@ -132,12 +132,7 @@ export class RestApiSpecGenerator { if (relIdFields.length === 0) continue; // GET /{model}/{id}/{field} — fetch related (+ nested create/update when nestedRoutes enabled) - paths[`/${modelPath}/{id}/${fieldName}`] = this.buildRelatedPath( - modelName, - fieldName, - fieldDef, - tag, - ); + paths[`/${modelPath}/{id}/${fieldName}`] = this.buildRelatedPath(modelName, fieldName, fieldDef, tag); // Nested single resource path: /{model}/{id}/{field}/{childId} if (this.nestedRoutes && fieldDef.array) { @@ -296,7 +291,9 @@ export class RestApiSpecGenerator { }, }, '400': ERROR_400, - ...(mayDenyAccess(modelDef, 'update', this.specOptions?.respectAccessPolicies) && { '403': ERROR_403 }), + ...(mayDenyAccess(modelDef, 'update', this.specOptions?.respectAccessPolicies) && { + '403': ERROR_403, + }), '404': ERROR_404, '422': ERROR_422, }, @@ -311,7 +308,9 @@ export class RestApiSpecGenerator { parameters: [idParam], responses: { '200': { description: 'Deleted successfully' }, - ...(mayDenyAccess(modelDef, 'delete', this.specOptions?.respectAccessPolicies) && { '403': ERROR_403 }), + ...(mayDenyAccess(modelDef, 'delete', this.specOptions?.respectAccessPolicies) && { + '403': ERROR_403, + }), '404': ERROR_404, }, }; @@ -362,7 +361,11 @@ export class RestApiSpecGenerator { }; if (this.nestedRoutes && relModelDef) { - const mayDeny = mayDenyAccess(relModelDef, isCollection ? 'create' : 'update', this.specOptions?.respectAccessPolicies); + const mayDeny = mayDenyAccess( + relModelDef, + isCollection ? 'create' : 'update', + this.specOptions?.respectAccessPolicies, + ); if (isCollection && isOperationIncluded(fieldDef.type, 'create', this.queryOptions)) { // POST /{model}/{id}/{field} — nested create pathItem['post'] = { @@ -1206,5 +1209,4 @@ export class RestApiSpecGenerator { private getIdFields(modelDef: ModelDef): FieldDef[] { return modelDef.idFields.map((name) => modelDef.fields[name]).filter((f): f is FieldDef => f !== undefined); } - } diff --git a/packages/server/test/api/procedures.e2e.test.ts b/packages/server/test/api/procedures.e2e.test.ts index 60c6f06b9..7a14307fa 100644 --- a/packages/server/test/api/procedures.e2e.test.ts +++ b/packages/server/test/api/procedures.e2e.test.ts @@ -24,24 +24,21 @@ mutation procedure createTwoAndFail(email1: String, email2: String): Int `; beforeEach(async () => { - client = await createTestClient( - schema, - { - procedures: { - greet: async ({ args }: any) => { - const name = args?.name as string | undefined; - return `hello ${name ?? 'world'}`; - }, - createTwoAndFail: async ({ client, args }: any) => { - const email1 = args.email1 as string; - const email2 = args.email2 as string; - await client.user.create({ data: { email: email1 } }); - await client.user.create({ data: { email: email2 } }); - throw new Error('boom'); - }, + client = await createTestClient(schema, { + procedures: { + greet: async ({ args }: any) => { + const name = args?.name as string | undefined; + return `hello ${name ?? 'world'}`; }, - } as any - ); + createTwoAndFail: async ({ client, args }: any) => { + const email1 = args.email1 as string; + const email2 = args.email2 as string; + await client.user.create({ data: { email: email1 } }); + await client.user.create({ data: { email: email2 } }); + throw new Error('boom'); + }, + }, + } as any); api = new RestApiHandler({ schema: client.$schema, diff --git a/packages/zod/src/utils.ts b/packages/zod/src/utils.ts index b048f6abf..a25202187 100644 --- a/packages/zod/src/utils.ts +++ b/packages/zod/src/utils.ts @@ -564,7 +564,10 @@ function evalCall(data: any, expr: CallExpression) { invariant(typeof fieldArg === 'string', `"${f}" first argument must be a string`); if (f === 'isTime') { const precision = getArgValue(expr.args?.[1]); - invariant((precision === null || precision == undefined) || typeof precision === 'number', `"isTime" optional second argument must be a number`); + invariant( + precision === null || precision == undefined || typeof precision === 'number', + `"isTime" optional second argument must be a number`, + ); return z.iso.time({ precision }).safeParse(fieldArg).success; } const fn = stringFuncZodMap[f]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd9b6bbc3..21545362a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,12 +124,21 @@ importers: glob: specifier: ^11.1.0 version: 11.1.0 + husky: + specifier: ^9.1.7 + version: 9.1.7 + lint-staged: + specifier: ^17.3.0 + version: 17.3.0 npm-run-all: specifier: ^4.1.5 version: 4.1.5 prettier: specifier: ^3.5.3 version: 3.5.3 + prettier-plugin-tailwindcss: + specifier: ^0.7.2 + version: 0.7.2(prettier@3.5.3) prisma: specifier: 'catalog:' version: 6.19.0(magicast@0.3.5)(typescript@6.0.3) @@ -172,7 +181,7 @@ importers: devDependencies: '@better-auth/cli': specifier: 1.4.19 - version: 1.4.19(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)) + version: 1.4.19(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)) '@better-auth/core': specifier: 1.4.19 version: 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.2.3)(kysely@0.29.0)(nanostores@1.3.0) @@ -196,7 +205,7 @@ importers: version: link:../../config/vitest-config better-auth: specifier: 1.4.19 - version: 1.4.19(aa46c218c2111ba42e6bbb995c1cdf9e) + version: 1.4.19(40c55c74539eb2c07288211f764cce6b) kysely: specifier: 'catalog:' version: 0.29.0 @@ -878,7 +887,7 @@ importers: version: 6.0.0(openapi-types@12.1.3) '@sveltejs/kit': specifier: 'catalog:' - version: 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + version: 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@types/body-parser': specifier: ^1.19.6 version: 1.19.6 @@ -929,7 +938,7 @@ importers: version: 16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) nuxt: specifier: 'catalog:' - version: 4.3.1(526b065509e6a4d54781a1030a9e863f) + version: 4.3.1(175990d052329d8b0154ca336b6ac7a3) supertest: specifier: ^7.1.4 version: 7.1.4 @@ -1103,7 +1112,7 @@ importers: dependencies: '@tailwindcss/vite': specifier: ^4.1.18 - version: 4.1.18(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + version: 4.1.18(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@tanstack/vue-query': specifier: 'catalog:' version: 5.90.2(vue@3.5.22(typescript@6.0.3)) @@ -1127,7 +1136,7 @@ importers: version: 2.0.8 nuxt: specifier: 'catalog:' - version: 4.3.1(95266d6f061a460ce208abe1df07947b) + version: 4.3.1(dd35fc409f8d464b401077cb817b832f) tailwindcss: specifier: ^4.1.18 version: 4.1.18 @@ -1211,16 +1220,16 @@ importers: devDependencies: '@sveltejs/adapter-auto': specifier: ^7.0.0 - version: 7.0.0(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))) + version: 7.0.0(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))) '@sveltejs/kit': specifier: 'catalog:' - version: 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + version: 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@sveltejs/vite-plugin-svelte': specifier: ^6.2.1 - version: 6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + version: 6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@tailwindcss/vite': specifier: ^4.1.17 - version: 4.1.18(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + version: 4.1.18(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@types/better-sqlite3': specifier: 'catalog:' version: 7.6.13 @@ -1250,7 +1259,7 @@ importers: version: 5.9.3 vite: specifier: ^7.2.6 - version: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + version: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) samples/taskforge: dependencies: @@ -1265,7 +1274,7 @@ importers: version: link:../../packages/schema better-auth: specifier: ^1.4.21 - version: 1.6.15(261c4d1149703dc38709f1a99ea83b5c) + version: 1.6.15(ea021998b94c175608aa591d0f2ab4df) better-sqlite3: specifier: 'catalog:' version: 12.5.0 @@ -1275,7 +1284,7 @@ importers: devDependencies: '@better-auth/cli': specifier: ^1.4.21 - version: 1.4.21(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)) + version: 1.4.21(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)) '@types/better-sqlite3': specifier: 'catalog:' version: 7.6.13 @@ -6481,6 +6490,11 @@ packages: resolution: {integrity: sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==} engines: {node: '>=18.18.0'} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -7025,6 +7039,11 @@ packages: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} + lint-staged@17.3.0: + resolution: {integrity: sha512-woZS3vNe3UKqBaLPvbLOtKRY4tLANpWQhom12MGWqC8Mh1lCOO+WgSwmX2amjJAqTY9BkXYW87fCUH5H9Ph6xw==} + engines: {node: '>=22.22.1'} + hasBin: true + listhen@1.9.0: resolution: {integrity: sha512-I8oW2+QL5KJo8zXNWX046M134WchxsXC7SawLPvRQpogCbkyQIaFxPE89A2HiwR7vAK2Dm2ERBAmyjTYGYEpBg==} hasBin: true @@ -7698,6 +7717,10 @@ packages: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + pidtree@0.3.1: resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} engines: {node: '>=0.10'} @@ -8562,6 +8585,10 @@ packages: strict-event-emitter@0.5.1: resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} + string-argv@0.3.2: + resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} + engines: {node: '>=0.6.19'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -8783,6 +8810,10 @@ packages: resolution: {integrity: sha512-VKS/ZaQhhkKFMANmAOhhXVoIfBXblQxGX1myCQ2faQrfmobMftXeJPcZGp0gS07ocvGJWDLZGyOZDadDBqYIJg==} engines: {node: '>=18'} + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} + engines: {node: '>=18'} + tinyglobby@0.2.15: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} @@ -9599,6 +9630,11 @@ packages: engines: {node: '>= 14.6'} hasBin: true + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -10061,7 +10097,7 @@ snapshots: '@bcoe/v8-coverage@1.0.2': {} - '@better-auth/cli@1.4.19(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3))': + '@better-auth/cli@1.4.19(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))': dependencies: '@babel/core': 7.29.0 '@babel/preset-react': 7.28.5(@babel/core@7.29.0) @@ -10073,7 +10109,7 @@ snapshots: '@mrleebo/prisma-ast': 0.13.1 '@prisma/client': 5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)) '@types/pg': 8.16.0 - better-auth: 1.4.19(aa46c218c2111ba42e6bbb995c1cdf9e) + better-auth: 1.4.19(40c55c74539eb2c07288211f764cce6b) better-sqlite3: 12.5.0 c12: 3.3.3(magicast@0.5.1) chalk: 5.6.2 @@ -10133,7 +10169,7 @@ snapshots: - vitest - vue - '@better-auth/cli@1.4.21(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3))': + '@better-auth/cli@1.4.21(@better-fetch/fetch@1.1.21)(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(@types/better-sqlite3@7.6.13)(@types/sql.js@1.4.9)(better-call@1.1.8(zod@4.3.6))(bun-types@1.3.3)(jose@6.2.3)(kysely@0.29.0)(magicast@0.5.1)(mysql2@3.16.1)(nanostores@1.3.0)(next@16.1.6(@babel/core@7.29.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(sql.js@1.13.0)(svelte@5.53.5)(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))': dependencies: '@babel/core': 7.29.0 '@babel/preset-react': 7.28.5(@babel/core@7.29.0) @@ -10145,7 +10181,7 @@ snapshots: '@mrleebo/prisma-ast': 0.13.1 '@prisma/client': 5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)) '@types/pg': 8.16.0 - better-auth: 1.4.21(261c4d1149703dc38709f1a99ea83b5c) + better-auth: 1.4.21(ea021998b94c175608aa591d0f2ab4df) better-sqlite3: 12.5.0 c12: 3.3.3(magicast@0.5.1) chalk: 5.6.2 @@ -11050,11 +11086,11 @@ snapshots: '@nuxt/devalue@2.0.2': {} - '@nuxt/devtools-kit@3.1.1(magicast@0.5.1)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@nuxt/devtools-kit@3.1.1(magicast@0.5.1)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@nuxt/kit': 4.3.1(magicast@0.5.1) execa: 8.0.1 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) transitivePeerDependencies: - magicast @@ -11069,12 +11105,12 @@ snapshots: prompts: 2.4.2 semver: 7.7.4 - '@nuxt/devtools@3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3))': + '@nuxt/devtools@3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))': dependencies: - '@nuxt/devtools-kit': 3.1.1(magicast@0.5.1)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@nuxt/devtools-kit': 3.1.1(magicast@0.5.1)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@nuxt/devtools-wizard': 3.1.1 '@nuxt/kit': 4.3.1(magicast@0.5.1) - '@vue/devtools-core': 8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)) + '@vue/devtools-core': 8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)) '@vue/devtools-kit': 8.0.5 birpc: 2.9.0 consola: 3.4.2 @@ -11099,9 +11135,9 @@ snapshots: sirv: 3.0.2 structured-clone-es: 1.0.0 tinyglobby: 0.2.15 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-plugin-inspect: 11.3.3(@nuxt/kit@4.3.1(magicast@0.5.1))(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) - vite-plugin-vue-tracer: 1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-plugin-inspect: 11.3.3(@nuxt/kit@4.3.1(magicast@0.5.1))(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) + vite-plugin-vue-tracer: 1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)) which: 5.0.0 ws: 8.20.0 transitivePeerDependencies: @@ -11110,12 +11146,12 @@ snapshots: - utf-8-validate - vue - '@nuxt/devtools@3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3))': + '@nuxt/devtools@3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3))': dependencies: - '@nuxt/devtools-kit': 3.1.1(magicast@0.5.1)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@nuxt/devtools-kit': 3.1.1(magicast@0.5.1)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@nuxt/devtools-wizard': 3.1.1 '@nuxt/kit': 4.3.1(magicast@0.5.1) - '@vue/devtools-core': 8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3)) + '@vue/devtools-core': 8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3)) '@vue/devtools-kit': 8.0.5 birpc: 2.9.0 consola: 3.4.2 @@ -11140,9 +11176,9 @@ snapshots: sirv: 3.0.2 structured-clone-es: 1.0.0 tinyglobby: 0.2.15 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-plugin-inspect: 11.3.3(@nuxt/kit@4.3.1(magicast@0.5.1))(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) - vite-plugin-vue-tracer: 1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3)) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-plugin-inspect: 11.3.3(@nuxt/kit@4.3.1(magicast@0.5.1))(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) + vite-plugin-vue-tracer: 1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3)) which: 5.0.0 ws: 8.20.0 transitivePeerDependencies: @@ -11176,7 +11212,7 @@ snapshots: transitivePeerDependencies: - magicast - '@nuxt/nitro-server@4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(526b065509e6a4d54781a1030a9e863f))(rolldown@1.0.0-rc.15)(typescript@5.9.3)': + '@nuxt/nitro-server@4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(175990d052329d8b0154ca336b6ac7a3))(rolldown@1.0.0-rc.15)(typescript@5.9.3)': dependencies: '@nuxt/devalue': 2.0.2 '@nuxt/kit': 4.3.1(magicast@0.5.1) @@ -11194,7 +11230,7 @@ snapshots: klona: 2.0.6 mocked-exports: 0.1.1 nitropack: 2.13.1(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(mysql2@3.16.1)(rolldown@1.0.0-rc.15) - nuxt: 4.3.1(526b065509e6a4d54781a1030a9e863f) + nuxt: 4.3.1(175990d052329d8b0154ca336b6ac7a3) ohash: 2.0.11 pathe: 2.0.3 pkg-types: 2.3.0 @@ -11241,7 +11277,7 @@ snapshots: - uploadthing - xml2js - '@nuxt/nitro-server@4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(95266d6f061a460ce208abe1df07947b))(rolldown@1.0.0-rc.15)(typescript@6.0.3)': + '@nuxt/nitro-server@4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(dd35fc409f8d464b401077cb817b832f))(rolldown@1.0.0-rc.15)(typescript@6.0.3)': dependencies: '@nuxt/devalue': 2.0.2 '@nuxt/kit': 4.3.1(magicast@0.5.1) @@ -11259,7 +11295,7 @@ snapshots: klona: 2.0.6 mocked-exports: 0.1.1 nitropack: 2.13.1(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(mysql2@3.16.1)(rolldown@1.0.0-rc.15) - nuxt: 4.3.1(95266d6f061a460ce208abe1df07947b) + nuxt: 4.3.1(dd35fc409f8d464b401077cb817b832f) ohash: 2.0.11 pathe: 2.0.3 pkg-types: 2.3.0 @@ -11323,12 +11359,12 @@ snapshots: rc9: 3.0.0 std-env: 3.10.0 - '@nuxt/vite-builder@4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(526b065509e6a4d54781a1030a9e863f))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@5.9.3)(vue-tsc@3.2.5(typescript@5.9.3))(vue@3.5.29(typescript@5.9.3))(yaml@2.8.2)': + '@nuxt/vite-builder@4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(175990d052329d8b0154ca336b6ac7a3))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@5.9.3)(vue-tsc@3.2.5(typescript@5.9.3))(vue@3.5.29(typescript@5.9.3))(yaml@2.9.0)': dependencies: '@nuxt/kit': 4.3.1(magicast@0.5.1) '@rollup/plugin-replace': 6.0.3(rollup@4.59.0) - '@vitejs/plugin-vue': 6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)) - '@vitejs/plugin-vue-jsx': 5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)) + '@vitejs/plugin-vue': 6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)) + '@vitejs/plugin-vue-jsx': 5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)) autoprefixer: 10.4.27(postcss@8.5.6) consola: 3.4.2 cssnano: 7.1.2(postcss@8.5.6) @@ -11342,7 +11378,7 @@ snapshots: magic-string: 0.30.21 mlly: 1.8.0 mocked-exports: 0.1.1 - nuxt: 4.3.1(526b065509e6a4d54781a1030a9e863f) + nuxt: 4.3.1(175990d052329d8b0154ca336b6ac7a3) pathe: 2.0.3 pkg-types: 2.3.0 postcss: 8.5.6 @@ -11351,9 +11387,9 @@ snapshots: std-env: 3.10.0 ufo: 1.6.3 unenv: 2.0.0-rc.24 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-node: 5.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-plugin-checker: 0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue-tsc@3.2.5(typescript@5.9.3)) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-node: 5.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-plugin-checker: 0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue-tsc@3.2.5(typescript@5.9.3)) vue: 3.5.29(typescript@5.9.3) vue-bundle-renderer: 2.2.0 optionalDependencies: @@ -11383,12 +11419,12 @@ snapshots: - vue-tsc - yaml - '@nuxt/vite-builder@4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(95266d6f061a460ce208abe1df07947b))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@6.0.3)(vue-tsc@3.2.5(typescript@6.0.3))(vue@3.5.29(typescript@6.0.3))(yaml@2.8.2)': + '@nuxt/vite-builder@4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(dd35fc409f8d464b401077cb817b832f))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@6.0.3)(vue-tsc@3.2.5(typescript@6.0.3))(vue@3.5.29(typescript@6.0.3))(yaml@2.9.0)': dependencies: '@nuxt/kit': 4.3.1(magicast@0.5.1) '@rollup/plugin-replace': 6.0.3(rollup@4.59.0) - '@vitejs/plugin-vue': 6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3)) - '@vitejs/plugin-vue-jsx': 5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3)) + '@vitejs/plugin-vue': 6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3)) + '@vitejs/plugin-vue-jsx': 5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3)) autoprefixer: 10.4.27(postcss@8.5.6) consola: 3.4.2 cssnano: 7.1.2(postcss@8.5.6) @@ -11402,7 +11438,7 @@ snapshots: magic-string: 0.30.21 mlly: 1.8.0 mocked-exports: 0.1.1 - nuxt: 4.3.1(95266d6f061a460ce208abe1df07947b) + nuxt: 4.3.1(dd35fc409f8d464b401077cb817b832f) pathe: 2.0.3 pkg-types: 2.3.0 postcss: 8.5.6 @@ -11411,9 +11447,9 @@ snapshots: std-env: 3.10.0 ufo: 1.6.3 unenv: 2.0.0-rc.24 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-node: 5.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-plugin-checker: 0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@6.0.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue-tsc@3.2.5(typescript@6.0.3)) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-node: 5.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-plugin-checker: 0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@6.0.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue-tsc@3.2.5(typescript@6.0.3)) vue: 3.5.29(typescript@6.0.3) vue-bundle-renderer: 2.2.0 optionalDependencies: @@ -12016,15 +12052,15 @@ snapshots: dependencies: acorn: 8.15.0 - '@sveltejs/adapter-auto@7.0.0(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))': + '@sveltejs/adapter-auto@7.0.0(@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))': dependencies: - '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) - '@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@standard-schema/spec': 1.0.0 '@sveltejs/acorn-typescript': 1.0.9(acorn@8.15.0) - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@types/cookie': 0.6.0 acorn: 8.15.0 cookie: 1.1.1 @@ -12036,15 +12072,15 @@ snapshots: set-cookie-parser: 3.0.1 sirv: 3.0.2 svelte: 5.53.5 - vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) optionalDependencies: typescript: 5.9.3 - '@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@standard-schema/spec': 1.0.0 '@sveltejs/acorn-typescript': 1.0.9(acorn@8.15.0) - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@types/cookie': 0.6.0 acorn: 8.15.0 cookie: 1.1.1 @@ -12056,16 +12092,16 @@ snapshots: set-cookie-parser: 3.0.1 sirv: 3.0.2 svelte: 5.53.5 - vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) optionalDependencies: typescript: 5.9.3 optional: true - '@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/kit@2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@standard-schema/spec': 1.0.0 '@sveltejs/acorn-typescript': 1.0.9(acorn@8.15.0) - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@types/cookie': 0.6.0 acorn: 8.15.0 cookie: 1.1.1 @@ -12077,7 +12113,7 @@ snapshots: set-cookie-parser: 3.0.1 sirv: 3.0.2 svelte: 5.53.5 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) optionalDependencies: typescript: 5.9.3 @@ -12092,68 +12128,68 @@ snapshots: transitivePeerDependencies: - typescript - '@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) debug: 4.4.3 svelte: 5.53.5 - vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) debug: 4.4.3 svelte: 5.53.5 - vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) transitivePeerDependencies: - supports-color optional: true - '@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/vite-plugin-svelte-inspector@5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte': 6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) debug: 4.4.3 svelte: 5.53.5 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) debug: 4.4.3 deepmerge: 4.3.1 magic-string: 0.30.21 svelte: 5.53.5 - vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vitefu: 1.1.1(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vitefu: 1.1.1(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) transitivePeerDependencies: - supports-color - '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) debug: 4.4.3 deepmerge: 4.3.1 magic-string: 0.30.21 svelte: 5.53.5 - vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vitefu: 1.1.1(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vitefu: 1.1.1(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) transitivePeerDependencies: - supports-color optional: true - '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/vite-plugin-svelte-inspector': 5.0.1(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) debug: 4.4.3 deepmerge: 4.3.1 magic-string: 0.30.21 svelte: 5.53.5 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vitefu: 1.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vitefu: 1.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) transitivePeerDependencies: - supports-color @@ -12291,19 +12327,19 @@ snapshots: postcss: 8.5.6 tailwindcss: 4.1.16 - '@tailwindcss/vite@4.1.18(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@tailwindcss/vite@4.1.18(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@tailwindcss/node': 4.1.18 '@tailwindcss/oxide': 4.1.18 tailwindcss: 4.1.18 - vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) - '@tailwindcss/vite@4.1.18(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@tailwindcss/vite@4.1.18(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@tailwindcss/node': 4.1.18 '@tailwindcss/oxide': 4.1.18 tailwindcss: 4.1.18 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) '@tanstack/match-sorter-utils@8.19.4': dependencies: @@ -12790,40 +12826,40 @@ snapshots: - rollup - supports-color - '@vitejs/plugin-vue-jsx@5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3))': + '@vitejs/plugin-vue-jsx@5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0) '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.0) '@rolldown/pluginutils': 1.0.0-rc.5 '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.0) - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@5.9.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3))': + '@vitejs/plugin-vue-jsx@5.1.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3))': dependencies: '@babel/core': 7.29.0 '@babel/plugin-syntax-typescript': 7.28.6(@babel/core@7.29.0) '@babel/plugin-transform-typescript': 7.28.6(@babel/core@7.29.0) '@rolldown/pluginutils': 1.0.0-rc.5 '@vue/babel-plugin-jsx': 2.0.1(@babel/core@7.29.0) - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@6.0.3) transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue@6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3))': + '@vitejs/plugin-vue@6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.2 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@5.9.3) - '@vitejs/plugin-vue@6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3))': + '@vitejs/plugin-vue@6.0.4(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3))': dependencies: '@rolldown/pluginutils': 1.0.0-rc.2 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@6.0.3) '@vitest/coverage-v8@4.0.16(vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.0))': @@ -12860,22 +12896,22 @@ snapshots: optionalDependencies: vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.0) - '@vitest/mocker@4.0.14(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@vitest/mocker@4.0.14(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@vitest/spy': 4.0.14 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) optional: true - '@vitest/mocker@4.0.14(vite@7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))': + '@vitest/mocker@4.0.14(vite@7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))': dependencies: '@vitest/spy': 4.0.14 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) optional: true '@vitest/pretty-format@4.0.14': @@ -13062,26 +13098,26 @@ snapshots: '@vue/devtools-api@6.6.4': {} - '@vue/devtools-core@8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3))': + '@vue/devtools-core@8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3))': dependencies: '@vue/devtools-kit': 8.0.5 '@vue/devtools-shared': 8.0.5 mitt: 3.0.1 nanoid: 5.1.6 pathe: 2.0.3 - vite-hot-client: 2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + vite-hot-client: 2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) vue: 3.5.29(typescript@5.9.3) transitivePeerDependencies: - vite - '@vue/devtools-core@8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3))': + '@vue/devtools-core@8.0.5(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3))': dependencies: '@vue/devtools-kit': 8.0.5 '@vue/devtools-shared': 8.0.5 mitt: 3.0.1 nanoid: 5.1.6 pathe: 2.0.3 - vite-hot-client: 2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + vite-hot-client: 2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) vue: 3.5.29(typescript@6.0.3) transitivePeerDependencies: - vite @@ -13422,7 +13458,7 @@ snapshots: baseline-browser-mapping@2.9.11: {} - better-auth@1.4.19(aa46c218c2111ba42e6bbb995c1cdf9e): + better-auth@1.4.19(40c55c74539eb2c07288211f764cce6b): dependencies: '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.1.2)(kysely@0.28.16)(nanostores@1.0.1) '@better-auth/telemetry': 1.4.19(@better-auth/core@1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.2.3)(kysely@0.29.0)(nanostores@1.3.0)) @@ -13438,7 +13474,7 @@ snapshots: zod: 4.3.6 optionalDependencies: '@prisma/client': 5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)) - '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) better-sqlite3: 12.5.0 drizzle-orm: 0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0) mysql2: 3.16.1 @@ -13448,10 +13484,10 @@ snapshots: react: 19.2.0 react-dom: 19.2.0(react@19.2.0) svelte: 5.53.5 - vitest: 4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vitest: 4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@5.9.3) - better-auth@1.4.21(261c4d1149703dc38709f1a99ea83b5c): + better-auth@1.4.21(ea021998b94c175608aa591d0f2ab4df): dependencies: '@better-auth/core': 1.4.19(@better-auth/utils@0.3.0)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.2.3)(kysely@0.28.16)(nanostores@1.3.0) '@better-auth/telemetry': 1.4.21(@better-auth/core@1.4.19(@better-auth/utils@0.4.1)(@better-fetch/fetch@1.1.21)(better-call@1.3.5(zod@4.3.6))(jose@6.2.3)(kysely@0.29.0)(nanostores@1.3.0)) @@ -13467,7 +13503,7 @@ snapshots: zod: 4.3.6 optionalDependencies: '@prisma/client': 5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)) - '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) better-sqlite3: 12.5.0 drizzle-orm: 0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0) mysql2: 3.16.1 @@ -13477,10 +13513,10 @@ snapshots: react: 19.2.0 react-dom: 19.2.0(react@19.2.0) svelte: 5.53.5 - vitest: 4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vitest: 4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@5.9.3) - better-auth@1.6.15(261c4d1149703dc38709f1a99ea83b5c): + better-auth@1.6.15(ea021998b94c175608aa591d0f2ab4df): dependencies: '@better-auth/core': 1.4.19(@better-auth/utils@0.4.1)(@better-fetch/fetch@1.1.21)(better-call@1.1.8(zod@4.3.6))(jose@6.2.3)(kysely@0.29.0)(nanostores@1.3.0) '@better-auth/drizzle-adapter': 1.6.15(@better-auth/core@1.4.19(@better-auth/utils@0.4.1)(@better-fetch/fetch@1.1.21)(better-call@1.3.5(zod@4.3.6))(jose@6.2.3)(kysely@0.29.0)(nanostores@1.3.0))(@better-auth/utils@0.4.1)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0)) @@ -13501,7 +13537,7 @@ snapshots: zod: 4.3.6 optionalDependencies: '@prisma/client': 5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)) - '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@sveltejs/kit': 2.53.2(@sveltejs/vite-plugin-svelte@6.2.1(svelte@5.53.5)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)))(svelte@5.53.5)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) better-sqlite3: 12.5.0 drizzle-orm: 0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0) mysql2: 3.16.1 @@ -13511,7 +13547,7 @@ snapshots: react: 19.2.0 react-dom: 19.2.0(react@19.2.0) svelte: 5.53.5 - vitest: 4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vitest: 4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@5.9.3) better-call@1.1.8(zod@4.3.6): @@ -15188,6 +15224,8 @@ snapshots: human-signals@8.0.1: {} + husky@9.1.7: {} + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 @@ -15706,6 +15744,14 @@ snapshots: lilconfig@3.1.3: {} + lint-staged@17.3.0: + dependencies: + picomatch: 4.0.5 + string-argv: 0.3.2 + tinyexec: 1.2.4 + optionalDependencies: + yaml: 2.9.0 + listhen@1.9.0: dependencies: '@parcel/watcher': 2.5.1 @@ -16290,16 +16336,16 @@ snapshots: dependencies: boolbase: 1.0.0 - nuxt@4.3.1(526b065509e6a4d54781a1030a9e863f): + nuxt@4.3.1(175990d052329d8b0154ca336b6ac7a3): dependencies: '@dxup/nuxt': 0.3.2(magicast@0.5.1) '@nuxt/cli': 3.33.1(@nuxt/schema@4.3.1)(cac@6.7.14)(magicast@0.5.1) - '@nuxt/devtools': 3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)) + '@nuxt/devtools': 3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)) '@nuxt/kit': 4.3.1(magicast@0.5.1) - '@nuxt/nitro-server': 4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(526b065509e6a4d54781a1030a9e863f))(rolldown@1.0.0-rc.15)(typescript@5.9.3) + '@nuxt/nitro-server': 4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@5.9.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(175990d052329d8b0154ca336b6ac7a3))(rolldown@1.0.0-rc.15)(typescript@5.9.3) '@nuxt/schema': 4.3.1 '@nuxt/telemetry': 2.7.0(@nuxt/kit@4.3.1(magicast@0.5.1)) - '@nuxt/vite-builder': 4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(526b065509e6a4d54781a1030a9e863f))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@5.9.3)(vue-tsc@3.2.5(typescript@5.9.3))(vue@3.5.29(typescript@5.9.3))(yaml@2.8.2) + '@nuxt/vite-builder': 4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(175990d052329d8b0154ca336b6ac7a3))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@5.9.3)(vue-tsc@3.2.5(typescript@5.9.3))(vue@3.5.29(typescript@5.9.3))(yaml@2.9.0) '@unhead/vue': 2.1.7(vue@3.5.29(typescript@5.9.3)) '@vue/shared': 3.5.29 c12: 3.3.3(magicast@0.5.1) @@ -16413,16 +16459,16 @@ snapshots: - xml2js - yaml - nuxt@4.3.1(95266d6f061a460ce208abe1df07947b): + nuxt@4.3.1(dd35fc409f8d464b401077cb817b832f): dependencies: '@dxup/nuxt': 0.3.2(magicast@0.5.1) '@nuxt/cli': 3.33.1(@nuxt/schema@4.3.1)(cac@6.7.14)(magicast@0.5.1) - '@nuxt/devtools': 3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3)) + '@nuxt/devtools': 3.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3)) '@nuxt/kit': 4.3.1(magicast@0.5.1) - '@nuxt/nitro-server': 4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(95266d6f061a460ce208abe1df07947b))(rolldown@1.0.0-rc.15)(typescript@6.0.3) + '@nuxt/nitro-server': 4.3.1(better-sqlite3@12.5.0)(db0@0.3.4(better-sqlite3@12.5.0)(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(mysql2@3.16.1))(drizzle-orm@0.41.0(@prisma/client@5.22.0(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3)))(@types/better-sqlite3@7.6.13)(@types/pg@8.16.0)(@types/sql.js@1.4.9)(better-sqlite3@12.5.0)(bun-types@1.3.3)(kysely@0.29.0)(mysql2@3.16.1)(pg@8.16.3)(prisma@6.19.0(magicast@0.5.1)(typescript@6.0.3))(sql.js@1.13.0))(ioredis@5.9.3)(magicast@0.5.1)(mysql2@3.16.1)(nuxt@4.3.1(dd35fc409f8d464b401077cb817b832f))(rolldown@1.0.0-rc.15)(typescript@6.0.3) '@nuxt/schema': 4.3.1 '@nuxt/telemetry': 2.7.0(@nuxt/kit@4.3.1(magicast@0.5.1)) - '@nuxt/vite-builder': 4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(95266d6f061a460ce208abe1df07947b))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@6.0.3)(vue-tsc@3.2.5(typescript@6.0.3))(vue@3.5.29(typescript@6.0.3))(yaml@2.8.2) + '@nuxt/vite-builder': 4.3.1(@types/node@25.5.2)(eslint@9.29.0(jiti@2.6.1))(lightningcss@1.30.2)(magicast@0.5.1)(nuxt@4.3.1(dd35fc409f8d464b401077cb817b832f))(optionator@0.9.4)(rolldown@1.0.0-rc.15)(rollup@4.59.0)(terser@5.44.0)(tsx@4.22.4)(typescript@6.0.3)(vue-tsc@3.2.5(typescript@6.0.3))(vue@3.5.29(typescript@6.0.3))(yaml@2.9.0) '@unhead/vue': 2.1.7(vue@3.5.29(typescript@6.0.3)) '@vue/shared': 3.5.29 c12: 3.3.3(magicast@0.5.1) @@ -16872,6 +16918,8 @@ snapshots: picomatch@4.0.4: {} + picomatch@4.0.5: {} + pidtree@0.3.1: {} pify@3.0.0: {} @@ -17119,6 +17167,10 @@ snapshots: prelude-ls@1.2.1: {} + prettier-plugin-tailwindcss@0.7.2(prettier@3.5.3): + dependencies: + prettier: 3.5.3 + prettier-plugin-tailwindcss@0.7.2(prettier@3.8.1): dependencies: prettier: 3.8.1 @@ -17772,6 +17824,8 @@ snapshots: strict-event-emitter@0.5.1: {} + string-argv@0.3.2: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -18064,6 +18118,8 @@ snapshots: tinyexec@1.1.1: {} + tinyexec@1.2.4: {} + tinyglobby@0.2.15: dependencies: fdir: 6.5.0(picomatch@4.0.3) @@ -18526,23 +18582,23 @@ snapshots: vary@1.1.2: {} - vite-dev-rpc@1.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)): + vite-dev-rpc@1.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)): dependencies: birpc: 2.9.0 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-hot-client: 2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-hot-client: 2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) - vite-hot-client@2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)): + vite-hot-client@2.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)): dependencies: - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) - vite-node@5.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2): + vite-node@5.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: cac: 6.7.14 es-module-lexer: 2.0.0 obug: 2.1.1 pathe: 2.0.3 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) transitivePeerDependencies: - '@types/node' - jiti @@ -18556,7 +18612,7 @@ snapshots: - tsx - yaml - vite-plugin-checker@0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue-tsc@3.2.5(typescript@5.9.3)): + vite-plugin-checker@0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@5.9.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue-tsc@3.2.5(typescript@5.9.3)): dependencies: '@babel/code-frame': 7.28.6 chokidar: 4.0.3 @@ -18565,7 +18621,7 @@ snapshots: picomatch: 4.0.3 tiny-invariant: 1.3.3 tinyglobby: 0.2.15 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vscode-uri: 3.1.0 optionalDependencies: eslint: 9.29.0(jiti@2.6.1) @@ -18573,7 +18629,7 @@ snapshots: typescript: 5.9.3 vue-tsc: 3.2.5(typescript@5.9.3) - vite-plugin-checker@0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@6.0.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue-tsc@3.2.5(typescript@6.0.3)): + vite-plugin-checker@0.12.0(eslint@9.29.0(jiti@2.6.1))(optionator@0.9.4)(typescript@6.0.3)(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue-tsc@3.2.5(typescript@6.0.3)): dependencies: '@babel/code-frame': 7.28.6 chokidar: 4.0.3 @@ -18582,7 +18638,7 @@ snapshots: picomatch: 4.0.3 tiny-invariant: 1.3.3 tinyglobby: 0.2.15 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vscode-uri: 3.1.0 optionalDependencies: eslint: 9.29.0(jiti@2.6.1) @@ -18590,7 +18646,7 @@ snapshots: typescript: 6.0.3 vue-tsc: 3.2.5(typescript@6.0.3) - vite-plugin-inspect@11.3.3(@nuxt/kit@4.3.1(magicast@0.5.1))(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)): + vite-plugin-inspect@11.3.3(@nuxt/kit@4.3.1(magicast@0.5.1))(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)): dependencies: ansis: 4.2.0 debug: 4.4.3 @@ -18600,31 +18656,31 @@ snapshots: perfect-debounce: 2.1.0 sirv: 3.0.2 unplugin-utils: 0.3.1 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) - vite-dev-rpc: 1.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) + vite-dev-rpc: 1.1.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) optionalDependencies: '@nuxt/kit': 4.3.1(magicast@0.5.1) transitivePeerDependencies: - supports-color - vite-plugin-vue-tracer@1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@5.9.3)): + vite-plugin-vue-tracer@1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@5.9.3)): dependencies: estree-walker: 3.0.3 exsolve: 1.0.8 magic-string: 0.30.21 pathe: 2.0.3 source-map-js: 1.2.1 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@5.9.3) - vite-plugin-vue-tracer@1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2))(vue@3.5.29(typescript@6.0.3)): + vite-plugin-vue-tracer@1.2.0(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0))(vue@3.5.29(typescript@6.0.3)): dependencies: estree-walker: 3.0.3 exsolve: 1.0.8 magic-string: 0.30.21 pathe: 2.0.3 source-map-js: 1.2.1 - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vue: 3.5.29(typescript@6.0.3) vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.0): @@ -18644,7 +18700,7 @@ snapshots: tsx: 4.22.4 yaml: 2.8.0 - vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2): + vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) @@ -18659,9 +18715,9 @@ snapshots: lightningcss: 1.30.2 terser: 5.44.0 tsx: 4.22.4 - yaml: 2.8.2 + yaml: 2.9.0 - vite@7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2): + vite@7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: esbuild: 0.27.2 fdir: 6.5.0(picomatch@4.0.3) @@ -18676,10 +18732,10 @@ snapshots: lightningcss: 1.30.2 terser: 5.44.0 tsx: 4.22.4 - yaml: 2.8.2 + yaml: 2.9.0 optional: true - vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2): + vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: esbuild: 0.27.3 fdir: 6.5.0(picomatch@4.0.3) @@ -18694,10 +18750,10 @@ snapshots: lightningcss: 1.30.2 terser: 5.44.0 tsx: 4.22.4 - yaml: 2.8.2 + yaml: 2.9.0 optional: true - vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2): + vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: esbuild: 0.27.3 fdir: 6.5.0(picomatch@4.0.3) @@ -18712,20 +18768,20 @@ snapshots: lightningcss: 1.30.2 terser: 5.44.0 tsx: 4.22.4 - yaml: 2.8.2 + yaml: 2.9.0 - vitefu@1.1.1(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)): + vitefu@1.1.1(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)): optionalDependencies: - vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) - vitefu@1.1.1(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)): + vitefu@1.1.1(vite@7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)): optionalDependencies: - vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) optional: true - vitefu@1.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)): + vitefu@1.1.1(vite@7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)): optionalDependencies: - vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.1(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.0): dependencies: @@ -18767,10 +18823,10 @@ snapshots: - tsx - yaml - vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2): + vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@20.19.24)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: '@vitest/expect': 4.0.14 - '@vitest/mocker': 4.0.14(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@vitest/mocker': 4.0.14(vite@7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@vitest/pretty-format': 4.0.14 '@vitest/runner': 4.0.14 '@vitest/snapshot': 4.0.14 @@ -18787,7 +18843,7 @@ snapshots: tinyexec: 0.3.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@20.19.24)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@edge-runtime/vm': 5.0.0 @@ -18808,10 +18864,10 @@ snapshots: - yaml optional: true - vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2): + vitest@4.0.14(@edge-runtime/vm@5.0.0)(@types/node@25.5.2)(happy-dom@20.8.9)(jiti@2.6.1)(jsdom@27.1.0)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0): dependencies: '@vitest/expect': 4.0.14 - '@vitest/mocker': 4.0.14(vite@7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2)) + '@vitest/mocker': 4.0.14(vite@7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0)) '@vitest/pretty-format': 4.0.14 '@vitest/runner': 4.0.14 '@vitest/snapshot': 4.0.14 @@ -18828,7 +18884,7 @@ snapshots: tinyexec: 0.3.2 tinyglobby: 0.2.15 tinyrainbow: 3.0.3 - vite: 7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.8.2) + vite: 7.3.0(@types/node@25.5.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.0)(tsx@4.22.4)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@edge-runtime/vm': 5.0.0 @@ -19078,6 +19134,9 @@ snapshots: yaml@2.8.2: {} + yaml@2.9.0: + optional: true + yargs-parser@21.1.1: {} yargs@17.7.2: diff --git a/samples/next.js/zenstack/schema-lite.ts b/samples/next.js/zenstack/schema-lite.ts index 78e36b195..40928d171 100644 --- a/samples/next.js/zenstack/schema-lite.ts +++ b/samples/next.js/zenstack/schema-lite.ts @@ -5,115 +5,119 @@ /* eslint-disable */ -import { type SchemaDef, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true + name: 'updatedAt', + type: 'DateTime', + updatedAt: true, }, email: { - name: "email", - type: "String", - unique: true + name: 'email', + type: 'String', + unique: true, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true + name: 'updatedAt', + type: 'DateTime', + updatedAt: true, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, published: { - name: "published", - type: "Boolean", - default: false as FieldDefault + name: 'published', + type: 'Boolean', + default: false as FieldDefault, }, author: { - name: "author", - type: "User", - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + name: 'author', + type: 'User', + relation: { + opposite: 'posts', + fields: ['authorId'], + references: ['id'], + onUpdate: 'Cascade', + onDelete: 'Cascade', + }, }, authorId: { - name: "authorId", - type: "String", - foreignKeyFor: [ - "author" - ] as readonly string[] - } + name: 'authorId', + type: 'String', + foreignKeyFor: ['author'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; procedures = { signUp: { params: { - email: { name: "email", type: "String" } + email: { name: 'email', type: 'String' }, }, - returnType: "User", - mutation: true + returnType: 'User', + mutation: true, }, listPublicPosts: { params: {}, - returnType: "Post", - returnArray: true - } + returnType: 'Post', + returnArray: true, + }, } as const; plugins = {}; } diff --git a/samples/nuxt/README.md b/samples/nuxt/README.md index b7700ace6..7d56d0fa9 100644 --- a/samples/nuxt/README.md +++ b/samples/nuxt/README.md @@ -13,16 +13,19 @@ A simple blog application built with Nuxt, ZenStack ORM, and TanStack Query Vue ## Getting Started 1. Install dependencies: + ```bash pnpm install ``` 2. Initialize the database and seed data: + ```bash pnpm db:init ``` 3. Start the development server: + ```bash pnpm dev ``` @@ -33,11 +36,11 @@ The app will be available at http://localhost:3302 - `app/` - Nuxt app components and pages - `server/` - Nuxt server files - - `api/model/[...path].ts` - ZenStack API endpoint - - `utils/db.ts` - Database client + - `api/model/[...path].ts` - ZenStack API endpoint + - `utils/db.ts` - Database client - `zenstack/` - ZenStack schema and generated files - - `schema.zmodel` - Database schema definition - - `seed.ts` - Database seeding script + - `schema.zmodel` - Database schema definition + - `seed.ts` - Database seeding script ## Available Scripts diff --git a/samples/nuxt/zenstack/schema-lite.ts b/samples/nuxt/zenstack/schema-lite.ts index 78e36b195..40928d171 100644 --- a/samples/nuxt/zenstack/schema-lite.ts +++ b/samples/nuxt/zenstack/schema-lite.ts @@ -5,115 +5,119 @@ /* eslint-disable */ -import { type SchemaDef, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true + name: 'updatedAt', + type: 'DateTime', + updatedAt: true, }, email: { - name: "email", - type: "String", - unique: true + name: 'email', + type: 'String', + unique: true, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - default: ExpressionUtils.call("cuid") as FieldDefault + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true + name: 'updatedAt', + type: 'DateTime', + updatedAt: true, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, published: { - name: "published", - type: "Boolean", - default: false as FieldDefault + name: 'published', + type: 'Boolean', + default: false as FieldDefault, }, author: { - name: "author", - type: "User", - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + name: 'author', + type: 'User', + relation: { + opposite: 'posts', + fields: ['authorId'], + references: ['id'], + onUpdate: 'Cascade', + onDelete: 'Cascade', + }, }, authorId: { - name: "authorId", - type: "String", - foreignKeyFor: [ - "author" - ] as readonly string[] - } + name: 'authorId', + type: 'String', + foreignKeyFor: ['author'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; procedures = { signUp: { params: { - email: { name: "email", type: "String" } + email: { name: 'email', type: 'String' }, }, - returnType: "User", - mutation: true + returnType: 'User', + mutation: true, }, listPublicPosts: { params: {}, - returnType: "Post", - returnArray: true - } + returnType: 'Post', + returnArray: true, + }, } as const; plugins = {}; } diff --git a/samples/sveltekit/.prettierrc b/samples/sveltekit/.prettierrc index 0cd5679cf..bd52218ef 100644 --- a/samples/sveltekit/.prettierrc +++ b/samples/sveltekit/.prettierrc @@ -1,4 +1,6 @@ { - "plugins": ["prettier-plugin-tailwindcss"], + "plugins": [ + "prettier-plugin-tailwindcss" + ], "tailwindStylesheet": "./src/routes/layout.css" -} +} \ No newline at end of file diff --git a/samples/sveltekit/src/zenstack/input.ts b/samples/sveltekit/src/zenstack/input.ts index 9fba87a68..e65afbedd 100644 --- a/samples/sveltekit/src/zenstack/input.ts +++ b/samples/sveltekit/src/zenstack/input.ts @@ -6,18 +6,53 @@ /* eslint-disable */ import { type SchemaType as $Schema } from "./schema-lite"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, UncheckedCreateInput as $UncheckedCreateInput, CheckedCreateInput as $CheckedCreateInput, UncheckedUpdateInput as $UncheckedUpdateInput, CheckedUpdateInput as $CheckedUpdateInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + UncheckedCreateInput as $UncheckedCreateInput, + CheckedCreateInput as $CheckedCreateInput, + UncheckedUpdateInput as $UncheckedUpdateInput, + CheckedUpdateInput as $CheckedUpdateInput, + QueryOptions as $QueryOptions, +} from "@zenstackhq/orm"; +import type { + SimplifiedPlainResult as $Result, + SelectIncludeOmit as $SelectIncludeOmit, +} from "@zenstackhq/orm"; export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; export type UserExistsArgs = $ExistsArgs<$Schema, "User">; export type UserCreateArgs = $CreateArgs<$Schema, "User">; export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + "User" +>; export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + "User" +>; export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; @@ -32,17 +67,26 @@ export type UserUncheckedCreateInput = $UncheckedCreateInput<$Schema, "User">; export type UserCheckedCreateInput = $CheckedCreateInput<$Schema, "User">; export type UserUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, "User">; export type UserCheckedUpdateInput = $CheckedUpdateInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, "User", true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, "User", Args, Options>; export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; export type PostCreateArgs = $CreateArgs<$Schema, "Post">; export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + "Post" +>; export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + "Post" +>; export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; @@ -57,4 +101,7 @@ export type PostUncheckedCreateInput = $UncheckedCreateInput<$Schema, "Post">; export type PostCheckedCreateInput = $CheckedCreateInput<$Schema, "Post">; export type PostUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, "Post">; export type PostCheckedUpdateInput = $CheckedUpdateInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, "Post", true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, "Post", Args, Options>; diff --git a/samples/sveltekit/src/zenstack/schema-lite.ts b/samples/sveltekit/src/zenstack/schema-lite.ts index 78e36b195..6e4d88be9 100644 --- a/samples/sveltekit/src/zenstack/schema-lite.ts +++ b/samples/sveltekit/src/zenstack/schema-lite.ts @@ -5,116 +5,124 @@ /* eslint-disable */ -import { type SchemaDef, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { + type SchemaDef, + type FieldDefault, + ExpressionUtils, +} from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { - provider = { - type: "sqlite" - } as const; - models = { - User: { - name: "User", - fields: { - id: { - name: "id", - type: "String", - id: true, - default: ExpressionUtils.call("cuid") as FieldDefault - }, - createdAt: { - name: "createdAt", - type: "DateTime", - default: ExpressionUtils.call("now") as FieldDefault - }, - updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true - }, - email: { - name: "email", - type: "String", - unique: true - }, - name: { - name: "name", - type: "String", - optional: true - }, - posts: { - name: "posts", - type: "Post", - array: true, - relation: { opposite: "author" } - } - }, - idFields: ["id"], - uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + provider = { + type: "sqlite", + } as const; + models = { + User: { + name: "User", + fields: { + id: { + name: "id", + type: "String", + id: true, + default: ExpressionUtils.call("cuid") as FieldDefault, }, - Post: { - name: "Post", - fields: { - id: { - name: "id", - type: "String", - id: true, - default: ExpressionUtils.call("cuid") as FieldDefault - }, - createdAt: { - name: "createdAt", - type: "DateTime", - default: ExpressionUtils.call("now") as FieldDefault - }, - updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true - }, - title: { - name: "title", - type: "String" - }, - published: { - name: "published", - type: "Boolean", - default: false as FieldDefault - }, - author: { - name: "author", - type: "User", - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } - }, - authorId: { - name: "authorId", - type: "String", - foreignKeyFor: [ - "author" - ] as readonly string[] - } - }, - idFields: ["id"], - uniqueFields: { - id: { type: "String" } - } - } - } as const; - authType = "User" as const; - procedures = { - signUp: { - params: { - email: { name: "email", type: "String" } - }, - returnType: "User", - mutation: true + createdAt: { + name: "createdAt", + type: "DateTime", + default: ExpressionUtils.call("now") as FieldDefault, }, - listPublicPosts: { - params: {}, - returnType: "Post", - returnArray: true - } - } as const; - plugins = {}; + updatedAt: { + name: "updatedAt", + type: "DateTime", + updatedAt: true, + }, + email: { + name: "email", + type: "String", + unique: true, + }, + name: { + name: "name", + type: "String", + optional: true, + }, + posts: { + name: "posts", + type: "Post", + array: true, + relation: { opposite: "author" }, + }, + }, + idFields: ["id"], + uniqueFields: { + id: { type: "String" }, + email: { type: "String" }, + }, + }, + Post: { + name: "Post", + fields: { + id: { + name: "id", + type: "String", + id: true, + default: ExpressionUtils.call("cuid") as FieldDefault, + }, + createdAt: { + name: "createdAt", + type: "DateTime", + default: ExpressionUtils.call("now") as FieldDefault, + }, + updatedAt: { + name: "updatedAt", + type: "DateTime", + updatedAt: true, + }, + title: { + name: "title", + type: "String", + }, + published: { + name: "published", + type: "Boolean", + default: false as FieldDefault, + }, + author: { + name: "author", + type: "User", + relation: { + opposite: "posts", + fields: ["authorId"], + references: ["id"], + onUpdate: "Cascade", + onDelete: "Cascade", + }, + }, + authorId: { + name: "authorId", + type: "String", + foreignKeyFor: ["author"] as readonly string[], + }, + }, + idFields: ["id"], + uniqueFields: { + id: { type: "String" }, + }, + }, + } as const; + authType = "User" as const; + procedures = { + signUp: { + params: { + email: { name: "email", type: "String" }, + }, + returnType: "User", + mutation: true, + }, + listPublicPosts: { + params: {}, + returnType: "Post", + returnArray: true, + }, + } as const; + plugins = {}; } export const schema = new SchemaType(); diff --git a/samples/sveltekit/src/zenstack/schema.ts b/samples/sveltekit/src/zenstack/schema.ts index 6735451d6..61067b002 100644 --- a/samples/sveltekit/src/zenstack/schema.ts +++ b/samples/sveltekit/src/zenstack/schema.ts @@ -5,125 +5,185 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { + type SchemaDef, + type AttributeApplication, + type FieldDefault, + ExpressionUtils, +} from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { - provider = { - type: "sqlite" - } as const; - models = { - User: { - name: "User", - fields: { - id: { - name: "id", - type: "String", - id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault - }, - createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - }, - updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - }, - email: { - name: "email", - type: "String", - unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] - }, - name: { - name: "name", - type: "String", - optional: true - }, - posts: { - name: "posts", - type: "Post", - array: true, - relation: { opposite: "author" } - } + provider = { + type: "sqlite", + } as const; + models = { + User: { + name: "User", + fields: { + id: { + name: "id", + type: "String", + id: true, + attributes: [ + { name: "@id" }, + { + name: "@default", + args: [{ name: "value", value: ExpressionUtils.call("cuid") }], }, - idFields: ["id"], - uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + ] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault, }, - Post: { - name: "Post", - fields: { - id: { - name: "id", - type: "String", - id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault - }, - createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - }, - updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - }, - title: { - name: "title", - type: "String" - }, - published: { - name: "published", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + createdAt: { + name: "createdAt", + type: "DateTime", + attributes: [ + { + name: "@default", + args: [{ name: "value", value: ExpressionUtils.call("now") }], + }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault, + }, + updatedAt: { + name: "updatedAt", + type: "DateTime", + updatedAt: true, + attributes: [ + { name: "@updatedAt" }, + ] as readonly AttributeApplication[], + }, + email: { + name: "email", + type: "String", + unique: true, + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + }, + name: { + name: "name", + type: "String", + optional: true, + }, + posts: { + name: "posts", + type: "Post", + array: true, + relation: { opposite: "author" }, + }, + }, + idFields: ["id"], + uniqueFields: { + id: { type: "String" }, + email: { type: "String" }, + }, + }, + Post: { + name: "Post", + fields: { + id: { + name: "id", + type: "String", + id: true, + attributes: [ + { name: "@id" }, + { + name: "@default", + args: [{ name: "value", value: ExpressionUtils.call("cuid") }], + }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault, + }, + createdAt: { + name: "createdAt", + type: "DateTime", + attributes: [ + { + name: "@default", + args: [{ name: "value", value: ExpressionUtils.call("now") }], + }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault, + }, + updatedAt: { + name: "updatedAt", + type: "DateTime", + updatedAt: true, + attributes: [ + { name: "@updatedAt" }, + ] as readonly AttributeApplication[], + }, + title: { + name: "title", + type: "String", + }, + published: { + name: "published", + type: "Boolean", + attributes: [ + { + name: "@default", + args: [{ name: "value", value: ExpressionUtils.literal(false) }], + }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, + author: { + name: "author", + type: "User", + attributes: [ + { + name: "@relation", + args: [ + { + name: "fields", + value: ExpressionUtils.array("String", [ + ExpressionUtils.field("authorId"), + ]), }, - author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + { + name: "references", + value: ExpressionUtils.array("String", [ + ExpressionUtils.field("id"), + ]), }, - authorId: { - name: "authorId", - type: "String", - foreignKeyFor: [ - "author" - ] as readonly string[] - } - }, - idFields: ["id"], - uniqueFields: { - id: { type: "String" } - } - } - } as const; - authType = "User" as const; - procedures = { - signUp: { - params: { - email: { name: "email", type: "String" } + { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, + { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, + ], }, - returnType: "User", - mutation: true + ] as readonly AttributeApplication[], + relation: { + opposite: "posts", + fields: ["authorId"], + references: ["id"], + onUpdate: "Cascade", + onDelete: "Cascade", + }, + }, + authorId: { + name: "authorId", + type: "String", + foreignKeyFor: ["author"] as readonly string[], }, - listPublicPosts: { - params: {}, - returnType: "Post", - returnArray: true - } - } as const; - plugins = {}; + }, + idFields: ["id"], + uniqueFields: { + id: { type: "String" }, + }, + }, + } as const; + authType = "User" as const; + procedures = { + signUp: { + params: { + email: { name: "email", type: "String" }, + }, + returnType: "User", + mutation: true, + }, + listPublicPosts: { + params: {}, + returnType: "Post", + returnArray: true, + }, + } as const; + plugins = {}; } export const schema = new SchemaType(); diff --git a/samples/taskforge/src/db.ts b/samples/taskforge/src/db.ts index 172bb966a..3eecfc9c7 100644 --- a/samples/taskforge/src/db.ts +++ b/samples/taskforge/src/db.ts @@ -11,9 +11,7 @@ import { schema, type SchemaType } from '../zenstack/schema'; * Resolve it as an absolute path so the runtime opens the same file regardless * of the current working directory. */ -const databaseFile = fileURLToPath( - new URL('../zenstack/taskforge.db', import.meta.url), -); +const databaseFile = fileURLToPath(new URL('../zenstack/taskforge.db', import.meta.url)); /** Explicit, fully-inferred client type for use in function signatures. */ export type DB = ClientContract; @@ -30,11 +28,7 @@ export function createClient(): DB { openIssueCount: (eb, { modelAlias }) => eb .selectFrom('Issue') - .whereRef( - 'Issue.projectId', - '=', - sql.ref(`${modelAlias}.id`), - ) + .whereRef('Issue.projectId', '=', sql.ref(`${modelAlias}.id`)) .where('Issue.status', 'not in', ['DONE', 'CANCELED']) .select(({ fn }) => fn.countAll().as('c')), }, @@ -42,11 +36,7 @@ export function createClient(): DB { commentCount: (eb, { modelAlias }) => eb .selectFrom('Comment') - .whereRef( - 'Comment.issueId', - '=', - sql.ref(`${modelAlias}.id`), - ) + .whereRef('Comment.issueId', '=', sql.ref(`${modelAlias}.id`)) .select(({ fn }) => fn.countAll().as('c')), }, }, diff --git a/tests/e2e/apps/rally/zenstack/input.ts b/tests/e2e/apps/rally/zenstack/input.ts index cd816ecfa..0316e97e2 100644 --- a/tests/e2e/apps/rally/zenstack/input.ts +++ b/tests/e2e/apps/rally/zenstack/input.ts @@ -5,573 +5,676 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type AccountFindManyArgs = $FindManyArgs<$Schema, "Account">; -export type AccountFindUniqueArgs = $FindUniqueArgs<$Schema, "Account">; -export type AccountFindFirstArgs = $FindFirstArgs<$Schema, "Account">; -export type AccountExistsArgs = $ExistsArgs<$Schema, "Account">; -export type AccountCreateArgs = $CreateArgs<$Schema, "Account">; -export type AccountCreateManyArgs = $CreateManyArgs<$Schema, "Account">; -export type AccountCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Account">; -export type AccountUpdateArgs = $UpdateArgs<$Schema, "Account">; -export type AccountUpdateManyArgs = $UpdateManyArgs<$Schema, "Account">; -export type AccountUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Account">; -export type AccountUpsertArgs = $UpsertArgs<$Schema, "Account">; -export type AccountDeleteArgs = $DeleteArgs<$Schema, "Account">; -export type AccountDeleteManyArgs = $DeleteManyArgs<$Schema, "Account">; -export type AccountCountArgs = $CountArgs<$Schema, "Account">; -export type AccountAggregateArgs = $AggregateArgs<$Schema, "Account">; -export type AccountGroupByArgs = $GroupByArgs<$Schema, "Account">; -export type AccountWhereInput = $WhereInput<$Schema, "Account">; -export type AccountSelect = $SelectInput<$Schema, "Account">; -export type AccountInclude = $IncludeInput<$Schema, "Account">; -export type AccountOmit = $OmitInput<$Schema, "Account">; -export type AccountGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Account", Args, Options>; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type VerificationTokenFindManyArgs = $FindManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "VerificationToken">; -export type VerificationTokenFindFirstArgs = $FindFirstArgs<$Schema, "VerificationToken">; -export type VerificationTokenExistsArgs = $ExistsArgs<$Schema, "VerificationToken">; -export type VerificationTokenCreateArgs = $CreateArgs<$Schema, "VerificationToken">; -export type VerificationTokenCreateManyArgs = $CreateManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpdateArgs = $UpdateArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpsertArgs = $UpsertArgs<$Schema, "VerificationToken">; -export type VerificationTokenDeleteArgs = $DeleteArgs<$Schema, "VerificationToken">; -export type VerificationTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenCountArgs = $CountArgs<$Schema, "VerificationToken">; -export type VerificationTokenAggregateArgs = $AggregateArgs<$Schema, "VerificationToken">; -export type VerificationTokenGroupByArgs = $GroupByArgs<$Schema, "VerificationToken">; -export type VerificationTokenWhereInput = $WhereInput<$Schema, "VerificationToken">; -export type VerificationTokenSelect = $SelectInput<$Schema, "VerificationToken">; -export type VerificationTokenInclude = $IncludeInput<$Schema, "VerificationToken">; -export type VerificationTokenOmit = $OmitInput<$Schema, "VerificationToken">; -export type VerificationTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "VerificationToken", Args, Options>; -export type SessionFindManyArgs = $FindManyArgs<$Schema, "Session">; -export type SessionFindUniqueArgs = $FindUniqueArgs<$Schema, "Session">; -export type SessionFindFirstArgs = $FindFirstArgs<$Schema, "Session">; -export type SessionExistsArgs = $ExistsArgs<$Schema, "Session">; -export type SessionCreateArgs = $CreateArgs<$Schema, "Session">; -export type SessionCreateManyArgs = $CreateManyArgs<$Schema, "Session">; -export type SessionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Session">; -export type SessionUpdateArgs = $UpdateArgs<$Schema, "Session">; -export type SessionUpdateManyArgs = $UpdateManyArgs<$Schema, "Session">; -export type SessionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Session">; -export type SessionUpsertArgs = $UpsertArgs<$Schema, "Session">; -export type SessionDeleteArgs = $DeleteArgs<$Schema, "Session">; -export type SessionDeleteManyArgs = $DeleteManyArgs<$Schema, "Session">; -export type SessionCountArgs = $CountArgs<$Schema, "Session">; -export type SessionAggregateArgs = $AggregateArgs<$Schema, "Session">; -export type SessionGroupByArgs = $GroupByArgs<$Schema, "Session">; -export type SessionWhereInput = $WhereInput<$Schema, "Session">; -export type SessionSelect = $SelectInput<$Schema, "Session">; -export type SessionInclude = $IncludeInput<$Schema, "Session">; -export type SessionOmit = $OmitInput<$Schema, "Session">; -export type SessionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Session", Args, Options>; -export type VerificationFindManyArgs = $FindManyArgs<$Schema, "Verification">; -export type VerificationFindUniqueArgs = $FindUniqueArgs<$Schema, "Verification">; -export type VerificationFindFirstArgs = $FindFirstArgs<$Schema, "Verification">; -export type VerificationExistsArgs = $ExistsArgs<$Schema, "Verification">; -export type VerificationCreateArgs = $CreateArgs<$Schema, "Verification">; -export type VerificationCreateManyArgs = $CreateManyArgs<$Schema, "Verification">; -export type VerificationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Verification">; -export type VerificationUpdateArgs = $UpdateArgs<$Schema, "Verification">; -export type VerificationUpdateManyArgs = $UpdateManyArgs<$Schema, "Verification">; -export type VerificationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Verification">; -export type VerificationUpsertArgs = $UpsertArgs<$Schema, "Verification">; -export type VerificationDeleteArgs = $DeleteArgs<$Schema, "Verification">; -export type VerificationDeleteManyArgs = $DeleteManyArgs<$Schema, "Verification">; -export type VerificationCountArgs = $CountArgs<$Schema, "Verification">; -export type VerificationAggregateArgs = $AggregateArgs<$Schema, "Verification">; -export type VerificationGroupByArgs = $GroupByArgs<$Schema, "Verification">; -export type VerificationWhereInput = $WhereInput<$Schema, "Verification">; -export type VerificationSelect = $SelectInput<$Schema, "Verification">; -export type VerificationInclude = $IncludeInput<$Schema, "Verification">; -export type VerificationOmit = $OmitInput<$Schema, "Verification">; -export type VerificationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Verification", Args, Options>; -export type PollFindManyArgs = $FindManyArgs<$Schema, "Poll">; -export type PollFindUniqueArgs = $FindUniqueArgs<$Schema, "Poll">; -export type PollFindFirstArgs = $FindFirstArgs<$Schema, "Poll">; -export type PollExistsArgs = $ExistsArgs<$Schema, "Poll">; -export type PollCreateArgs = $CreateArgs<$Schema, "Poll">; -export type PollCreateManyArgs = $CreateManyArgs<$Schema, "Poll">; -export type PollCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Poll">; -export type PollUpdateArgs = $UpdateArgs<$Schema, "Poll">; -export type PollUpdateManyArgs = $UpdateManyArgs<$Schema, "Poll">; -export type PollUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Poll">; -export type PollUpsertArgs = $UpsertArgs<$Schema, "Poll">; -export type PollDeleteArgs = $DeleteArgs<$Schema, "Poll">; -export type PollDeleteManyArgs = $DeleteManyArgs<$Schema, "Poll">; -export type PollCountArgs = $CountArgs<$Schema, "Poll">; -export type PollAggregateArgs = $AggregateArgs<$Schema, "Poll">; -export type PollGroupByArgs = $GroupByArgs<$Schema, "Poll">; -export type PollWhereInput = $WhereInput<$Schema, "Poll">; -export type PollSelect = $SelectInput<$Schema, "Poll">; -export type PollInclude = $IncludeInput<$Schema, "Poll">; -export type PollOmit = $OmitInput<$Schema, "Poll">; -export type PollGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Poll", Args, Options>; -export type WatcherFindManyArgs = $FindManyArgs<$Schema, "Watcher">; -export type WatcherFindUniqueArgs = $FindUniqueArgs<$Schema, "Watcher">; -export type WatcherFindFirstArgs = $FindFirstArgs<$Schema, "Watcher">; -export type WatcherExistsArgs = $ExistsArgs<$Schema, "Watcher">; -export type WatcherCreateArgs = $CreateArgs<$Schema, "Watcher">; -export type WatcherCreateManyArgs = $CreateManyArgs<$Schema, "Watcher">; -export type WatcherCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Watcher">; -export type WatcherUpdateArgs = $UpdateArgs<$Schema, "Watcher">; -export type WatcherUpdateManyArgs = $UpdateManyArgs<$Schema, "Watcher">; -export type WatcherUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Watcher">; -export type WatcherUpsertArgs = $UpsertArgs<$Schema, "Watcher">; -export type WatcherDeleteArgs = $DeleteArgs<$Schema, "Watcher">; -export type WatcherDeleteManyArgs = $DeleteManyArgs<$Schema, "Watcher">; -export type WatcherCountArgs = $CountArgs<$Schema, "Watcher">; -export type WatcherAggregateArgs = $AggregateArgs<$Schema, "Watcher">; -export type WatcherGroupByArgs = $GroupByArgs<$Schema, "Watcher">; -export type WatcherWhereInput = $WhereInput<$Schema, "Watcher">; -export type WatcherSelect = $SelectInput<$Schema, "Watcher">; -export type WatcherInclude = $IncludeInput<$Schema, "Watcher">; -export type WatcherOmit = $OmitInput<$Schema, "Watcher">; -export type WatcherGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Watcher", Args, Options>; -export type ParticipantFindManyArgs = $FindManyArgs<$Schema, "Participant">; -export type ParticipantFindUniqueArgs = $FindUniqueArgs<$Schema, "Participant">; -export type ParticipantFindFirstArgs = $FindFirstArgs<$Schema, "Participant">; -export type ParticipantExistsArgs = $ExistsArgs<$Schema, "Participant">; -export type ParticipantCreateArgs = $CreateArgs<$Schema, "Participant">; -export type ParticipantCreateManyArgs = $CreateManyArgs<$Schema, "Participant">; -export type ParticipantCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Participant">; -export type ParticipantUpdateArgs = $UpdateArgs<$Schema, "Participant">; -export type ParticipantUpdateManyArgs = $UpdateManyArgs<$Schema, "Participant">; -export type ParticipantUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Participant">; -export type ParticipantUpsertArgs = $UpsertArgs<$Schema, "Participant">; -export type ParticipantDeleteArgs = $DeleteArgs<$Schema, "Participant">; -export type ParticipantDeleteManyArgs = $DeleteManyArgs<$Schema, "Participant">; -export type ParticipantCountArgs = $CountArgs<$Schema, "Participant">; -export type ParticipantAggregateArgs = $AggregateArgs<$Schema, "Participant">; -export type ParticipantGroupByArgs = $GroupByArgs<$Schema, "Participant">; -export type ParticipantWhereInput = $WhereInput<$Schema, "Participant">; -export type ParticipantSelect = $SelectInput<$Schema, "Participant">; -export type ParticipantInclude = $IncludeInput<$Schema, "Participant">; -export type ParticipantOmit = $OmitInput<$Schema, "Participant">; -export type ParticipantGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Participant", Args, Options>; -export type OptionFindManyArgs = $FindManyArgs<$Schema, "Option">; -export type OptionFindUniqueArgs = $FindUniqueArgs<$Schema, "Option">; -export type OptionFindFirstArgs = $FindFirstArgs<$Schema, "Option">; -export type OptionExistsArgs = $ExistsArgs<$Schema, "Option">; -export type OptionCreateArgs = $CreateArgs<$Schema, "Option">; -export type OptionCreateManyArgs = $CreateManyArgs<$Schema, "Option">; -export type OptionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Option">; -export type OptionUpdateArgs = $UpdateArgs<$Schema, "Option">; -export type OptionUpdateManyArgs = $UpdateManyArgs<$Schema, "Option">; -export type OptionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Option">; -export type OptionUpsertArgs = $UpsertArgs<$Schema, "Option">; -export type OptionDeleteArgs = $DeleteArgs<$Schema, "Option">; -export type OptionDeleteManyArgs = $DeleteManyArgs<$Schema, "Option">; -export type OptionCountArgs = $CountArgs<$Schema, "Option">; -export type OptionAggregateArgs = $AggregateArgs<$Schema, "Option">; -export type OptionGroupByArgs = $GroupByArgs<$Schema, "Option">; -export type OptionWhereInput = $WhereInput<$Schema, "Option">; -export type OptionSelect = $SelectInput<$Schema, "Option">; -export type OptionInclude = $IncludeInput<$Schema, "Option">; -export type OptionOmit = $OmitInput<$Schema, "Option">; -export type OptionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Option", Args, Options>; -export type VoteFindManyArgs = $FindManyArgs<$Schema, "Vote">; -export type VoteFindUniqueArgs = $FindUniqueArgs<$Schema, "Vote">; -export type VoteFindFirstArgs = $FindFirstArgs<$Schema, "Vote">; -export type VoteExistsArgs = $ExistsArgs<$Schema, "Vote">; -export type VoteCreateArgs = $CreateArgs<$Schema, "Vote">; -export type VoteCreateManyArgs = $CreateManyArgs<$Schema, "Vote">; -export type VoteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Vote">; -export type VoteUpdateArgs = $UpdateArgs<$Schema, "Vote">; -export type VoteUpdateManyArgs = $UpdateManyArgs<$Schema, "Vote">; -export type VoteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Vote">; -export type VoteUpsertArgs = $UpsertArgs<$Schema, "Vote">; -export type VoteDeleteArgs = $DeleteArgs<$Schema, "Vote">; -export type VoteDeleteManyArgs = $DeleteManyArgs<$Schema, "Vote">; -export type VoteCountArgs = $CountArgs<$Schema, "Vote">; -export type VoteAggregateArgs = $AggregateArgs<$Schema, "Vote">; -export type VoteGroupByArgs = $GroupByArgs<$Schema, "Vote">; -export type VoteWhereInput = $WhereInput<$Schema, "Vote">; -export type VoteSelect = $SelectInput<$Schema, "Vote">; -export type VoteInclude = $IncludeInput<$Schema, "Vote">; -export type VoteOmit = $OmitInput<$Schema, "Vote">; -export type VoteGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Vote", Args, Options>; -export type CommentFindManyArgs = $FindManyArgs<$Schema, "Comment">; -export type CommentFindUniqueArgs = $FindUniqueArgs<$Schema, "Comment">; -export type CommentFindFirstArgs = $FindFirstArgs<$Schema, "Comment">; -export type CommentExistsArgs = $ExistsArgs<$Schema, "Comment">; -export type CommentCreateArgs = $CreateArgs<$Schema, "Comment">; -export type CommentCreateManyArgs = $CreateManyArgs<$Schema, "Comment">; -export type CommentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Comment">; -export type CommentUpdateArgs = $UpdateArgs<$Schema, "Comment">; -export type CommentUpdateManyArgs = $UpdateManyArgs<$Schema, "Comment">; -export type CommentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Comment">; -export type CommentUpsertArgs = $UpsertArgs<$Schema, "Comment">; -export type CommentDeleteArgs = $DeleteArgs<$Schema, "Comment">; -export type CommentDeleteManyArgs = $DeleteManyArgs<$Schema, "Comment">; -export type CommentCountArgs = $CountArgs<$Schema, "Comment">; -export type CommentAggregateArgs = $AggregateArgs<$Schema, "Comment">; -export type CommentGroupByArgs = $GroupByArgs<$Schema, "Comment">; -export type CommentWhereInput = $WhereInput<$Schema, "Comment">; -export type CommentSelect = $SelectInput<$Schema, "Comment">; -export type CommentInclude = $IncludeInput<$Schema, "Comment">; -export type CommentOmit = $OmitInput<$Schema, "Comment">; -export type CommentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Comment", Args, Options>; -export type PollViewFindManyArgs = $FindManyArgs<$Schema, "PollView">; -export type PollViewFindUniqueArgs = $FindUniqueArgs<$Schema, "PollView">; -export type PollViewFindFirstArgs = $FindFirstArgs<$Schema, "PollView">; -export type PollViewExistsArgs = $ExistsArgs<$Schema, "PollView">; -export type PollViewCreateArgs = $CreateArgs<$Schema, "PollView">; -export type PollViewCreateManyArgs = $CreateManyArgs<$Schema, "PollView">; -export type PollViewCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "PollView">; -export type PollViewUpdateArgs = $UpdateArgs<$Schema, "PollView">; -export type PollViewUpdateManyArgs = $UpdateManyArgs<$Schema, "PollView">; -export type PollViewUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "PollView">; -export type PollViewUpsertArgs = $UpsertArgs<$Schema, "PollView">; -export type PollViewDeleteArgs = $DeleteArgs<$Schema, "PollView">; -export type PollViewDeleteManyArgs = $DeleteManyArgs<$Schema, "PollView">; -export type PollViewCountArgs = $CountArgs<$Schema, "PollView">; -export type PollViewAggregateArgs = $AggregateArgs<$Schema, "PollView">; -export type PollViewGroupByArgs = $GroupByArgs<$Schema, "PollView">; -export type PollViewWhereInput = $WhereInput<$Schema, "PollView">; -export type PollViewSelect = $SelectInput<$Schema, "PollView">; -export type PollViewInclude = $IncludeInput<$Schema, "PollView">; -export type PollViewOmit = $OmitInput<$Schema, "PollView">; -export type PollViewGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "PollView", Args, Options>; -export type SpaceFindManyArgs = $FindManyArgs<$Schema, "Space">; -export type SpaceFindUniqueArgs = $FindUniqueArgs<$Schema, "Space">; -export type SpaceFindFirstArgs = $FindFirstArgs<$Schema, "Space">; -export type SpaceExistsArgs = $ExistsArgs<$Schema, "Space">; -export type SpaceCreateArgs = $CreateArgs<$Schema, "Space">; -export type SpaceCreateManyArgs = $CreateManyArgs<$Schema, "Space">; -export type SpaceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Space">; -export type SpaceUpdateArgs = $UpdateArgs<$Schema, "Space">; -export type SpaceUpdateManyArgs = $UpdateManyArgs<$Schema, "Space">; -export type SpaceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Space">; -export type SpaceUpsertArgs = $UpsertArgs<$Schema, "Space">; -export type SpaceDeleteArgs = $DeleteArgs<$Schema, "Space">; -export type SpaceDeleteManyArgs = $DeleteManyArgs<$Schema, "Space">; -export type SpaceCountArgs = $CountArgs<$Schema, "Space">; -export type SpaceAggregateArgs = $AggregateArgs<$Schema, "Space">; -export type SpaceGroupByArgs = $GroupByArgs<$Schema, "Space">; -export type SpaceWhereInput = $WhereInput<$Schema, "Space">; -export type SpaceSelect = $SelectInput<$Schema, "Space">; -export type SpaceInclude = $IncludeInput<$Schema, "Space">; -export type SpaceOmit = $OmitInput<$Schema, "Space">; -export type SpaceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Space", Args, Options>; -export type SpaceMemberFindManyArgs = $FindManyArgs<$Schema, "SpaceMember">; -export type SpaceMemberFindUniqueArgs = $FindUniqueArgs<$Schema, "SpaceMember">; -export type SpaceMemberFindFirstArgs = $FindFirstArgs<$Schema, "SpaceMember">; -export type SpaceMemberExistsArgs = $ExistsArgs<$Schema, "SpaceMember">; -export type SpaceMemberCreateArgs = $CreateArgs<$Schema, "SpaceMember">; -export type SpaceMemberCreateManyArgs = $CreateManyArgs<$Schema, "SpaceMember">; -export type SpaceMemberCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SpaceMember">; -export type SpaceMemberUpdateArgs = $UpdateArgs<$Schema, "SpaceMember">; -export type SpaceMemberUpdateManyArgs = $UpdateManyArgs<$Schema, "SpaceMember">; -export type SpaceMemberUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SpaceMember">; -export type SpaceMemberUpsertArgs = $UpsertArgs<$Schema, "SpaceMember">; -export type SpaceMemberDeleteArgs = $DeleteArgs<$Schema, "SpaceMember">; -export type SpaceMemberDeleteManyArgs = $DeleteManyArgs<$Schema, "SpaceMember">; -export type SpaceMemberCountArgs = $CountArgs<$Schema, "SpaceMember">; -export type SpaceMemberAggregateArgs = $AggregateArgs<$Schema, "SpaceMember">; -export type SpaceMemberGroupByArgs = $GroupByArgs<$Schema, "SpaceMember">; -export type SpaceMemberWhereInput = $WhereInput<$Schema, "SpaceMember">; -export type SpaceMemberSelect = $SelectInput<$Schema, "SpaceMember">; -export type SpaceMemberInclude = $IncludeInput<$Schema, "SpaceMember">; -export type SpaceMemberOmit = $OmitInput<$Schema, "SpaceMember">; -export type SpaceMemberGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SpaceMember", Args, Options>; -export type SpaceMemberInviteFindManyArgs = $FindManyArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteFindUniqueArgs = $FindUniqueArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteFindFirstArgs = $FindFirstArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteExistsArgs = $ExistsArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteCreateArgs = $CreateArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteCreateManyArgs = $CreateManyArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteUpdateArgs = $UpdateArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteUpdateManyArgs = $UpdateManyArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteUpsertArgs = $UpsertArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteDeleteArgs = $DeleteArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteDeleteManyArgs = $DeleteManyArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteCountArgs = $CountArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteAggregateArgs = $AggregateArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteGroupByArgs = $GroupByArgs<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteWhereInput = $WhereInput<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteSelect = $SelectInput<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteInclude = $IncludeInput<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteOmit = $OmitInput<$Schema, "SpaceMemberInvite">; -export type SpaceMemberInviteGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SpaceMemberInvite", Args, Options>; -export type SubscriptionFindManyArgs = $FindManyArgs<$Schema, "Subscription">; -export type SubscriptionFindUniqueArgs = $FindUniqueArgs<$Schema, "Subscription">; -export type SubscriptionFindFirstArgs = $FindFirstArgs<$Schema, "Subscription">; -export type SubscriptionExistsArgs = $ExistsArgs<$Schema, "Subscription">; -export type SubscriptionCreateArgs = $CreateArgs<$Schema, "Subscription">; -export type SubscriptionCreateManyArgs = $CreateManyArgs<$Schema, "Subscription">; -export type SubscriptionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Subscription">; -export type SubscriptionUpdateArgs = $UpdateArgs<$Schema, "Subscription">; -export type SubscriptionUpdateManyArgs = $UpdateManyArgs<$Schema, "Subscription">; -export type SubscriptionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Subscription">; -export type SubscriptionUpsertArgs = $UpsertArgs<$Schema, "Subscription">; -export type SubscriptionDeleteArgs = $DeleteArgs<$Schema, "Subscription">; -export type SubscriptionDeleteManyArgs = $DeleteManyArgs<$Schema, "Subscription">; -export type SubscriptionCountArgs = $CountArgs<$Schema, "Subscription">; -export type SubscriptionAggregateArgs = $AggregateArgs<$Schema, "Subscription">; -export type SubscriptionGroupByArgs = $GroupByArgs<$Schema, "Subscription">; -export type SubscriptionWhereInput = $WhereInput<$Schema, "Subscription">; -export type SubscriptionSelect = $SelectInput<$Schema, "Subscription">; -export type SubscriptionInclude = $IncludeInput<$Schema, "Subscription">; -export type SubscriptionOmit = $OmitInput<$Schema, "Subscription">; -export type SubscriptionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Subscription", Args, Options>; -export type PaymentMethodFindManyArgs = $FindManyArgs<$Schema, "PaymentMethod">; -export type PaymentMethodFindUniqueArgs = $FindUniqueArgs<$Schema, "PaymentMethod">; -export type PaymentMethodFindFirstArgs = $FindFirstArgs<$Schema, "PaymentMethod">; -export type PaymentMethodExistsArgs = $ExistsArgs<$Schema, "PaymentMethod">; -export type PaymentMethodCreateArgs = $CreateArgs<$Schema, "PaymentMethod">; -export type PaymentMethodCreateManyArgs = $CreateManyArgs<$Schema, "PaymentMethod">; -export type PaymentMethodCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "PaymentMethod">; -export type PaymentMethodUpdateArgs = $UpdateArgs<$Schema, "PaymentMethod">; -export type PaymentMethodUpdateManyArgs = $UpdateManyArgs<$Schema, "PaymentMethod">; -export type PaymentMethodUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "PaymentMethod">; -export type PaymentMethodUpsertArgs = $UpsertArgs<$Schema, "PaymentMethod">; -export type PaymentMethodDeleteArgs = $DeleteArgs<$Schema, "PaymentMethod">; -export type PaymentMethodDeleteManyArgs = $DeleteManyArgs<$Schema, "PaymentMethod">; -export type PaymentMethodCountArgs = $CountArgs<$Schema, "PaymentMethod">; -export type PaymentMethodAggregateArgs = $AggregateArgs<$Schema, "PaymentMethod">; -export type PaymentMethodGroupByArgs = $GroupByArgs<$Schema, "PaymentMethod">; -export type PaymentMethodWhereInput = $WhereInput<$Schema, "PaymentMethod">; -export type PaymentMethodSelect = $SelectInput<$Schema, "PaymentMethod">; -export type PaymentMethodInclude = $IncludeInput<$Schema, "PaymentMethod">; -export type PaymentMethodOmit = $OmitInput<$Schema, "PaymentMethod">; -export type PaymentMethodGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "PaymentMethod", Args, Options>; -export type ScheduledEventFindManyArgs = $FindManyArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventFindUniqueArgs = $FindUniqueArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventFindFirstArgs = $FindFirstArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventExistsArgs = $ExistsArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventCreateArgs = $CreateArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventCreateManyArgs = $CreateManyArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventUpdateArgs = $UpdateArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventUpdateManyArgs = $UpdateManyArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventUpsertArgs = $UpsertArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventDeleteArgs = $DeleteArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventDeleteManyArgs = $DeleteManyArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventCountArgs = $CountArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventAggregateArgs = $AggregateArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventGroupByArgs = $GroupByArgs<$Schema, "ScheduledEvent">; -export type ScheduledEventWhereInput = $WhereInput<$Schema, "ScheduledEvent">; -export type ScheduledEventSelect = $SelectInput<$Schema, "ScheduledEvent">; -export type ScheduledEventInclude = $IncludeInput<$Schema, "ScheduledEvent">; -export type ScheduledEventOmit = $OmitInput<$Schema, "ScheduledEvent">; -export type ScheduledEventGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ScheduledEvent", Args, Options>; -export type RescheduledEventDateFindManyArgs = $FindManyArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateFindUniqueArgs = $FindUniqueArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateFindFirstArgs = $FindFirstArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateExistsArgs = $ExistsArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateCreateArgs = $CreateArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateCreateManyArgs = $CreateManyArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateUpdateArgs = $UpdateArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateUpdateManyArgs = $UpdateManyArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateUpsertArgs = $UpsertArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateDeleteArgs = $DeleteArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateDeleteManyArgs = $DeleteManyArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateCountArgs = $CountArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateAggregateArgs = $AggregateArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateGroupByArgs = $GroupByArgs<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateWhereInput = $WhereInput<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateSelect = $SelectInput<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateInclude = $IncludeInput<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateOmit = $OmitInput<$Schema, "RescheduledEventDate">; -export type RescheduledEventDateGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RescheduledEventDate", Args, Options>; -export type ScheduledEventInviteFindManyArgs = $FindManyArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteFindUniqueArgs = $FindUniqueArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteFindFirstArgs = $FindFirstArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteExistsArgs = $ExistsArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteCreateArgs = $CreateArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteCreateManyArgs = $CreateManyArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteUpdateArgs = $UpdateArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteUpdateManyArgs = $UpdateManyArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteUpsertArgs = $UpsertArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteDeleteArgs = $DeleteArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteDeleteManyArgs = $DeleteManyArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteCountArgs = $CountArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteAggregateArgs = $AggregateArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteGroupByArgs = $GroupByArgs<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteWhereInput = $WhereInput<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteSelect = $SelectInput<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteInclude = $IncludeInput<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteOmit = $OmitInput<$Schema, "ScheduledEventInvite">; -export type ScheduledEventInviteGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ScheduledEventInvite", Args, Options>; -export type CredentialFindManyArgs = $FindManyArgs<$Schema, "Credential">; -export type CredentialFindUniqueArgs = $FindUniqueArgs<$Schema, "Credential">; -export type CredentialFindFirstArgs = $FindFirstArgs<$Schema, "Credential">; -export type CredentialExistsArgs = $ExistsArgs<$Schema, "Credential">; -export type CredentialCreateArgs = $CreateArgs<$Schema, "Credential">; -export type CredentialCreateManyArgs = $CreateManyArgs<$Schema, "Credential">; -export type CredentialCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Credential">; -export type CredentialUpdateArgs = $UpdateArgs<$Schema, "Credential">; -export type CredentialUpdateManyArgs = $UpdateManyArgs<$Schema, "Credential">; -export type CredentialUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Credential">; -export type CredentialUpsertArgs = $UpsertArgs<$Schema, "Credential">; -export type CredentialDeleteArgs = $DeleteArgs<$Schema, "Credential">; -export type CredentialDeleteManyArgs = $DeleteManyArgs<$Schema, "Credential">; -export type CredentialCountArgs = $CountArgs<$Schema, "Credential">; -export type CredentialAggregateArgs = $AggregateArgs<$Schema, "Credential">; -export type CredentialGroupByArgs = $GroupByArgs<$Schema, "Credential">; -export type CredentialWhereInput = $WhereInput<$Schema, "Credential">; -export type CredentialSelect = $SelectInput<$Schema, "Credential">; -export type CredentialInclude = $IncludeInput<$Schema, "Credential">; -export type CredentialOmit = $OmitInput<$Schema, "Credential">; -export type CredentialGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Credential", Args, Options>; -export type CalendarConnectionFindManyArgs = $FindManyArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionFindUniqueArgs = $FindUniqueArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionFindFirstArgs = $FindFirstArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionExistsArgs = $ExistsArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionCreateArgs = $CreateArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionCreateManyArgs = $CreateManyArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionUpdateArgs = $UpdateArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionUpdateManyArgs = $UpdateManyArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionUpsertArgs = $UpsertArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionDeleteArgs = $DeleteArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionDeleteManyArgs = $DeleteManyArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionCountArgs = $CountArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionAggregateArgs = $AggregateArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionGroupByArgs = $GroupByArgs<$Schema, "CalendarConnection">; -export type CalendarConnectionWhereInput = $WhereInput<$Schema, "CalendarConnection">; -export type CalendarConnectionSelect = $SelectInput<$Schema, "CalendarConnection">; -export type CalendarConnectionInclude = $IncludeInput<$Schema, "CalendarConnection">; -export type CalendarConnectionOmit = $OmitInput<$Schema, "CalendarConnection">; -export type CalendarConnectionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "CalendarConnection", Args, Options>; -export type ProviderCalendarFindManyArgs = $FindManyArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarFindUniqueArgs = $FindUniqueArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarFindFirstArgs = $FindFirstArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarExistsArgs = $ExistsArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarCreateArgs = $CreateArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarCreateManyArgs = $CreateManyArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarUpdateArgs = $UpdateArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarUpdateManyArgs = $UpdateManyArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarUpsertArgs = $UpsertArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarDeleteArgs = $DeleteArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarDeleteManyArgs = $DeleteManyArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarCountArgs = $CountArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarAggregateArgs = $AggregateArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarGroupByArgs = $GroupByArgs<$Schema, "ProviderCalendar">; -export type ProviderCalendarWhereInput = $WhereInput<$Schema, "ProviderCalendar">; -export type ProviderCalendarSelect = $SelectInput<$Schema, "ProviderCalendar">; -export type ProviderCalendarInclude = $IncludeInput<$Schema, "ProviderCalendar">; -export type ProviderCalendarOmit = $OmitInput<$Schema, "ProviderCalendar">; -export type ProviderCalendarGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ProviderCalendar", Args, Options>; -export type InstanceSettingsFindManyArgs = $FindManyArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsFindUniqueArgs = $FindUniqueArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsFindFirstArgs = $FindFirstArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsExistsArgs = $ExistsArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsCreateArgs = $CreateArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsCreateManyArgs = $CreateManyArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsUpdateArgs = $UpdateArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsUpdateManyArgs = $UpdateManyArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsUpsertArgs = $UpsertArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsDeleteArgs = $DeleteArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsDeleteManyArgs = $DeleteManyArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsCountArgs = $CountArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsAggregateArgs = $AggregateArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsGroupByArgs = $GroupByArgs<$Schema, "InstanceSettings">; -export type InstanceSettingsWhereInput = $WhereInput<$Schema, "InstanceSettings">; -export type InstanceSettingsSelect = $SelectInput<$Schema, "InstanceSettings">; -export type InstanceSettingsInclude = $IncludeInput<$Schema, "InstanceSettings">; -export type InstanceSettingsOmit = $OmitInput<$Schema, "InstanceSettings">; -export type InstanceSettingsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "InstanceSettings", Args, Options>; -export type LicenseFindManyArgs = $FindManyArgs<$Schema, "License">; -export type LicenseFindUniqueArgs = $FindUniqueArgs<$Schema, "License">; -export type LicenseFindFirstArgs = $FindFirstArgs<$Schema, "License">; -export type LicenseExistsArgs = $ExistsArgs<$Schema, "License">; -export type LicenseCreateArgs = $CreateArgs<$Schema, "License">; -export type LicenseCreateManyArgs = $CreateManyArgs<$Schema, "License">; -export type LicenseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "License">; -export type LicenseUpdateArgs = $UpdateArgs<$Schema, "License">; -export type LicenseUpdateManyArgs = $UpdateManyArgs<$Schema, "License">; -export type LicenseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "License">; -export type LicenseUpsertArgs = $UpsertArgs<$Schema, "License">; -export type LicenseDeleteArgs = $DeleteArgs<$Schema, "License">; -export type LicenseDeleteManyArgs = $DeleteManyArgs<$Schema, "License">; -export type LicenseCountArgs = $CountArgs<$Schema, "License">; -export type LicenseAggregateArgs = $AggregateArgs<$Schema, "License">; -export type LicenseGroupByArgs = $GroupByArgs<$Schema, "License">; -export type LicenseWhereInput = $WhereInput<$Schema, "License">; -export type LicenseSelect = $SelectInput<$Schema, "License">; -export type LicenseInclude = $IncludeInput<$Schema, "License">; -export type LicenseOmit = $OmitInput<$Schema, "License">; -export type LicenseGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "License", Args, Options>; -export type LicenseValidationFindManyArgs = $FindManyArgs<$Schema, "LicenseValidation">; -export type LicenseValidationFindUniqueArgs = $FindUniqueArgs<$Schema, "LicenseValidation">; -export type LicenseValidationFindFirstArgs = $FindFirstArgs<$Schema, "LicenseValidation">; -export type LicenseValidationExistsArgs = $ExistsArgs<$Schema, "LicenseValidation">; -export type LicenseValidationCreateArgs = $CreateArgs<$Schema, "LicenseValidation">; -export type LicenseValidationCreateManyArgs = $CreateManyArgs<$Schema, "LicenseValidation">; -export type LicenseValidationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "LicenseValidation">; -export type LicenseValidationUpdateArgs = $UpdateArgs<$Schema, "LicenseValidation">; -export type LicenseValidationUpdateManyArgs = $UpdateManyArgs<$Schema, "LicenseValidation">; -export type LicenseValidationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "LicenseValidation">; -export type LicenseValidationUpsertArgs = $UpsertArgs<$Schema, "LicenseValidation">; -export type LicenseValidationDeleteArgs = $DeleteArgs<$Schema, "LicenseValidation">; -export type LicenseValidationDeleteManyArgs = $DeleteManyArgs<$Schema, "LicenseValidation">; -export type LicenseValidationCountArgs = $CountArgs<$Schema, "LicenseValidation">; -export type LicenseValidationAggregateArgs = $AggregateArgs<$Schema, "LicenseValidation">; -export type LicenseValidationGroupByArgs = $GroupByArgs<$Schema, "LicenseValidation">; -export type LicenseValidationWhereInput = $WhereInput<$Schema, "LicenseValidation">; -export type LicenseValidationSelect = $SelectInput<$Schema, "LicenseValidation">; -export type LicenseValidationInclude = $IncludeInput<$Schema, "LicenseValidation">; -export type LicenseValidationOmit = $OmitInput<$Schema, "LicenseValidation">; -export type LicenseValidationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "LicenseValidation", Args, Options>; -export type InstanceLicenseFindManyArgs = $FindManyArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseFindUniqueArgs = $FindUniqueArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseFindFirstArgs = $FindFirstArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseExistsArgs = $ExistsArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseCreateArgs = $CreateArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseCreateManyArgs = $CreateManyArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseUpdateArgs = $UpdateArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseUpdateManyArgs = $UpdateManyArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseUpsertArgs = $UpsertArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseDeleteArgs = $DeleteArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseDeleteManyArgs = $DeleteManyArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseCountArgs = $CountArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseAggregateArgs = $AggregateArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseGroupByArgs = $GroupByArgs<$Schema, "InstanceLicense">; -export type InstanceLicenseWhereInput = $WhereInput<$Schema, "InstanceLicense">; -export type InstanceLicenseSelect = $SelectInput<$Schema, "InstanceLicense">; -export type InstanceLicenseInclude = $IncludeInput<$Schema, "InstanceLicense">; -export type InstanceLicenseOmit = $OmitInput<$Schema, "InstanceLicense">; -export type InstanceLicenseGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "InstanceLicense", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type AccountFindManyArgs = $FindManyArgs<$Schema, 'Account'>; +export type AccountFindUniqueArgs = $FindUniqueArgs<$Schema, 'Account'>; +export type AccountFindFirstArgs = $FindFirstArgs<$Schema, 'Account'>; +export type AccountExistsArgs = $ExistsArgs<$Schema, 'Account'>; +export type AccountCreateArgs = $CreateArgs<$Schema, 'Account'>; +export type AccountCreateManyArgs = $CreateManyArgs<$Schema, 'Account'>; +export type AccountCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Account'>; +export type AccountUpdateArgs = $UpdateArgs<$Schema, 'Account'>; +export type AccountUpdateManyArgs = $UpdateManyArgs<$Schema, 'Account'>; +export type AccountUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Account'>; +export type AccountUpsertArgs = $UpsertArgs<$Schema, 'Account'>; +export type AccountDeleteArgs = $DeleteArgs<$Schema, 'Account'>; +export type AccountDeleteManyArgs = $DeleteManyArgs<$Schema, 'Account'>; +export type AccountCountArgs = $CountArgs<$Schema, 'Account'>; +export type AccountAggregateArgs = $AggregateArgs<$Schema, 'Account'>; +export type AccountGroupByArgs = $GroupByArgs<$Schema, 'Account'>; +export type AccountWhereInput = $WhereInput<$Schema, 'Account'>; +export type AccountSelect = $SelectInput<$Schema, 'Account'>; +export type AccountInclude = $IncludeInput<$Schema, 'Account'>; +export type AccountOmit = $OmitInput<$Schema, 'Account'>; +export type AccountGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Account', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Account', Args, Options>; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type VerificationTokenFindManyArgs = $FindManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenFindFirstArgs = $FindFirstArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenExistsArgs = $ExistsArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCreateArgs = $CreateArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCreateManyArgs = $CreateManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpdateArgs = $UpdateArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpsertArgs = $UpsertArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenDeleteArgs = $DeleteArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCountArgs = $CountArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenAggregateArgs = $AggregateArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenGroupByArgs = $GroupByArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenWhereInput = $WhereInput<$Schema, 'VerificationToken'>; +export type VerificationTokenSelect = $SelectInput<$Schema, 'VerificationToken'>; +export type VerificationTokenInclude = $IncludeInput<$Schema, 'VerificationToken'>; +export type VerificationTokenOmit = $OmitInput<$Schema, 'VerificationToken'>; +export type VerificationTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'VerificationToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'VerificationToken', Args, Options>; +export type SessionFindManyArgs = $FindManyArgs<$Schema, 'Session'>; +export type SessionFindUniqueArgs = $FindUniqueArgs<$Schema, 'Session'>; +export type SessionFindFirstArgs = $FindFirstArgs<$Schema, 'Session'>; +export type SessionExistsArgs = $ExistsArgs<$Schema, 'Session'>; +export type SessionCreateArgs = $CreateArgs<$Schema, 'Session'>; +export type SessionCreateManyArgs = $CreateManyArgs<$Schema, 'Session'>; +export type SessionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Session'>; +export type SessionUpdateArgs = $UpdateArgs<$Schema, 'Session'>; +export type SessionUpdateManyArgs = $UpdateManyArgs<$Schema, 'Session'>; +export type SessionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Session'>; +export type SessionUpsertArgs = $UpsertArgs<$Schema, 'Session'>; +export type SessionDeleteArgs = $DeleteArgs<$Schema, 'Session'>; +export type SessionDeleteManyArgs = $DeleteManyArgs<$Schema, 'Session'>; +export type SessionCountArgs = $CountArgs<$Schema, 'Session'>; +export type SessionAggregateArgs = $AggregateArgs<$Schema, 'Session'>; +export type SessionGroupByArgs = $GroupByArgs<$Schema, 'Session'>; +export type SessionWhereInput = $WhereInput<$Schema, 'Session'>; +export type SessionSelect = $SelectInput<$Schema, 'Session'>; +export type SessionInclude = $IncludeInput<$Schema, 'Session'>; +export type SessionOmit = $OmitInput<$Schema, 'Session'>; +export type SessionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Session', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Session', Args, Options>; +export type VerificationFindManyArgs = $FindManyArgs<$Schema, 'Verification'>; +export type VerificationFindUniqueArgs = $FindUniqueArgs<$Schema, 'Verification'>; +export type VerificationFindFirstArgs = $FindFirstArgs<$Schema, 'Verification'>; +export type VerificationExistsArgs = $ExistsArgs<$Schema, 'Verification'>; +export type VerificationCreateArgs = $CreateArgs<$Schema, 'Verification'>; +export type VerificationCreateManyArgs = $CreateManyArgs<$Schema, 'Verification'>; +export type VerificationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Verification'>; +export type VerificationUpdateArgs = $UpdateArgs<$Schema, 'Verification'>; +export type VerificationUpdateManyArgs = $UpdateManyArgs<$Schema, 'Verification'>; +export type VerificationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Verification'>; +export type VerificationUpsertArgs = $UpsertArgs<$Schema, 'Verification'>; +export type VerificationDeleteArgs = $DeleteArgs<$Schema, 'Verification'>; +export type VerificationDeleteManyArgs = $DeleteManyArgs<$Schema, 'Verification'>; +export type VerificationCountArgs = $CountArgs<$Schema, 'Verification'>; +export type VerificationAggregateArgs = $AggregateArgs<$Schema, 'Verification'>; +export type VerificationGroupByArgs = $GroupByArgs<$Schema, 'Verification'>; +export type VerificationWhereInput = $WhereInput<$Schema, 'Verification'>; +export type VerificationSelect = $SelectInput<$Schema, 'Verification'>; +export type VerificationInclude = $IncludeInput<$Schema, 'Verification'>; +export type VerificationOmit = $OmitInput<$Schema, 'Verification'>; +export type VerificationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Verification', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Verification', Args, Options>; +export type PollFindManyArgs = $FindManyArgs<$Schema, 'Poll'>; +export type PollFindUniqueArgs = $FindUniqueArgs<$Schema, 'Poll'>; +export type PollFindFirstArgs = $FindFirstArgs<$Schema, 'Poll'>; +export type PollExistsArgs = $ExistsArgs<$Schema, 'Poll'>; +export type PollCreateArgs = $CreateArgs<$Schema, 'Poll'>; +export type PollCreateManyArgs = $CreateManyArgs<$Schema, 'Poll'>; +export type PollCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Poll'>; +export type PollUpdateArgs = $UpdateArgs<$Schema, 'Poll'>; +export type PollUpdateManyArgs = $UpdateManyArgs<$Schema, 'Poll'>; +export type PollUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Poll'>; +export type PollUpsertArgs = $UpsertArgs<$Schema, 'Poll'>; +export type PollDeleteArgs = $DeleteArgs<$Schema, 'Poll'>; +export type PollDeleteManyArgs = $DeleteManyArgs<$Schema, 'Poll'>; +export type PollCountArgs = $CountArgs<$Schema, 'Poll'>; +export type PollAggregateArgs = $AggregateArgs<$Schema, 'Poll'>; +export type PollGroupByArgs = $GroupByArgs<$Schema, 'Poll'>; +export type PollWhereInput = $WhereInput<$Schema, 'Poll'>; +export type PollSelect = $SelectInput<$Schema, 'Poll'>; +export type PollInclude = $IncludeInput<$Schema, 'Poll'>; +export type PollOmit = $OmitInput<$Schema, 'Poll'>; +export type PollGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Poll', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Poll', Args, Options>; +export type WatcherFindManyArgs = $FindManyArgs<$Schema, 'Watcher'>; +export type WatcherFindUniqueArgs = $FindUniqueArgs<$Schema, 'Watcher'>; +export type WatcherFindFirstArgs = $FindFirstArgs<$Schema, 'Watcher'>; +export type WatcherExistsArgs = $ExistsArgs<$Schema, 'Watcher'>; +export type WatcherCreateArgs = $CreateArgs<$Schema, 'Watcher'>; +export type WatcherCreateManyArgs = $CreateManyArgs<$Schema, 'Watcher'>; +export type WatcherCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Watcher'>; +export type WatcherUpdateArgs = $UpdateArgs<$Schema, 'Watcher'>; +export type WatcherUpdateManyArgs = $UpdateManyArgs<$Schema, 'Watcher'>; +export type WatcherUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Watcher'>; +export type WatcherUpsertArgs = $UpsertArgs<$Schema, 'Watcher'>; +export type WatcherDeleteArgs = $DeleteArgs<$Schema, 'Watcher'>; +export type WatcherDeleteManyArgs = $DeleteManyArgs<$Schema, 'Watcher'>; +export type WatcherCountArgs = $CountArgs<$Schema, 'Watcher'>; +export type WatcherAggregateArgs = $AggregateArgs<$Schema, 'Watcher'>; +export type WatcherGroupByArgs = $GroupByArgs<$Schema, 'Watcher'>; +export type WatcherWhereInput = $WhereInput<$Schema, 'Watcher'>; +export type WatcherSelect = $SelectInput<$Schema, 'Watcher'>; +export type WatcherInclude = $IncludeInput<$Schema, 'Watcher'>; +export type WatcherOmit = $OmitInput<$Schema, 'Watcher'>; +export type WatcherGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Watcher', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Watcher', Args, Options>; +export type ParticipantFindManyArgs = $FindManyArgs<$Schema, 'Participant'>; +export type ParticipantFindUniqueArgs = $FindUniqueArgs<$Schema, 'Participant'>; +export type ParticipantFindFirstArgs = $FindFirstArgs<$Schema, 'Participant'>; +export type ParticipantExistsArgs = $ExistsArgs<$Schema, 'Participant'>; +export type ParticipantCreateArgs = $CreateArgs<$Schema, 'Participant'>; +export type ParticipantCreateManyArgs = $CreateManyArgs<$Schema, 'Participant'>; +export type ParticipantCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Participant'>; +export type ParticipantUpdateArgs = $UpdateArgs<$Schema, 'Participant'>; +export type ParticipantUpdateManyArgs = $UpdateManyArgs<$Schema, 'Participant'>; +export type ParticipantUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Participant'>; +export type ParticipantUpsertArgs = $UpsertArgs<$Schema, 'Participant'>; +export type ParticipantDeleteArgs = $DeleteArgs<$Schema, 'Participant'>; +export type ParticipantDeleteManyArgs = $DeleteManyArgs<$Schema, 'Participant'>; +export type ParticipantCountArgs = $CountArgs<$Schema, 'Participant'>; +export type ParticipantAggregateArgs = $AggregateArgs<$Schema, 'Participant'>; +export type ParticipantGroupByArgs = $GroupByArgs<$Schema, 'Participant'>; +export type ParticipantWhereInput = $WhereInput<$Schema, 'Participant'>; +export type ParticipantSelect = $SelectInput<$Schema, 'Participant'>; +export type ParticipantInclude = $IncludeInput<$Schema, 'Participant'>; +export type ParticipantOmit = $OmitInput<$Schema, 'Participant'>; +export type ParticipantGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Participant', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Participant', Args, Options>; +export type OptionFindManyArgs = $FindManyArgs<$Schema, 'Option'>; +export type OptionFindUniqueArgs = $FindUniqueArgs<$Schema, 'Option'>; +export type OptionFindFirstArgs = $FindFirstArgs<$Schema, 'Option'>; +export type OptionExistsArgs = $ExistsArgs<$Schema, 'Option'>; +export type OptionCreateArgs = $CreateArgs<$Schema, 'Option'>; +export type OptionCreateManyArgs = $CreateManyArgs<$Schema, 'Option'>; +export type OptionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Option'>; +export type OptionUpdateArgs = $UpdateArgs<$Schema, 'Option'>; +export type OptionUpdateManyArgs = $UpdateManyArgs<$Schema, 'Option'>; +export type OptionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Option'>; +export type OptionUpsertArgs = $UpsertArgs<$Schema, 'Option'>; +export type OptionDeleteArgs = $DeleteArgs<$Schema, 'Option'>; +export type OptionDeleteManyArgs = $DeleteManyArgs<$Schema, 'Option'>; +export type OptionCountArgs = $CountArgs<$Schema, 'Option'>; +export type OptionAggregateArgs = $AggregateArgs<$Schema, 'Option'>; +export type OptionGroupByArgs = $GroupByArgs<$Schema, 'Option'>; +export type OptionWhereInput = $WhereInput<$Schema, 'Option'>; +export type OptionSelect = $SelectInput<$Schema, 'Option'>; +export type OptionInclude = $IncludeInput<$Schema, 'Option'>; +export type OptionOmit = $OmitInput<$Schema, 'Option'>; +export type OptionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Option', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Option', Args, Options>; +export type VoteFindManyArgs = $FindManyArgs<$Schema, 'Vote'>; +export type VoteFindUniqueArgs = $FindUniqueArgs<$Schema, 'Vote'>; +export type VoteFindFirstArgs = $FindFirstArgs<$Schema, 'Vote'>; +export type VoteExistsArgs = $ExistsArgs<$Schema, 'Vote'>; +export type VoteCreateArgs = $CreateArgs<$Schema, 'Vote'>; +export type VoteCreateManyArgs = $CreateManyArgs<$Schema, 'Vote'>; +export type VoteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Vote'>; +export type VoteUpdateArgs = $UpdateArgs<$Schema, 'Vote'>; +export type VoteUpdateManyArgs = $UpdateManyArgs<$Schema, 'Vote'>; +export type VoteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Vote'>; +export type VoteUpsertArgs = $UpsertArgs<$Schema, 'Vote'>; +export type VoteDeleteArgs = $DeleteArgs<$Schema, 'Vote'>; +export type VoteDeleteManyArgs = $DeleteManyArgs<$Schema, 'Vote'>; +export type VoteCountArgs = $CountArgs<$Schema, 'Vote'>; +export type VoteAggregateArgs = $AggregateArgs<$Schema, 'Vote'>; +export type VoteGroupByArgs = $GroupByArgs<$Schema, 'Vote'>; +export type VoteWhereInput = $WhereInput<$Schema, 'Vote'>; +export type VoteSelect = $SelectInput<$Schema, 'Vote'>; +export type VoteInclude = $IncludeInput<$Schema, 'Vote'>; +export type VoteOmit = $OmitInput<$Schema, 'Vote'>; +export type VoteGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Vote', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Vote', Args, Options>; +export type CommentFindManyArgs = $FindManyArgs<$Schema, 'Comment'>; +export type CommentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Comment'>; +export type CommentFindFirstArgs = $FindFirstArgs<$Schema, 'Comment'>; +export type CommentExistsArgs = $ExistsArgs<$Schema, 'Comment'>; +export type CommentCreateArgs = $CreateArgs<$Schema, 'Comment'>; +export type CommentCreateManyArgs = $CreateManyArgs<$Schema, 'Comment'>; +export type CommentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Comment'>; +export type CommentUpdateArgs = $UpdateArgs<$Schema, 'Comment'>; +export type CommentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Comment'>; +export type CommentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Comment'>; +export type CommentUpsertArgs = $UpsertArgs<$Schema, 'Comment'>; +export type CommentDeleteArgs = $DeleteArgs<$Schema, 'Comment'>; +export type CommentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Comment'>; +export type CommentCountArgs = $CountArgs<$Schema, 'Comment'>; +export type CommentAggregateArgs = $AggregateArgs<$Schema, 'Comment'>; +export type CommentGroupByArgs = $GroupByArgs<$Schema, 'Comment'>; +export type CommentWhereInput = $WhereInput<$Schema, 'Comment'>; +export type CommentSelect = $SelectInput<$Schema, 'Comment'>; +export type CommentInclude = $IncludeInput<$Schema, 'Comment'>; +export type CommentOmit = $OmitInput<$Schema, 'Comment'>; +export type CommentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Comment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Comment', Args, Options>; +export type PollViewFindManyArgs = $FindManyArgs<$Schema, 'PollView'>; +export type PollViewFindUniqueArgs = $FindUniqueArgs<$Schema, 'PollView'>; +export type PollViewFindFirstArgs = $FindFirstArgs<$Schema, 'PollView'>; +export type PollViewExistsArgs = $ExistsArgs<$Schema, 'PollView'>; +export type PollViewCreateArgs = $CreateArgs<$Schema, 'PollView'>; +export type PollViewCreateManyArgs = $CreateManyArgs<$Schema, 'PollView'>; +export type PollViewCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'PollView'>; +export type PollViewUpdateArgs = $UpdateArgs<$Schema, 'PollView'>; +export type PollViewUpdateManyArgs = $UpdateManyArgs<$Schema, 'PollView'>; +export type PollViewUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'PollView'>; +export type PollViewUpsertArgs = $UpsertArgs<$Schema, 'PollView'>; +export type PollViewDeleteArgs = $DeleteArgs<$Schema, 'PollView'>; +export type PollViewDeleteManyArgs = $DeleteManyArgs<$Schema, 'PollView'>; +export type PollViewCountArgs = $CountArgs<$Schema, 'PollView'>; +export type PollViewAggregateArgs = $AggregateArgs<$Schema, 'PollView'>; +export type PollViewGroupByArgs = $GroupByArgs<$Schema, 'PollView'>; +export type PollViewWhereInput = $WhereInput<$Schema, 'PollView'>; +export type PollViewSelect = $SelectInput<$Schema, 'PollView'>; +export type PollViewInclude = $IncludeInput<$Schema, 'PollView'>; +export type PollViewOmit = $OmitInput<$Schema, 'PollView'>; +export type PollViewGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'PollView', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'PollView', Args, Options>; +export type SpaceFindManyArgs = $FindManyArgs<$Schema, 'Space'>; +export type SpaceFindUniqueArgs = $FindUniqueArgs<$Schema, 'Space'>; +export type SpaceFindFirstArgs = $FindFirstArgs<$Schema, 'Space'>; +export type SpaceExistsArgs = $ExistsArgs<$Schema, 'Space'>; +export type SpaceCreateArgs = $CreateArgs<$Schema, 'Space'>; +export type SpaceCreateManyArgs = $CreateManyArgs<$Schema, 'Space'>; +export type SpaceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Space'>; +export type SpaceUpdateArgs = $UpdateArgs<$Schema, 'Space'>; +export type SpaceUpdateManyArgs = $UpdateManyArgs<$Schema, 'Space'>; +export type SpaceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Space'>; +export type SpaceUpsertArgs = $UpsertArgs<$Schema, 'Space'>; +export type SpaceDeleteArgs = $DeleteArgs<$Schema, 'Space'>; +export type SpaceDeleteManyArgs = $DeleteManyArgs<$Schema, 'Space'>; +export type SpaceCountArgs = $CountArgs<$Schema, 'Space'>; +export type SpaceAggregateArgs = $AggregateArgs<$Schema, 'Space'>; +export type SpaceGroupByArgs = $GroupByArgs<$Schema, 'Space'>; +export type SpaceWhereInput = $WhereInput<$Schema, 'Space'>; +export type SpaceSelect = $SelectInput<$Schema, 'Space'>; +export type SpaceInclude = $IncludeInput<$Schema, 'Space'>; +export type SpaceOmit = $OmitInput<$Schema, 'Space'>; +export type SpaceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Space', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Space', Args, Options>; +export type SpaceMemberFindManyArgs = $FindManyArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberFindUniqueArgs = $FindUniqueArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberFindFirstArgs = $FindFirstArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberExistsArgs = $ExistsArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberCreateArgs = $CreateArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberCreateManyArgs = $CreateManyArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberUpdateArgs = $UpdateArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberUpdateManyArgs = $UpdateManyArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberUpsertArgs = $UpsertArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberDeleteArgs = $DeleteArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberDeleteManyArgs = $DeleteManyArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberCountArgs = $CountArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberAggregateArgs = $AggregateArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberGroupByArgs = $GroupByArgs<$Schema, 'SpaceMember'>; +export type SpaceMemberWhereInput = $WhereInput<$Schema, 'SpaceMember'>; +export type SpaceMemberSelect = $SelectInput<$Schema, 'SpaceMember'>; +export type SpaceMemberInclude = $IncludeInput<$Schema, 'SpaceMember'>; +export type SpaceMemberOmit = $OmitInput<$Schema, 'SpaceMember'>; +export type SpaceMemberGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SpaceMember', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SpaceMember', Args, Options>; +export type SpaceMemberInviteFindManyArgs = $FindManyArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteFindUniqueArgs = $FindUniqueArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteFindFirstArgs = $FindFirstArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteExistsArgs = $ExistsArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteCreateArgs = $CreateArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteCreateManyArgs = $CreateManyArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteUpdateArgs = $UpdateArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteUpdateManyArgs = $UpdateManyArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteUpsertArgs = $UpsertArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteDeleteArgs = $DeleteArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteDeleteManyArgs = $DeleteManyArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteCountArgs = $CountArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteAggregateArgs = $AggregateArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteGroupByArgs = $GroupByArgs<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteWhereInput = $WhereInput<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteSelect = $SelectInput<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteInclude = $IncludeInput<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteOmit = $OmitInput<$Schema, 'SpaceMemberInvite'>; +export type SpaceMemberInviteGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SpaceMemberInvite', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SpaceMemberInvite', Args, Options>; +export type SubscriptionFindManyArgs = $FindManyArgs<$Schema, 'Subscription'>; +export type SubscriptionFindUniqueArgs = $FindUniqueArgs<$Schema, 'Subscription'>; +export type SubscriptionFindFirstArgs = $FindFirstArgs<$Schema, 'Subscription'>; +export type SubscriptionExistsArgs = $ExistsArgs<$Schema, 'Subscription'>; +export type SubscriptionCreateArgs = $CreateArgs<$Schema, 'Subscription'>; +export type SubscriptionCreateManyArgs = $CreateManyArgs<$Schema, 'Subscription'>; +export type SubscriptionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Subscription'>; +export type SubscriptionUpdateArgs = $UpdateArgs<$Schema, 'Subscription'>; +export type SubscriptionUpdateManyArgs = $UpdateManyArgs<$Schema, 'Subscription'>; +export type SubscriptionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Subscription'>; +export type SubscriptionUpsertArgs = $UpsertArgs<$Schema, 'Subscription'>; +export type SubscriptionDeleteArgs = $DeleteArgs<$Schema, 'Subscription'>; +export type SubscriptionDeleteManyArgs = $DeleteManyArgs<$Schema, 'Subscription'>; +export type SubscriptionCountArgs = $CountArgs<$Schema, 'Subscription'>; +export type SubscriptionAggregateArgs = $AggregateArgs<$Schema, 'Subscription'>; +export type SubscriptionGroupByArgs = $GroupByArgs<$Schema, 'Subscription'>; +export type SubscriptionWhereInput = $WhereInput<$Schema, 'Subscription'>; +export type SubscriptionSelect = $SelectInput<$Schema, 'Subscription'>; +export type SubscriptionInclude = $IncludeInput<$Schema, 'Subscription'>; +export type SubscriptionOmit = $OmitInput<$Schema, 'Subscription'>; +export type SubscriptionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Subscription', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Subscription', Args, Options>; +export type PaymentMethodFindManyArgs = $FindManyArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodFindUniqueArgs = $FindUniqueArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodFindFirstArgs = $FindFirstArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodExistsArgs = $ExistsArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodCreateArgs = $CreateArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodCreateManyArgs = $CreateManyArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodUpdateArgs = $UpdateArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodUpdateManyArgs = $UpdateManyArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodUpsertArgs = $UpsertArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodDeleteArgs = $DeleteArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodDeleteManyArgs = $DeleteManyArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodCountArgs = $CountArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodAggregateArgs = $AggregateArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodGroupByArgs = $GroupByArgs<$Schema, 'PaymentMethod'>; +export type PaymentMethodWhereInput = $WhereInput<$Schema, 'PaymentMethod'>; +export type PaymentMethodSelect = $SelectInput<$Schema, 'PaymentMethod'>; +export type PaymentMethodInclude = $IncludeInput<$Schema, 'PaymentMethod'>; +export type PaymentMethodOmit = $OmitInput<$Schema, 'PaymentMethod'>; +export type PaymentMethodGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'PaymentMethod', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'PaymentMethod', Args, Options>; +export type ScheduledEventFindManyArgs = $FindManyArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventFindUniqueArgs = $FindUniqueArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventFindFirstArgs = $FindFirstArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventExistsArgs = $ExistsArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventCreateArgs = $CreateArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventCreateManyArgs = $CreateManyArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventUpdateArgs = $UpdateArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventUpdateManyArgs = $UpdateManyArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventUpsertArgs = $UpsertArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventDeleteArgs = $DeleteArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventDeleteManyArgs = $DeleteManyArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventCountArgs = $CountArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventAggregateArgs = $AggregateArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventGroupByArgs = $GroupByArgs<$Schema, 'ScheduledEvent'>; +export type ScheduledEventWhereInput = $WhereInput<$Schema, 'ScheduledEvent'>; +export type ScheduledEventSelect = $SelectInput<$Schema, 'ScheduledEvent'>; +export type ScheduledEventInclude = $IncludeInput<$Schema, 'ScheduledEvent'>; +export type ScheduledEventOmit = $OmitInput<$Schema, 'ScheduledEvent'>; +export type ScheduledEventGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ScheduledEvent', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ScheduledEvent', Args, Options>; +export type RescheduledEventDateFindManyArgs = $FindManyArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateFindUniqueArgs = $FindUniqueArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateFindFirstArgs = $FindFirstArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateExistsArgs = $ExistsArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateCreateArgs = $CreateArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateCreateManyArgs = $CreateManyArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateUpdateArgs = $UpdateArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateUpdateManyArgs = $UpdateManyArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateUpsertArgs = $UpsertArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateDeleteArgs = $DeleteArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateDeleteManyArgs = $DeleteManyArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateCountArgs = $CountArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateAggregateArgs = $AggregateArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateGroupByArgs = $GroupByArgs<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateWhereInput = $WhereInput<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateSelect = $SelectInput<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateInclude = $IncludeInput<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateOmit = $OmitInput<$Schema, 'RescheduledEventDate'>; +export type RescheduledEventDateGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RescheduledEventDate', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RescheduledEventDate', Args, Options>; +export type ScheduledEventInviteFindManyArgs = $FindManyArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteFindUniqueArgs = $FindUniqueArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteFindFirstArgs = $FindFirstArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteExistsArgs = $ExistsArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteCreateArgs = $CreateArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteCreateManyArgs = $CreateManyArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteUpdateArgs = $UpdateArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteUpdateManyArgs = $UpdateManyArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteUpsertArgs = $UpsertArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteDeleteArgs = $DeleteArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteDeleteManyArgs = $DeleteManyArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteCountArgs = $CountArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteAggregateArgs = $AggregateArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteGroupByArgs = $GroupByArgs<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteWhereInput = $WhereInput<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteSelect = $SelectInput<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteInclude = $IncludeInput<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteOmit = $OmitInput<$Schema, 'ScheduledEventInvite'>; +export type ScheduledEventInviteGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ScheduledEventInvite', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ScheduledEventInvite', Args, Options>; +export type CredentialFindManyArgs = $FindManyArgs<$Schema, 'Credential'>; +export type CredentialFindUniqueArgs = $FindUniqueArgs<$Schema, 'Credential'>; +export type CredentialFindFirstArgs = $FindFirstArgs<$Schema, 'Credential'>; +export type CredentialExistsArgs = $ExistsArgs<$Schema, 'Credential'>; +export type CredentialCreateArgs = $CreateArgs<$Schema, 'Credential'>; +export type CredentialCreateManyArgs = $CreateManyArgs<$Schema, 'Credential'>; +export type CredentialCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Credential'>; +export type CredentialUpdateArgs = $UpdateArgs<$Schema, 'Credential'>; +export type CredentialUpdateManyArgs = $UpdateManyArgs<$Schema, 'Credential'>; +export type CredentialUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Credential'>; +export type CredentialUpsertArgs = $UpsertArgs<$Schema, 'Credential'>; +export type CredentialDeleteArgs = $DeleteArgs<$Schema, 'Credential'>; +export type CredentialDeleteManyArgs = $DeleteManyArgs<$Schema, 'Credential'>; +export type CredentialCountArgs = $CountArgs<$Schema, 'Credential'>; +export type CredentialAggregateArgs = $AggregateArgs<$Schema, 'Credential'>; +export type CredentialGroupByArgs = $GroupByArgs<$Schema, 'Credential'>; +export type CredentialWhereInput = $WhereInput<$Schema, 'Credential'>; +export type CredentialSelect = $SelectInput<$Schema, 'Credential'>; +export type CredentialInclude = $IncludeInput<$Schema, 'Credential'>; +export type CredentialOmit = $OmitInput<$Schema, 'Credential'>; +export type CredentialGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Credential', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Credential', Args, Options>; +export type CalendarConnectionFindManyArgs = $FindManyArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionFindUniqueArgs = $FindUniqueArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionFindFirstArgs = $FindFirstArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionExistsArgs = $ExistsArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionCreateArgs = $CreateArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionCreateManyArgs = $CreateManyArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionUpdateArgs = $UpdateArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionUpdateManyArgs = $UpdateManyArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionUpsertArgs = $UpsertArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionDeleteArgs = $DeleteArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionDeleteManyArgs = $DeleteManyArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionCountArgs = $CountArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionAggregateArgs = $AggregateArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionGroupByArgs = $GroupByArgs<$Schema, 'CalendarConnection'>; +export type CalendarConnectionWhereInput = $WhereInput<$Schema, 'CalendarConnection'>; +export type CalendarConnectionSelect = $SelectInput<$Schema, 'CalendarConnection'>; +export type CalendarConnectionInclude = $IncludeInput<$Schema, 'CalendarConnection'>; +export type CalendarConnectionOmit = $OmitInput<$Schema, 'CalendarConnection'>; +export type CalendarConnectionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'CalendarConnection', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'CalendarConnection', Args, Options>; +export type ProviderCalendarFindManyArgs = $FindManyArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarFindUniqueArgs = $FindUniqueArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarFindFirstArgs = $FindFirstArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarExistsArgs = $ExistsArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarCreateArgs = $CreateArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarCreateManyArgs = $CreateManyArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarUpdateArgs = $UpdateArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarUpdateManyArgs = $UpdateManyArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarUpsertArgs = $UpsertArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarDeleteArgs = $DeleteArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarDeleteManyArgs = $DeleteManyArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarCountArgs = $CountArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarAggregateArgs = $AggregateArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarGroupByArgs = $GroupByArgs<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarWhereInput = $WhereInput<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarSelect = $SelectInput<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarInclude = $IncludeInput<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarOmit = $OmitInput<$Schema, 'ProviderCalendar'>; +export type ProviderCalendarGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ProviderCalendar', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ProviderCalendar', Args, Options>; +export type InstanceSettingsFindManyArgs = $FindManyArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsFindUniqueArgs = $FindUniqueArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsFindFirstArgs = $FindFirstArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsExistsArgs = $ExistsArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsCreateArgs = $CreateArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsCreateManyArgs = $CreateManyArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsUpdateArgs = $UpdateArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsUpdateManyArgs = $UpdateManyArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsUpsertArgs = $UpsertArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsDeleteArgs = $DeleteArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsDeleteManyArgs = $DeleteManyArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsCountArgs = $CountArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsAggregateArgs = $AggregateArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsGroupByArgs = $GroupByArgs<$Schema, 'InstanceSettings'>; +export type InstanceSettingsWhereInput = $WhereInput<$Schema, 'InstanceSettings'>; +export type InstanceSettingsSelect = $SelectInput<$Schema, 'InstanceSettings'>; +export type InstanceSettingsInclude = $IncludeInput<$Schema, 'InstanceSettings'>; +export type InstanceSettingsOmit = $OmitInput<$Schema, 'InstanceSettings'>; +export type InstanceSettingsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'InstanceSettings', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'InstanceSettings', Args, Options>; +export type LicenseFindManyArgs = $FindManyArgs<$Schema, 'License'>; +export type LicenseFindUniqueArgs = $FindUniqueArgs<$Schema, 'License'>; +export type LicenseFindFirstArgs = $FindFirstArgs<$Schema, 'License'>; +export type LicenseExistsArgs = $ExistsArgs<$Schema, 'License'>; +export type LicenseCreateArgs = $CreateArgs<$Schema, 'License'>; +export type LicenseCreateManyArgs = $CreateManyArgs<$Schema, 'License'>; +export type LicenseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'License'>; +export type LicenseUpdateArgs = $UpdateArgs<$Schema, 'License'>; +export type LicenseUpdateManyArgs = $UpdateManyArgs<$Schema, 'License'>; +export type LicenseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'License'>; +export type LicenseUpsertArgs = $UpsertArgs<$Schema, 'License'>; +export type LicenseDeleteArgs = $DeleteArgs<$Schema, 'License'>; +export type LicenseDeleteManyArgs = $DeleteManyArgs<$Schema, 'License'>; +export type LicenseCountArgs = $CountArgs<$Schema, 'License'>; +export type LicenseAggregateArgs = $AggregateArgs<$Schema, 'License'>; +export type LicenseGroupByArgs = $GroupByArgs<$Schema, 'License'>; +export type LicenseWhereInput = $WhereInput<$Schema, 'License'>; +export type LicenseSelect = $SelectInput<$Schema, 'License'>; +export type LicenseInclude = $IncludeInput<$Schema, 'License'>; +export type LicenseOmit = $OmitInput<$Schema, 'License'>; +export type LicenseGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'License', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'License', Args, Options>; +export type LicenseValidationFindManyArgs = $FindManyArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationFindUniqueArgs = $FindUniqueArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationFindFirstArgs = $FindFirstArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationExistsArgs = $ExistsArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationCreateArgs = $CreateArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationCreateManyArgs = $CreateManyArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationUpdateArgs = $UpdateArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationUpdateManyArgs = $UpdateManyArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationUpsertArgs = $UpsertArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationDeleteArgs = $DeleteArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationDeleteManyArgs = $DeleteManyArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationCountArgs = $CountArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationAggregateArgs = $AggregateArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationGroupByArgs = $GroupByArgs<$Schema, 'LicenseValidation'>; +export type LicenseValidationWhereInput = $WhereInput<$Schema, 'LicenseValidation'>; +export type LicenseValidationSelect = $SelectInput<$Schema, 'LicenseValidation'>; +export type LicenseValidationInclude = $IncludeInput<$Schema, 'LicenseValidation'>; +export type LicenseValidationOmit = $OmitInput<$Schema, 'LicenseValidation'>; +export type LicenseValidationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'LicenseValidation', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'LicenseValidation', Args, Options>; +export type InstanceLicenseFindManyArgs = $FindManyArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseFindUniqueArgs = $FindUniqueArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseFindFirstArgs = $FindFirstArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseExistsArgs = $ExistsArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseCreateArgs = $CreateArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseCreateManyArgs = $CreateManyArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseUpdateArgs = $UpdateArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseUpdateManyArgs = $UpdateManyArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseUpsertArgs = $UpsertArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseDeleteArgs = $DeleteArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseDeleteManyArgs = $DeleteManyArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseCountArgs = $CountArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseAggregateArgs = $AggregateArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseGroupByArgs = $GroupByArgs<$Schema, 'InstanceLicense'>; +export type InstanceLicenseWhereInput = $WhereInput<$Schema, 'InstanceLicense'>; +export type InstanceLicenseSelect = $SelectInput<$Schema, 'InstanceLicense'>; +export type InstanceLicenseInclude = $IncludeInput<$Schema, 'InstanceLicense'>; +export type InstanceLicenseOmit = $OmitInput<$Schema, 'InstanceLicense'>; +export type InstanceLicenseGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'InstanceLicense', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'InstanceLicense', Args, Options>; diff --git a/tests/e2e/apps/rally/zenstack/models.ts b/tests/e2e/apps/rally/zenstack/models.ts index 06e6ac4ff..365ba7dad 100644 --- a/tests/e2e/apps/rally/zenstack/models.ts +++ b/tests/e2e/apps/rally/zenstack/models.ts @@ -5,35 +5,35 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type Account = $ModelResult<$Schema, "Account">; -export type User = $ModelResult<$Schema, "User">; -export type VerificationToken = $ModelResult<$Schema, "VerificationToken">; -export type Session = $ModelResult<$Schema, "Session">; -export type Verification = $ModelResult<$Schema, "Verification">; -export type Poll = $ModelResult<$Schema, "Poll">; -export type Watcher = $ModelResult<$Schema, "Watcher">; -export type Participant = $ModelResult<$Schema, "Participant">; -export type Option = $ModelResult<$Schema, "Option">; -export type Vote = $ModelResult<$Schema, "Vote">; -export type Comment = $ModelResult<$Schema, "Comment">; -export type PollView = $ModelResult<$Schema, "PollView">; -export type Space = $ModelResult<$Schema, "Space">; -export type SpaceMember = $ModelResult<$Schema, "SpaceMember">; -export type SpaceMemberInvite = $ModelResult<$Schema, "SpaceMemberInvite">; -export type Subscription = $ModelResult<$Schema, "Subscription">; -export type PaymentMethod = $ModelResult<$Schema, "PaymentMethod">; -export type ScheduledEvent = $ModelResult<$Schema, "ScheduledEvent">; -export type RescheduledEventDate = $ModelResult<$Schema, "RescheduledEventDate">; -export type ScheduledEventInvite = $ModelResult<$Schema, "ScheduledEventInvite">; -export type Credential = $ModelResult<$Schema, "Credential">; -export type CalendarConnection = $ModelResult<$Schema, "CalendarConnection">; -export type ProviderCalendar = $ModelResult<$Schema, "ProviderCalendar">; -export type InstanceSettings = $ModelResult<$Schema, "InstanceSettings">; -export type License = $ModelResult<$Schema, "License">; -export type LicenseValidation = $ModelResult<$Schema, "LicenseValidation">; -export type InstanceLicense = $ModelResult<$Schema, "InstanceLicense">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type Account = $ModelResult<$Schema, 'Account'>; +export type User = $ModelResult<$Schema, 'User'>; +export type VerificationToken = $ModelResult<$Schema, 'VerificationToken'>; +export type Session = $ModelResult<$Schema, 'Session'>; +export type Verification = $ModelResult<$Schema, 'Verification'>; +export type Poll = $ModelResult<$Schema, 'Poll'>; +export type Watcher = $ModelResult<$Schema, 'Watcher'>; +export type Participant = $ModelResult<$Schema, 'Participant'>; +export type Option = $ModelResult<$Schema, 'Option'>; +export type Vote = $ModelResult<$Schema, 'Vote'>; +export type Comment = $ModelResult<$Schema, 'Comment'>; +export type PollView = $ModelResult<$Schema, 'PollView'>; +export type Space = $ModelResult<$Schema, 'Space'>; +export type SpaceMember = $ModelResult<$Schema, 'SpaceMember'>; +export type SpaceMemberInvite = $ModelResult<$Schema, 'SpaceMemberInvite'>; +export type Subscription = $ModelResult<$Schema, 'Subscription'>; +export type PaymentMethod = $ModelResult<$Schema, 'PaymentMethod'>; +export type ScheduledEvent = $ModelResult<$Schema, 'ScheduledEvent'>; +export type RescheduledEventDate = $ModelResult<$Schema, 'RescheduledEventDate'>; +export type ScheduledEventInvite = $ModelResult<$Schema, 'ScheduledEventInvite'>; +export type Credential = $ModelResult<$Schema, 'Credential'>; +export type CalendarConnection = $ModelResult<$Schema, 'CalendarConnection'>; +export type ProviderCalendar = $ModelResult<$Schema, 'ProviderCalendar'>; +export type InstanceSettings = $ModelResult<$Schema, 'InstanceSettings'>; +export type License = $ModelResult<$Schema, 'License'>; +export type LicenseValidation = $ModelResult<$Schema, 'LicenseValidation'>; +export type InstanceLicense = $ModelResult<$Schema, 'InstanceLicense'>; export const TimeFormat = $schema.enums.TimeFormat.values; export type TimeFormat = (typeof TimeFormat)[keyof typeof TimeFormat]; export const UserRole = $schema.enums.UserRole.values; diff --git a/tests/e2e/apps/rally/zenstack/schema.ts b/tests/e2e/apps/rally/zenstack/schema.ts index 34a1bf454..83101978a 100644 --- a/tests/e2e/apps/rally/zenstack/schema.ts +++ b/tests/e2e/apps/rally/zenstack/schema.ts @@ -5,2533 +5,3988 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { Account: { - name: "Account", + name: 'Account', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, provider: { - name: "provider", - type: "String" + name: 'provider', + type: 'String', }, providerAccountId: { - name: "providerAccountId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_account_id") }] }] as readonly AttributeApplication[] + name: 'providerAccountId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('provider_account_id') }], + }, + ] as readonly AttributeApplication[], }, refresh_token: { - name: "refresh_token", - type: "String", + name: 'refresh_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, access_token: { - name: "access_token", - type: "String", + name: 'access_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, expires_at: { - name: "expires_at", - type: "Int", - optional: true + name: 'expires_at', + type: 'Int', + optional: true, }, scope: { - name: "scope", - type: "String", - optional: true + name: 'scope', + type: 'String', + optional: true, }, id_token: { - name: "id_token", - type: "String", + name: 'id_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "accounts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'accounts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, accessTokenExpiresAt: { - name: "accessTokenExpiresAt", - type: "DateTime", + name: 'accessTokenExpiresAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("access_token_expires_at") }] }] as readonly AttributeApplication[] + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('access_token_expires_at') }], + }, + ] as readonly AttributeApplication[], }, refreshTokenExpiresAt: { - name: "refreshTokenExpiresAt", - type: "DateTime", + name: 'refreshTokenExpiresAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("refresh_token_expires_at") }] }] as readonly AttributeApplication[] + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('refresh_token_expires_at') }], + }, + ] as readonly AttributeApplication[], }, password: { - name: "password", - type: "String", + name: 'password', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("password") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('password') }] }, + ] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] - } + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("accounts") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('provider'), + ExpressionUtils.field('providerAccountId'), + ]), + }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('accounts') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - provider_providerAccountId: { provider: { type: "String" }, providerAccountId: { type: "String" } } - } + id: { type: 'String' }, + provider_providerAccountId: { provider: { type: 'String' }, providerAccountId: { type: 'String' } }, + }, }, User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@db.Citext" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }, { name: '@db.Citext' }] as readonly AttributeApplication[], }, emailVerified: { - name: "emailVerified", - type: "Boolean", + name: 'emailVerified', + type: 'Boolean', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("email_verified") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('email_verified') }] }, + ] as readonly AttributeApplication[], }, image: { - name: "image", - type: "String", - optional: true + name: 'image', + type: 'String', + optional: true, }, timeZone: { - name: "timeZone", - type: "String", + name: 'timeZone', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, + ] as readonly AttributeApplication[], }, weekStart: { - name: "weekStart", - type: "Int", + name: 'weekStart', + type: 'Int', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("week_start") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('week_start') }] }, + ] as readonly AttributeApplication[], }, timeFormat: { - name: "timeFormat", - type: "TimeFormat", + name: 'timeFormat', + type: 'TimeFormat', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_format") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_format') }] }, + ] as readonly AttributeApplication[], }, locale: { - name: "locale", - type: "String", - optional: true + name: 'locale', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, customerId: { - name: "customerId", - type: "String", + name: 'customerId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("customer_id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('customer_id') }] }, + ] as readonly AttributeApplication[], }, banned: { - name: "banned", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'banned', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, bannedAt: { - name: "bannedAt", - type: "DateTime", + name: 'bannedAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("banned_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('banned_at') }] }, + ] as readonly AttributeApplication[], }, banReason: { - name: "banReason", - type: "String", + name: 'banReason', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ban_reason") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ban_reason') }] }, + ] as readonly AttributeApplication[], }, banExpires: { - name: "banExpires", - type: "DateTime", + name: 'banExpires', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ban_expires") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ban_expires') }] }, + ] as readonly AttributeApplication[], }, role: { - name: "role", - type: "UserRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("user") }] }] as readonly AttributeApplication[], - default: "user" as FieldDefault + name: 'role', + type: 'UserRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('user') }] }, + ] as readonly AttributeApplication[], + default: 'user' as FieldDefault, }, lastLoginMethod: { - name: "lastLoginMethod", - type: "String", + name: 'lastLoginMethod', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("last_login_method") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('last_login_method') }] }, + ] as readonly AttributeApplication[], }, isAnonymous: { - name: "isAnonymous", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("anonymous") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isAnonymous', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('anonymous') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, polls: { - name: "polls", - type: "Poll", + name: 'polls', + type: 'Poll', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, watcher: { - name: "watcher", - type: "Watcher", + name: 'watcher', + type: 'Watcher', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, accounts: { - name: "accounts", - type: "Account", + name: 'accounts', + type: 'Account', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, participants: { - name: "participants", - type: "Participant", + name: 'participants', + type: 'Participant', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, paymentMethods: { - name: "paymentMethods", - type: "PaymentMethod", + name: 'paymentMethods', + type: 'PaymentMethod', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, spaceMemberInvites: { - name: "spaceMemberInvites", - type: "SpaceMemberInvite", + name: 'spaceMemberInvites', + type: 'SpaceMemberInvite', array: true, - relation: { opposite: "invitedBy" } + relation: { opposite: 'invitedBy' }, }, subscriptions: { - name: "subscriptions", - type: "Subscription", + name: 'subscriptions', + type: 'Subscription', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserToSubscription") }] }] as readonly AttributeApplication[], - relation: { opposite: "user", name: "UserToSubscription" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('UserToSubscription') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'user', name: 'UserToSubscription' }, }, spaces: { - name: "spaces", - type: "Space", + name: 'spaces', + type: 'Space', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserSpaces") }] }] as readonly AttributeApplication[], - relation: { opposite: "owner", name: "UserSpaces" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('UserSpaces') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'owner', name: 'UserSpaces' }, }, memberOf: { - name: "memberOf", - type: "SpaceMember", + name: 'memberOf', + type: 'SpaceMember', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, pollViews: { - name: "pollViews", - type: "PollView", + name: 'pollViews', + type: 'PollView', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, scheduledEvents: { - name: "scheduledEvents", - type: "ScheduledEvent", + name: 'scheduledEvents', + type: 'ScheduledEvent', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, scheduledEventInvites: { - name: "scheduledEventInvites", - type: "ScheduledEventInvite", + name: 'scheduledEventInvites', + type: 'ScheduledEventInvite', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, calendarConnections: { - name: "calendarConnections", - type: "CalendarConnection", + name: 'calendarConnections', + type: 'CalendarConnection', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, credentials: { - name: "credentials", - type: "Credential", + name: 'credentials', + type: 'Credential', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, defaultDestinationCalendarId: { - name: "defaultDestinationCalendarId", - type: "String", + name: 'defaultDestinationCalendarId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("default_destination_calendar_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "defaultDestinationCalendar" - ] as readonly string[] + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('default_destination_calendar_id') }], + }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['defaultDestinationCalendar'] as readonly string[], }, defaultDestinationCalendar: { - name: "defaultDestinationCalendar", - type: "ProviderCalendar", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserDefaultDestinationCalendar") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("defaultDestinationCalendarId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "userDefaultDestination", name: "UserDefaultDestinationCalendar", fields: ["defaultDestinationCalendarId"], references: ["id"], onDelete: "SetNull" } + name: 'defaultDestinationCalendar', + type: 'ProviderCalendar', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('UserDefaultDestinationCalendar') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('defaultDestinationCalendarId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'userDefaultDestination', + name: 'UserDefaultDestinationCalendar', + fields: ['defaultDestinationCalendarId'], + references: ['id'], + onDelete: 'SetNull', + }, }, sessions: { - name: "sessions", - type: "Session", + name: 'sessions', + type: 'Session', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, impersonatedSessions: { - name: "impersonatedSessions", - type: "Session", + name: 'impersonatedSessions', + type: 'Session', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ImpersonatedSessions") }] }] as readonly AttributeApplication[], - relation: { opposite: "impersonatedByUser", name: "ImpersonatedSessions" } - } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('ImpersonatedSessions') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'impersonatedByUser', name: 'ImpersonatedSessions' }, + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("users") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('users') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, VerificationToken: { - name: "VerificationToken", + name: 'VerificationToken', fields: { identifier: { - name: "identifier", - type: "String", - attributes: [{ name: "@db.Citext" }] as readonly AttributeApplication[] + name: 'identifier', + type: 'String', + attributes: [{ name: '@db.Citext' }] as readonly AttributeApplication[], }, token: { - name: "token", - type: "String", + name: 'token', + type: 'String', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, expires: { - name: "expires", - type: "DateTime" - } + name: 'expires', + type: 'DateTime', + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("identifier"), ExpressionUtils.field("token")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("verification_tokens") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('identifier'), + ExpressionUtils.field('token'), + ]), + }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('verification_tokens') }] }, ] as readonly AttributeApplication[], - idFields: ["token"], + idFields: ['token'], uniqueFields: { - token: { type: "String" }, - identifier_token: { identifier: { type: "String" }, token: { type: "String" } } - } + token: { type: 'String' }, + identifier_token: { identifier: { type: 'String' }, token: { type: 'String' } }, + }, }, Session: { - name: "Session", + name: 'Session', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, expiresAt: { - name: "expiresAt", - type: "DateTime", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] + name: 'expiresAt', + type: 'DateTime', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, + ] as readonly AttributeApplication[], }, token: { - name: "token", - type: "String" + name: 'token', + type: 'String', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, ipAddress: { - name: "ipAddress", - type: "String", + name: 'ipAddress', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ip_address") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ip_address') }] }, + ] as readonly AttributeApplication[], }, userAgent: { - name: "userAgent", - type: "String", + name: 'userAgent', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_agent") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_agent') }] }, + ] as readonly AttributeApplication[], }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, impersonatedBy: { - name: "impersonatedBy", - type: "String", + name: 'impersonatedBy', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_by") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "impersonatedByUser" - ] as readonly string[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('impersonated_by') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['impersonatedByUser'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "sessions", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'sessions', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, impersonatedByUser: { - name: "impersonatedByUser", - type: "User", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ImpersonatedSessions") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("impersonatedBy")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "impersonatedSessions", name: "ImpersonatedSessions", fields: ["impersonatedBy"], references: ["id"] } - } + name: 'impersonatedByUser', + type: 'User', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('ImpersonatedSessions') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('impersonatedBy')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'impersonatedSessions', + name: 'ImpersonatedSessions', + fields: ['impersonatedBy'], + references: ['id'], + }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("token")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("sessions") }] } + { + name: '@@unique', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('token')]) }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('sessions') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - token: { type: "String" } - } + id: { type: 'String' }, + token: { type: 'String' }, + }, }, Verification: { - name: "Verification", + name: 'Verification', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, identifier: { - name: "identifier", - type: "String" + name: 'identifier', + type: 'String', }, value: { - name: "value", - type: "String" + name: 'value', + type: 'String', }, expiresAt: { - name: "expiresAt", - type: "DateTime", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] + name: 'expiresAt', + type: 'DateTime', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, + ] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("verifications") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('verifications') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Poll: { - name: "Poll", + name: 'Poll', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@id' }, + { name: '@unique' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('id') }] }, + ] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, deadline: { - name: "deadline", - type: "DateTime", - optional: true + name: 'deadline', + type: 'DateTime', + optional: true, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, location: { - name: "location", - type: "String", - optional: true + name: 'location', + type: 'String', + optional: true, }, userId: { - name: "userId", - type: "String", + name: 'userId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, guestId: { - name: "guestId", - type: "String", + name: 'guestId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("guest_id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('guest_id') }] }, + ] as readonly AttributeApplication[], }, timeZone: { - name: "timeZone", - type: "String", + name: 'timeZone', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, + ] as readonly AttributeApplication[], }, status: { - name: "status", - type: "PollStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("live") }] }] as readonly AttributeApplication[], - default: "live" as FieldDefault + name: 'status', + type: 'PollStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('live') }] }, + ] as readonly AttributeApplication[], + default: 'live' as FieldDefault, }, deleted: { - name: "deleted", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'deleted', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, deletedAt: { - name: "deletedAt", - type: "DateTime", + name: 'deletedAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted_at') }] }, + ] as readonly AttributeApplication[], }, touchedAt: { - name: "touchedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("touched_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'touchedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('touched_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, participantUrlId: { - name: "participantUrlId", - type: "String", + name: 'participantUrlId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("participant_url_id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@unique' }, + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('participant_url_id') }], + }, + ] as readonly AttributeApplication[], }, adminUrlId: { - name: "adminUrlId", - type: "String", + name: 'adminUrlId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("admin_url_id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@unique' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('admin_url_id') }] }, + ] as readonly AttributeApplication[], }, eventId: { - name: "eventId", - type: "String", + name: 'eventId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("event_id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@unique' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('event_id') }] }, + ] as readonly AttributeApplication[], }, scheduledEventId: { - name: "scheduledEventId", - type: "String", + name: 'scheduledEventId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "scheduledEvent" - ] as readonly string[] + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_id') }], + }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['scheduledEvent'] as readonly string[], }, hideParticipants: { - name: "hideParticipants", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("hide_participants") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideParticipants', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('hide_participants') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hideScores: { - name: "hideScores", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("hide_scores") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideScores', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('hide_scores') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, disableComments: { - name: "disableComments", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("disable_comments") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableComments', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('disable_comments') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, requireParticipantEmail: { - name: "requireParticipantEmail", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("require_participant_email") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'requireParticipantEmail', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('require_participant_email') }], + }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, user: { - name: "user", - type: "User", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "polls", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'polls', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, scheduledEvent: { - name: "scheduledEvent", - type: "ScheduledEvent", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "polls", fields: ["scheduledEventId"], references: ["id"], onDelete: "SetNull" } + name: 'scheduledEvent', + type: 'ScheduledEvent', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'polls', + fields: ['scheduledEventId'], + references: ['id'], + onDelete: 'SetNull', + }, }, options: { - name: "options", - type: "Option", + name: 'options', + type: 'Option', array: true, - relation: { opposite: "poll" } + relation: { opposite: 'poll' }, }, participants: { - name: "participants", - type: "Participant", + name: 'participants', + type: 'Participant', array: true, - relation: { opposite: "poll" } + relation: { opposite: 'poll' }, }, watchers: { - name: "watchers", - type: "Watcher", + name: 'watchers', + type: 'Watcher', array: true, - relation: { opposite: "poll" } + relation: { opposite: 'poll' }, }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - relation: { opposite: "poll" } + relation: { opposite: 'poll' }, }, votes: { - name: "votes", - type: "Vote", + name: 'votes', + type: 'Vote', array: true, - relation: { opposite: "poll" } + relation: { opposite: 'poll' }, }, views: { - name: "views", - type: "PollView", + name: 'views', + type: 'PollView', array: true, - relation: { opposite: "poll" } + relation: { opposite: 'poll' }, }, space: { - name: "space", - type: "Space", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "polls", fields: ["spaceId"], references: ["id"], onDelete: "SetNull" } + name: 'space', + type: 'Space', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'polls', fields: ['spaceId'], references: ['id'], onDelete: 'SetNull' }, }, spaceId: { - name: "spaceId", - type: "String", + name: 'spaceId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "space" - ] as readonly string[] - } + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['space'] as readonly string[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("guestId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("polls") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('guestId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('polls') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - participantUrlId: { type: "String" }, - adminUrlId: { type: "String" }, - eventId: { type: "String" } - } + id: { type: 'String' }, + participantUrlId: { type: 'String' }, + adminUrlId: { type: 'String' }, + eventId: { type: 'String' }, + }, }, Watcher: { - name: "Watcher", + name: 'Watcher', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, pollId: { - name: "pollId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "poll" - ] as readonly string[] + name: 'pollId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['poll'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, poll: { - name: "poll", - type: "Poll", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "watchers", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } + name: 'poll', + type: 'Poll', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'watchers', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "watcher", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'watcher', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("watchers") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('watchers') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Participant: { - name: "Participant", + name: 'Participant', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, email: { - name: "email", - type: "String", - optional: true + name: 'email', + type: 'String', + optional: true, }, userId: { - name: "userId", - type: "String", + name: 'userId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, guestId: { - name: "guestId", - type: "String", + name: 'guestId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("guest_id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('guest_id') }] }, + ] as readonly AttributeApplication[], }, pollId: { - name: "pollId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "poll" - ] as readonly string[] + name: 'pollId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['poll'] as readonly string[], }, locale: { - name: "locale", - type: "String", - optional: true + name: 'locale', + type: 'String', + optional: true, }, timeZone: { - name: "timeZone", - type: "String", + name: 'timeZone', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, + ] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, deleted: { - name: "deleted", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'deleted', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, deletedAt: { - name: "deletedAt", - type: "DateTime", + name: 'deletedAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted_at') }] }, + ] as readonly AttributeApplication[], }, votes: { - name: "votes", - type: "Vote", + name: 'votes', + type: 'Vote', array: true, - relation: { opposite: "participant" } + relation: { opposite: 'participant' }, }, poll: { - name: "poll", - type: "Poll", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "participants", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } + name: 'poll', + type: 'Poll', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'participants', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, }, user: { - name: "user", - type: "User", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "participants", fields: ["userId"], references: ["id"], onDelete: "SetNull" } - } + name: 'user', + type: 'User', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'participants', fields: ['userId'], references: ['id'], onDelete: 'SetNull' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("participants") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('participants') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Option: { - name: "Option", + name: 'Option', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, startTime: { - name: "startTime", - type: "DateTime", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("start_time") }] }, { name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[] + name: 'startTime', + type: 'DateTime', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('start_time') }] }, + { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], }, duration: { - name: "duration", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("duration_minutes") }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'duration', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('duration_minutes') }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, pollId: { - name: "pollId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "poll" - ] as readonly string[] + name: 'pollId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['poll'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, votes: { - name: "votes", - type: "Vote", + name: 'votes', + type: 'Vote', array: true, - relation: { opposite: "option" } + relation: { opposite: 'option' }, }, poll: { - name: "poll", - type: "Poll", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "options", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } - } + name: 'poll', + type: 'Poll', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'options', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("options") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('options') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Vote: { - name: "Vote", + name: 'Vote', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, participantId: { - name: "participantId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("participant_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "participant" - ] as readonly string[] + name: 'participantId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('participant_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['participant'] as readonly string[], }, optionId: { - name: "optionId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("option_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "option" - ] as readonly string[] + name: 'optionId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('option_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['option'] as readonly string[], }, pollId: { - name: "pollId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "poll" - ] as readonly string[] + name: 'pollId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['poll'] as readonly string[], }, type: { - name: "type", - type: "VoteType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("yes") }] }] as readonly AttributeApplication[], - default: "yes" as FieldDefault + name: 'type', + type: 'VoteType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('yes') }] }, + ] as readonly AttributeApplication[], + default: 'yes' as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, participant: { - name: "participant", - type: "Participant", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("participantId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "votes", fields: ["participantId"], references: ["id"], onDelete: "Cascade" } + name: 'participant', + type: 'Participant', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('participantId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'votes', fields: ['participantId'], references: ['id'], onDelete: 'Cascade' }, }, option: { - name: "option", - type: "Option", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("optionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "votes", fields: ["optionId"], references: ["id"], onDelete: "Cascade" } + name: 'option', + type: 'Option', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('optionId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'votes', fields: ['optionId'], references: ['id'], onDelete: 'Cascade' }, }, poll: { - name: "poll", - type: "Poll", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "votes", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } - } + name: 'poll', + type: 'Poll', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'votes', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("participantId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("optionId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("votes") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('participantId')]), + }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('optionId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('votes') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Comment: { - name: "Comment", + name: 'Comment', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, content: { - name: "content", - type: "String" + name: 'content', + type: 'String', }, pollId: { - name: "pollId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "poll" - ] as readonly string[] + name: 'pollId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['poll'] as readonly string[], }, authorName: { - name: "authorName", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("author_name") }] }] as readonly AttributeApplication[] + name: 'authorName', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('author_name') }] }, + ] as readonly AttributeApplication[], }, userId: { - name: "userId", - type: "String", + name: 'userId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, guestId: { - name: "guestId", - type: "String", + name: 'guestId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("guest_id") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('guest_id') }] }, + ] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, poll: { - name: "poll", - type: "Poll", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } + name: 'poll', + type: 'Poll', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, }, user: { - name: "user", - type: "User", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + name: 'user', + type: 'User', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("comments") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('comments') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, PollView: { - name: "PollView", + name: 'PollView', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, pollId: { - name: "pollId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "poll" - ] as readonly string[] + name: 'pollId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['poll'] as readonly string[], }, ipAddress: { - name: "ipAddress", - type: "String", + name: 'ipAddress', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ip_address") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ip_address') }] }, + ] as readonly AttributeApplication[], }, userId: { - name: "userId", - type: "String", + name: 'userId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, userAgent: { - name: "userAgent", - type: "String", + name: 'userAgent', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_agent") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_agent') }] }, + ] as readonly AttributeApplication[], }, viewedAt: { - name: "viewedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("viewed_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'viewedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('viewed_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, poll: { - name: "poll", - type: "Poll", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "views", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } + name: 'poll', + type: 'Poll', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'views', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, }, user: { - name: "user", - type: "User", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "pollViews", fields: ["userId"], references: ["id"], onDelete: "SetNull" } - } + name: 'user', + type: 'User', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'pollViews', fields: ['userId'], references: ['id'], onDelete: 'SetNull' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("viewedAt")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_views") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('viewedAt')]), + }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_views') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Space: { - name: "Space", + name: 'Space', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, image: { - name: "image", - type: "String", - optional: true + name: 'image', + type: 'String', + optional: true, }, ownerId: { - name: "ownerId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("owner_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "owner" - ] as readonly string[] + name: 'ownerId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('owner_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['owner'] as readonly string[], }, tier: { - name: "tier", - type: "SpaceTier", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("hobby") }] }] as readonly AttributeApplication[], - default: "hobby" as FieldDefault + name: 'tier', + type: 'SpaceTier', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('hobby') }] }, + ] as readonly AttributeApplication[], + default: 'hobby' as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, owner: { - name: "owner", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserSpaces") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "spaces", name: "UserSpaces", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + name: 'owner', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('UserSpaces') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'spaces', + name: 'UserSpaces', + fields: ['ownerId'], + references: ['id'], + onDelete: 'Cascade', + }, }, polls: { - name: "polls", - type: "Poll", + name: 'polls', + type: 'Poll', array: true, - relation: { opposite: "space" } + relation: { opposite: 'space' }, }, scheduledEvents: { - name: "scheduledEvents", - type: "ScheduledEvent", + name: 'scheduledEvents', + type: 'ScheduledEvent', array: true, - relation: { opposite: "space" } + relation: { opposite: 'space' }, }, subscriptions: { - name: "subscriptions", - type: "Subscription", + name: 'subscriptions', + type: 'Subscription', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SpaceToSubscription") }] }] as readonly AttributeApplication[], - relation: { opposite: "space", name: "SpaceToSubscription" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('SpaceToSubscription') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'space', name: 'SpaceToSubscription' }, }, members: { - name: "members", - type: "SpaceMember", + name: 'members', + type: 'SpaceMember', array: true, - relation: { opposite: "space" } + relation: { opposite: 'space' }, }, memberInvites: { - name: "memberInvites", - type: "SpaceMemberInvite", + name: 'memberInvites', + type: 'SpaceMemberInvite', array: true, - relation: { opposite: "space" } - } + relation: { opposite: 'space' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("spaces") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('spaces') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, SpaceMember: { - name: "SpaceMember", + name: 'SpaceMember', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, spaceId: { - name: "spaceId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "space" - ] as readonly string[] + name: 'spaceId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['space'] as readonly string[], }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, role: { - name: "role", - type: "SpaceMemberRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], - default: "MEMBER" as FieldDefault + name: 'role', + type: 'SpaceMemberRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, + ] as readonly AttributeApplication[], + default: 'MEMBER' as FieldDefault, }, lastSelectedAt: { - name: "lastSelectedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("last_selected_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'lastSelectedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('last_selected_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, space: { - name: "space", - type: "Space", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "members", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } + name: 'space', + type: 'Space', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'members', fields: ['spaceId'], references: ['id'], onDelete: 'Cascade' }, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "memberOf", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'memberOf', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId"), ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }, { name: "map", value: ExpressionUtils.literal("space_members_space_id_idx") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }, { name: "map", value: ExpressionUtils.literal("space_members_user_id_idx") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("space_members") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('spaceId'), + ExpressionUtils.field('userId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + { name: 'map', value: ExpressionUtils.literal('space_members_space_id_idx') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + { name: 'map', value: ExpressionUtils.literal('space_members_user_id_idx') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_members') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - spaceId_userId: { spaceId: { type: "String" }, userId: { type: "String" } } - } + id: { type: 'String' }, + spaceId_userId: { spaceId: { type: 'String' }, userId: { type: 'String' } }, + }, }, SpaceMemberInvite: { - name: "SpaceMemberInvite", + name: 'SpaceMemberInvite', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, spaceId: { - name: "spaceId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "space" - ] as readonly string[] + name: 'spaceId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['space'] as readonly string[], }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, role: { - name: "role", - type: "SpaceMemberRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], - default: "MEMBER" as FieldDefault + name: 'role', + type: 'SpaceMemberRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, + ] as readonly AttributeApplication[], + default: 'MEMBER' as FieldDefault, }, inviterId: { - name: "inviterId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("inviter_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "invitedBy" - ] as readonly string[] + name: 'inviterId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('inviter_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['invitedBy'] as readonly string[], }, invitedBy: { - name: "invitedBy", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviterId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "spaceMemberInvites", fields: ["inviterId"], references: ["id"], onDelete: "Cascade" } + name: 'invitedBy', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('inviterId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'spaceMemberInvites', + fields: ['inviterId'], + references: ['id'], + onDelete: 'Cascade', + }, }, space: { - name: "space", - type: "Space", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "memberInvites", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } - } + name: 'space', + type: 'Space', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'memberInvites', + fields: ['spaceId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId"), ExpressionUtils.field("email")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }, { name: "map", value: ExpressionUtils.literal("space_member_invites_space_id_idx") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("space_member_invites") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('spaceId'), + ExpressionUtils.field('email'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + { name: 'map', value: ExpressionUtils.literal('space_member_invites_space_id_idx') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_member_invites') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - spaceId_email: { spaceId: { type: "String" }, email: { type: "String" } } - } + id: { type: 'String' }, + spaceId_email: { spaceId: { type: 'String' }, email: { type: 'String' } }, + }, }, Subscription: { - name: "Subscription", + name: 'Subscription', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, priceId: { - name: "priceId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("price_id") }] }] as readonly AttributeApplication[] + name: 'priceId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('price_id') }] }, + ] as readonly AttributeApplication[], }, quantity: { - name: "quantity", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], - default: 1 as FieldDefault + name: 'quantity', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, + ] as readonly AttributeApplication[], + default: 1 as FieldDefault, }, subscriptionItemId: { - name: "subscriptionItemId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("subscription_item_id") }] }] as readonly AttributeApplication[] + name: 'subscriptionItemId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('subscription_item_id') }], + }, + ] as readonly AttributeApplication[], }, amount: { - name: "amount", - type: "Int" + name: 'amount', + type: 'Int', }, status: { - name: "status", - type: "SubscriptionStatus" + name: 'status', + type: 'SubscriptionStatus', }, active: { - name: "active", - type: "Boolean" + name: 'active', + type: 'Boolean', }, currency: { - name: "currency", - type: "String" + name: 'currency', + type: 'String', }, interval: { - name: "interval", - type: "SubscriptionInterval" + name: 'interval', + type: 'SubscriptionInterval', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, periodStart: { - name: "periodStart", - type: "DateTime", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("period_start") }] }] as readonly AttributeApplication[] + name: 'periodStart', + type: 'DateTime', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('period_start') }] }, + ] as readonly AttributeApplication[], }, periodEnd: { - name: "periodEnd", - type: "DateTime", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("period_end") }] }] as readonly AttributeApplication[] + name: 'periodEnd', + type: 'DateTime', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('period_end') }] }, + ] as readonly AttributeApplication[], }, cancelAtPeriodEnd: { - name: "cancelAtPeriodEnd", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("cancel_at_period_end") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'cancelAtPeriodEnd', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('cancel_at_period_end') }], + }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, spaceId: { - name: "spaceId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "space" - ] as readonly string[] + name: 'spaceId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['space'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserToSubscription") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "subscriptions", name: "UserToSubscription", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('UserToSubscription') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'subscriptions', + name: 'UserToSubscription', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, space: { - name: "space", - type: "Space", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SpaceToSubscription") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "subscriptions", name: "SpaceToSubscription", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } - } + name: 'space', + type: 'Space', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('SpaceToSubscription') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'subscriptions', + name: 'SpaceToSubscription', + fields: ['spaceId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("subscriptions") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('subscriptions') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, PaymentMethod: { - name: "PaymentMethod", + name: 'PaymentMethod', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, type: { - name: "type", - type: "String" + name: 'type', + type: 'String', }, data: { - name: "data", - type: "Json" + name: 'data', + type: 'Json', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "paymentMethods", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'paymentMethods', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("payment_methods") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('payment_methods') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ScheduledEvent: { - name: "ScheduledEvent", + name: 'ScheduledEvent', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, spaceId: { - name: "spaceId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "space" - ] as readonly string[] + name: 'spaceId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['space'] as readonly string[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, location: { - name: "location", - type: "String", - optional: true + name: 'location', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, status: { - name: "status", - type: "ScheduledEventStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("confirmed") }] }] as readonly AttributeApplication[], - default: "confirmed" as FieldDefault + name: 'status', + type: 'ScheduledEventStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('confirmed') }] }, + ] as readonly AttributeApplication[], + default: 'confirmed' as FieldDefault, }, timeZone: { - name: "timeZone", - type: "String", + name: 'timeZone', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, + ] as readonly AttributeApplication[], }, start: { - name: "start", - type: "DateTime" + name: 'start', + type: 'DateTime', }, end: { - name: "end", - type: "DateTime" + name: 'end', + type: 'DateTime', }, allDay: { - name: "allDay", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("all_day") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'allDay', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('all_day') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, deletedAt: { - name: "deletedAt", - type: "DateTime", + name: 'deletedAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted_at') }] }, + ] as readonly AttributeApplication[], }, sequence: { - name: "sequence", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'sequence', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, uid: { - name: "uid", - type: "String", + name: 'uid', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "scheduledEvents", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'scheduledEvents', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, space: { - name: "space", - type: "Space", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "scheduledEvents", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } + name: 'space', + type: 'Space', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'scheduledEvents', + fields: ['spaceId'], + references: ['id'], + onDelete: 'Cascade', + }, }, rescheduledDates: { - name: "rescheduledDates", - type: "RescheduledEventDate", + name: 'rescheduledDates', + type: 'RescheduledEventDate', array: true, - relation: { opposite: "scheduledEvent" } + relation: { opposite: 'scheduledEvent' }, }, invites: { - name: "invites", - type: "ScheduledEventInvite", + name: 'invites', + type: 'ScheduledEventInvite', array: true, - relation: { opposite: "scheduledEvent" } + relation: { opposite: 'scheduledEvent' }, }, polls: { - name: "polls", - type: "Poll", + name: 'polls', + type: 'Poll', array: true, - relation: { opposite: "scheduledEvent" } - } + relation: { opposite: 'scheduledEvent' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_events") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + { name: 'type', value: ExpressionUtils.literal('Hash') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_events') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - uid: { type: "String" } - } + id: { type: 'String' }, + uid: { type: 'String' }, + }, }, RescheduledEventDate: { - name: "RescheduledEventDate", + name: 'RescheduledEventDate', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, scheduledEventId: { - name: "scheduledEventId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "scheduledEvent" - ] as readonly string[] + name: 'scheduledEventId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_id') }], + }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['scheduledEvent'] as readonly string[], }, start: { - name: "start", - type: "DateTime", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("start") }] }] as readonly AttributeApplication[] + name: 'start', + type: 'DateTime', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('start') }] }, + ] as readonly AttributeApplication[], }, end: { - name: "end", - type: "DateTime", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("end") }] }] as readonly AttributeApplication[] + name: 'end', + type: 'DateTime', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('end') }] }, + ] as readonly AttributeApplication[], }, allDay: { - name: "allDay", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("all_day") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'allDay', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('all_day') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, scheduledEvent: { - name: "scheduledEvent", - type: "ScheduledEvent", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "rescheduledDates", fields: ["scheduledEventId"], references: ["id"], onDelete: "Cascade" } - } + name: 'scheduledEvent', + type: 'ScheduledEvent', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'rescheduledDates', + fields: ['scheduledEventId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("rescheduled_event_dates") }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), + }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('rescheduled_event_dates') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ScheduledEventInvite: { - name: "ScheduledEventInvite", + name: 'ScheduledEventInvite', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, scheduledEventId: { - name: "scheduledEventId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "scheduledEvent" - ] as readonly string[] + name: 'scheduledEventId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_id') }], + }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['scheduledEvent'] as readonly string[], }, inviteeName: { - name: "inviteeName", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_name") }] }] as readonly AttributeApplication[] + name: 'inviteeName', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_name') }] }, + ] as readonly AttributeApplication[], }, inviteeEmail: { - name: "inviteeEmail", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_email") }] }] as readonly AttributeApplication[] + name: 'inviteeEmail', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_email') }] }, + ] as readonly AttributeApplication[], }, inviteeId: { - name: "inviteeId", - type: "String", + name: 'inviteeId', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, inviteeTimeZone: { - name: "inviteeTimeZone", - type: "String", + name: 'inviteeTimeZone', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_time_zone") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_time_zone') }] }, + ] as readonly AttributeApplication[], }, status: { - name: "status", - type: "ScheduledEventInviteStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("pending") }] }] as readonly AttributeApplication[], - default: "pending" as FieldDefault + name: 'status', + type: 'ScheduledEventInviteStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('pending') }] }, + ] as readonly AttributeApplication[], + default: 'pending' as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, scheduledEvent: { - name: "scheduledEvent", - type: "ScheduledEvent", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "invites", fields: ["scheduledEventId"], references: ["id"], onDelete: "Cascade" } + name: 'scheduledEvent', + type: 'ScheduledEvent', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'invites', + fields: ['scheduledEventId'], + references: ['id'], + onDelete: 'Cascade', + }, }, user: { - name: "user", - type: "User", - optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviteeId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "scheduledEventInvites", fields: ["inviteeId"], references: ["id"], onDelete: "SetNull" } - } + name: 'user', + type: 'User', + optional: true, + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('inviteeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'scheduledEventInvites', + fields: ['inviteeId'], + references: ['id'], + onDelete: 'SetNull', + }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviteeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviteeEmail")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_invites") }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('inviteeId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('inviteeEmail')]), + }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_invites') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Credential: { - name: "Credential", + name: 'Credential', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, provider: { - name: "provider", - type: "String" + name: 'provider', + type: 'String', }, providerAccountId: { - name: "providerAccountId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_account_id") }] }] as readonly AttributeApplication[] + name: 'providerAccountId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('provider_account_id') }], + }, + ] as readonly AttributeApplication[], }, type: { - name: "type", - type: "CredentialType" + name: 'type', + type: 'CredentialType', }, secret: { - name: "secret", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("secret") }] }] as readonly AttributeApplication[] + name: 'secret', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('secret') }] }, + ] as readonly AttributeApplication[], }, scopes: { - name: "scopes", - type: "String", - array: true + name: 'scopes', + type: 'String', + array: true, }, expiresAt: { - name: "expiresAt", - type: "DateTime", + name: 'expiresAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, + ] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, calendarConnections: { - name: "calendarConnections", - type: "CalendarConnection", + name: 'calendarConnections', + type: 'CalendarConnection', array: true, - relation: { opposite: "credential" } + relation: { opposite: 'credential' }, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "credentials", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'credentials', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }, { name: "name", value: ExpressionUtils.literal("user_provider_account_unique") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("expiresAt")]) }, { name: "name", value: ExpressionUtils.literal("credential_expiry_idx") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("credentials") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('provider'), + ExpressionUtils.field('providerAccountId'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('user_provider_account_unique') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('expiresAt')]), + }, + { name: 'name', value: ExpressionUtils.literal('credential_expiry_idx') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('credentials') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - user_provider_account_unique: { userId: { type: "String" }, provider: { type: "String" }, providerAccountId: { type: "String" } } - } + id: { type: 'String' }, + user_provider_account_unique: { + userId: { type: 'String' }, + provider: { type: 'String' }, + providerAccountId: { type: 'String' }, + }, + }, }, CalendarConnection: { - name: "CalendarConnection", + name: 'CalendarConnection', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userId: { - name: "userId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, provider: { - name: "provider", - type: "String" + name: 'provider', + type: 'String', }, integrationId: { - name: "integrationId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("integration_id") }] }] as readonly AttributeApplication[] + name: 'integrationId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('integration_id') }] }, + ] as readonly AttributeApplication[], }, providerAccountId: { - name: "providerAccountId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_account_id") }] }] as readonly AttributeApplication[] + name: 'providerAccountId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('provider_account_id') }], + }, + ] as readonly AttributeApplication[], }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, displayName: { - name: "displayName", - type: "String", + name: 'displayName', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("display_name") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('display_name') }] }, + ] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, credential: { - name: "credential", - type: "Credential", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "calendarConnections", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } + name: 'credential', + type: 'Credential', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('credentialId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'calendarConnections', + fields: ['credentialId'], + references: ['id'], + onDelete: 'Cascade', + }, }, credentialId: { - name: "credentialId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("credential_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "credential" - ] as readonly string[] + name: 'credentialId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('credential_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['credential'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "calendarConnections", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'calendarConnections', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, providerCalendars: { - name: "providerCalendars", - type: "ProviderCalendar", + name: 'providerCalendars', + type: 'ProviderCalendar', array: true, - relation: { opposite: "calendarConnection" } - } + relation: { opposite: 'calendarConnection' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }, { name: "name", value: ExpressionUtils.literal("user_provider_account_unique") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("calendar_connections") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('provider'), + ExpressionUtils.field('providerAccountId'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('user_provider_account_unique') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('calendar_connections') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - user_provider_account_unique: { userId: { type: "String" }, provider: { type: "String" }, providerAccountId: { type: "String" } } - } + id: { type: 'String' }, + user_provider_account_unique: { + userId: { type: 'String' }, + provider: { type: 'String' }, + providerAccountId: { type: 'String' }, + }, + }, }, ProviderCalendar: { - name: "ProviderCalendar", + name: 'ProviderCalendar', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, calendarConnectionId: { - name: "calendarConnectionId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("calendar_connection_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "calendarConnection" - ] as readonly string[] + name: 'calendarConnectionId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('calendar_connection_id') }], + }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['calendarConnection'] as readonly string[], }, providerCalendarId: { - name: "providerCalendarId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_calendar_id") }] }] as readonly AttributeApplication[] + name: 'providerCalendarId', + type: 'String', + attributes: [ + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('provider_calendar_id') }], + }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, isPrimary: { - name: "isPrimary", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("primary") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isPrimary', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('primary') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, timeZone: { - name: "timeZone", - type: "String", + name: 'timeZone', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, + ] as readonly AttributeApplication[], }, isSelected: { - name: "isSelected", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("selected") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isSelected', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('selected') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isDeleted: { - name: "isDeleted", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isDeleted', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isWritable: { - name: "isWritable", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("writable") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isWritable', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('writable') }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, providerData: { - name: "providerData", - type: "Json", + name: 'providerData', + type: 'Json', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_data") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('provider_data') }] }, + ] as readonly AttributeApplication[], }, lastSyncedAt: { - name: "lastSyncedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("last_synced_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'lastSyncedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('last_synced_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, calendarConnection: { - name: "calendarConnection", - type: "CalendarConnection", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("calendarConnectionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "providerCalendars", fields: ["calendarConnectionId"], references: ["id"], onDelete: "Cascade" } + name: 'calendarConnection', + type: 'CalendarConnection', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('calendarConnectionId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'providerCalendars', + fields: ['calendarConnectionId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userDefaultDestination: { - name: "userDefaultDestination", - type: "User", + name: 'userDefaultDestination', + type: 'User', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserDefaultDestinationCalendar") }] }] as readonly AttributeApplication[], - relation: { opposite: "defaultDestinationCalendar", name: "UserDefaultDestinationCalendar" } - } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('UserDefaultDestinationCalendar') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'defaultDestinationCalendar', name: 'UserDefaultDestinationCalendar' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("calendarConnectionId"), ExpressionUtils.field("providerCalendarId")]) }, { name: "name", value: ExpressionUtils.literal("connection_calendar_unique") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("calendarConnectionId"), ExpressionUtils.field("isSelected")]) }, { name: "name", value: ExpressionUtils.literal("connection_selected_idx") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("isPrimary")]) }, { name: "name", value: ExpressionUtils.literal("primary_calendar_idx") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("lastSyncedAt")]) }, { name: "name", value: ExpressionUtils.literal("sync_time_idx") }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_calendars") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('calendarConnectionId'), + ExpressionUtils.field('providerCalendarId'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('connection_calendar_unique') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('calendarConnectionId'), + ExpressionUtils.field('isSelected'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('connection_selected_idx') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('isPrimary')]), + }, + { name: 'name', value: ExpressionUtils.literal('primary_calendar_idx') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('lastSyncedAt')]), + }, + { name: 'name', value: ExpressionUtils.literal('sync_time_idx') }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('provider_calendars') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - connection_calendar_unique: { calendarConnectionId: { type: "String" }, providerCalendarId: { type: "String" } } - } + id: { type: 'String' }, + connection_calendar_unique: { + calendarConnectionId: { type: 'String' }, + providerCalendarId: { type: 'String' }, + }, + }, }, InstanceSettings: { - name: "InstanceSettings", + name: 'InstanceSettings', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], - default: 1 as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, + ] as readonly AttributeApplication[], + default: 1 as FieldDefault, }, disableUserRegistration: { - name: "disableUserRegistration", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("disable_user_registration") }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableUserRegistration', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + { + name: '@map', + args: [{ name: 'name', value: ExpressionUtils.literal('disable_user_registration') }], + }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("instance_settings") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('instance_settings') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, License: { - name: "License", + name: 'License', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, licenseKey: { - name: "licenseKey", - type: "String", + name: 'licenseKey', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("license_key") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@unique' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_key') }] }, + ] as readonly AttributeApplication[], }, version: { - name: "version", - type: "Int", + name: 'version', + type: 'Int', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("version") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('version') }] }, + ] as readonly AttributeApplication[], }, type: { - name: "type", - type: "LicenseType" + name: 'type', + type: 'LicenseType', }, seats: { - name: "seats", - type: "Int", + name: 'seats', + type: 'Int', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("seats") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('seats') }] }, + ] as readonly AttributeApplication[], }, issuedAt: { - name: "issuedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("issued_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'issuedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('issued_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, expiresAt: { - name: "expiresAt", - type: "DateTime", + name: 'expiresAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, + ] as readonly AttributeApplication[], }, licenseeEmail: { - name: "licenseeEmail", - type: "String", + name: 'licenseeEmail', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_email") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_email') }] }, + ] as readonly AttributeApplication[], }, licenseeName: { - name: "licenseeName", - type: "String", + name: 'licenseeName', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_name") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_name') }] }, + ] as readonly AttributeApplication[], }, status: { - name: "status", - type: "LicenseStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACTIVE") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("status") }] }] as readonly AttributeApplication[], - default: "ACTIVE" as FieldDefault + name: 'status', + type: 'LicenseStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACTIVE') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('status') }] }, + ] as readonly AttributeApplication[], + default: 'ACTIVE' as FieldDefault, }, validations: { - name: "validations", - type: "LicenseValidation", + name: 'validations', + type: 'LicenseValidation', array: true, - relation: { opposite: "license" } - } + relation: { opposite: 'license' }, + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("licenses") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('licenses') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - licenseKey: { type: "String" } - } + id: { type: 'String' }, + licenseKey: { type: 'String' }, + }, }, LicenseValidation: { - name: "LicenseValidation", + name: 'LicenseValidation', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, licenseId: { - name: "licenseId", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("license_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "license" - ] as readonly string[] + name: 'licenseId', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['license'] as readonly string[], }, license: { - name: "license", - type: "License", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("licenseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "validations", fields: ["licenseId"], references: ["id"], onDelete: "Cascade" } + name: 'license', + type: 'License', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('licenseId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'validations', + fields: ['licenseId'], + references: ['id'], + onDelete: 'Cascade', + }, }, ipAddress: { - name: "ipAddress", - type: "String", + name: 'ipAddress', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ip_address") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ip_address') }] }, + ] as readonly AttributeApplication[], }, fingerprint: { - name: "fingerprint", - type: "String", + name: 'fingerprint', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("fingerprint") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('fingerprint') }] }, + ] as readonly AttributeApplication[], }, validatedAt: { - name: "validatedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("validated_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'validatedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('validated_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, userAgent: { - name: "userAgent", - type: "String", + name: 'userAgent', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_agent") }] }] as readonly AttributeApplication[] - } + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_agent') }] }, + ] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("license_validations") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_validations') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, InstanceLicense: { - name: "InstanceLicense", + name: 'InstanceLicense', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, licenseKey: { - name: "licenseKey", - type: "String", + name: 'licenseKey', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("license_key") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@unique' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_key') }] }, + ] as readonly AttributeApplication[], }, version: { - name: "version", - type: "Int", + name: 'version', + type: 'Int', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("version") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('version') }] }, + ] as readonly AttributeApplication[], }, type: { - name: "type", - type: "LicenseType" + name: 'type', + type: 'LicenseType', }, seats: { - name: "seats", - type: "Int", + name: 'seats', + type: 'Int', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("seats") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('seats') }] }, + ] as readonly AttributeApplication[], }, issuedAt: { - name: "issuedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("issued_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'issuedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('issued_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, expiresAt: { - name: "expiresAt", - type: "DateTime", + name: 'expiresAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, + ] as readonly AttributeApplication[], }, licenseeEmail: { - name: "licenseeEmail", - type: "String", + name: 'licenseeEmail', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_email") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_email') }] }, + ] as readonly AttributeApplication[], }, licenseeName: { - name: "licenseeName", - type: "String", + name: 'licenseeName', + type: 'String', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_name") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_name') }] }, + ] as readonly AttributeApplication[], }, status: { - name: "status", - type: "LicenseStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACTIVE") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("status") }] }] as readonly AttributeApplication[], - default: "ACTIVE" as FieldDefault - } + name: 'status', + type: 'LicenseStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACTIVE') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('status') }] }, + ] as readonly AttributeApplication[], + default: 'ACTIVE' as FieldDefault, + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("instance_licenses") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('instance_licenses') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - licenseKey: { type: "String" } - } - } + id: { type: 'String' }, + licenseKey: { type: 'String' }, + }, + }, } as const; enums = { TimeFormat: { - name: "TimeFormat", + name: 'TimeFormat', values: { - hours12: "hours12", - hours24: "hours24" + hours12: 'hours12', + hours24: 'hours24', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("time_format") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_format') }] }, + ] as readonly AttributeApplication[], }, UserRole: { - name: "UserRole", + name: 'UserRole', values: { - admin: "admin", - user: "user" + admin: 'admin', + user: 'user', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("user_role") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_role') }] }, + ] as readonly AttributeApplication[], }, ParticipantVisibility: { - name: "ParticipantVisibility", + name: 'ParticipantVisibility', values: { - full: "full", - scoresOnly: "scoresOnly", - limited: "limited" + full: 'full', + scoresOnly: 'scoresOnly', + limited: 'limited', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("participant_visibility") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('participant_visibility') }] }, + ] as readonly AttributeApplication[], }, PollStatus: { - name: "PollStatus", + name: 'PollStatus', values: { - live: "live", - paused: "paused", - finalized: "finalized" + live: 'live', + paused: 'paused', + finalized: 'finalized', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_status") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_status') }] }, + ] as readonly AttributeApplication[], }, VoteType: { - name: "VoteType", + name: 'VoteType', values: { - yes: "yes", - no: "no", - ifNeedBe: "ifNeedBe" + yes: 'yes', + no: 'no', + ifNeedBe: 'ifNeedBe', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("vote_type") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('vote_type') }] }, + ] as readonly AttributeApplication[], }, SpaceMemberRole: { - name: "SpaceMemberRole", + name: 'SpaceMemberRole', values: { - ADMIN: "ADMIN", - MEMBER: "MEMBER" - } + ADMIN: 'ADMIN', + MEMBER: 'MEMBER', + }, }, SpaceTier: { - name: "SpaceTier", + name: 'SpaceTier', values: { - hobby: "hobby", - pro: "pro" + hobby: 'hobby', + pro: 'pro', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("space_tiers") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_tiers') }] }, + ] as readonly AttributeApplication[], }, SubscriptionStatus: { - name: "SubscriptionStatus", + name: 'SubscriptionStatus', values: { - incomplete: "incomplete", - incomplete_expired: "incomplete_expired", - active: "active", - paused: "paused", - trialing: "trialing", - past_due: "past_due", - canceled: "canceled", - unpaid: "unpaid" + incomplete: 'incomplete', + incomplete_expired: 'incomplete_expired', + active: 'active', + paused: 'paused', + trialing: 'trialing', + past_due: 'past_due', + canceled: 'canceled', + unpaid: 'unpaid', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("subscription_status") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('subscription_status') }] }, + ] as readonly AttributeApplication[], }, SubscriptionInterval: { - name: "SubscriptionInterval", + name: 'SubscriptionInterval', values: { - month: "month", - year: "year" + month: 'month', + year: 'year', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("subscription_interval") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('subscription_interval') }] }, + ] as readonly AttributeApplication[], }, ScheduledEventStatus: { - name: "ScheduledEventStatus", + name: 'ScheduledEventStatus', values: { - confirmed: "confirmed", - canceled: "canceled", - unconfirmed: "unconfirmed" + confirmed: 'confirmed', + canceled: 'canceled', + unconfirmed: 'unconfirmed', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_status") }] } - ] as readonly AttributeApplication[] + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_status') }] }, + ] as readonly AttributeApplication[], }, ScheduledEventInviteStatus: { - name: "ScheduledEventInviteStatus", + name: 'ScheduledEventInviteStatus', values: { - pending: "pending", - accepted: "accepted", - declined: "declined", - tentative: "tentative" + pending: 'pending', + accepted: 'accepted', + declined: 'declined', + tentative: 'tentative', }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_invite_status") }] } - ] as readonly AttributeApplication[] + { + name: '@@map', + args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_invite_status') }], + }, + ] as readonly AttributeApplication[], }, CredentialType: { - name: "CredentialType", + name: 'CredentialType', values: { - OAUTH: "OAUTH" - } + OAUTH: 'OAUTH', + }, }, LicenseType: { - name: "LicenseType", + name: 'LicenseType', values: { - PLUS: "PLUS", - ORGANIZATION: "ORGANIZATION", - ENTERPRISE: "ENTERPRISE" - } + PLUS: 'PLUS', + ORGANIZATION: 'ORGANIZATION', + ENTERPRISE: 'ENTERPRISE', + }, }, LicenseStatus: { - name: "LicenseStatus", + name: 'LicenseStatus', values: { - ACTIVE: "ACTIVE", - REVOKED: "REVOKED" - } - } + ACTIVE: 'ACTIVE', + REVOKED: 'REVOKED', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/github-repos/cal.com/input.ts b/tests/e2e/github-repos/cal.com/input.ts index c5c963cc1..de3df74b8 100644 --- a/tests/e2e/github-repos/cal.com/input.ts +++ b/tests/e2e/github-repos/cal.com/input.ts @@ -5,2043 +5,2500 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type HostFindManyArgs = $FindManyArgs<$Schema, "Host">; -export type HostFindUniqueArgs = $FindUniqueArgs<$Schema, "Host">; -export type HostFindFirstArgs = $FindFirstArgs<$Schema, "Host">; -export type HostExistsArgs = $ExistsArgs<$Schema, "Host">; -export type HostCreateArgs = $CreateArgs<$Schema, "Host">; -export type HostCreateManyArgs = $CreateManyArgs<$Schema, "Host">; -export type HostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Host">; -export type HostUpdateArgs = $UpdateArgs<$Schema, "Host">; -export type HostUpdateManyArgs = $UpdateManyArgs<$Schema, "Host">; -export type HostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Host">; -export type HostUpsertArgs = $UpsertArgs<$Schema, "Host">; -export type HostDeleteArgs = $DeleteArgs<$Schema, "Host">; -export type HostDeleteManyArgs = $DeleteManyArgs<$Schema, "Host">; -export type HostCountArgs = $CountArgs<$Schema, "Host">; -export type HostAggregateArgs = $AggregateArgs<$Schema, "Host">; -export type HostGroupByArgs = $GroupByArgs<$Schema, "Host">; -export type HostWhereInput = $WhereInput<$Schema, "Host">; -export type HostSelect = $SelectInput<$Schema, "Host">; -export type HostInclude = $IncludeInput<$Schema, "Host">; -export type HostOmit = $OmitInput<$Schema, "Host">; -export type HostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Host", Args, Options>; -export type CalVideoSettingsFindManyArgs = $FindManyArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsFindUniqueArgs = $FindUniqueArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsFindFirstArgs = $FindFirstArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsExistsArgs = $ExistsArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsCreateArgs = $CreateArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsCreateManyArgs = $CreateManyArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsUpdateArgs = $UpdateArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsUpdateManyArgs = $UpdateManyArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsUpsertArgs = $UpsertArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsDeleteArgs = $DeleteArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsDeleteManyArgs = $DeleteManyArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsCountArgs = $CountArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsAggregateArgs = $AggregateArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsGroupByArgs = $GroupByArgs<$Schema, "CalVideoSettings">; -export type CalVideoSettingsWhereInput = $WhereInput<$Schema, "CalVideoSettings">; -export type CalVideoSettingsSelect = $SelectInput<$Schema, "CalVideoSettings">; -export type CalVideoSettingsInclude = $IncludeInput<$Schema, "CalVideoSettings">; -export type CalVideoSettingsOmit = $OmitInput<$Schema, "CalVideoSettings">; -export type CalVideoSettingsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "CalVideoSettings", Args, Options>; -export type EventTypeFindManyArgs = $FindManyArgs<$Schema, "EventType">; -export type EventTypeFindUniqueArgs = $FindUniqueArgs<$Schema, "EventType">; -export type EventTypeFindFirstArgs = $FindFirstArgs<$Schema, "EventType">; -export type EventTypeExistsArgs = $ExistsArgs<$Schema, "EventType">; -export type EventTypeCreateArgs = $CreateArgs<$Schema, "EventType">; -export type EventTypeCreateManyArgs = $CreateManyArgs<$Schema, "EventType">; -export type EventTypeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "EventType">; -export type EventTypeUpdateArgs = $UpdateArgs<$Schema, "EventType">; -export type EventTypeUpdateManyArgs = $UpdateManyArgs<$Schema, "EventType">; -export type EventTypeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "EventType">; -export type EventTypeUpsertArgs = $UpsertArgs<$Schema, "EventType">; -export type EventTypeDeleteArgs = $DeleteArgs<$Schema, "EventType">; -export type EventTypeDeleteManyArgs = $DeleteManyArgs<$Schema, "EventType">; -export type EventTypeCountArgs = $CountArgs<$Schema, "EventType">; -export type EventTypeAggregateArgs = $AggregateArgs<$Schema, "EventType">; -export type EventTypeGroupByArgs = $GroupByArgs<$Schema, "EventType">; -export type EventTypeWhereInput = $WhereInput<$Schema, "EventType">; -export type EventTypeSelect = $SelectInput<$Schema, "EventType">; -export type EventTypeInclude = $IncludeInput<$Schema, "EventType">; -export type EventTypeOmit = $OmitInput<$Schema, "EventType">; -export type EventTypeGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "EventType", Args, Options>; -export type CredentialFindManyArgs = $FindManyArgs<$Schema, "Credential">; -export type CredentialFindUniqueArgs = $FindUniqueArgs<$Schema, "Credential">; -export type CredentialFindFirstArgs = $FindFirstArgs<$Schema, "Credential">; -export type CredentialExistsArgs = $ExistsArgs<$Schema, "Credential">; -export type CredentialCreateArgs = $CreateArgs<$Schema, "Credential">; -export type CredentialCreateManyArgs = $CreateManyArgs<$Schema, "Credential">; -export type CredentialCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Credential">; -export type CredentialUpdateArgs = $UpdateArgs<$Schema, "Credential">; -export type CredentialUpdateManyArgs = $UpdateManyArgs<$Schema, "Credential">; -export type CredentialUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Credential">; -export type CredentialUpsertArgs = $UpsertArgs<$Schema, "Credential">; -export type CredentialDeleteArgs = $DeleteArgs<$Schema, "Credential">; -export type CredentialDeleteManyArgs = $DeleteManyArgs<$Schema, "Credential">; -export type CredentialCountArgs = $CountArgs<$Schema, "Credential">; -export type CredentialAggregateArgs = $AggregateArgs<$Schema, "Credential">; -export type CredentialGroupByArgs = $GroupByArgs<$Schema, "Credential">; -export type CredentialWhereInput = $WhereInput<$Schema, "Credential">; -export type CredentialSelect = $SelectInput<$Schema, "Credential">; -export type CredentialInclude = $IncludeInput<$Schema, "Credential">; -export type CredentialOmit = $OmitInput<$Schema, "Credential">; -export type CredentialGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Credential", Args, Options>; -export type DestinationCalendarFindManyArgs = $FindManyArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarFindUniqueArgs = $FindUniqueArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarFindFirstArgs = $FindFirstArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarExistsArgs = $ExistsArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarCreateArgs = $CreateArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarCreateManyArgs = $CreateManyArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarUpdateArgs = $UpdateArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarUpdateManyArgs = $UpdateManyArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarUpsertArgs = $UpsertArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarDeleteArgs = $DeleteArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarDeleteManyArgs = $DeleteManyArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarCountArgs = $CountArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarAggregateArgs = $AggregateArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarGroupByArgs = $GroupByArgs<$Schema, "DestinationCalendar">; -export type DestinationCalendarWhereInput = $WhereInput<$Schema, "DestinationCalendar">; -export type DestinationCalendarSelect = $SelectInput<$Schema, "DestinationCalendar">; -export type DestinationCalendarInclude = $IncludeInput<$Schema, "DestinationCalendar">; -export type DestinationCalendarOmit = $OmitInput<$Schema, "DestinationCalendar">; -export type DestinationCalendarGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DestinationCalendar", Args, Options>; -export type UserPasswordFindManyArgs = $FindManyArgs<$Schema, "UserPassword">; -export type UserPasswordFindUniqueArgs = $FindUniqueArgs<$Schema, "UserPassword">; -export type UserPasswordFindFirstArgs = $FindFirstArgs<$Schema, "UserPassword">; -export type UserPasswordExistsArgs = $ExistsArgs<$Schema, "UserPassword">; -export type UserPasswordCreateArgs = $CreateArgs<$Schema, "UserPassword">; -export type UserPasswordCreateManyArgs = $CreateManyArgs<$Schema, "UserPassword">; -export type UserPasswordCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "UserPassword">; -export type UserPasswordUpdateArgs = $UpdateArgs<$Schema, "UserPassword">; -export type UserPasswordUpdateManyArgs = $UpdateManyArgs<$Schema, "UserPassword">; -export type UserPasswordUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "UserPassword">; -export type UserPasswordUpsertArgs = $UpsertArgs<$Schema, "UserPassword">; -export type UserPasswordDeleteArgs = $DeleteArgs<$Schema, "UserPassword">; -export type UserPasswordDeleteManyArgs = $DeleteManyArgs<$Schema, "UserPassword">; -export type UserPasswordCountArgs = $CountArgs<$Schema, "UserPassword">; -export type UserPasswordAggregateArgs = $AggregateArgs<$Schema, "UserPassword">; -export type UserPasswordGroupByArgs = $GroupByArgs<$Schema, "UserPassword">; -export type UserPasswordWhereInput = $WhereInput<$Schema, "UserPassword">; -export type UserPasswordSelect = $SelectInput<$Schema, "UserPassword">; -export type UserPasswordInclude = $IncludeInput<$Schema, "UserPassword">; -export type UserPasswordOmit = $OmitInput<$Schema, "UserPassword">; -export type UserPasswordGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "UserPassword", Args, Options>; -export type TravelScheduleFindManyArgs = $FindManyArgs<$Schema, "TravelSchedule">; -export type TravelScheduleFindUniqueArgs = $FindUniqueArgs<$Schema, "TravelSchedule">; -export type TravelScheduleFindFirstArgs = $FindFirstArgs<$Schema, "TravelSchedule">; -export type TravelScheduleExistsArgs = $ExistsArgs<$Schema, "TravelSchedule">; -export type TravelScheduleCreateArgs = $CreateArgs<$Schema, "TravelSchedule">; -export type TravelScheduleCreateManyArgs = $CreateManyArgs<$Schema, "TravelSchedule">; -export type TravelScheduleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TravelSchedule">; -export type TravelScheduleUpdateArgs = $UpdateArgs<$Schema, "TravelSchedule">; -export type TravelScheduleUpdateManyArgs = $UpdateManyArgs<$Schema, "TravelSchedule">; -export type TravelScheduleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TravelSchedule">; -export type TravelScheduleUpsertArgs = $UpsertArgs<$Schema, "TravelSchedule">; -export type TravelScheduleDeleteArgs = $DeleteArgs<$Schema, "TravelSchedule">; -export type TravelScheduleDeleteManyArgs = $DeleteManyArgs<$Schema, "TravelSchedule">; -export type TravelScheduleCountArgs = $CountArgs<$Schema, "TravelSchedule">; -export type TravelScheduleAggregateArgs = $AggregateArgs<$Schema, "TravelSchedule">; -export type TravelScheduleGroupByArgs = $GroupByArgs<$Schema, "TravelSchedule">; -export type TravelScheduleWhereInput = $WhereInput<$Schema, "TravelSchedule">; -export type TravelScheduleSelect = $SelectInput<$Schema, "TravelSchedule">; -export type TravelScheduleInclude = $IncludeInput<$Schema, "TravelSchedule">; -export type TravelScheduleOmit = $OmitInput<$Schema, "TravelSchedule">; -export type TravelScheduleGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TravelSchedule", Args, Options>; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type NotificationsSubscriptionsFindManyArgs = $FindManyArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsFindUniqueArgs = $FindUniqueArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsFindFirstArgs = $FindFirstArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsExistsArgs = $ExistsArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsCreateArgs = $CreateArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsCreateManyArgs = $CreateManyArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsUpdateArgs = $UpdateArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsUpdateManyArgs = $UpdateManyArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsUpsertArgs = $UpsertArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsDeleteArgs = $DeleteArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsDeleteManyArgs = $DeleteManyArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsCountArgs = $CountArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsAggregateArgs = $AggregateArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsGroupByArgs = $GroupByArgs<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsWhereInput = $WhereInput<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsSelect = $SelectInput<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsInclude = $IncludeInput<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsOmit = $OmitInput<$Schema, "NotificationsSubscriptions">; -export type NotificationsSubscriptionsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "NotificationsSubscriptions", Args, Options>; -export type ProfileFindManyArgs = $FindManyArgs<$Schema, "Profile">; -export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, "Profile">; -export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, "Profile">; -export type ProfileExistsArgs = $ExistsArgs<$Schema, "Profile">; -export type ProfileCreateArgs = $CreateArgs<$Schema, "Profile">; -export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, "Profile">; -export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpdateArgs = $UpdateArgs<$Schema, "Profile">; -export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, "Profile">; -export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpsertArgs = $UpsertArgs<$Schema, "Profile">; -export type ProfileDeleteArgs = $DeleteArgs<$Schema, "Profile">; -export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, "Profile">; -export type ProfileCountArgs = $CountArgs<$Schema, "Profile">; -export type ProfileAggregateArgs = $AggregateArgs<$Schema, "Profile">; -export type ProfileGroupByArgs = $GroupByArgs<$Schema, "Profile">; -export type ProfileWhereInput = $WhereInput<$Schema, "Profile">; -export type ProfileSelect = $SelectInput<$Schema, "Profile">; -export type ProfileInclude = $IncludeInput<$Schema, "Profile">; -export type ProfileOmit = $OmitInput<$Schema, "Profile">; -export type ProfileGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Profile", Args, Options>; -export type TeamFindManyArgs = $FindManyArgs<$Schema, "Team">; -export type TeamFindUniqueArgs = $FindUniqueArgs<$Schema, "Team">; -export type TeamFindFirstArgs = $FindFirstArgs<$Schema, "Team">; -export type TeamExistsArgs = $ExistsArgs<$Schema, "Team">; -export type TeamCreateArgs = $CreateArgs<$Schema, "Team">; -export type TeamCreateManyArgs = $CreateManyArgs<$Schema, "Team">; -export type TeamCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Team">; -export type TeamUpdateArgs = $UpdateArgs<$Schema, "Team">; -export type TeamUpdateManyArgs = $UpdateManyArgs<$Schema, "Team">; -export type TeamUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Team">; -export type TeamUpsertArgs = $UpsertArgs<$Schema, "Team">; -export type TeamDeleteArgs = $DeleteArgs<$Schema, "Team">; -export type TeamDeleteManyArgs = $DeleteManyArgs<$Schema, "Team">; -export type TeamCountArgs = $CountArgs<$Schema, "Team">; -export type TeamAggregateArgs = $AggregateArgs<$Schema, "Team">; -export type TeamGroupByArgs = $GroupByArgs<$Schema, "Team">; -export type TeamWhereInput = $WhereInput<$Schema, "Team">; -export type TeamSelect = $SelectInput<$Schema, "Team">; -export type TeamInclude = $IncludeInput<$Schema, "Team">; -export type TeamOmit = $OmitInput<$Schema, "Team">; -export type TeamGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Team", Args, Options>; -export type CreditBalanceFindManyArgs = $FindManyArgs<$Schema, "CreditBalance">; -export type CreditBalanceFindUniqueArgs = $FindUniqueArgs<$Schema, "CreditBalance">; -export type CreditBalanceFindFirstArgs = $FindFirstArgs<$Schema, "CreditBalance">; -export type CreditBalanceExistsArgs = $ExistsArgs<$Schema, "CreditBalance">; -export type CreditBalanceCreateArgs = $CreateArgs<$Schema, "CreditBalance">; -export type CreditBalanceCreateManyArgs = $CreateManyArgs<$Schema, "CreditBalance">; -export type CreditBalanceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "CreditBalance">; -export type CreditBalanceUpdateArgs = $UpdateArgs<$Schema, "CreditBalance">; -export type CreditBalanceUpdateManyArgs = $UpdateManyArgs<$Schema, "CreditBalance">; -export type CreditBalanceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "CreditBalance">; -export type CreditBalanceUpsertArgs = $UpsertArgs<$Schema, "CreditBalance">; -export type CreditBalanceDeleteArgs = $DeleteArgs<$Schema, "CreditBalance">; -export type CreditBalanceDeleteManyArgs = $DeleteManyArgs<$Schema, "CreditBalance">; -export type CreditBalanceCountArgs = $CountArgs<$Schema, "CreditBalance">; -export type CreditBalanceAggregateArgs = $AggregateArgs<$Schema, "CreditBalance">; -export type CreditBalanceGroupByArgs = $GroupByArgs<$Schema, "CreditBalance">; -export type CreditBalanceWhereInput = $WhereInput<$Schema, "CreditBalance">; -export type CreditBalanceSelect = $SelectInput<$Schema, "CreditBalance">; -export type CreditBalanceInclude = $IncludeInput<$Schema, "CreditBalance">; -export type CreditBalanceOmit = $OmitInput<$Schema, "CreditBalance">; -export type CreditBalanceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "CreditBalance", Args, Options>; -export type CreditPurchaseLogFindManyArgs = $FindManyArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogFindUniqueArgs = $FindUniqueArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogFindFirstArgs = $FindFirstArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogExistsArgs = $ExistsArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogCreateArgs = $CreateArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogCreateManyArgs = $CreateManyArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogUpdateArgs = $UpdateArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogUpdateManyArgs = $UpdateManyArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogUpsertArgs = $UpsertArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogDeleteArgs = $DeleteArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogDeleteManyArgs = $DeleteManyArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogCountArgs = $CountArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogAggregateArgs = $AggregateArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogGroupByArgs = $GroupByArgs<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogWhereInput = $WhereInput<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogSelect = $SelectInput<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogInclude = $IncludeInput<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogOmit = $OmitInput<$Schema, "CreditPurchaseLog">; -export type CreditPurchaseLogGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "CreditPurchaseLog", Args, Options>; -export type CreditExpenseLogFindManyArgs = $FindManyArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogFindUniqueArgs = $FindUniqueArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogFindFirstArgs = $FindFirstArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogExistsArgs = $ExistsArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogCreateArgs = $CreateArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogCreateManyArgs = $CreateManyArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogUpdateArgs = $UpdateArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogUpdateManyArgs = $UpdateManyArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogUpsertArgs = $UpsertArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogDeleteArgs = $DeleteArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogDeleteManyArgs = $DeleteManyArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogCountArgs = $CountArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogAggregateArgs = $AggregateArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogGroupByArgs = $GroupByArgs<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogWhereInput = $WhereInput<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogSelect = $SelectInput<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogInclude = $IncludeInput<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogOmit = $OmitInput<$Schema, "CreditExpenseLog">; -export type CreditExpenseLogGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "CreditExpenseLog", Args, Options>; -export type OrganizationSettingsFindManyArgs = $FindManyArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsFindUniqueArgs = $FindUniqueArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsFindFirstArgs = $FindFirstArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsExistsArgs = $ExistsArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsCreateArgs = $CreateArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsCreateManyArgs = $CreateManyArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsUpdateArgs = $UpdateArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsUpdateManyArgs = $UpdateManyArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsUpsertArgs = $UpsertArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsDeleteArgs = $DeleteArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsDeleteManyArgs = $DeleteManyArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsCountArgs = $CountArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsAggregateArgs = $AggregateArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsGroupByArgs = $GroupByArgs<$Schema, "OrganizationSettings">; -export type OrganizationSettingsWhereInput = $WhereInput<$Schema, "OrganizationSettings">; -export type OrganizationSettingsSelect = $SelectInput<$Schema, "OrganizationSettings">; -export type OrganizationSettingsInclude = $IncludeInput<$Schema, "OrganizationSettings">; -export type OrganizationSettingsOmit = $OmitInput<$Schema, "OrganizationSettings">; -export type OrganizationSettingsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OrganizationSettings", Args, Options>; -export type MembershipFindManyArgs = $FindManyArgs<$Schema, "Membership">; -export type MembershipFindUniqueArgs = $FindUniqueArgs<$Schema, "Membership">; -export type MembershipFindFirstArgs = $FindFirstArgs<$Schema, "Membership">; -export type MembershipExistsArgs = $ExistsArgs<$Schema, "Membership">; -export type MembershipCreateArgs = $CreateArgs<$Schema, "Membership">; -export type MembershipCreateManyArgs = $CreateManyArgs<$Schema, "Membership">; -export type MembershipCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Membership">; -export type MembershipUpdateArgs = $UpdateArgs<$Schema, "Membership">; -export type MembershipUpdateManyArgs = $UpdateManyArgs<$Schema, "Membership">; -export type MembershipUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Membership">; -export type MembershipUpsertArgs = $UpsertArgs<$Schema, "Membership">; -export type MembershipDeleteArgs = $DeleteArgs<$Schema, "Membership">; -export type MembershipDeleteManyArgs = $DeleteManyArgs<$Schema, "Membership">; -export type MembershipCountArgs = $CountArgs<$Schema, "Membership">; -export type MembershipAggregateArgs = $AggregateArgs<$Schema, "Membership">; -export type MembershipGroupByArgs = $GroupByArgs<$Schema, "Membership">; -export type MembershipWhereInput = $WhereInput<$Schema, "Membership">; -export type MembershipSelect = $SelectInput<$Schema, "Membership">; -export type MembershipInclude = $IncludeInput<$Schema, "Membership">; -export type MembershipOmit = $OmitInput<$Schema, "Membership">; -export type MembershipGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Membership", Args, Options>; -export type VerificationTokenFindManyArgs = $FindManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "VerificationToken">; -export type VerificationTokenFindFirstArgs = $FindFirstArgs<$Schema, "VerificationToken">; -export type VerificationTokenExistsArgs = $ExistsArgs<$Schema, "VerificationToken">; -export type VerificationTokenCreateArgs = $CreateArgs<$Schema, "VerificationToken">; -export type VerificationTokenCreateManyArgs = $CreateManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpdateArgs = $UpdateArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "VerificationToken">; -export type VerificationTokenUpsertArgs = $UpsertArgs<$Schema, "VerificationToken">; -export type VerificationTokenDeleteArgs = $DeleteArgs<$Schema, "VerificationToken">; -export type VerificationTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "VerificationToken">; -export type VerificationTokenCountArgs = $CountArgs<$Schema, "VerificationToken">; -export type VerificationTokenAggregateArgs = $AggregateArgs<$Schema, "VerificationToken">; -export type VerificationTokenGroupByArgs = $GroupByArgs<$Schema, "VerificationToken">; -export type VerificationTokenWhereInput = $WhereInput<$Schema, "VerificationToken">; -export type VerificationTokenSelect = $SelectInput<$Schema, "VerificationToken">; -export type VerificationTokenInclude = $IncludeInput<$Schema, "VerificationToken">; -export type VerificationTokenOmit = $OmitInput<$Schema, "VerificationToken">; -export type VerificationTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "VerificationToken", Args, Options>; -export type InstantMeetingTokenFindManyArgs = $FindManyArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenFindFirstArgs = $FindFirstArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenExistsArgs = $ExistsArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenCreateArgs = $CreateArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenCreateManyArgs = $CreateManyArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenUpdateArgs = $UpdateArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenUpsertArgs = $UpsertArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenDeleteArgs = $DeleteArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenCountArgs = $CountArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenAggregateArgs = $AggregateArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenGroupByArgs = $GroupByArgs<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenWhereInput = $WhereInput<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenSelect = $SelectInput<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenInclude = $IncludeInput<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenOmit = $OmitInput<$Schema, "InstantMeetingToken">; -export type InstantMeetingTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "InstantMeetingToken", Args, Options>; -export type BookingReferenceFindManyArgs = $FindManyArgs<$Schema, "BookingReference">; -export type BookingReferenceFindUniqueArgs = $FindUniqueArgs<$Schema, "BookingReference">; -export type BookingReferenceFindFirstArgs = $FindFirstArgs<$Schema, "BookingReference">; -export type BookingReferenceExistsArgs = $ExistsArgs<$Schema, "BookingReference">; -export type BookingReferenceCreateArgs = $CreateArgs<$Schema, "BookingReference">; -export type BookingReferenceCreateManyArgs = $CreateManyArgs<$Schema, "BookingReference">; -export type BookingReferenceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BookingReference">; -export type BookingReferenceUpdateArgs = $UpdateArgs<$Schema, "BookingReference">; -export type BookingReferenceUpdateManyArgs = $UpdateManyArgs<$Schema, "BookingReference">; -export type BookingReferenceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BookingReference">; -export type BookingReferenceUpsertArgs = $UpsertArgs<$Schema, "BookingReference">; -export type BookingReferenceDeleteArgs = $DeleteArgs<$Schema, "BookingReference">; -export type BookingReferenceDeleteManyArgs = $DeleteManyArgs<$Schema, "BookingReference">; -export type BookingReferenceCountArgs = $CountArgs<$Schema, "BookingReference">; -export type BookingReferenceAggregateArgs = $AggregateArgs<$Schema, "BookingReference">; -export type BookingReferenceGroupByArgs = $GroupByArgs<$Schema, "BookingReference">; -export type BookingReferenceWhereInput = $WhereInput<$Schema, "BookingReference">; -export type BookingReferenceSelect = $SelectInput<$Schema, "BookingReference">; -export type BookingReferenceInclude = $IncludeInput<$Schema, "BookingReference">; -export type BookingReferenceOmit = $OmitInput<$Schema, "BookingReference">; -export type BookingReferenceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BookingReference", Args, Options>; -export type AttendeeFindManyArgs = $FindManyArgs<$Schema, "Attendee">; -export type AttendeeFindUniqueArgs = $FindUniqueArgs<$Schema, "Attendee">; -export type AttendeeFindFirstArgs = $FindFirstArgs<$Schema, "Attendee">; -export type AttendeeExistsArgs = $ExistsArgs<$Schema, "Attendee">; -export type AttendeeCreateArgs = $CreateArgs<$Schema, "Attendee">; -export type AttendeeCreateManyArgs = $CreateManyArgs<$Schema, "Attendee">; -export type AttendeeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Attendee">; -export type AttendeeUpdateArgs = $UpdateArgs<$Schema, "Attendee">; -export type AttendeeUpdateManyArgs = $UpdateManyArgs<$Schema, "Attendee">; -export type AttendeeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Attendee">; -export type AttendeeUpsertArgs = $UpsertArgs<$Schema, "Attendee">; -export type AttendeeDeleteArgs = $DeleteArgs<$Schema, "Attendee">; -export type AttendeeDeleteManyArgs = $DeleteManyArgs<$Schema, "Attendee">; -export type AttendeeCountArgs = $CountArgs<$Schema, "Attendee">; -export type AttendeeAggregateArgs = $AggregateArgs<$Schema, "Attendee">; -export type AttendeeGroupByArgs = $GroupByArgs<$Schema, "Attendee">; -export type AttendeeWhereInput = $WhereInput<$Schema, "Attendee">; -export type AttendeeSelect = $SelectInput<$Schema, "Attendee">; -export type AttendeeInclude = $IncludeInput<$Schema, "Attendee">; -export type AttendeeOmit = $OmitInput<$Schema, "Attendee">; -export type AttendeeGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Attendee", Args, Options>; -export type BookingFindManyArgs = $FindManyArgs<$Schema, "Booking">; -export type BookingFindUniqueArgs = $FindUniqueArgs<$Schema, "Booking">; -export type BookingFindFirstArgs = $FindFirstArgs<$Schema, "Booking">; -export type BookingExistsArgs = $ExistsArgs<$Schema, "Booking">; -export type BookingCreateArgs = $CreateArgs<$Schema, "Booking">; -export type BookingCreateManyArgs = $CreateManyArgs<$Schema, "Booking">; -export type BookingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Booking">; -export type BookingUpdateArgs = $UpdateArgs<$Schema, "Booking">; -export type BookingUpdateManyArgs = $UpdateManyArgs<$Schema, "Booking">; -export type BookingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Booking">; -export type BookingUpsertArgs = $UpsertArgs<$Schema, "Booking">; -export type BookingDeleteArgs = $DeleteArgs<$Schema, "Booking">; -export type BookingDeleteManyArgs = $DeleteManyArgs<$Schema, "Booking">; -export type BookingCountArgs = $CountArgs<$Schema, "Booking">; -export type BookingAggregateArgs = $AggregateArgs<$Schema, "Booking">; -export type BookingGroupByArgs = $GroupByArgs<$Schema, "Booking">; -export type BookingWhereInput = $WhereInput<$Schema, "Booking">; -export type BookingSelect = $SelectInput<$Schema, "Booking">; -export type BookingInclude = $IncludeInput<$Schema, "Booking">; -export type BookingOmit = $OmitInput<$Schema, "Booking">; -export type BookingGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Booking", Args, Options>; -export type TrackingFindManyArgs = $FindManyArgs<$Schema, "Tracking">; -export type TrackingFindUniqueArgs = $FindUniqueArgs<$Schema, "Tracking">; -export type TrackingFindFirstArgs = $FindFirstArgs<$Schema, "Tracking">; -export type TrackingExistsArgs = $ExistsArgs<$Schema, "Tracking">; -export type TrackingCreateArgs = $CreateArgs<$Schema, "Tracking">; -export type TrackingCreateManyArgs = $CreateManyArgs<$Schema, "Tracking">; -export type TrackingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Tracking">; -export type TrackingUpdateArgs = $UpdateArgs<$Schema, "Tracking">; -export type TrackingUpdateManyArgs = $UpdateManyArgs<$Schema, "Tracking">; -export type TrackingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Tracking">; -export type TrackingUpsertArgs = $UpsertArgs<$Schema, "Tracking">; -export type TrackingDeleteArgs = $DeleteArgs<$Schema, "Tracking">; -export type TrackingDeleteManyArgs = $DeleteManyArgs<$Schema, "Tracking">; -export type TrackingCountArgs = $CountArgs<$Schema, "Tracking">; -export type TrackingAggregateArgs = $AggregateArgs<$Schema, "Tracking">; -export type TrackingGroupByArgs = $GroupByArgs<$Schema, "Tracking">; -export type TrackingWhereInput = $WhereInput<$Schema, "Tracking">; -export type TrackingSelect = $SelectInput<$Schema, "Tracking">; -export type TrackingInclude = $IncludeInput<$Schema, "Tracking">; -export type TrackingOmit = $OmitInput<$Schema, "Tracking">; -export type TrackingGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Tracking", Args, Options>; -export type ScheduleFindManyArgs = $FindManyArgs<$Schema, "Schedule">; -export type ScheduleFindUniqueArgs = $FindUniqueArgs<$Schema, "Schedule">; -export type ScheduleFindFirstArgs = $FindFirstArgs<$Schema, "Schedule">; -export type ScheduleExistsArgs = $ExistsArgs<$Schema, "Schedule">; -export type ScheduleCreateArgs = $CreateArgs<$Schema, "Schedule">; -export type ScheduleCreateManyArgs = $CreateManyArgs<$Schema, "Schedule">; -export type ScheduleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Schedule">; -export type ScheduleUpdateArgs = $UpdateArgs<$Schema, "Schedule">; -export type ScheduleUpdateManyArgs = $UpdateManyArgs<$Schema, "Schedule">; -export type ScheduleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Schedule">; -export type ScheduleUpsertArgs = $UpsertArgs<$Schema, "Schedule">; -export type ScheduleDeleteArgs = $DeleteArgs<$Schema, "Schedule">; -export type ScheduleDeleteManyArgs = $DeleteManyArgs<$Schema, "Schedule">; -export type ScheduleCountArgs = $CountArgs<$Schema, "Schedule">; -export type ScheduleAggregateArgs = $AggregateArgs<$Schema, "Schedule">; -export type ScheduleGroupByArgs = $GroupByArgs<$Schema, "Schedule">; -export type ScheduleWhereInput = $WhereInput<$Schema, "Schedule">; -export type ScheduleSelect = $SelectInput<$Schema, "Schedule">; -export type ScheduleInclude = $IncludeInput<$Schema, "Schedule">; -export type ScheduleOmit = $OmitInput<$Schema, "Schedule">; -export type ScheduleGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Schedule", Args, Options>; -export type AvailabilityFindManyArgs = $FindManyArgs<$Schema, "Availability">; -export type AvailabilityFindUniqueArgs = $FindUniqueArgs<$Schema, "Availability">; -export type AvailabilityFindFirstArgs = $FindFirstArgs<$Schema, "Availability">; -export type AvailabilityExistsArgs = $ExistsArgs<$Schema, "Availability">; -export type AvailabilityCreateArgs = $CreateArgs<$Schema, "Availability">; -export type AvailabilityCreateManyArgs = $CreateManyArgs<$Schema, "Availability">; -export type AvailabilityCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Availability">; -export type AvailabilityUpdateArgs = $UpdateArgs<$Schema, "Availability">; -export type AvailabilityUpdateManyArgs = $UpdateManyArgs<$Schema, "Availability">; -export type AvailabilityUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Availability">; -export type AvailabilityUpsertArgs = $UpsertArgs<$Schema, "Availability">; -export type AvailabilityDeleteArgs = $DeleteArgs<$Schema, "Availability">; -export type AvailabilityDeleteManyArgs = $DeleteManyArgs<$Schema, "Availability">; -export type AvailabilityCountArgs = $CountArgs<$Schema, "Availability">; -export type AvailabilityAggregateArgs = $AggregateArgs<$Schema, "Availability">; -export type AvailabilityGroupByArgs = $GroupByArgs<$Schema, "Availability">; -export type AvailabilityWhereInput = $WhereInput<$Schema, "Availability">; -export type AvailabilitySelect = $SelectInput<$Schema, "Availability">; -export type AvailabilityInclude = $IncludeInput<$Schema, "Availability">; -export type AvailabilityOmit = $OmitInput<$Schema, "Availability">; -export type AvailabilityGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Availability", Args, Options>; -export type SelectedCalendarFindManyArgs = $FindManyArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarFindUniqueArgs = $FindUniqueArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarFindFirstArgs = $FindFirstArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarExistsArgs = $ExistsArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarCreateArgs = $CreateArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarCreateManyArgs = $CreateManyArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarUpdateArgs = $UpdateArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarUpdateManyArgs = $UpdateManyArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarUpsertArgs = $UpsertArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarDeleteArgs = $DeleteArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarDeleteManyArgs = $DeleteManyArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarCountArgs = $CountArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarAggregateArgs = $AggregateArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarGroupByArgs = $GroupByArgs<$Schema, "SelectedCalendar">; -export type SelectedCalendarWhereInput = $WhereInput<$Schema, "SelectedCalendar">; -export type SelectedCalendarSelect = $SelectInput<$Schema, "SelectedCalendar">; -export type SelectedCalendarInclude = $IncludeInput<$Schema, "SelectedCalendar">; -export type SelectedCalendarOmit = $OmitInput<$Schema, "SelectedCalendar">; -export type SelectedCalendarGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SelectedCalendar", Args, Options>; -export type EventTypeCustomInputFindManyArgs = $FindManyArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputFindUniqueArgs = $FindUniqueArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputFindFirstArgs = $FindFirstArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputExistsArgs = $ExistsArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputCreateArgs = $CreateArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputCreateManyArgs = $CreateManyArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputUpdateArgs = $UpdateArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputUpdateManyArgs = $UpdateManyArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputUpsertArgs = $UpsertArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputDeleteArgs = $DeleteArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputDeleteManyArgs = $DeleteManyArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputCountArgs = $CountArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputAggregateArgs = $AggregateArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputGroupByArgs = $GroupByArgs<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputWhereInput = $WhereInput<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputSelect = $SelectInput<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputInclude = $IncludeInput<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputOmit = $OmitInput<$Schema, "EventTypeCustomInput">; -export type EventTypeCustomInputGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "EventTypeCustomInput", Args, Options>; -export type ResetPasswordRequestFindManyArgs = $FindManyArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestFindUniqueArgs = $FindUniqueArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestFindFirstArgs = $FindFirstArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestExistsArgs = $ExistsArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestCreateArgs = $CreateArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestCreateManyArgs = $CreateManyArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestUpdateArgs = $UpdateArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestUpdateManyArgs = $UpdateManyArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestUpsertArgs = $UpsertArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestDeleteArgs = $DeleteArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestDeleteManyArgs = $DeleteManyArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestCountArgs = $CountArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestAggregateArgs = $AggregateArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestGroupByArgs = $GroupByArgs<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestWhereInput = $WhereInput<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestSelect = $SelectInput<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestInclude = $IncludeInput<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestOmit = $OmitInput<$Schema, "ResetPasswordRequest">; -export type ResetPasswordRequestGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ResetPasswordRequest", Args, Options>; -export type ReminderMailFindManyArgs = $FindManyArgs<$Schema, "ReminderMail">; -export type ReminderMailFindUniqueArgs = $FindUniqueArgs<$Schema, "ReminderMail">; -export type ReminderMailFindFirstArgs = $FindFirstArgs<$Schema, "ReminderMail">; -export type ReminderMailExistsArgs = $ExistsArgs<$Schema, "ReminderMail">; -export type ReminderMailCreateArgs = $CreateArgs<$Schema, "ReminderMail">; -export type ReminderMailCreateManyArgs = $CreateManyArgs<$Schema, "ReminderMail">; -export type ReminderMailCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ReminderMail">; -export type ReminderMailUpdateArgs = $UpdateArgs<$Schema, "ReminderMail">; -export type ReminderMailUpdateManyArgs = $UpdateManyArgs<$Schema, "ReminderMail">; -export type ReminderMailUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ReminderMail">; -export type ReminderMailUpsertArgs = $UpsertArgs<$Schema, "ReminderMail">; -export type ReminderMailDeleteArgs = $DeleteArgs<$Schema, "ReminderMail">; -export type ReminderMailDeleteManyArgs = $DeleteManyArgs<$Schema, "ReminderMail">; -export type ReminderMailCountArgs = $CountArgs<$Schema, "ReminderMail">; -export type ReminderMailAggregateArgs = $AggregateArgs<$Schema, "ReminderMail">; -export type ReminderMailGroupByArgs = $GroupByArgs<$Schema, "ReminderMail">; -export type ReminderMailWhereInput = $WhereInput<$Schema, "ReminderMail">; -export type ReminderMailSelect = $SelectInput<$Schema, "ReminderMail">; -export type ReminderMailInclude = $IncludeInput<$Schema, "ReminderMail">; -export type ReminderMailOmit = $OmitInput<$Schema, "ReminderMail">; -export type ReminderMailGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ReminderMail", Args, Options>; -export type PaymentFindManyArgs = $FindManyArgs<$Schema, "Payment">; -export type PaymentFindUniqueArgs = $FindUniqueArgs<$Schema, "Payment">; -export type PaymentFindFirstArgs = $FindFirstArgs<$Schema, "Payment">; -export type PaymentExistsArgs = $ExistsArgs<$Schema, "Payment">; -export type PaymentCreateArgs = $CreateArgs<$Schema, "Payment">; -export type PaymentCreateManyArgs = $CreateManyArgs<$Schema, "Payment">; -export type PaymentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Payment">; -export type PaymentUpdateArgs = $UpdateArgs<$Schema, "Payment">; -export type PaymentUpdateManyArgs = $UpdateManyArgs<$Schema, "Payment">; -export type PaymentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Payment">; -export type PaymentUpsertArgs = $UpsertArgs<$Schema, "Payment">; -export type PaymentDeleteArgs = $DeleteArgs<$Schema, "Payment">; -export type PaymentDeleteManyArgs = $DeleteManyArgs<$Schema, "Payment">; -export type PaymentCountArgs = $CountArgs<$Schema, "Payment">; -export type PaymentAggregateArgs = $AggregateArgs<$Schema, "Payment">; -export type PaymentGroupByArgs = $GroupByArgs<$Schema, "Payment">; -export type PaymentWhereInput = $WhereInput<$Schema, "Payment">; -export type PaymentSelect = $SelectInput<$Schema, "Payment">; -export type PaymentInclude = $IncludeInput<$Schema, "Payment">; -export type PaymentOmit = $OmitInput<$Schema, "Payment">; -export type PaymentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Payment", Args, Options>; -export type WebhookFindManyArgs = $FindManyArgs<$Schema, "Webhook">; -export type WebhookFindUniqueArgs = $FindUniqueArgs<$Schema, "Webhook">; -export type WebhookFindFirstArgs = $FindFirstArgs<$Schema, "Webhook">; -export type WebhookExistsArgs = $ExistsArgs<$Schema, "Webhook">; -export type WebhookCreateArgs = $CreateArgs<$Schema, "Webhook">; -export type WebhookCreateManyArgs = $CreateManyArgs<$Schema, "Webhook">; -export type WebhookCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Webhook">; -export type WebhookUpdateArgs = $UpdateArgs<$Schema, "Webhook">; -export type WebhookUpdateManyArgs = $UpdateManyArgs<$Schema, "Webhook">; -export type WebhookUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Webhook">; -export type WebhookUpsertArgs = $UpsertArgs<$Schema, "Webhook">; -export type WebhookDeleteArgs = $DeleteArgs<$Schema, "Webhook">; -export type WebhookDeleteManyArgs = $DeleteManyArgs<$Schema, "Webhook">; -export type WebhookCountArgs = $CountArgs<$Schema, "Webhook">; -export type WebhookAggregateArgs = $AggregateArgs<$Schema, "Webhook">; -export type WebhookGroupByArgs = $GroupByArgs<$Schema, "Webhook">; -export type WebhookWhereInput = $WhereInput<$Schema, "Webhook">; -export type WebhookSelect = $SelectInput<$Schema, "Webhook">; -export type WebhookInclude = $IncludeInput<$Schema, "Webhook">; -export type WebhookOmit = $OmitInput<$Schema, "Webhook">; -export type WebhookGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Webhook", Args, Options>; -export type ImpersonationsFindManyArgs = $FindManyArgs<$Schema, "Impersonations">; -export type ImpersonationsFindUniqueArgs = $FindUniqueArgs<$Schema, "Impersonations">; -export type ImpersonationsFindFirstArgs = $FindFirstArgs<$Schema, "Impersonations">; -export type ImpersonationsExistsArgs = $ExistsArgs<$Schema, "Impersonations">; -export type ImpersonationsCreateArgs = $CreateArgs<$Schema, "Impersonations">; -export type ImpersonationsCreateManyArgs = $CreateManyArgs<$Schema, "Impersonations">; -export type ImpersonationsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Impersonations">; -export type ImpersonationsUpdateArgs = $UpdateArgs<$Schema, "Impersonations">; -export type ImpersonationsUpdateManyArgs = $UpdateManyArgs<$Schema, "Impersonations">; -export type ImpersonationsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Impersonations">; -export type ImpersonationsUpsertArgs = $UpsertArgs<$Schema, "Impersonations">; -export type ImpersonationsDeleteArgs = $DeleteArgs<$Schema, "Impersonations">; -export type ImpersonationsDeleteManyArgs = $DeleteManyArgs<$Schema, "Impersonations">; -export type ImpersonationsCountArgs = $CountArgs<$Schema, "Impersonations">; -export type ImpersonationsAggregateArgs = $AggregateArgs<$Schema, "Impersonations">; -export type ImpersonationsGroupByArgs = $GroupByArgs<$Schema, "Impersonations">; -export type ImpersonationsWhereInput = $WhereInput<$Schema, "Impersonations">; -export type ImpersonationsSelect = $SelectInput<$Schema, "Impersonations">; -export type ImpersonationsInclude = $IncludeInput<$Schema, "Impersonations">; -export type ImpersonationsOmit = $OmitInput<$Schema, "Impersonations">; -export type ImpersonationsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Impersonations", Args, Options>; -export type ApiKeyFindManyArgs = $FindManyArgs<$Schema, "ApiKey">; -export type ApiKeyFindUniqueArgs = $FindUniqueArgs<$Schema, "ApiKey">; -export type ApiKeyFindFirstArgs = $FindFirstArgs<$Schema, "ApiKey">; -export type ApiKeyExistsArgs = $ExistsArgs<$Schema, "ApiKey">; -export type ApiKeyCreateArgs = $CreateArgs<$Schema, "ApiKey">; -export type ApiKeyCreateManyArgs = $CreateManyArgs<$Schema, "ApiKey">; -export type ApiKeyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ApiKey">; -export type ApiKeyUpdateArgs = $UpdateArgs<$Schema, "ApiKey">; -export type ApiKeyUpdateManyArgs = $UpdateManyArgs<$Schema, "ApiKey">; -export type ApiKeyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ApiKey">; -export type ApiKeyUpsertArgs = $UpsertArgs<$Schema, "ApiKey">; -export type ApiKeyDeleteArgs = $DeleteArgs<$Schema, "ApiKey">; -export type ApiKeyDeleteManyArgs = $DeleteManyArgs<$Schema, "ApiKey">; -export type ApiKeyCountArgs = $CountArgs<$Schema, "ApiKey">; -export type ApiKeyAggregateArgs = $AggregateArgs<$Schema, "ApiKey">; -export type ApiKeyGroupByArgs = $GroupByArgs<$Schema, "ApiKey">; -export type ApiKeyWhereInput = $WhereInput<$Schema, "ApiKey">; -export type ApiKeySelect = $SelectInput<$Schema, "ApiKey">; -export type ApiKeyInclude = $IncludeInput<$Schema, "ApiKey">; -export type ApiKeyOmit = $OmitInput<$Schema, "ApiKey">; -export type ApiKeyGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ApiKey", Args, Options>; -export type RateLimitFindManyArgs = $FindManyArgs<$Schema, "RateLimit">; -export type RateLimitFindUniqueArgs = $FindUniqueArgs<$Schema, "RateLimit">; -export type RateLimitFindFirstArgs = $FindFirstArgs<$Schema, "RateLimit">; -export type RateLimitExistsArgs = $ExistsArgs<$Schema, "RateLimit">; -export type RateLimitCreateArgs = $CreateArgs<$Schema, "RateLimit">; -export type RateLimitCreateManyArgs = $CreateManyArgs<$Schema, "RateLimit">; -export type RateLimitCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RateLimit">; -export type RateLimitUpdateArgs = $UpdateArgs<$Schema, "RateLimit">; -export type RateLimitUpdateManyArgs = $UpdateManyArgs<$Schema, "RateLimit">; -export type RateLimitUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RateLimit">; -export type RateLimitUpsertArgs = $UpsertArgs<$Schema, "RateLimit">; -export type RateLimitDeleteArgs = $DeleteArgs<$Schema, "RateLimit">; -export type RateLimitDeleteManyArgs = $DeleteManyArgs<$Schema, "RateLimit">; -export type RateLimitCountArgs = $CountArgs<$Schema, "RateLimit">; -export type RateLimitAggregateArgs = $AggregateArgs<$Schema, "RateLimit">; -export type RateLimitGroupByArgs = $GroupByArgs<$Schema, "RateLimit">; -export type RateLimitWhereInput = $WhereInput<$Schema, "RateLimit">; -export type RateLimitSelect = $SelectInput<$Schema, "RateLimit">; -export type RateLimitInclude = $IncludeInput<$Schema, "RateLimit">; -export type RateLimitOmit = $OmitInput<$Schema, "RateLimit">; -export type RateLimitGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RateLimit", Args, Options>; -export type HashedLinkFindManyArgs = $FindManyArgs<$Schema, "HashedLink">; -export type HashedLinkFindUniqueArgs = $FindUniqueArgs<$Schema, "HashedLink">; -export type HashedLinkFindFirstArgs = $FindFirstArgs<$Schema, "HashedLink">; -export type HashedLinkExistsArgs = $ExistsArgs<$Schema, "HashedLink">; -export type HashedLinkCreateArgs = $CreateArgs<$Schema, "HashedLink">; -export type HashedLinkCreateManyArgs = $CreateManyArgs<$Schema, "HashedLink">; -export type HashedLinkCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "HashedLink">; -export type HashedLinkUpdateArgs = $UpdateArgs<$Schema, "HashedLink">; -export type HashedLinkUpdateManyArgs = $UpdateManyArgs<$Schema, "HashedLink">; -export type HashedLinkUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "HashedLink">; -export type HashedLinkUpsertArgs = $UpsertArgs<$Schema, "HashedLink">; -export type HashedLinkDeleteArgs = $DeleteArgs<$Schema, "HashedLink">; -export type HashedLinkDeleteManyArgs = $DeleteManyArgs<$Schema, "HashedLink">; -export type HashedLinkCountArgs = $CountArgs<$Schema, "HashedLink">; -export type HashedLinkAggregateArgs = $AggregateArgs<$Schema, "HashedLink">; -export type HashedLinkGroupByArgs = $GroupByArgs<$Schema, "HashedLink">; -export type HashedLinkWhereInput = $WhereInput<$Schema, "HashedLink">; -export type HashedLinkSelect = $SelectInput<$Schema, "HashedLink">; -export type HashedLinkInclude = $IncludeInput<$Schema, "HashedLink">; -export type HashedLinkOmit = $OmitInput<$Schema, "HashedLink">; -export type HashedLinkGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "HashedLink", Args, Options>; -export type AccountFindManyArgs = $FindManyArgs<$Schema, "Account">; -export type AccountFindUniqueArgs = $FindUniqueArgs<$Schema, "Account">; -export type AccountFindFirstArgs = $FindFirstArgs<$Schema, "Account">; -export type AccountExistsArgs = $ExistsArgs<$Schema, "Account">; -export type AccountCreateArgs = $CreateArgs<$Schema, "Account">; -export type AccountCreateManyArgs = $CreateManyArgs<$Schema, "Account">; -export type AccountCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Account">; -export type AccountUpdateArgs = $UpdateArgs<$Schema, "Account">; -export type AccountUpdateManyArgs = $UpdateManyArgs<$Schema, "Account">; -export type AccountUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Account">; -export type AccountUpsertArgs = $UpsertArgs<$Schema, "Account">; -export type AccountDeleteArgs = $DeleteArgs<$Schema, "Account">; -export type AccountDeleteManyArgs = $DeleteManyArgs<$Schema, "Account">; -export type AccountCountArgs = $CountArgs<$Schema, "Account">; -export type AccountAggregateArgs = $AggregateArgs<$Schema, "Account">; -export type AccountGroupByArgs = $GroupByArgs<$Schema, "Account">; -export type AccountWhereInput = $WhereInput<$Schema, "Account">; -export type AccountSelect = $SelectInput<$Schema, "Account">; -export type AccountInclude = $IncludeInput<$Schema, "Account">; -export type AccountOmit = $OmitInput<$Schema, "Account">; -export type AccountGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Account", Args, Options>; -export type SessionFindManyArgs = $FindManyArgs<$Schema, "Session">; -export type SessionFindUniqueArgs = $FindUniqueArgs<$Schema, "Session">; -export type SessionFindFirstArgs = $FindFirstArgs<$Schema, "Session">; -export type SessionExistsArgs = $ExistsArgs<$Schema, "Session">; -export type SessionCreateArgs = $CreateArgs<$Schema, "Session">; -export type SessionCreateManyArgs = $CreateManyArgs<$Schema, "Session">; -export type SessionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Session">; -export type SessionUpdateArgs = $UpdateArgs<$Schema, "Session">; -export type SessionUpdateManyArgs = $UpdateManyArgs<$Schema, "Session">; -export type SessionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Session">; -export type SessionUpsertArgs = $UpsertArgs<$Schema, "Session">; -export type SessionDeleteArgs = $DeleteArgs<$Schema, "Session">; -export type SessionDeleteManyArgs = $DeleteManyArgs<$Schema, "Session">; -export type SessionCountArgs = $CountArgs<$Schema, "Session">; -export type SessionAggregateArgs = $AggregateArgs<$Schema, "Session">; -export type SessionGroupByArgs = $GroupByArgs<$Schema, "Session">; -export type SessionWhereInput = $WhereInput<$Schema, "Session">; -export type SessionSelect = $SelectInput<$Schema, "Session">; -export type SessionInclude = $IncludeInput<$Schema, "Session">; -export type SessionOmit = $OmitInput<$Schema, "Session">; -export type SessionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Session", Args, Options>; -export type AppFindManyArgs = $FindManyArgs<$Schema, "App">; -export type AppFindUniqueArgs = $FindUniqueArgs<$Schema, "App">; -export type AppFindFirstArgs = $FindFirstArgs<$Schema, "App">; -export type AppExistsArgs = $ExistsArgs<$Schema, "App">; -export type AppCreateArgs = $CreateArgs<$Schema, "App">; -export type AppCreateManyArgs = $CreateManyArgs<$Schema, "App">; -export type AppCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "App">; -export type AppUpdateArgs = $UpdateArgs<$Schema, "App">; -export type AppUpdateManyArgs = $UpdateManyArgs<$Schema, "App">; -export type AppUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "App">; -export type AppUpsertArgs = $UpsertArgs<$Schema, "App">; -export type AppDeleteArgs = $DeleteArgs<$Schema, "App">; -export type AppDeleteManyArgs = $DeleteManyArgs<$Schema, "App">; -export type AppCountArgs = $CountArgs<$Schema, "App">; -export type AppAggregateArgs = $AggregateArgs<$Schema, "App">; -export type AppGroupByArgs = $GroupByArgs<$Schema, "App">; -export type AppWhereInput = $WhereInput<$Schema, "App">; -export type AppSelect = $SelectInput<$Schema, "App">; -export type AppInclude = $IncludeInput<$Schema, "App">; -export type AppOmit = $OmitInput<$Schema, "App">; -export type AppGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "App", Args, Options>; -export type App_RoutingForms_FormFindManyArgs = $FindManyArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormFindUniqueArgs = $FindUniqueArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormFindFirstArgs = $FindFirstArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormExistsArgs = $ExistsArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormCreateArgs = $CreateArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormCreateManyArgs = $CreateManyArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormUpdateArgs = $UpdateArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormUpdateManyArgs = $UpdateManyArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormUpsertArgs = $UpsertArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormDeleteArgs = $DeleteArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormDeleteManyArgs = $DeleteManyArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormCountArgs = $CountArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormAggregateArgs = $AggregateArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormGroupByArgs = $GroupByArgs<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormWhereInput = $WhereInput<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormSelect = $SelectInput<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormInclude = $IncludeInput<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormOmit = $OmitInput<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "App_RoutingForms_Form", Args, Options>; -export type App_RoutingForms_FormResponseFindManyArgs = $FindManyArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseFindUniqueArgs = $FindUniqueArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseFindFirstArgs = $FindFirstArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseExistsArgs = $ExistsArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseCreateArgs = $CreateArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseCreateManyArgs = $CreateManyArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseUpdateArgs = $UpdateArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseUpdateManyArgs = $UpdateManyArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseUpsertArgs = $UpsertArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseDeleteArgs = $DeleteArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseDeleteManyArgs = $DeleteManyArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseCountArgs = $CountArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseAggregateArgs = $AggregateArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseGroupByArgs = $GroupByArgs<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseWhereInput = $WhereInput<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseSelect = $SelectInput<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseInclude = $IncludeInput<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseOmit = $OmitInput<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_FormResponseGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "App_RoutingForms_FormResponse", Args, Options>; -export type App_RoutingForms_QueuedFormResponseFindManyArgs = $FindManyArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseFindUniqueArgs = $FindUniqueArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseFindFirstArgs = $FindFirstArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseExistsArgs = $ExistsArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseCreateArgs = $CreateArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseCreateManyArgs = $CreateManyArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseUpdateArgs = $UpdateArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseUpdateManyArgs = $UpdateManyArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseUpsertArgs = $UpsertArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseDeleteArgs = $DeleteArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseDeleteManyArgs = $DeleteManyArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseCountArgs = $CountArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseAggregateArgs = $AggregateArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseGroupByArgs = $GroupByArgs<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseWhereInput = $WhereInput<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseSelect = $SelectInput<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseInclude = $IncludeInput<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseOmit = $OmitInput<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type App_RoutingForms_QueuedFormResponseGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "App_RoutingForms_QueuedFormResponse", Args, Options>; -export type RoutingFormResponseFieldFindManyArgs = $FindManyArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldFindUniqueArgs = $FindUniqueArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldFindFirstArgs = $FindFirstArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldExistsArgs = $ExistsArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldCreateArgs = $CreateArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldCreateManyArgs = $CreateManyArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldUpdateArgs = $UpdateArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldUpdateManyArgs = $UpdateManyArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldUpsertArgs = $UpsertArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldDeleteArgs = $DeleteArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldDeleteManyArgs = $DeleteManyArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldCountArgs = $CountArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldAggregateArgs = $AggregateArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldGroupByArgs = $GroupByArgs<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldWhereInput = $WhereInput<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldSelect = $SelectInput<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldInclude = $IncludeInput<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldOmit = $OmitInput<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponseFieldGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RoutingFormResponseField", Args, Options>; -export type RoutingFormResponseFindManyArgs = $FindManyArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseFindUniqueArgs = $FindUniqueArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseFindFirstArgs = $FindFirstArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseExistsArgs = $ExistsArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseCreateArgs = $CreateArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseCreateManyArgs = $CreateManyArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseUpdateArgs = $UpdateArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseUpdateManyArgs = $UpdateManyArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseUpsertArgs = $UpsertArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseDeleteArgs = $DeleteArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseDeleteManyArgs = $DeleteManyArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseCountArgs = $CountArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseAggregateArgs = $AggregateArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseGroupByArgs = $GroupByArgs<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseWhereInput = $WhereInput<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseSelect = $SelectInput<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseInclude = $IncludeInput<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseOmit = $OmitInput<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RoutingFormResponse", Args, Options>; -export type RoutingFormResponseDenormalizedFindManyArgs = $FindManyArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedFindUniqueArgs = $FindUniqueArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedFindFirstArgs = $FindFirstArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedExistsArgs = $ExistsArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedCreateArgs = $CreateArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedCreateManyArgs = $CreateManyArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedUpdateArgs = $UpdateArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedUpdateManyArgs = $UpdateManyArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedUpsertArgs = $UpsertArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedDeleteArgs = $DeleteArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedDeleteManyArgs = $DeleteManyArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedCountArgs = $CountArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedAggregateArgs = $AggregateArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedGroupByArgs = $GroupByArgs<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedWhereInput = $WhereInput<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedSelect = $SelectInput<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedInclude = $IncludeInput<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedOmit = $OmitInput<$Schema, "RoutingFormResponseDenormalized">; -export type RoutingFormResponseDenormalizedGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RoutingFormResponseDenormalized", Args, Options>; -export type FeedbackFindManyArgs = $FindManyArgs<$Schema, "Feedback">; -export type FeedbackFindUniqueArgs = $FindUniqueArgs<$Schema, "Feedback">; -export type FeedbackFindFirstArgs = $FindFirstArgs<$Schema, "Feedback">; -export type FeedbackExistsArgs = $ExistsArgs<$Schema, "Feedback">; -export type FeedbackCreateArgs = $CreateArgs<$Schema, "Feedback">; -export type FeedbackCreateManyArgs = $CreateManyArgs<$Schema, "Feedback">; -export type FeedbackCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Feedback">; -export type FeedbackUpdateArgs = $UpdateArgs<$Schema, "Feedback">; -export type FeedbackUpdateManyArgs = $UpdateManyArgs<$Schema, "Feedback">; -export type FeedbackUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Feedback">; -export type FeedbackUpsertArgs = $UpsertArgs<$Schema, "Feedback">; -export type FeedbackDeleteArgs = $DeleteArgs<$Schema, "Feedback">; -export type FeedbackDeleteManyArgs = $DeleteManyArgs<$Schema, "Feedback">; -export type FeedbackCountArgs = $CountArgs<$Schema, "Feedback">; -export type FeedbackAggregateArgs = $AggregateArgs<$Schema, "Feedback">; -export type FeedbackGroupByArgs = $GroupByArgs<$Schema, "Feedback">; -export type FeedbackWhereInput = $WhereInput<$Schema, "Feedback">; -export type FeedbackSelect = $SelectInput<$Schema, "Feedback">; -export type FeedbackInclude = $IncludeInput<$Schema, "Feedback">; -export type FeedbackOmit = $OmitInput<$Schema, "Feedback">; -export type FeedbackGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Feedback", Args, Options>; -export type WorkflowStepFindManyArgs = $FindManyArgs<$Schema, "WorkflowStep">; -export type WorkflowStepFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkflowStep">; -export type WorkflowStepFindFirstArgs = $FindFirstArgs<$Schema, "WorkflowStep">; -export type WorkflowStepExistsArgs = $ExistsArgs<$Schema, "WorkflowStep">; -export type WorkflowStepCreateArgs = $CreateArgs<$Schema, "WorkflowStep">; -export type WorkflowStepCreateManyArgs = $CreateManyArgs<$Schema, "WorkflowStep">; -export type WorkflowStepCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkflowStep">; -export type WorkflowStepUpdateArgs = $UpdateArgs<$Schema, "WorkflowStep">; -export type WorkflowStepUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkflowStep">; -export type WorkflowStepUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkflowStep">; -export type WorkflowStepUpsertArgs = $UpsertArgs<$Schema, "WorkflowStep">; -export type WorkflowStepDeleteArgs = $DeleteArgs<$Schema, "WorkflowStep">; -export type WorkflowStepDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkflowStep">; -export type WorkflowStepCountArgs = $CountArgs<$Schema, "WorkflowStep">; -export type WorkflowStepAggregateArgs = $AggregateArgs<$Schema, "WorkflowStep">; -export type WorkflowStepGroupByArgs = $GroupByArgs<$Schema, "WorkflowStep">; -export type WorkflowStepWhereInput = $WhereInput<$Schema, "WorkflowStep">; -export type WorkflowStepSelect = $SelectInput<$Schema, "WorkflowStep">; -export type WorkflowStepInclude = $IncludeInput<$Schema, "WorkflowStep">; -export type WorkflowStepOmit = $OmitInput<$Schema, "WorkflowStep">; -export type WorkflowStepGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkflowStep", Args, Options>; -export type WorkflowFindManyArgs = $FindManyArgs<$Schema, "Workflow">; -export type WorkflowFindUniqueArgs = $FindUniqueArgs<$Schema, "Workflow">; -export type WorkflowFindFirstArgs = $FindFirstArgs<$Schema, "Workflow">; -export type WorkflowExistsArgs = $ExistsArgs<$Schema, "Workflow">; -export type WorkflowCreateArgs = $CreateArgs<$Schema, "Workflow">; -export type WorkflowCreateManyArgs = $CreateManyArgs<$Schema, "Workflow">; -export type WorkflowCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Workflow">; -export type WorkflowUpdateArgs = $UpdateArgs<$Schema, "Workflow">; -export type WorkflowUpdateManyArgs = $UpdateManyArgs<$Schema, "Workflow">; -export type WorkflowUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Workflow">; -export type WorkflowUpsertArgs = $UpsertArgs<$Schema, "Workflow">; -export type WorkflowDeleteArgs = $DeleteArgs<$Schema, "Workflow">; -export type WorkflowDeleteManyArgs = $DeleteManyArgs<$Schema, "Workflow">; -export type WorkflowCountArgs = $CountArgs<$Schema, "Workflow">; -export type WorkflowAggregateArgs = $AggregateArgs<$Schema, "Workflow">; -export type WorkflowGroupByArgs = $GroupByArgs<$Schema, "Workflow">; -export type WorkflowWhereInput = $WhereInput<$Schema, "Workflow">; -export type WorkflowSelect = $SelectInput<$Schema, "Workflow">; -export type WorkflowInclude = $IncludeInput<$Schema, "Workflow">; -export type WorkflowOmit = $OmitInput<$Schema, "Workflow">; -export type WorkflowGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Workflow", Args, Options>; -export type AIPhoneCallConfigurationFindManyArgs = $FindManyArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationFindUniqueArgs = $FindUniqueArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationFindFirstArgs = $FindFirstArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationExistsArgs = $ExistsArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationCreateArgs = $CreateArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationCreateManyArgs = $CreateManyArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationUpdateArgs = $UpdateArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationUpdateManyArgs = $UpdateManyArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationUpsertArgs = $UpsertArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationDeleteArgs = $DeleteArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationDeleteManyArgs = $DeleteManyArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationCountArgs = $CountArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationAggregateArgs = $AggregateArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationGroupByArgs = $GroupByArgs<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationWhereInput = $WhereInput<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationSelect = $SelectInput<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationInclude = $IncludeInput<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationOmit = $OmitInput<$Schema, "AIPhoneCallConfiguration">; -export type AIPhoneCallConfigurationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "AIPhoneCallConfiguration", Args, Options>; -export type WorkflowsOnEventTypesFindManyArgs = $FindManyArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesFindFirstArgs = $FindFirstArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesExistsArgs = $ExistsArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesCreateArgs = $CreateArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesCreateManyArgs = $CreateManyArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesUpdateArgs = $UpdateArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesUpsertArgs = $UpsertArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesDeleteArgs = $DeleteArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesCountArgs = $CountArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesAggregateArgs = $AggregateArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesGroupByArgs = $GroupByArgs<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesWhereInput = $WhereInput<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesSelect = $SelectInput<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesInclude = $IncludeInput<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesOmit = $OmitInput<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnEventTypesGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkflowsOnEventTypes", Args, Options>; -export type WorkflowsOnTeamsFindManyArgs = $FindManyArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsFindFirstArgs = $FindFirstArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsExistsArgs = $ExistsArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsCreateArgs = $CreateArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsCreateManyArgs = $CreateManyArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsUpdateArgs = $UpdateArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsUpsertArgs = $UpsertArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsDeleteArgs = $DeleteArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsCountArgs = $CountArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsAggregateArgs = $AggregateArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsGroupByArgs = $GroupByArgs<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsWhereInput = $WhereInput<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsSelect = $SelectInput<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsInclude = $IncludeInput<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsOmit = $OmitInput<$Schema, "WorkflowsOnTeams">; -export type WorkflowsOnTeamsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkflowsOnTeams", Args, Options>; -export type DeploymentFindManyArgs = $FindManyArgs<$Schema, "Deployment">; -export type DeploymentFindUniqueArgs = $FindUniqueArgs<$Schema, "Deployment">; -export type DeploymentFindFirstArgs = $FindFirstArgs<$Schema, "Deployment">; -export type DeploymentExistsArgs = $ExistsArgs<$Schema, "Deployment">; -export type DeploymentCreateArgs = $CreateArgs<$Schema, "Deployment">; -export type DeploymentCreateManyArgs = $CreateManyArgs<$Schema, "Deployment">; -export type DeploymentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Deployment">; -export type DeploymentUpdateArgs = $UpdateArgs<$Schema, "Deployment">; -export type DeploymentUpdateManyArgs = $UpdateManyArgs<$Schema, "Deployment">; -export type DeploymentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Deployment">; -export type DeploymentUpsertArgs = $UpsertArgs<$Schema, "Deployment">; -export type DeploymentDeleteArgs = $DeleteArgs<$Schema, "Deployment">; -export type DeploymentDeleteManyArgs = $DeleteManyArgs<$Schema, "Deployment">; -export type DeploymentCountArgs = $CountArgs<$Schema, "Deployment">; -export type DeploymentAggregateArgs = $AggregateArgs<$Schema, "Deployment">; -export type DeploymentGroupByArgs = $GroupByArgs<$Schema, "Deployment">; -export type DeploymentWhereInput = $WhereInput<$Schema, "Deployment">; -export type DeploymentSelect = $SelectInput<$Schema, "Deployment">; -export type DeploymentInclude = $IncludeInput<$Schema, "Deployment">; -export type DeploymentOmit = $OmitInput<$Schema, "Deployment">; -export type DeploymentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Deployment", Args, Options>; -export type WorkflowReminderFindManyArgs = $FindManyArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderFindFirstArgs = $FindFirstArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderExistsArgs = $ExistsArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderCreateArgs = $CreateArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderCreateManyArgs = $CreateManyArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderUpdateArgs = $UpdateArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderUpsertArgs = $UpsertArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderDeleteArgs = $DeleteArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderCountArgs = $CountArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderAggregateArgs = $AggregateArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderGroupByArgs = $GroupByArgs<$Schema, "WorkflowReminder">; -export type WorkflowReminderWhereInput = $WhereInput<$Schema, "WorkflowReminder">; -export type WorkflowReminderSelect = $SelectInput<$Schema, "WorkflowReminder">; -export type WorkflowReminderInclude = $IncludeInput<$Schema, "WorkflowReminder">; -export type WorkflowReminderOmit = $OmitInput<$Schema, "WorkflowReminder">; -export type WorkflowReminderGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkflowReminder", Args, Options>; -export type WebhookScheduledTriggersFindManyArgs = $FindManyArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersFindUniqueArgs = $FindUniqueArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersFindFirstArgs = $FindFirstArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersExistsArgs = $ExistsArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersCreateArgs = $CreateArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersCreateManyArgs = $CreateManyArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersUpdateArgs = $UpdateArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersUpdateManyArgs = $UpdateManyArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersUpsertArgs = $UpsertArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersDeleteArgs = $DeleteArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersDeleteManyArgs = $DeleteManyArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersCountArgs = $CountArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersAggregateArgs = $AggregateArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersGroupByArgs = $GroupByArgs<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersWhereInput = $WhereInput<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersSelect = $SelectInput<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersInclude = $IncludeInput<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersOmit = $OmitInput<$Schema, "WebhookScheduledTriggers">; -export type WebhookScheduledTriggersGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WebhookScheduledTriggers", Args, Options>; -export type BookingSeatFindManyArgs = $FindManyArgs<$Schema, "BookingSeat">; -export type BookingSeatFindUniqueArgs = $FindUniqueArgs<$Schema, "BookingSeat">; -export type BookingSeatFindFirstArgs = $FindFirstArgs<$Schema, "BookingSeat">; -export type BookingSeatExistsArgs = $ExistsArgs<$Schema, "BookingSeat">; -export type BookingSeatCreateArgs = $CreateArgs<$Schema, "BookingSeat">; -export type BookingSeatCreateManyArgs = $CreateManyArgs<$Schema, "BookingSeat">; -export type BookingSeatCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BookingSeat">; -export type BookingSeatUpdateArgs = $UpdateArgs<$Schema, "BookingSeat">; -export type BookingSeatUpdateManyArgs = $UpdateManyArgs<$Schema, "BookingSeat">; -export type BookingSeatUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BookingSeat">; -export type BookingSeatUpsertArgs = $UpsertArgs<$Schema, "BookingSeat">; -export type BookingSeatDeleteArgs = $DeleteArgs<$Schema, "BookingSeat">; -export type BookingSeatDeleteManyArgs = $DeleteManyArgs<$Schema, "BookingSeat">; -export type BookingSeatCountArgs = $CountArgs<$Schema, "BookingSeat">; -export type BookingSeatAggregateArgs = $AggregateArgs<$Schema, "BookingSeat">; -export type BookingSeatGroupByArgs = $GroupByArgs<$Schema, "BookingSeat">; -export type BookingSeatWhereInput = $WhereInput<$Schema, "BookingSeat">; -export type BookingSeatSelect = $SelectInput<$Schema, "BookingSeat">; -export type BookingSeatInclude = $IncludeInput<$Schema, "BookingSeat">; -export type BookingSeatOmit = $OmitInput<$Schema, "BookingSeat">; -export type BookingSeatGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BookingSeat", Args, Options>; -export type VerifiedNumberFindManyArgs = $FindManyArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberFindUniqueArgs = $FindUniqueArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberFindFirstArgs = $FindFirstArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberExistsArgs = $ExistsArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberCreateArgs = $CreateArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberCreateManyArgs = $CreateManyArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberUpdateArgs = $UpdateArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberUpdateManyArgs = $UpdateManyArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberUpsertArgs = $UpsertArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberDeleteArgs = $DeleteArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberDeleteManyArgs = $DeleteManyArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberCountArgs = $CountArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberAggregateArgs = $AggregateArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberGroupByArgs = $GroupByArgs<$Schema, "VerifiedNumber">; -export type VerifiedNumberWhereInput = $WhereInput<$Schema, "VerifiedNumber">; -export type VerifiedNumberSelect = $SelectInput<$Schema, "VerifiedNumber">; -export type VerifiedNumberInclude = $IncludeInput<$Schema, "VerifiedNumber">; -export type VerifiedNumberOmit = $OmitInput<$Schema, "VerifiedNumber">; -export type VerifiedNumberGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "VerifiedNumber", Args, Options>; -export type VerifiedEmailFindManyArgs = $FindManyArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailFindUniqueArgs = $FindUniqueArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailFindFirstArgs = $FindFirstArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailExistsArgs = $ExistsArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailCreateArgs = $CreateArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailCreateManyArgs = $CreateManyArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailUpdateArgs = $UpdateArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailUpdateManyArgs = $UpdateManyArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailUpsertArgs = $UpsertArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailDeleteArgs = $DeleteArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailDeleteManyArgs = $DeleteManyArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailCountArgs = $CountArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailAggregateArgs = $AggregateArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailGroupByArgs = $GroupByArgs<$Schema, "VerifiedEmail">; -export type VerifiedEmailWhereInput = $WhereInput<$Schema, "VerifiedEmail">; -export type VerifiedEmailSelect = $SelectInput<$Schema, "VerifiedEmail">; -export type VerifiedEmailInclude = $IncludeInput<$Schema, "VerifiedEmail">; -export type VerifiedEmailOmit = $OmitInput<$Schema, "VerifiedEmail">; -export type VerifiedEmailGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "VerifiedEmail", Args, Options>; -export type FeatureFindManyArgs = $FindManyArgs<$Schema, "Feature">; -export type FeatureFindUniqueArgs = $FindUniqueArgs<$Schema, "Feature">; -export type FeatureFindFirstArgs = $FindFirstArgs<$Schema, "Feature">; -export type FeatureExistsArgs = $ExistsArgs<$Schema, "Feature">; -export type FeatureCreateArgs = $CreateArgs<$Schema, "Feature">; -export type FeatureCreateManyArgs = $CreateManyArgs<$Schema, "Feature">; -export type FeatureCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Feature">; -export type FeatureUpdateArgs = $UpdateArgs<$Schema, "Feature">; -export type FeatureUpdateManyArgs = $UpdateManyArgs<$Schema, "Feature">; -export type FeatureUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Feature">; -export type FeatureUpsertArgs = $UpsertArgs<$Schema, "Feature">; -export type FeatureDeleteArgs = $DeleteArgs<$Schema, "Feature">; -export type FeatureDeleteManyArgs = $DeleteManyArgs<$Schema, "Feature">; -export type FeatureCountArgs = $CountArgs<$Schema, "Feature">; -export type FeatureAggregateArgs = $AggregateArgs<$Schema, "Feature">; -export type FeatureGroupByArgs = $GroupByArgs<$Schema, "Feature">; -export type FeatureWhereInput = $WhereInput<$Schema, "Feature">; -export type FeatureSelect = $SelectInput<$Schema, "Feature">; -export type FeatureInclude = $IncludeInput<$Schema, "Feature">; -export type FeatureOmit = $OmitInput<$Schema, "Feature">; -export type FeatureGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Feature", Args, Options>; -export type UserFeaturesFindManyArgs = $FindManyArgs<$Schema, "UserFeatures">; -export type UserFeaturesFindUniqueArgs = $FindUniqueArgs<$Schema, "UserFeatures">; -export type UserFeaturesFindFirstArgs = $FindFirstArgs<$Schema, "UserFeatures">; -export type UserFeaturesExistsArgs = $ExistsArgs<$Schema, "UserFeatures">; -export type UserFeaturesCreateArgs = $CreateArgs<$Schema, "UserFeatures">; -export type UserFeaturesCreateManyArgs = $CreateManyArgs<$Schema, "UserFeatures">; -export type UserFeaturesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "UserFeatures">; -export type UserFeaturesUpdateArgs = $UpdateArgs<$Schema, "UserFeatures">; -export type UserFeaturesUpdateManyArgs = $UpdateManyArgs<$Schema, "UserFeatures">; -export type UserFeaturesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "UserFeatures">; -export type UserFeaturesUpsertArgs = $UpsertArgs<$Schema, "UserFeatures">; -export type UserFeaturesDeleteArgs = $DeleteArgs<$Schema, "UserFeatures">; -export type UserFeaturesDeleteManyArgs = $DeleteManyArgs<$Schema, "UserFeatures">; -export type UserFeaturesCountArgs = $CountArgs<$Schema, "UserFeatures">; -export type UserFeaturesAggregateArgs = $AggregateArgs<$Schema, "UserFeatures">; -export type UserFeaturesGroupByArgs = $GroupByArgs<$Schema, "UserFeatures">; -export type UserFeaturesWhereInput = $WhereInput<$Schema, "UserFeatures">; -export type UserFeaturesSelect = $SelectInput<$Schema, "UserFeatures">; -export type UserFeaturesInclude = $IncludeInput<$Schema, "UserFeatures">; -export type UserFeaturesOmit = $OmitInput<$Schema, "UserFeatures">; -export type UserFeaturesGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "UserFeatures", Args, Options>; -export type TeamFeaturesFindManyArgs = $FindManyArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesFindUniqueArgs = $FindUniqueArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesFindFirstArgs = $FindFirstArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesExistsArgs = $ExistsArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesCreateArgs = $CreateArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesCreateManyArgs = $CreateManyArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesUpdateArgs = $UpdateArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesUpdateManyArgs = $UpdateManyArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesUpsertArgs = $UpsertArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesDeleteArgs = $DeleteArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesDeleteManyArgs = $DeleteManyArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesCountArgs = $CountArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesAggregateArgs = $AggregateArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesGroupByArgs = $GroupByArgs<$Schema, "TeamFeatures">; -export type TeamFeaturesWhereInput = $WhereInput<$Schema, "TeamFeatures">; -export type TeamFeaturesSelect = $SelectInput<$Schema, "TeamFeatures">; -export type TeamFeaturesInclude = $IncludeInput<$Schema, "TeamFeatures">; -export type TeamFeaturesOmit = $OmitInput<$Schema, "TeamFeatures">; -export type TeamFeaturesGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TeamFeatures", Args, Options>; -export type SelectedSlotsFindManyArgs = $FindManyArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsFindUniqueArgs = $FindUniqueArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsFindFirstArgs = $FindFirstArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsExistsArgs = $ExistsArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsCreateArgs = $CreateArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsCreateManyArgs = $CreateManyArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsUpdateArgs = $UpdateArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsUpdateManyArgs = $UpdateManyArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsUpsertArgs = $UpsertArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsDeleteArgs = $DeleteArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsDeleteManyArgs = $DeleteManyArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsCountArgs = $CountArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsAggregateArgs = $AggregateArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsGroupByArgs = $GroupByArgs<$Schema, "SelectedSlots">; -export type SelectedSlotsWhereInput = $WhereInput<$Schema, "SelectedSlots">; -export type SelectedSlotsSelect = $SelectInput<$Schema, "SelectedSlots">; -export type SelectedSlotsInclude = $IncludeInput<$Schema, "SelectedSlots">; -export type SelectedSlotsOmit = $OmitInput<$Schema, "SelectedSlots">; -export type SelectedSlotsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SelectedSlots", Args, Options>; -export type OAuthClientFindManyArgs = $FindManyArgs<$Schema, "OAuthClient">; -export type OAuthClientFindUniqueArgs = $FindUniqueArgs<$Schema, "OAuthClient">; -export type OAuthClientFindFirstArgs = $FindFirstArgs<$Schema, "OAuthClient">; -export type OAuthClientExistsArgs = $ExistsArgs<$Schema, "OAuthClient">; -export type OAuthClientCreateArgs = $CreateArgs<$Schema, "OAuthClient">; -export type OAuthClientCreateManyArgs = $CreateManyArgs<$Schema, "OAuthClient">; -export type OAuthClientCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OAuthClient">; -export type OAuthClientUpdateArgs = $UpdateArgs<$Schema, "OAuthClient">; -export type OAuthClientUpdateManyArgs = $UpdateManyArgs<$Schema, "OAuthClient">; -export type OAuthClientUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OAuthClient">; -export type OAuthClientUpsertArgs = $UpsertArgs<$Schema, "OAuthClient">; -export type OAuthClientDeleteArgs = $DeleteArgs<$Schema, "OAuthClient">; -export type OAuthClientDeleteManyArgs = $DeleteManyArgs<$Schema, "OAuthClient">; -export type OAuthClientCountArgs = $CountArgs<$Schema, "OAuthClient">; -export type OAuthClientAggregateArgs = $AggregateArgs<$Schema, "OAuthClient">; -export type OAuthClientGroupByArgs = $GroupByArgs<$Schema, "OAuthClient">; -export type OAuthClientWhereInput = $WhereInput<$Schema, "OAuthClient">; -export type OAuthClientSelect = $SelectInput<$Schema, "OAuthClient">; -export type OAuthClientInclude = $IncludeInput<$Schema, "OAuthClient">; -export type OAuthClientOmit = $OmitInput<$Schema, "OAuthClient">; -export type OAuthClientGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OAuthClient", Args, Options>; -export type AccessCodeFindManyArgs = $FindManyArgs<$Schema, "AccessCode">; -export type AccessCodeFindUniqueArgs = $FindUniqueArgs<$Schema, "AccessCode">; -export type AccessCodeFindFirstArgs = $FindFirstArgs<$Schema, "AccessCode">; -export type AccessCodeExistsArgs = $ExistsArgs<$Schema, "AccessCode">; -export type AccessCodeCreateArgs = $CreateArgs<$Schema, "AccessCode">; -export type AccessCodeCreateManyArgs = $CreateManyArgs<$Schema, "AccessCode">; -export type AccessCodeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "AccessCode">; -export type AccessCodeUpdateArgs = $UpdateArgs<$Schema, "AccessCode">; -export type AccessCodeUpdateManyArgs = $UpdateManyArgs<$Schema, "AccessCode">; -export type AccessCodeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "AccessCode">; -export type AccessCodeUpsertArgs = $UpsertArgs<$Schema, "AccessCode">; -export type AccessCodeDeleteArgs = $DeleteArgs<$Schema, "AccessCode">; -export type AccessCodeDeleteManyArgs = $DeleteManyArgs<$Schema, "AccessCode">; -export type AccessCodeCountArgs = $CountArgs<$Schema, "AccessCode">; -export type AccessCodeAggregateArgs = $AggregateArgs<$Schema, "AccessCode">; -export type AccessCodeGroupByArgs = $GroupByArgs<$Schema, "AccessCode">; -export type AccessCodeWhereInput = $WhereInput<$Schema, "AccessCode">; -export type AccessCodeSelect = $SelectInput<$Schema, "AccessCode">; -export type AccessCodeInclude = $IncludeInput<$Schema, "AccessCode">; -export type AccessCodeOmit = $OmitInput<$Schema, "AccessCode">; -export type AccessCodeGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "AccessCode", Args, Options>; -export type BookingTimeStatusFindManyArgs = $FindManyArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusFindUniqueArgs = $FindUniqueArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusFindFirstArgs = $FindFirstArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusExistsArgs = $ExistsArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusCreateArgs = $CreateArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusCreateManyArgs = $CreateManyArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusUpdateArgs = $UpdateArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusUpdateManyArgs = $UpdateManyArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusUpsertArgs = $UpsertArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusDeleteArgs = $DeleteArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusDeleteManyArgs = $DeleteManyArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusCountArgs = $CountArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusAggregateArgs = $AggregateArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusGroupByArgs = $GroupByArgs<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusWhereInput = $WhereInput<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusSelect = $SelectInput<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusInclude = $IncludeInput<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusOmit = $OmitInput<$Schema, "BookingTimeStatus">; -export type BookingTimeStatusGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BookingTimeStatus", Args, Options>; -export type BookingDenormalizedFindManyArgs = $FindManyArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedFindUniqueArgs = $FindUniqueArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedFindFirstArgs = $FindFirstArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedExistsArgs = $ExistsArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedCreateArgs = $CreateArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedCreateManyArgs = $CreateManyArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedUpdateArgs = $UpdateArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedUpdateManyArgs = $UpdateManyArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedUpsertArgs = $UpsertArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedDeleteArgs = $DeleteArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedDeleteManyArgs = $DeleteManyArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedCountArgs = $CountArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedAggregateArgs = $AggregateArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedGroupByArgs = $GroupByArgs<$Schema, "BookingDenormalized">; -export type BookingDenormalizedWhereInput = $WhereInput<$Schema, "BookingDenormalized">; -export type BookingDenormalizedSelect = $SelectInput<$Schema, "BookingDenormalized">; -export type BookingDenormalizedInclude = $IncludeInput<$Schema, "BookingDenormalized">; -export type BookingDenormalizedOmit = $OmitInput<$Schema, "BookingDenormalized">; -export type BookingDenormalizedGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BookingDenormalized", Args, Options>; -export type BookingTimeStatusDenormalizedFindManyArgs = $FindManyArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedFindUniqueArgs = $FindUniqueArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedFindFirstArgs = $FindFirstArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedExistsArgs = $ExistsArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedCreateArgs = $CreateArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedCreateManyArgs = $CreateManyArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedUpdateArgs = $UpdateArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedUpdateManyArgs = $UpdateManyArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedUpsertArgs = $UpsertArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedDeleteArgs = $DeleteArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedDeleteManyArgs = $DeleteManyArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedCountArgs = $CountArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedAggregateArgs = $AggregateArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedGroupByArgs = $GroupByArgs<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedWhereInput = $WhereInput<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedSelect = $SelectInput<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedInclude = $IncludeInput<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedOmit = $OmitInput<$Schema, "BookingTimeStatusDenormalized">; -export type BookingTimeStatusDenormalizedGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BookingTimeStatusDenormalized", Args, Options>; -export type CalendarCacheFindManyArgs = $FindManyArgs<$Schema, "CalendarCache">; -export type CalendarCacheFindUniqueArgs = $FindUniqueArgs<$Schema, "CalendarCache">; -export type CalendarCacheFindFirstArgs = $FindFirstArgs<$Schema, "CalendarCache">; -export type CalendarCacheExistsArgs = $ExistsArgs<$Schema, "CalendarCache">; -export type CalendarCacheCreateArgs = $CreateArgs<$Schema, "CalendarCache">; -export type CalendarCacheCreateManyArgs = $CreateManyArgs<$Schema, "CalendarCache">; -export type CalendarCacheCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "CalendarCache">; -export type CalendarCacheUpdateArgs = $UpdateArgs<$Schema, "CalendarCache">; -export type CalendarCacheUpdateManyArgs = $UpdateManyArgs<$Schema, "CalendarCache">; -export type CalendarCacheUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "CalendarCache">; -export type CalendarCacheUpsertArgs = $UpsertArgs<$Schema, "CalendarCache">; -export type CalendarCacheDeleteArgs = $DeleteArgs<$Schema, "CalendarCache">; -export type CalendarCacheDeleteManyArgs = $DeleteManyArgs<$Schema, "CalendarCache">; -export type CalendarCacheCountArgs = $CountArgs<$Schema, "CalendarCache">; -export type CalendarCacheAggregateArgs = $AggregateArgs<$Schema, "CalendarCache">; -export type CalendarCacheGroupByArgs = $GroupByArgs<$Schema, "CalendarCache">; -export type CalendarCacheWhereInput = $WhereInput<$Schema, "CalendarCache">; -export type CalendarCacheSelect = $SelectInput<$Schema, "CalendarCache">; -export type CalendarCacheInclude = $IncludeInput<$Schema, "CalendarCache">; -export type CalendarCacheOmit = $OmitInput<$Schema, "CalendarCache">; -export type CalendarCacheGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "CalendarCache", Args, Options>; -export type TempOrgRedirectFindManyArgs = $FindManyArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectFindUniqueArgs = $FindUniqueArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectFindFirstArgs = $FindFirstArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectExistsArgs = $ExistsArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectCreateArgs = $CreateArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectCreateManyArgs = $CreateManyArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectUpdateArgs = $UpdateArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectUpdateManyArgs = $UpdateManyArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectUpsertArgs = $UpsertArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectDeleteArgs = $DeleteArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectDeleteManyArgs = $DeleteManyArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectCountArgs = $CountArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectAggregateArgs = $AggregateArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectGroupByArgs = $GroupByArgs<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectWhereInput = $WhereInput<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectSelect = $SelectInput<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectInclude = $IncludeInput<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectOmit = $OmitInput<$Schema, "TempOrgRedirect">; -export type TempOrgRedirectGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TempOrgRedirect", Args, Options>; -export type AvatarFindManyArgs = $FindManyArgs<$Schema, "Avatar">; -export type AvatarFindUniqueArgs = $FindUniqueArgs<$Schema, "Avatar">; -export type AvatarFindFirstArgs = $FindFirstArgs<$Schema, "Avatar">; -export type AvatarExistsArgs = $ExistsArgs<$Schema, "Avatar">; -export type AvatarCreateArgs = $CreateArgs<$Schema, "Avatar">; -export type AvatarCreateManyArgs = $CreateManyArgs<$Schema, "Avatar">; -export type AvatarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Avatar">; -export type AvatarUpdateArgs = $UpdateArgs<$Schema, "Avatar">; -export type AvatarUpdateManyArgs = $UpdateManyArgs<$Schema, "Avatar">; -export type AvatarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Avatar">; -export type AvatarUpsertArgs = $UpsertArgs<$Schema, "Avatar">; -export type AvatarDeleteArgs = $DeleteArgs<$Schema, "Avatar">; -export type AvatarDeleteManyArgs = $DeleteManyArgs<$Schema, "Avatar">; -export type AvatarCountArgs = $CountArgs<$Schema, "Avatar">; -export type AvatarAggregateArgs = $AggregateArgs<$Schema, "Avatar">; -export type AvatarGroupByArgs = $GroupByArgs<$Schema, "Avatar">; -export type AvatarWhereInput = $WhereInput<$Schema, "Avatar">; -export type AvatarSelect = $SelectInput<$Schema, "Avatar">; -export type AvatarInclude = $IncludeInput<$Schema, "Avatar">; -export type AvatarOmit = $OmitInput<$Schema, "Avatar">; -export type AvatarGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Avatar", Args, Options>; -export type OutOfOfficeEntryFindManyArgs = $FindManyArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryFindUniqueArgs = $FindUniqueArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryFindFirstArgs = $FindFirstArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryExistsArgs = $ExistsArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryCreateArgs = $CreateArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryCreateManyArgs = $CreateManyArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryUpdateArgs = $UpdateArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryUpdateManyArgs = $UpdateManyArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryUpsertArgs = $UpsertArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryDeleteArgs = $DeleteArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryDeleteManyArgs = $DeleteManyArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryCountArgs = $CountArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryAggregateArgs = $AggregateArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryGroupByArgs = $GroupByArgs<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryWhereInput = $WhereInput<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntrySelect = $SelectInput<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryInclude = $IncludeInput<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryOmit = $OmitInput<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeEntryGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OutOfOfficeEntry", Args, Options>; -export type OutOfOfficeReasonFindManyArgs = $FindManyArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonFindUniqueArgs = $FindUniqueArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonFindFirstArgs = $FindFirstArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonExistsArgs = $ExistsArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonCreateArgs = $CreateArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonCreateManyArgs = $CreateManyArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonUpdateArgs = $UpdateArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonUpdateManyArgs = $UpdateManyArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonUpsertArgs = $UpsertArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonDeleteArgs = $DeleteArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonDeleteManyArgs = $DeleteManyArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonCountArgs = $CountArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonAggregateArgs = $AggregateArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonGroupByArgs = $GroupByArgs<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonWhereInput = $WhereInput<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonSelect = $SelectInput<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonInclude = $IncludeInput<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonOmit = $OmitInput<$Schema, "OutOfOfficeReason">; -export type OutOfOfficeReasonGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OutOfOfficeReason", Args, Options>; -export type PlatformOAuthClientFindManyArgs = $FindManyArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientFindUniqueArgs = $FindUniqueArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientFindFirstArgs = $FindFirstArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientExistsArgs = $ExistsArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientCreateArgs = $CreateArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientCreateManyArgs = $CreateManyArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientUpdateArgs = $UpdateArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientUpdateManyArgs = $UpdateManyArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientUpsertArgs = $UpsertArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientDeleteArgs = $DeleteArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientDeleteManyArgs = $DeleteManyArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientCountArgs = $CountArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientAggregateArgs = $AggregateArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientGroupByArgs = $GroupByArgs<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientWhereInput = $WhereInput<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientSelect = $SelectInput<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientInclude = $IncludeInput<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientOmit = $OmitInput<$Schema, "PlatformOAuthClient">; -export type PlatformOAuthClientGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "PlatformOAuthClient", Args, Options>; -export type PlatformAuthorizationTokenFindManyArgs = $FindManyArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenFindFirstArgs = $FindFirstArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenExistsArgs = $ExistsArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenCreateArgs = $CreateArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenCreateManyArgs = $CreateManyArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenUpdateArgs = $UpdateArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenUpsertArgs = $UpsertArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenDeleteArgs = $DeleteArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenCountArgs = $CountArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenAggregateArgs = $AggregateArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenGroupByArgs = $GroupByArgs<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenWhereInput = $WhereInput<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenSelect = $SelectInput<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenInclude = $IncludeInput<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenOmit = $OmitInput<$Schema, "PlatformAuthorizationToken">; -export type PlatformAuthorizationTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "PlatformAuthorizationToken", Args, Options>; -export type AccessTokenFindManyArgs = $FindManyArgs<$Schema, "AccessToken">; -export type AccessTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "AccessToken">; -export type AccessTokenFindFirstArgs = $FindFirstArgs<$Schema, "AccessToken">; -export type AccessTokenExistsArgs = $ExistsArgs<$Schema, "AccessToken">; -export type AccessTokenCreateArgs = $CreateArgs<$Schema, "AccessToken">; -export type AccessTokenCreateManyArgs = $CreateManyArgs<$Schema, "AccessToken">; -export type AccessTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "AccessToken">; -export type AccessTokenUpdateArgs = $UpdateArgs<$Schema, "AccessToken">; -export type AccessTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "AccessToken">; -export type AccessTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "AccessToken">; -export type AccessTokenUpsertArgs = $UpsertArgs<$Schema, "AccessToken">; -export type AccessTokenDeleteArgs = $DeleteArgs<$Schema, "AccessToken">; -export type AccessTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "AccessToken">; -export type AccessTokenCountArgs = $CountArgs<$Schema, "AccessToken">; -export type AccessTokenAggregateArgs = $AggregateArgs<$Schema, "AccessToken">; -export type AccessTokenGroupByArgs = $GroupByArgs<$Schema, "AccessToken">; -export type AccessTokenWhereInput = $WhereInput<$Schema, "AccessToken">; -export type AccessTokenSelect = $SelectInput<$Schema, "AccessToken">; -export type AccessTokenInclude = $IncludeInput<$Schema, "AccessToken">; -export type AccessTokenOmit = $OmitInput<$Schema, "AccessToken">; -export type AccessTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "AccessToken", Args, Options>; -export type RefreshTokenFindManyArgs = $FindManyArgs<$Schema, "RefreshToken">; -export type RefreshTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "RefreshToken">; -export type RefreshTokenFindFirstArgs = $FindFirstArgs<$Schema, "RefreshToken">; -export type RefreshTokenExistsArgs = $ExistsArgs<$Schema, "RefreshToken">; -export type RefreshTokenCreateArgs = $CreateArgs<$Schema, "RefreshToken">; -export type RefreshTokenCreateManyArgs = $CreateManyArgs<$Schema, "RefreshToken">; -export type RefreshTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RefreshToken">; -export type RefreshTokenUpdateArgs = $UpdateArgs<$Schema, "RefreshToken">; -export type RefreshTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "RefreshToken">; -export type RefreshTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RefreshToken">; -export type RefreshTokenUpsertArgs = $UpsertArgs<$Schema, "RefreshToken">; -export type RefreshTokenDeleteArgs = $DeleteArgs<$Schema, "RefreshToken">; -export type RefreshTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "RefreshToken">; -export type RefreshTokenCountArgs = $CountArgs<$Schema, "RefreshToken">; -export type RefreshTokenAggregateArgs = $AggregateArgs<$Schema, "RefreshToken">; -export type RefreshTokenGroupByArgs = $GroupByArgs<$Schema, "RefreshToken">; -export type RefreshTokenWhereInput = $WhereInput<$Schema, "RefreshToken">; -export type RefreshTokenSelect = $SelectInput<$Schema, "RefreshToken">; -export type RefreshTokenInclude = $IncludeInput<$Schema, "RefreshToken">; -export type RefreshTokenOmit = $OmitInput<$Schema, "RefreshToken">; -export type RefreshTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RefreshToken", Args, Options>; -export type DSyncDataFindManyArgs = $FindManyArgs<$Schema, "DSyncData">; -export type DSyncDataFindUniqueArgs = $FindUniqueArgs<$Schema, "DSyncData">; -export type DSyncDataFindFirstArgs = $FindFirstArgs<$Schema, "DSyncData">; -export type DSyncDataExistsArgs = $ExistsArgs<$Schema, "DSyncData">; -export type DSyncDataCreateArgs = $CreateArgs<$Schema, "DSyncData">; -export type DSyncDataCreateManyArgs = $CreateManyArgs<$Schema, "DSyncData">; -export type DSyncDataCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DSyncData">; -export type DSyncDataUpdateArgs = $UpdateArgs<$Schema, "DSyncData">; -export type DSyncDataUpdateManyArgs = $UpdateManyArgs<$Schema, "DSyncData">; -export type DSyncDataUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DSyncData">; -export type DSyncDataUpsertArgs = $UpsertArgs<$Schema, "DSyncData">; -export type DSyncDataDeleteArgs = $DeleteArgs<$Schema, "DSyncData">; -export type DSyncDataDeleteManyArgs = $DeleteManyArgs<$Schema, "DSyncData">; -export type DSyncDataCountArgs = $CountArgs<$Schema, "DSyncData">; -export type DSyncDataAggregateArgs = $AggregateArgs<$Schema, "DSyncData">; -export type DSyncDataGroupByArgs = $GroupByArgs<$Schema, "DSyncData">; -export type DSyncDataWhereInput = $WhereInput<$Schema, "DSyncData">; -export type DSyncDataSelect = $SelectInput<$Schema, "DSyncData">; -export type DSyncDataInclude = $IncludeInput<$Schema, "DSyncData">; -export type DSyncDataOmit = $OmitInput<$Schema, "DSyncData">; -export type DSyncDataGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DSyncData", Args, Options>; -export type DSyncTeamGroupMappingFindManyArgs = $FindManyArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingFindUniqueArgs = $FindUniqueArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingFindFirstArgs = $FindFirstArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingExistsArgs = $ExistsArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingCreateArgs = $CreateArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingCreateManyArgs = $CreateManyArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingUpdateArgs = $UpdateArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingUpdateManyArgs = $UpdateManyArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingUpsertArgs = $UpsertArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingDeleteArgs = $DeleteArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingDeleteManyArgs = $DeleteManyArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingCountArgs = $CountArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingAggregateArgs = $AggregateArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingGroupByArgs = $GroupByArgs<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingWhereInput = $WhereInput<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingSelect = $SelectInput<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingInclude = $IncludeInput<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingOmit = $OmitInput<$Schema, "DSyncTeamGroupMapping">; -export type DSyncTeamGroupMappingGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DSyncTeamGroupMapping", Args, Options>; -export type SecondaryEmailFindManyArgs = $FindManyArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailFindUniqueArgs = $FindUniqueArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailFindFirstArgs = $FindFirstArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailExistsArgs = $ExistsArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailCreateArgs = $CreateArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailCreateManyArgs = $CreateManyArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailUpdateArgs = $UpdateArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailUpdateManyArgs = $UpdateManyArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailUpsertArgs = $UpsertArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailDeleteArgs = $DeleteArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailDeleteManyArgs = $DeleteManyArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailCountArgs = $CountArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailAggregateArgs = $AggregateArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailGroupByArgs = $GroupByArgs<$Schema, "SecondaryEmail">; -export type SecondaryEmailWhereInput = $WhereInput<$Schema, "SecondaryEmail">; -export type SecondaryEmailSelect = $SelectInput<$Schema, "SecondaryEmail">; -export type SecondaryEmailInclude = $IncludeInput<$Schema, "SecondaryEmail">; -export type SecondaryEmailOmit = $OmitInput<$Schema, "SecondaryEmail">; -export type SecondaryEmailGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SecondaryEmail", Args, Options>; -export type TaskFindManyArgs = $FindManyArgs<$Schema, "Task">; -export type TaskFindUniqueArgs = $FindUniqueArgs<$Schema, "Task">; -export type TaskFindFirstArgs = $FindFirstArgs<$Schema, "Task">; -export type TaskExistsArgs = $ExistsArgs<$Schema, "Task">; -export type TaskCreateArgs = $CreateArgs<$Schema, "Task">; -export type TaskCreateManyArgs = $CreateManyArgs<$Schema, "Task">; -export type TaskCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Task">; -export type TaskUpdateArgs = $UpdateArgs<$Schema, "Task">; -export type TaskUpdateManyArgs = $UpdateManyArgs<$Schema, "Task">; -export type TaskUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Task">; -export type TaskUpsertArgs = $UpsertArgs<$Schema, "Task">; -export type TaskDeleteArgs = $DeleteArgs<$Schema, "Task">; -export type TaskDeleteManyArgs = $DeleteManyArgs<$Schema, "Task">; -export type TaskCountArgs = $CountArgs<$Schema, "Task">; -export type TaskAggregateArgs = $AggregateArgs<$Schema, "Task">; -export type TaskGroupByArgs = $GroupByArgs<$Schema, "Task">; -export type TaskWhereInput = $WhereInput<$Schema, "Task">; -export type TaskSelect = $SelectInput<$Schema, "Task">; -export type TaskInclude = $IncludeInput<$Schema, "Task">; -export type TaskOmit = $OmitInput<$Schema, "Task">; -export type TaskGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Task", Args, Options>; -export type ManagedOrganizationFindManyArgs = $FindManyArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationFindUniqueArgs = $FindUniqueArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationFindFirstArgs = $FindFirstArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationExistsArgs = $ExistsArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationCreateArgs = $CreateArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationCreateManyArgs = $CreateManyArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationUpdateArgs = $UpdateArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationUpdateManyArgs = $UpdateManyArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationUpsertArgs = $UpsertArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationDeleteArgs = $DeleteArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationDeleteManyArgs = $DeleteManyArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationCountArgs = $CountArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationAggregateArgs = $AggregateArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationGroupByArgs = $GroupByArgs<$Schema, "ManagedOrganization">; -export type ManagedOrganizationWhereInput = $WhereInput<$Schema, "ManagedOrganization">; -export type ManagedOrganizationSelect = $SelectInput<$Schema, "ManagedOrganization">; -export type ManagedOrganizationInclude = $IncludeInput<$Schema, "ManagedOrganization">; -export type ManagedOrganizationOmit = $OmitInput<$Schema, "ManagedOrganization">; -export type ManagedOrganizationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ManagedOrganization", Args, Options>; -export type PlatformBillingFindManyArgs = $FindManyArgs<$Schema, "PlatformBilling">; -export type PlatformBillingFindUniqueArgs = $FindUniqueArgs<$Schema, "PlatformBilling">; -export type PlatformBillingFindFirstArgs = $FindFirstArgs<$Schema, "PlatformBilling">; -export type PlatformBillingExistsArgs = $ExistsArgs<$Schema, "PlatformBilling">; -export type PlatformBillingCreateArgs = $CreateArgs<$Schema, "PlatformBilling">; -export type PlatformBillingCreateManyArgs = $CreateManyArgs<$Schema, "PlatformBilling">; -export type PlatformBillingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "PlatformBilling">; -export type PlatformBillingUpdateArgs = $UpdateArgs<$Schema, "PlatformBilling">; -export type PlatformBillingUpdateManyArgs = $UpdateManyArgs<$Schema, "PlatformBilling">; -export type PlatformBillingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "PlatformBilling">; -export type PlatformBillingUpsertArgs = $UpsertArgs<$Schema, "PlatformBilling">; -export type PlatformBillingDeleteArgs = $DeleteArgs<$Schema, "PlatformBilling">; -export type PlatformBillingDeleteManyArgs = $DeleteManyArgs<$Schema, "PlatformBilling">; -export type PlatformBillingCountArgs = $CountArgs<$Schema, "PlatformBilling">; -export type PlatformBillingAggregateArgs = $AggregateArgs<$Schema, "PlatformBilling">; -export type PlatformBillingGroupByArgs = $GroupByArgs<$Schema, "PlatformBilling">; -export type PlatformBillingWhereInput = $WhereInput<$Schema, "PlatformBilling">; -export type PlatformBillingSelect = $SelectInput<$Schema, "PlatformBilling">; -export type PlatformBillingInclude = $IncludeInput<$Schema, "PlatformBilling">; -export type PlatformBillingOmit = $OmitInput<$Schema, "PlatformBilling">; -export type PlatformBillingGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "PlatformBilling", Args, Options>; -export type AttributeOptionFindManyArgs = $FindManyArgs<$Schema, "AttributeOption">; -export type AttributeOptionFindUniqueArgs = $FindUniqueArgs<$Schema, "AttributeOption">; -export type AttributeOptionFindFirstArgs = $FindFirstArgs<$Schema, "AttributeOption">; -export type AttributeOptionExistsArgs = $ExistsArgs<$Schema, "AttributeOption">; -export type AttributeOptionCreateArgs = $CreateArgs<$Schema, "AttributeOption">; -export type AttributeOptionCreateManyArgs = $CreateManyArgs<$Schema, "AttributeOption">; -export type AttributeOptionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "AttributeOption">; -export type AttributeOptionUpdateArgs = $UpdateArgs<$Schema, "AttributeOption">; -export type AttributeOptionUpdateManyArgs = $UpdateManyArgs<$Schema, "AttributeOption">; -export type AttributeOptionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "AttributeOption">; -export type AttributeOptionUpsertArgs = $UpsertArgs<$Schema, "AttributeOption">; -export type AttributeOptionDeleteArgs = $DeleteArgs<$Schema, "AttributeOption">; -export type AttributeOptionDeleteManyArgs = $DeleteManyArgs<$Schema, "AttributeOption">; -export type AttributeOptionCountArgs = $CountArgs<$Schema, "AttributeOption">; -export type AttributeOptionAggregateArgs = $AggregateArgs<$Schema, "AttributeOption">; -export type AttributeOptionGroupByArgs = $GroupByArgs<$Schema, "AttributeOption">; -export type AttributeOptionWhereInput = $WhereInput<$Schema, "AttributeOption">; -export type AttributeOptionSelect = $SelectInput<$Schema, "AttributeOption">; -export type AttributeOptionInclude = $IncludeInput<$Schema, "AttributeOption">; -export type AttributeOptionOmit = $OmitInput<$Schema, "AttributeOption">; -export type AttributeOptionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "AttributeOption", Args, Options>; -export type AttributeFindManyArgs = $FindManyArgs<$Schema, "Attribute">; -export type AttributeFindUniqueArgs = $FindUniqueArgs<$Schema, "Attribute">; -export type AttributeFindFirstArgs = $FindFirstArgs<$Schema, "Attribute">; -export type AttributeExistsArgs = $ExistsArgs<$Schema, "Attribute">; -export type AttributeCreateArgs = $CreateArgs<$Schema, "Attribute">; -export type AttributeCreateManyArgs = $CreateManyArgs<$Schema, "Attribute">; -export type AttributeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Attribute">; -export type AttributeUpdateArgs = $UpdateArgs<$Schema, "Attribute">; -export type AttributeUpdateManyArgs = $UpdateManyArgs<$Schema, "Attribute">; -export type AttributeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Attribute">; -export type AttributeUpsertArgs = $UpsertArgs<$Schema, "Attribute">; -export type AttributeDeleteArgs = $DeleteArgs<$Schema, "Attribute">; -export type AttributeDeleteManyArgs = $DeleteManyArgs<$Schema, "Attribute">; -export type AttributeCountArgs = $CountArgs<$Schema, "Attribute">; -export type AttributeAggregateArgs = $AggregateArgs<$Schema, "Attribute">; -export type AttributeGroupByArgs = $GroupByArgs<$Schema, "Attribute">; -export type AttributeWhereInput = $WhereInput<$Schema, "Attribute">; -export type AttributeSelect = $SelectInput<$Schema, "Attribute">; -export type AttributeInclude = $IncludeInput<$Schema, "Attribute">; -export type AttributeOmit = $OmitInput<$Schema, "Attribute">; -export type AttributeGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Attribute", Args, Options>; -export type AttributeToUserFindManyArgs = $FindManyArgs<$Schema, "AttributeToUser">; -export type AttributeToUserFindUniqueArgs = $FindUniqueArgs<$Schema, "AttributeToUser">; -export type AttributeToUserFindFirstArgs = $FindFirstArgs<$Schema, "AttributeToUser">; -export type AttributeToUserExistsArgs = $ExistsArgs<$Schema, "AttributeToUser">; -export type AttributeToUserCreateArgs = $CreateArgs<$Schema, "AttributeToUser">; -export type AttributeToUserCreateManyArgs = $CreateManyArgs<$Schema, "AttributeToUser">; -export type AttributeToUserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "AttributeToUser">; -export type AttributeToUserUpdateArgs = $UpdateArgs<$Schema, "AttributeToUser">; -export type AttributeToUserUpdateManyArgs = $UpdateManyArgs<$Schema, "AttributeToUser">; -export type AttributeToUserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "AttributeToUser">; -export type AttributeToUserUpsertArgs = $UpsertArgs<$Schema, "AttributeToUser">; -export type AttributeToUserDeleteArgs = $DeleteArgs<$Schema, "AttributeToUser">; -export type AttributeToUserDeleteManyArgs = $DeleteManyArgs<$Schema, "AttributeToUser">; -export type AttributeToUserCountArgs = $CountArgs<$Schema, "AttributeToUser">; -export type AttributeToUserAggregateArgs = $AggregateArgs<$Schema, "AttributeToUser">; -export type AttributeToUserGroupByArgs = $GroupByArgs<$Schema, "AttributeToUser">; -export type AttributeToUserWhereInput = $WhereInput<$Schema, "AttributeToUser">; -export type AttributeToUserSelect = $SelectInput<$Schema, "AttributeToUser">; -export type AttributeToUserInclude = $IncludeInput<$Schema, "AttributeToUser">; -export type AttributeToUserOmit = $OmitInput<$Schema, "AttributeToUser">; -export type AttributeToUserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "AttributeToUser", Args, Options>; -export type AssignmentReasonFindManyArgs = $FindManyArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonFindUniqueArgs = $FindUniqueArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonFindFirstArgs = $FindFirstArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonExistsArgs = $ExistsArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonCreateArgs = $CreateArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonCreateManyArgs = $CreateManyArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonUpdateArgs = $UpdateArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonUpdateManyArgs = $UpdateManyArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonUpsertArgs = $UpsertArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonDeleteArgs = $DeleteArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonDeleteManyArgs = $DeleteManyArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonCountArgs = $CountArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonAggregateArgs = $AggregateArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonGroupByArgs = $GroupByArgs<$Schema, "AssignmentReason">; -export type AssignmentReasonWhereInput = $WhereInput<$Schema, "AssignmentReason">; -export type AssignmentReasonSelect = $SelectInput<$Schema, "AssignmentReason">; -export type AssignmentReasonInclude = $IncludeInput<$Schema, "AssignmentReason">; -export type AssignmentReasonOmit = $OmitInput<$Schema, "AssignmentReason">; -export type AssignmentReasonGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "AssignmentReason", Args, Options>; -export type DelegationCredentialFindManyArgs = $FindManyArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialFindUniqueArgs = $FindUniqueArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialFindFirstArgs = $FindFirstArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialExistsArgs = $ExistsArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialCreateArgs = $CreateArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialCreateManyArgs = $CreateManyArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialUpdateArgs = $UpdateArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialUpdateManyArgs = $UpdateManyArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialUpsertArgs = $UpsertArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialDeleteArgs = $DeleteArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialDeleteManyArgs = $DeleteManyArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialCountArgs = $CountArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialAggregateArgs = $AggregateArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialGroupByArgs = $GroupByArgs<$Schema, "DelegationCredential">; -export type DelegationCredentialWhereInput = $WhereInput<$Schema, "DelegationCredential">; -export type DelegationCredentialSelect = $SelectInput<$Schema, "DelegationCredential">; -export type DelegationCredentialInclude = $IncludeInput<$Schema, "DelegationCredential">; -export type DelegationCredentialOmit = $OmitInput<$Schema, "DelegationCredential">; -export type DelegationCredentialGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DelegationCredential", Args, Options>; -export type DomainWideDelegationFindManyArgs = $FindManyArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationFindUniqueArgs = $FindUniqueArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationFindFirstArgs = $FindFirstArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationExistsArgs = $ExistsArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationCreateArgs = $CreateArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationCreateManyArgs = $CreateManyArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationUpdateArgs = $UpdateArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationUpdateManyArgs = $UpdateManyArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationUpsertArgs = $UpsertArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationDeleteArgs = $DeleteArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationDeleteManyArgs = $DeleteManyArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationCountArgs = $CountArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationAggregateArgs = $AggregateArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationGroupByArgs = $GroupByArgs<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationWhereInput = $WhereInput<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationSelect = $SelectInput<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationInclude = $IncludeInput<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationOmit = $OmitInput<$Schema, "DomainWideDelegation">; -export type DomainWideDelegationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DomainWideDelegation", Args, Options>; -export type WorkspacePlatformFindManyArgs = $FindManyArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformFindFirstArgs = $FindFirstArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformExistsArgs = $ExistsArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformCreateArgs = $CreateArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformCreateManyArgs = $CreateManyArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformUpdateArgs = $UpdateArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformUpsertArgs = $UpsertArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformDeleteArgs = $DeleteArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformCountArgs = $CountArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformAggregateArgs = $AggregateArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformGroupByArgs = $GroupByArgs<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformWhereInput = $WhereInput<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformSelect = $SelectInput<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformInclude = $IncludeInput<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformOmit = $OmitInput<$Schema, "WorkspacePlatform">; -export type WorkspacePlatformGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkspacePlatform", Args, Options>; -export type EventTypeTranslationFindManyArgs = $FindManyArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationFindUniqueArgs = $FindUniqueArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationFindFirstArgs = $FindFirstArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationExistsArgs = $ExistsArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationCreateArgs = $CreateArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationCreateManyArgs = $CreateManyArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationUpdateArgs = $UpdateArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationUpdateManyArgs = $UpdateManyArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationUpsertArgs = $UpsertArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationDeleteArgs = $DeleteArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationDeleteManyArgs = $DeleteManyArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationCountArgs = $CountArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationAggregateArgs = $AggregateArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationGroupByArgs = $GroupByArgs<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationWhereInput = $WhereInput<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationSelect = $SelectInput<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationInclude = $IncludeInput<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationOmit = $OmitInput<$Schema, "EventTypeTranslation">; -export type EventTypeTranslationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "EventTypeTranslation", Args, Options>; -export type WatchlistFindManyArgs = $FindManyArgs<$Schema, "Watchlist">; -export type WatchlistFindUniqueArgs = $FindUniqueArgs<$Schema, "Watchlist">; -export type WatchlistFindFirstArgs = $FindFirstArgs<$Schema, "Watchlist">; -export type WatchlistExistsArgs = $ExistsArgs<$Schema, "Watchlist">; -export type WatchlistCreateArgs = $CreateArgs<$Schema, "Watchlist">; -export type WatchlistCreateManyArgs = $CreateManyArgs<$Schema, "Watchlist">; -export type WatchlistCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Watchlist">; -export type WatchlistUpdateArgs = $UpdateArgs<$Schema, "Watchlist">; -export type WatchlistUpdateManyArgs = $UpdateManyArgs<$Schema, "Watchlist">; -export type WatchlistUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Watchlist">; -export type WatchlistUpsertArgs = $UpsertArgs<$Schema, "Watchlist">; -export type WatchlistDeleteArgs = $DeleteArgs<$Schema, "Watchlist">; -export type WatchlistDeleteManyArgs = $DeleteManyArgs<$Schema, "Watchlist">; -export type WatchlistCountArgs = $CountArgs<$Schema, "Watchlist">; -export type WatchlistAggregateArgs = $AggregateArgs<$Schema, "Watchlist">; -export type WatchlistGroupByArgs = $GroupByArgs<$Schema, "Watchlist">; -export type WatchlistWhereInput = $WhereInput<$Schema, "Watchlist">; -export type WatchlistSelect = $SelectInput<$Schema, "Watchlist">; -export type WatchlistInclude = $IncludeInput<$Schema, "Watchlist">; -export type WatchlistOmit = $OmitInput<$Schema, "Watchlist">; -export type WatchlistGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Watchlist", Args, Options>; -export type OrganizationOnboardingFindManyArgs = $FindManyArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingFindUniqueArgs = $FindUniqueArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingFindFirstArgs = $FindFirstArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingExistsArgs = $ExistsArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingCreateArgs = $CreateArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingCreateManyArgs = $CreateManyArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingUpdateArgs = $UpdateArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingUpdateManyArgs = $UpdateManyArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingUpsertArgs = $UpsertArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingDeleteArgs = $DeleteArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingDeleteManyArgs = $DeleteManyArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingCountArgs = $CountArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingAggregateArgs = $AggregateArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingGroupByArgs = $GroupByArgs<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingWhereInput = $WhereInput<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingSelect = $SelectInput<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingInclude = $IncludeInput<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingOmit = $OmitInput<$Schema, "OrganizationOnboarding">; -export type OrganizationOnboardingGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OrganizationOnboarding", Args, Options>; -export type App_RoutingForms_IncompleteBookingActionsFindManyArgs = $FindManyArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsFindUniqueArgs = $FindUniqueArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsFindFirstArgs = $FindFirstArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsExistsArgs = $ExistsArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsCreateArgs = $CreateArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsCreateManyArgs = $CreateManyArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsUpdateArgs = $UpdateArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsUpdateManyArgs = $UpdateManyArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsUpsertArgs = $UpsertArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsDeleteArgs = $DeleteArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsDeleteManyArgs = $DeleteManyArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsCountArgs = $CountArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsAggregateArgs = $AggregateArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsGroupByArgs = $GroupByArgs<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsWhereInput = $WhereInput<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsSelect = $SelectInput<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsInclude = $IncludeInput<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsOmit = $OmitInput<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type App_RoutingForms_IncompleteBookingActionsGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "App_RoutingForms_IncompleteBookingActions", Args, Options>; -export type InternalNotePresetFindManyArgs = $FindManyArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetFindUniqueArgs = $FindUniqueArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetFindFirstArgs = $FindFirstArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetExistsArgs = $ExistsArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetCreateArgs = $CreateArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetCreateManyArgs = $CreateManyArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetUpdateArgs = $UpdateArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetUpdateManyArgs = $UpdateManyArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetUpsertArgs = $UpsertArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetDeleteArgs = $DeleteArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetDeleteManyArgs = $DeleteManyArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetCountArgs = $CountArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetAggregateArgs = $AggregateArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetGroupByArgs = $GroupByArgs<$Schema, "InternalNotePreset">; -export type InternalNotePresetWhereInput = $WhereInput<$Schema, "InternalNotePreset">; -export type InternalNotePresetSelect = $SelectInput<$Schema, "InternalNotePreset">; -export type InternalNotePresetInclude = $IncludeInput<$Schema, "InternalNotePreset">; -export type InternalNotePresetOmit = $OmitInput<$Schema, "InternalNotePreset">; -export type InternalNotePresetGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "InternalNotePreset", Args, Options>; -export type FilterSegmentFindManyArgs = $FindManyArgs<$Schema, "FilterSegment">; -export type FilterSegmentFindUniqueArgs = $FindUniqueArgs<$Schema, "FilterSegment">; -export type FilterSegmentFindFirstArgs = $FindFirstArgs<$Schema, "FilterSegment">; -export type FilterSegmentExistsArgs = $ExistsArgs<$Schema, "FilterSegment">; -export type FilterSegmentCreateArgs = $CreateArgs<$Schema, "FilterSegment">; -export type FilterSegmentCreateManyArgs = $CreateManyArgs<$Schema, "FilterSegment">; -export type FilterSegmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "FilterSegment">; -export type FilterSegmentUpdateArgs = $UpdateArgs<$Schema, "FilterSegment">; -export type FilterSegmentUpdateManyArgs = $UpdateManyArgs<$Schema, "FilterSegment">; -export type FilterSegmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "FilterSegment">; -export type FilterSegmentUpsertArgs = $UpsertArgs<$Schema, "FilterSegment">; -export type FilterSegmentDeleteArgs = $DeleteArgs<$Schema, "FilterSegment">; -export type FilterSegmentDeleteManyArgs = $DeleteManyArgs<$Schema, "FilterSegment">; -export type FilterSegmentCountArgs = $CountArgs<$Schema, "FilterSegment">; -export type FilterSegmentAggregateArgs = $AggregateArgs<$Schema, "FilterSegment">; -export type FilterSegmentGroupByArgs = $GroupByArgs<$Schema, "FilterSegment">; -export type FilterSegmentWhereInput = $WhereInput<$Schema, "FilterSegment">; -export type FilterSegmentSelect = $SelectInput<$Schema, "FilterSegment">; -export type FilterSegmentInclude = $IncludeInput<$Schema, "FilterSegment">; -export type FilterSegmentOmit = $OmitInput<$Schema, "FilterSegment">; -export type FilterSegmentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "FilterSegment", Args, Options>; -export type UserFilterSegmentPreferenceFindManyArgs = $FindManyArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceFindUniqueArgs = $FindUniqueArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceFindFirstArgs = $FindFirstArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceExistsArgs = $ExistsArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceCreateArgs = $CreateArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceCreateManyArgs = $CreateManyArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceUpdateArgs = $UpdateArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceUpdateManyArgs = $UpdateManyArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceUpsertArgs = $UpsertArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceDeleteArgs = $DeleteArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceDeleteManyArgs = $DeleteManyArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceCountArgs = $CountArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceAggregateArgs = $AggregateArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceGroupByArgs = $GroupByArgs<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceWhereInput = $WhereInput<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceSelect = $SelectInput<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceInclude = $IncludeInput<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceOmit = $OmitInput<$Schema, "UserFilterSegmentPreference">; -export type UserFilterSegmentPreferenceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "UserFilterSegmentPreference", Args, Options>; -export type BookingInternalNoteFindManyArgs = $FindManyArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteFindUniqueArgs = $FindUniqueArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteFindFirstArgs = $FindFirstArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteExistsArgs = $ExistsArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteCreateArgs = $CreateArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteCreateManyArgs = $CreateManyArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteUpdateArgs = $UpdateArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteUpdateManyArgs = $UpdateManyArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteUpsertArgs = $UpsertArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteDeleteArgs = $DeleteArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteDeleteManyArgs = $DeleteManyArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteCountArgs = $CountArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteAggregateArgs = $AggregateArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteGroupByArgs = $GroupByArgs<$Schema, "BookingInternalNote">; -export type BookingInternalNoteWhereInput = $WhereInput<$Schema, "BookingInternalNote">; -export type BookingInternalNoteSelect = $SelectInput<$Schema, "BookingInternalNote">; -export type BookingInternalNoteInclude = $IncludeInput<$Schema, "BookingInternalNote">; -export type BookingInternalNoteOmit = $OmitInput<$Schema, "BookingInternalNote">; -export type BookingInternalNoteGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BookingInternalNote", Args, Options>; -export type WorkflowOptOutContactFindManyArgs = $FindManyArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactFindFirstArgs = $FindFirstArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactExistsArgs = $ExistsArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactCreateArgs = $CreateArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactCreateManyArgs = $CreateManyArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactUpdateArgs = $UpdateArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactUpsertArgs = $UpsertArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactDeleteArgs = $DeleteArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactCountArgs = $CountArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactAggregateArgs = $AggregateArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactGroupByArgs = $GroupByArgs<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactWhereInput = $WhereInput<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactSelect = $SelectInput<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactInclude = $IncludeInput<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactOmit = $OmitInput<$Schema, "WorkflowOptOutContact">; -export type WorkflowOptOutContactGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkflowOptOutContact", Args, Options>; -export type RoleFindManyArgs = $FindManyArgs<$Schema, "Role">; -export type RoleFindUniqueArgs = $FindUniqueArgs<$Schema, "Role">; -export type RoleFindFirstArgs = $FindFirstArgs<$Schema, "Role">; -export type RoleExistsArgs = $ExistsArgs<$Schema, "Role">; -export type RoleCreateArgs = $CreateArgs<$Schema, "Role">; -export type RoleCreateManyArgs = $CreateManyArgs<$Schema, "Role">; -export type RoleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Role">; -export type RoleUpdateArgs = $UpdateArgs<$Schema, "Role">; -export type RoleUpdateManyArgs = $UpdateManyArgs<$Schema, "Role">; -export type RoleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Role">; -export type RoleUpsertArgs = $UpsertArgs<$Schema, "Role">; -export type RoleDeleteArgs = $DeleteArgs<$Schema, "Role">; -export type RoleDeleteManyArgs = $DeleteManyArgs<$Schema, "Role">; -export type RoleCountArgs = $CountArgs<$Schema, "Role">; -export type RoleAggregateArgs = $AggregateArgs<$Schema, "Role">; -export type RoleGroupByArgs = $GroupByArgs<$Schema, "Role">; -export type RoleWhereInput = $WhereInput<$Schema, "Role">; -export type RoleSelect = $SelectInput<$Schema, "Role">; -export type RoleInclude = $IncludeInput<$Schema, "Role">; -export type RoleOmit = $OmitInput<$Schema, "Role">; -export type RoleGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Role", Args, Options>; -export type RolePermissionFindManyArgs = $FindManyArgs<$Schema, "RolePermission">; -export type RolePermissionFindUniqueArgs = $FindUniqueArgs<$Schema, "RolePermission">; -export type RolePermissionFindFirstArgs = $FindFirstArgs<$Schema, "RolePermission">; -export type RolePermissionExistsArgs = $ExistsArgs<$Schema, "RolePermission">; -export type RolePermissionCreateArgs = $CreateArgs<$Schema, "RolePermission">; -export type RolePermissionCreateManyArgs = $CreateManyArgs<$Schema, "RolePermission">; -export type RolePermissionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RolePermission">; -export type RolePermissionUpdateArgs = $UpdateArgs<$Schema, "RolePermission">; -export type RolePermissionUpdateManyArgs = $UpdateManyArgs<$Schema, "RolePermission">; -export type RolePermissionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RolePermission">; -export type RolePermissionUpsertArgs = $UpsertArgs<$Schema, "RolePermission">; -export type RolePermissionDeleteArgs = $DeleteArgs<$Schema, "RolePermission">; -export type RolePermissionDeleteManyArgs = $DeleteManyArgs<$Schema, "RolePermission">; -export type RolePermissionCountArgs = $CountArgs<$Schema, "RolePermission">; -export type RolePermissionAggregateArgs = $AggregateArgs<$Schema, "RolePermission">; -export type RolePermissionGroupByArgs = $GroupByArgs<$Schema, "RolePermission">; -export type RolePermissionWhereInput = $WhereInput<$Schema, "RolePermission">; -export type RolePermissionSelect = $SelectInput<$Schema, "RolePermission">; -export type RolePermissionInclude = $IncludeInput<$Schema, "RolePermission">; -export type RolePermissionOmit = $OmitInput<$Schema, "RolePermission">; -export type RolePermissionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RolePermission", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type HostFindManyArgs = $FindManyArgs<$Schema, 'Host'>; +export type HostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Host'>; +export type HostFindFirstArgs = $FindFirstArgs<$Schema, 'Host'>; +export type HostExistsArgs = $ExistsArgs<$Schema, 'Host'>; +export type HostCreateArgs = $CreateArgs<$Schema, 'Host'>; +export type HostCreateManyArgs = $CreateManyArgs<$Schema, 'Host'>; +export type HostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Host'>; +export type HostUpdateArgs = $UpdateArgs<$Schema, 'Host'>; +export type HostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Host'>; +export type HostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Host'>; +export type HostUpsertArgs = $UpsertArgs<$Schema, 'Host'>; +export type HostDeleteArgs = $DeleteArgs<$Schema, 'Host'>; +export type HostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Host'>; +export type HostCountArgs = $CountArgs<$Schema, 'Host'>; +export type HostAggregateArgs = $AggregateArgs<$Schema, 'Host'>; +export type HostGroupByArgs = $GroupByArgs<$Schema, 'Host'>; +export type HostWhereInput = $WhereInput<$Schema, 'Host'>; +export type HostSelect = $SelectInput<$Schema, 'Host'>; +export type HostInclude = $IncludeInput<$Schema, 'Host'>; +export type HostOmit = $OmitInput<$Schema, 'Host'>; +export type HostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Host', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Host', Args, Options>; +export type CalVideoSettingsFindManyArgs = $FindManyArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsFindUniqueArgs = $FindUniqueArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsFindFirstArgs = $FindFirstArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsExistsArgs = $ExistsArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsCreateArgs = $CreateArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsCreateManyArgs = $CreateManyArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsUpdateArgs = $UpdateArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsUpdateManyArgs = $UpdateManyArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsUpsertArgs = $UpsertArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsDeleteArgs = $DeleteArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsDeleteManyArgs = $DeleteManyArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsCountArgs = $CountArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsAggregateArgs = $AggregateArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsGroupByArgs = $GroupByArgs<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsWhereInput = $WhereInput<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsSelect = $SelectInput<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsInclude = $IncludeInput<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsOmit = $OmitInput<$Schema, 'CalVideoSettings'>; +export type CalVideoSettingsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'CalVideoSettings', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'CalVideoSettings', Args, Options>; +export type EventTypeFindManyArgs = $FindManyArgs<$Schema, 'EventType'>; +export type EventTypeFindUniqueArgs = $FindUniqueArgs<$Schema, 'EventType'>; +export type EventTypeFindFirstArgs = $FindFirstArgs<$Schema, 'EventType'>; +export type EventTypeExistsArgs = $ExistsArgs<$Schema, 'EventType'>; +export type EventTypeCreateArgs = $CreateArgs<$Schema, 'EventType'>; +export type EventTypeCreateManyArgs = $CreateManyArgs<$Schema, 'EventType'>; +export type EventTypeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'EventType'>; +export type EventTypeUpdateArgs = $UpdateArgs<$Schema, 'EventType'>; +export type EventTypeUpdateManyArgs = $UpdateManyArgs<$Schema, 'EventType'>; +export type EventTypeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'EventType'>; +export type EventTypeUpsertArgs = $UpsertArgs<$Schema, 'EventType'>; +export type EventTypeDeleteArgs = $DeleteArgs<$Schema, 'EventType'>; +export type EventTypeDeleteManyArgs = $DeleteManyArgs<$Schema, 'EventType'>; +export type EventTypeCountArgs = $CountArgs<$Schema, 'EventType'>; +export type EventTypeAggregateArgs = $AggregateArgs<$Schema, 'EventType'>; +export type EventTypeGroupByArgs = $GroupByArgs<$Schema, 'EventType'>; +export type EventTypeWhereInput = $WhereInput<$Schema, 'EventType'>; +export type EventTypeSelect = $SelectInput<$Schema, 'EventType'>; +export type EventTypeInclude = $IncludeInput<$Schema, 'EventType'>; +export type EventTypeOmit = $OmitInput<$Schema, 'EventType'>; +export type EventTypeGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'EventType', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'EventType', Args, Options>; +export type CredentialFindManyArgs = $FindManyArgs<$Schema, 'Credential'>; +export type CredentialFindUniqueArgs = $FindUniqueArgs<$Schema, 'Credential'>; +export type CredentialFindFirstArgs = $FindFirstArgs<$Schema, 'Credential'>; +export type CredentialExistsArgs = $ExistsArgs<$Schema, 'Credential'>; +export type CredentialCreateArgs = $CreateArgs<$Schema, 'Credential'>; +export type CredentialCreateManyArgs = $CreateManyArgs<$Schema, 'Credential'>; +export type CredentialCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Credential'>; +export type CredentialUpdateArgs = $UpdateArgs<$Schema, 'Credential'>; +export type CredentialUpdateManyArgs = $UpdateManyArgs<$Schema, 'Credential'>; +export type CredentialUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Credential'>; +export type CredentialUpsertArgs = $UpsertArgs<$Schema, 'Credential'>; +export type CredentialDeleteArgs = $DeleteArgs<$Schema, 'Credential'>; +export type CredentialDeleteManyArgs = $DeleteManyArgs<$Schema, 'Credential'>; +export type CredentialCountArgs = $CountArgs<$Schema, 'Credential'>; +export type CredentialAggregateArgs = $AggregateArgs<$Schema, 'Credential'>; +export type CredentialGroupByArgs = $GroupByArgs<$Schema, 'Credential'>; +export type CredentialWhereInput = $WhereInput<$Schema, 'Credential'>; +export type CredentialSelect = $SelectInput<$Schema, 'Credential'>; +export type CredentialInclude = $IncludeInput<$Schema, 'Credential'>; +export type CredentialOmit = $OmitInput<$Schema, 'Credential'>; +export type CredentialGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Credential', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Credential', Args, Options>; +export type DestinationCalendarFindManyArgs = $FindManyArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarFindUniqueArgs = $FindUniqueArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarFindFirstArgs = $FindFirstArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarExistsArgs = $ExistsArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarCreateArgs = $CreateArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarCreateManyArgs = $CreateManyArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarUpdateArgs = $UpdateArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarUpdateManyArgs = $UpdateManyArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarUpsertArgs = $UpsertArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarDeleteArgs = $DeleteArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarDeleteManyArgs = $DeleteManyArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarCountArgs = $CountArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarAggregateArgs = $AggregateArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarGroupByArgs = $GroupByArgs<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarWhereInput = $WhereInput<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarSelect = $SelectInput<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarInclude = $IncludeInput<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarOmit = $OmitInput<$Schema, 'DestinationCalendar'>; +export type DestinationCalendarGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DestinationCalendar', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DestinationCalendar', Args, Options>; +export type UserPasswordFindManyArgs = $FindManyArgs<$Schema, 'UserPassword'>; +export type UserPasswordFindUniqueArgs = $FindUniqueArgs<$Schema, 'UserPassword'>; +export type UserPasswordFindFirstArgs = $FindFirstArgs<$Schema, 'UserPassword'>; +export type UserPasswordExistsArgs = $ExistsArgs<$Schema, 'UserPassword'>; +export type UserPasswordCreateArgs = $CreateArgs<$Schema, 'UserPassword'>; +export type UserPasswordCreateManyArgs = $CreateManyArgs<$Schema, 'UserPassword'>; +export type UserPasswordCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'UserPassword'>; +export type UserPasswordUpdateArgs = $UpdateArgs<$Schema, 'UserPassword'>; +export type UserPasswordUpdateManyArgs = $UpdateManyArgs<$Schema, 'UserPassword'>; +export type UserPasswordUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'UserPassword'>; +export type UserPasswordUpsertArgs = $UpsertArgs<$Schema, 'UserPassword'>; +export type UserPasswordDeleteArgs = $DeleteArgs<$Schema, 'UserPassword'>; +export type UserPasswordDeleteManyArgs = $DeleteManyArgs<$Schema, 'UserPassword'>; +export type UserPasswordCountArgs = $CountArgs<$Schema, 'UserPassword'>; +export type UserPasswordAggregateArgs = $AggregateArgs<$Schema, 'UserPassword'>; +export type UserPasswordGroupByArgs = $GroupByArgs<$Schema, 'UserPassword'>; +export type UserPasswordWhereInput = $WhereInput<$Schema, 'UserPassword'>; +export type UserPasswordSelect = $SelectInput<$Schema, 'UserPassword'>; +export type UserPasswordInclude = $IncludeInput<$Schema, 'UserPassword'>; +export type UserPasswordOmit = $OmitInput<$Schema, 'UserPassword'>; +export type UserPasswordGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'UserPassword', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'UserPassword', Args, Options>; +export type TravelScheduleFindManyArgs = $FindManyArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleFindUniqueArgs = $FindUniqueArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleFindFirstArgs = $FindFirstArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleExistsArgs = $ExistsArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleCreateArgs = $CreateArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleCreateManyArgs = $CreateManyArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleUpdateArgs = $UpdateArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleUpdateManyArgs = $UpdateManyArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleUpsertArgs = $UpsertArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleDeleteArgs = $DeleteArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleDeleteManyArgs = $DeleteManyArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleCountArgs = $CountArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleAggregateArgs = $AggregateArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleGroupByArgs = $GroupByArgs<$Schema, 'TravelSchedule'>; +export type TravelScheduleWhereInput = $WhereInput<$Schema, 'TravelSchedule'>; +export type TravelScheduleSelect = $SelectInput<$Schema, 'TravelSchedule'>; +export type TravelScheduleInclude = $IncludeInput<$Schema, 'TravelSchedule'>; +export type TravelScheduleOmit = $OmitInput<$Schema, 'TravelSchedule'>; +export type TravelScheduleGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TravelSchedule', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TravelSchedule', Args, Options>; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type NotificationsSubscriptionsFindManyArgs = $FindManyArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsFindUniqueArgs = $FindUniqueArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsFindFirstArgs = $FindFirstArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsExistsArgs = $ExistsArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsCreateArgs = $CreateArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsCreateManyArgs = $CreateManyArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'NotificationsSubscriptions' +>; +export type NotificationsSubscriptionsUpdateArgs = $UpdateArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsUpdateManyArgs = $UpdateManyArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'NotificationsSubscriptions' +>; +export type NotificationsSubscriptionsUpsertArgs = $UpsertArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsDeleteArgs = $DeleteArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsDeleteManyArgs = $DeleteManyArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsCountArgs = $CountArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsAggregateArgs = $AggregateArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsGroupByArgs = $GroupByArgs<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsWhereInput = $WhereInput<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsSelect = $SelectInput<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsInclude = $IncludeInput<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsOmit = $OmitInput<$Schema, 'NotificationsSubscriptions'>; +export type NotificationsSubscriptionsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'NotificationsSubscriptions', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'NotificationsSubscriptions', Args, Options>; +export type ProfileFindManyArgs = $FindManyArgs<$Schema, 'Profile'>; +export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, 'Profile'>; +export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, 'Profile'>; +export type ProfileExistsArgs = $ExistsArgs<$Schema, 'Profile'>; +export type ProfileCreateArgs = $CreateArgs<$Schema, 'Profile'>; +export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, 'Profile'>; +export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpdateArgs = $UpdateArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpsertArgs = $UpsertArgs<$Schema, 'Profile'>; +export type ProfileDeleteArgs = $DeleteArgs<$Schema, 'Profile'>; +export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, 'Profile'>; +export type ProfileCountArgs = $CountArgs<$Schema, 'Profile'>; +export type ProfileAggregateArgs = $AggregateArgs<$Schema, 'Profile'>; +export type ProfileGroupByArgs = $GroupByArgs<$Schema, 'Profile'>; +export type ProfileWhereInput = $WhereInput<$Schema, 'Profile'>; +export type ProfileSelect = $SelectInput<$Schema, 'Profile'>; +export type ProfileInclude = $IncludeInput<$Schema, 'Profile'>; +export type ProfileOmit = $OmitInput<$Schema, 'Profile'>; +export type ProfileGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Profile', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Profile', Args, Options>; +export type TeamFindManyArgs = $FindManyArgs<$Schema, 'Team'>; +export type TeamFindUniqueArgs = $FindUniqueArgs<$Schema, 'Team'>; +export type TeamFindFirstArgs = $FindFirstArgs<$Schema, 'Team'>; +export type TeamExistsArgs = $ExistsArgs<$Schema, 'Team'>; +export type TeamCreateArgs = $CreateArgs<$Schema, 'Team'>; +export type TeamCreateManyArgs = $CreateManyArgs<$Schema, 'Team'>; +export type TeamCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Team'>; +export type TeamUpdateArgs = $UpdateArgs<$Schema, 'Team'>; +export type TeamUpdateManyArgs = $UpdateManyArgs<$Schema, 'Team'>; +export type TeamUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Team'>; +export type TeamUpsertArgs = $UpsertArgs<$Schema, 'Team'>; +export type TeamDeleteArgs = $DeleteArgs<$Schema, 'Team'>; +export type TeamDeleteManyArgs = $DeleteManyArgs<$Schema, 'Team'>; +export type TeamCountArgs = $CountArgs<$Schema, 'Team'>; +export type TeamAggregateArgs = $AggregateArgs<$Schema, 'Team'>; +export type TeamGroupByArgs = $GroupByArgs<$Schema, 'Team'>; +export type TeamWhereInput = $WhereInput<$Schema, 'Team'>; +export type TeamSelect = $SelectInput<$Schema, 'Team'>; +export type TeamInclude = $IncludeInput<$Schema, 'Team'>; +export type TeamOmit = $OmitInput<$Schema, 'Team'>; +export type TeamGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Team', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Team', Args, Options>; +export type CreditBalanceFindManyArgs = $FindManyArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceFindUniqueArgs = $FindUniqueArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceFindFirstArgs = $FindFirstArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceExistsArgs = $ExistsArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceCreateArgs = $CreateArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceCreateManyArgs = $CreateManyArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceUpdateArgs = $UpdateArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceUpdateManyArgs = $UpdateManyArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceUpsertArgs = $UpsertArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceDeleteArgs = $DeleteArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceDeleteManyArgs = $DeleteManyArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceCountArgs = $CountArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceAggregateArgs = $AggregateArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceGroupByArgs = $GroupByArgs<$Schema, 'CreditBalance'>; +export type CreditBalanceWhereInput = $WhereInput<$Schema, 'CreditBalance'>; +export type CreditBalanceSelect = $SelectInput<$Schema, 'CreditBalance'>; +export type CreditBalanceInclude = $IncludeInput<$Schema, 'CreditBalance'>; +export type CreditBalanceOmit = $OmitInput<$Schema, 'CreditBalance'>; +export type CreditBalanceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'CreditBalance', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'CreditBalance', Args, Options>; +export type CreditPurchaseLogFindManyArgs = $FindManyArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogFindUniqueArgs = $FindUniqueArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogFindFirstArgs = $FindFirstArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogExistsArgs = $ExistsArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogCreateArgs = $CreateArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogCreateManyArgs = $CreateManyArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogUpdateArgs = $UpdateArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogUpdateManyArgs = $UpdateManyArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogUpsertArgs = $UpsertArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogDeleteArgs = $DeleteArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogDeleteManyArgs = $DeleteManyArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogCountArgs = $CountArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogAggregateArgs = $AggregateArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogGroupByArgs = $GroupByArgs<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogWhereInput = $WhereInput<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogSelect = $SelectInput<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogInclude = $IncludeInput<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogOmit = $OmitInput<$Schema, 'CreditPurchaseLog'>; +export type CreditPurchaseLogGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'CreditPurchaseLog', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'CreditPurchaseLog', Args, Options>; +export type CreditExpenseLogFindManyArgs = $FindManyArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogFindUniqueArgs = $FindUniqueArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogFindFirstArgs = $FindFirstArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogExistsArgs = $ExistsArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogCreateArgs = $CreateArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogCreateManyArgs = $CreateManyArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogUpdateArgs = $UpdateArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogUpdateManyArgs = $UpdateManyArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogUpsertArgs = $UpsertArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogDeleteArgs = $DeleteArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogDeleteManyArgs = $DeleteManyArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogCountArgs = $CountArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogAggregateArgs = $AggregateArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogGroupByArgs = $GroupByArgs<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogWhereInput = $WhereInput<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogSelect = $SelectInput<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogInclude = $IncludeInput<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogOmit = $OmitInput<$Schema, 'CreditExpenseLog'>; +export type CreditExpenseLogGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'CreditExpenseLog', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'CreditExpenseLog', Args, Options>; +export type OrganizationSettingsFindManyArgs = $FindManyArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsFindUniqueArgs = $FindUniqueArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsFindFirstArgs = $FindFirstArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsExistsArgs = $ExistsArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsCreateArgs = $CreateArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsCreateManyArgs = $CreateManyArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsUpdateArgs = $UpdateArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsUpdateManyArgs = $UpdateManyArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsUpsertArgs = $UpsertArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsDeleteArgs = $DeleteArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsDeleteManyArgs = $DeleteManyArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsCountArgs = $CountArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsAggregateArgs = $AggregateArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsGroupByArgs = $GroupByArgs<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsWhereInput = $WhereInput<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsSelect = $SelectInput<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsInclude = $IncludeInput<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsOmit = $OmitInput<$Schema, 'OrganizationSettings'>; +export type OrganizationSettingsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OrganizationSettings', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OrganizationSettings', Args, Options>; +export type MembershipFindManyArgs = $FindManyArgs<$Schema, 'Membership'>; +export type MembershipFindUniqueArgs = $FindUniqueArgs<$Schema, 'Membership'>; +export type MembershipFindFirstArgs = $FindFirstArgs<$Schema, 'Membership'>; +export type MembershipExistsArgs = $ExistsArgs<$Schema, 'Membership'>; +export type MembershipCreateArgs = $CreateArgs<$Schema, 'Membership'>; +export type MembershipCreateManyArgs = $CreateManyArgs<$Schema, 'Membership'>; +export type MembershipCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Membership'>; +export type MembershipUpdateArgs = $UpdateArgs<$Schema, 'Membership'>; +export type MembershipUpdateManyArgs = $UpdateManyArgs<$Schema, 'Membership'>; +export type MembershipUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Membership'>; +export type MembershipUpsertArgs = $UpsertArgs<$Schema, 'Membership'>; +export type MembershipDeleteArgs = $DeleteArgs<$Schema, 'Membership'>; +export type MembershipDeleteManyArgs = $DeleteManyArgs<$Schema, 'Membership'>; +export type MembershipCountArgs = $CountArgs<$Schema, 'Membership'>; +export type MembershipAggregateArgs = $AggregateArgs<$Schema, 'Membership'>; +export type MembershipGroupByArgs = $GroupByArgs<$Schema, 'Membership'>; +export type MembershipWhereInput = $WhereInput<$Schema, 'Membership'>; +export type MembershipSelect = $SelectInput<$Schema, 'Membership'>; +export type MembershipInclude = $IncludeInput<$Schema, 'Membership'>; +export type MembershipOmit = $OmitInput<$Schema, 'Membership'>; +export type MembershipGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Membership', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Membership', Args, Options>; +export type VerificationTokenFindManyArgs = $FindManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenFindFirstArgs = $FindFirstArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenExistsArgs = $ExistsArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCreateArgs = $CreateArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCreateManyArgs = $CreateManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpdateArgs = $UpdateArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenUpsertArgs = $UpsertArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenDeleteArgs = $DeleteArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenCountArgs = $CountArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenAggregateArgs = $AggregateArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenGroupByArgs = $GroupByArgs<$Schema, 'VerificationToken'>; +export type VerificationTokenWhereInput = $WhereInput<$Schema, 'VerificationToken'>; +export type VerificationTokenSelect = $SelectInput<$Schema, 'VerificationToken'>; +export type VerificationTokenInclude = $IncludeInput<$Schema, 'VerificationToken'>; +export type VerificationTokenOmit = $OmitInput<$Schema, 'VerificationToken'>; +export type VerificationTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'VerificationToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'VerificationToken', Args, Options>; +export type InstantMeetingTokenFindManyArgs = $FindManyArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenFindFirstArgs = $FindFirstArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenExistsArgs = $ExistsArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenCreateArgs = $CreateArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenCreateManyArgs = $CreateManyArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenUpdateArgs = $UpdateArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenUpsertArgs = $UpsertArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenDeleteArgs = $DeleteArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenCountArgs = $CountArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenAggregateArgs = $AggregateArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenGroupByArgs = $GroupByArgs<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenWhereInput = $WhereInput<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenSelect = $SelectInput<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenInclude = $IncludeInput<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenOmit = $OmitInput<$Schema, 'InstantMeetingToken'>; +export type InstantMeetingTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'InstantMeetingToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'InstantMeetingToken', Args, Options>; +export type BookingReferenceFindManyArgs = $FindManyArgs<$Schema, 'BookingReference'>; +export type BookingReferenceFindUniqueArgs = $FindUniqueArgs<$Schema, 'BookingReference'>; +export type BookingReferenceFindFirstArgs = $FindFirstArgs<$Schema, 'BookingReference'>; +export type BookingReferenceExistsArgs = $ExistsArgs<$Schema, 'BookingReference'>; +export type BookingReferenceCreateArgs = $CreateArgs<$Schema, 'BookingReference'>; +export type BookingReferenceCreateManyArgs = $CreateManyArgs<$Schema, 'BookingReference'>; +export type BookingReferenceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BookingReference'>; +export type BookingReferenceUpdateArgs = $UpdateArgs<$Schema, 'BookingReference'>; +export type BookingReferenceUpdateManyArgs = $UpdateManyArgs<$Schema, 'BookingReference'>; +export type BookingReferenceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BookingReference'>; +export type BookingReferenceUpsertArgs = $UpsertArgs<$Schema, 'BookingReference'>; +export type BookingReferenceDeleteArgs = $DeleteArgs<$Schema, 'BookingReference'>; +export type BookingReferenceDeleteManyArgs = $DeleteManyArgs<$Schema, 'BookingReference'>; +export type BookingReferenceCountArgs = $CountArgs<$Schema, 'BookingReference'>; +export type BookingReferenceAggregateArgs = $AggregateArgs<$Schema, 'BookingReference'>; +export type BookingReferenceGroupByArgs = $GroupByArgs<$Schema, 'BookingReference'>; +export type BookingReferenceWhereInput = $WhereInput<$Schema, 'BookingReference'>; +export type BookingReferenceSelect = $SelectInput<$Schema, 'BookingReference'>; +export type BookingReferenceInclude = $IncludeInput<$Schema, 'BookingReference'>; +export type BookingReferenceOmit = $OmitInput<$Schema, 'BookingReference'>; +export type BookingReferenceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BookingReference', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BookingReference', Args, Options>; +export type AttendeeFindManyArgs = $FindManyArgs<$Schema, 'Attendee'>; +export type AttendeeFindUniqueArgs = $FindUniqueArgs<$Schema, 'Attendee'>; +export type AttendeeFindFirstArgs = $FindFirstArgs<$Schema, 'Attendee'>; +export type AttendeeExistsArgs = $ExistsArgs<$Schema, 'Attendee'>; +export type AttendeeCreateArgs = $CreateArgs<$Schema, 'Attendee'>; +export type AttendeeCreateManyArgs = $CreateManyArgs<$Schema, 'Attendee'>; +export type AttendeeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Attendee'>; +export type AttendeeUpdateArgs = $UpdateArgs<$Schema, 'Attendee'>; +export type AttendeeUpdateManyArgs = $UpdateManyArgs<$Schema, 'Attendee'>; +export type AttendeeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Attendee'>; +export type AttendeeUpsertArgs = $UpsertArgs<$Schema, 'Attendee'>; +export type AttendeeDeleteArgs = $DeleteArgs<$Schema, 'Attendee'>; +export type AttendeeDeleteManyArgs = $DeleteManyArgs<$Schema, 'Attendee'>; +export type AttendeeCountArgs = $CountArgs<$Schema, 'Attendee'>; +export type AttendeeAggregateArgs = $AggregateArgs<$Schema, 'Attendee'>; +export type AttendeeGroupByArgs = $GroupByArgs<$Schema, 'Attendee'>; +export type AttendeeWhereInput = $WhereInput<$Schema, 'Attendee'>; +export type AttendeeSelect = $SelectInput<$Schema, 'Attendee'>; +export type AttendeeInclude = $IncludeInput<$Schema, 'Attendee'>; +export type AttendeeOmit = $OmitInput<$Schema, 'Attendee'>; +export type AttendeeGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Attendee', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Attendee', Args, Options>; +export type BookingFindManyArgs = $FindManyArgs<$Schema, 'Booking'>; +export type BookingFindUniqueArgs = $FindUniqueArgs<$Schema, 'Booking'>; +export type BookingFindFirstArgs = $FindFirstArgs<$Schema, 'Booking'>; +export type BookingExistsArgs = $ExistsArgs<$Schema, 'Booking'>; +export type BookingCreateArgs = $CreateArgs<$Schema, 'Booking'>; +export type BookingCreateManyArgs = $CreateManyArgs<$Schema, 'Booking'>; +export type BookingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Booking'>; +export type BookingUpdateArgs = $UpdateArgs<$Schema, 'Booking'>; +export type BookingUpdateManyArgs = $UpdateManyArgs<$Schema, 'Booking'>; +export type BookingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Booking'>; +export type BookingUpsertArgs = $UpsertArgs<$Schema, 'Booking'>; +export type BookingDeleteArgs = $DeleteArgs<$Schema, 'Booking'>; +export type BookingDeleteManyArgs = $DeleteManyArgs<$Schema, 'Booking'>; +export type BookingCountArgs = $CountArgs<$Schema, 'Booking'>; +export type BookingAggregateArgs = $AggregateArgs<$Schema, 'Booking'>; +export type BookingGroupByArgs = $GroupByArgs<$Schema, 'Booking'>; +export type BookingWhereInput = $WhereInput<$Schema, 'Booking'>; +export type BookingSelect = $SelectInput<$Schema, 'Booking'>; +export type BookingInclude = $IncludeInput<$Schema, 'Booking'>; +export type BookingOmit = $OmitInput<$Schema, 'Booking'>; +export type BookingGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Booking', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Booking', Args, Options>; +export type TrackingFindManyArgs = $FindManyArgs<$Schema, 'Tracking'>; +export type TrackingFindUniqueArgs = $FindUniqueArgs<$Schema, 'Tracking'>; +export type TrackingFindFirstArgs = $FindFirstArgs<$Schema, 'Tracking'>; +export type TrackingExistsArgs = $ExistsArgs<$Schema, 'Tracking'>; +export type TrackingCreateArgs = $CreateArgs<$Schema, 'Tracking'>; +export type TrackingCreateManyArgs = $CreateManyArgs<$Schema, 'Tracking'>; +export type TrackingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Tracking'>; +export type TrackingUpdateArgs = $UpdateArgs<$Schema, 'Tracking'>; +export type TrackingUpdateManyArgs = $UpdateManyArgs<$Schema, 'Tracking'>; +export type TrackingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Tracking'>; +export type TrackingUpsertArgs = $UpsertArgs<$Schema, 'Tracking'>; +export type TrackingDeleteArgs = $DeleteArgs<$Schema, 'Tracking'>; +export type TrackingDeleteManyArgs = $DeleteManyArgs<$Schema, 'Tracking'>; +export type TrackingCountArgs = $CountArgs<$Schema, 'Tracking'>; +export type TrackingAggregateArgs = $AggregateArgs<$Schema, 'Tracking'>; +export type TrackingGroupByArgs = $GroupByArgs<$Schema, 'Tracking'>; +export type TrackingWhereInput = $WhereInput<$Schema, 'Tracking'>; +export type TrackingSelect = $SelectInput<$Schema, 'Tracking'>; +export type TrackingInclude = $IncludeInput<$Schema, 'Tracking'>; +export type TrackingOmit = $OmitInput<$Schema, 'Tracking'>; +export type TrackingGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Tracking', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Tracking', Args, Options>; +export type ScheduleFindManyArgs = $FindManyArgs<$Schema, 'Schedule'>; +export type ScheduleFindUniqueArgs = $FindUniqueArgs<$Schema, 'Schedule'>; +export type ScheduleFindFirstArgs = $FindFirstArgs<$Schema, 'Schedule'>; +export type ScheduleExistsArgs = $ExistsArgs<$Schema, 'Schedule'>; +export type ScheduleCreateArgs = $CreateArgs<$Schema, 'Schedule'>; +export type ScheduleCreateManyArgs = $CreateManyArgs<$Schema, 'Schedule'>; +export type ScheduleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Schedule'>; +export type ScheduleUpdateArgs = $UpdateArgs<$Schema, 'Schedule'>; +export type ScheduleUpdateManyArgs = $UpdateManyArgs<$Schema, 'Schedule'>; +export type ScheduleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Schedule'>; +export type ScheduleUpsertArgs = $UpsertArgs<$Schema, 'Schedule'>; +export type ScheduleDeleteArgs = $DeleteArgs<$Schema, 'Schedule'>; +export type ScheduleDeleteManyArgs = $DeleteManyArgs<$Schema, 'Schedule'>; +export type ScheduleCountArgs = $CountArgs<$Schema, 'Schedule'>; +export type ScheduleAggregateArgs = $AggregateArgs<$Schema, 'Schedule'>; +export type ScheduleGroupByArgs = $GroupByArgs<$Schema, 'Schedule'>; +export type ScheduleWhereInput = $WhereInput<$Schema, 'Schedule'>; +export type ScheduleSelect = $SelectInput<$Schema, 'Schedule'>; +export type ScheduleInclude = $IncludeInput<$Schema, 'Schedule'>; +export type ScheduleOmit = $OmitInput<$Schema, 'Schedule'>; +export type ScheduleGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Schedule', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Schedule', Args, Options>; +export type AvailabilityFindManyArgs = $FindManyArgs<$Schema, 'Availability'>; +export type AvailabilityFindUniqueArgs = $FindUniqueArgs<$Schema, 'Availability'>; +export type AvailabilityFindFirstArgs = $FindFirstArgs<$Schema, 'Availability'>; +export type AvailabilityExistsArgs = $ExistsArgs<$Schema, 'Availability'>; +export type AvailabilityCreateArgs = $CreateArgs<$Schema, 'Availability'>; +export type AvailabilityCreateManyArgs = $CreateManyArgs<$Schema, 'Availability'>; +export type AvailabilityCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Availability'>; +export type AvailabilityUpdateArgs = $UpdateArgs<$Schema, 'Availability'>; +export type AvailabilityUpdateManyArgs = $UpdateManyArgs<$Schema, 'Availability'>; +export type AvailabilityUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Availability'>; +export type AvailabilityUpsertArgs = $UpsertArgs<$Schema, 'Availability'>; +export type AvailabilityDeleteArgs = $DeleteArgs<$Schema, 'Availability'>; +export type AvailabilityDeleteManyArgs = $DeleteManyArgs<$Schema, 'Availability'>; +export type AvailabilityCountArgs = $CountArgs<$Schema, 'Availability'>; +export type AvailabilityAggregateArgs = $AggregateArgs<$Schema, 'Availability'>; +export type AvailabilityGroupByArgs = $GroupByArgs<$Schema, 'Availability'>; +export type AvailabilityWhereInput = $WhereInput<$Schema, 'Availability'>; +export type AvailabilitySelect = $SelectInput<$Schema, 'Availability'>; +export type AvailabilityInclude = $IncludeInput<$Schema, 'Availability'>; +export type AvailabilityOmit = $OmitInput<$Schema, 'Availability'>; +export type AvailabilityGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Availability', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Availability', Args, Options>; +export type SelectedCalendarFindManyArgs = $FindManyArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarFindUniqueArgs = $FindUniqueArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarFindFirstArgs = $FindFirstArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarExistsArgs = $ExistsArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarCreateArgs = $CreateArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarCreateManyArgs = $CreateManyArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarUpdateArgs = $UpdateArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarUpdateManyArgs = $UpdateManyArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarUpsertArgs = $UpsertArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarDeleteArgs = $DeleteArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarDeleteManyArgs = $DeleteManyArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarCountArgs = $CountArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarAggregateArgs = $AggregateArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarGroupByArgs = $GroupByArgs<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarWhereInput = $WhereInput<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarSelect = $SelectInput<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarInclude = $IncludeInput<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarOmit = $OmitInput<$Schema, 'SelectedCalendar'>; +export type SelectedCalendarGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SelectedCalendar', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SelectedCalendar', Args, Options>; +export type EventTypeCustomInputFindManyArgs = $FindManyArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputFindUniqueArgs = $FindUniqueArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputFindFirstArgs = $FindFirstArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputExistsArgs = $ExistsArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputCreateArgs = $CreateArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputCreateManyArgs = $CreateManyArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputUpdateArgs = $UpdateArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputUpdateManyArgs = $UpdateManyArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputUpsertArgs = $UpsertArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputDeleteArgs = $DeleteArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputDeleteManyArgs = $DeleteManyArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputCountArgs = $CountArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputAggregateArgs = $AggregateArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputGroupByArgs = $GroupByArgs<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputWhereInput = $WhereInput<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputSelect = $SelectInput<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputInclude = $IncludeInput<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputOmit = $OmitInput<$Schema, 'EventTypeCustomInput'>; +export type EventTypeCustomInputGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'EventTypeCustomInput', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'EventTypeCustomInput', Args, Options>; +export type ResetPasswordRequestFindManyArgs = $FindManyArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestFindUniqueArgs = $FindUniqueArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestFindFirstArgs = $FindFirstArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestExistsArgs = $ExistsArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestCreateArgs = $CreateArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestCreateManyArgs = $CreateManyArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestUpdateArgs = $UpdateArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestUpdateManyArgs = $UpdateManyArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestUpsertArgs = $UpsertArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestDeleteArgs = $DeleteArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestDeleteManyArgs = $DeleteManyArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestCountArgs = $CountArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestAggregateArgs = $AggregateArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestGroupByArgs = $GroupByArgs<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestWhereInput = $WhereInput<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestSelect = $SelectInput<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestInclude = $IncludeInput<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestOmit = $OmitInput<$Schema, 'ResetPasswordRequest'>; +export type ResetPasswordRequestGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ResetPasswordRequest', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ResetPasswordRequest', Args, Options>; +export type ReminderMailFindManyArgs = $FindManyArgs<$Schema, 'ReminderMail'>; +export type ReminderMailFindUniqueArgs = $FindUniqueArgs<$Schema, 'ReminderMail'>; +export type ReminderMailFindFirstArgs = $FindFirstArgs<$Schema, 'ReminderMail'>; +export type ReminderMailExistsArgs = $ExistsArgs<$Schema, 'ReminderMail'>; +export type ReminderMailCreateArgs = $CreateArgs<$Schema, 'ReminderMail'>; +export type ReminderMailCreateManyArgs = $CreateManyArgs<$Schema, 'ReminderMail'>; +export type ReminderMailCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ReminderMail'>; +export type ReminderMailUpdateArgs = $UpdateArgs<$Schema, 'ReminderMail'>; +export type ReminderMailUpdateManyArgs = $UpdateManyArgs<$Schema, 'ReminderMail'>; +export type ReminderMailUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ReminderMail'>; +export type ReminderMailUpsertArgs = $UpsertArgs<$Schema, 'ReminderMail'>; +export type ReminderMailDeleteArgs = $DeleteArgs<$Schema, 'ReminderMail'>; +export type ReminderMailDeleteManyArgs = $DeleteManyArgs<$Schema, 'ReminderMail'>; +export type ReminderMailCountArgs = $CountArgs<$Schema, 'ReminderMail'>; +export type ReminderMailAggregateArgs = $AggregateArgs<$Schema, 'ReminderMail'>; +export type ReminderMailGroupByArgs = $GroupByArgs<$Schema, 'ReminderMail'>; +export type ReminderMailWhereInput = $WhereInput<$Schema, 'ReminderMail'>; +export type ReminderMailSelect = $SelectInput<$Schema, 'ReminderMail'>; +export type ReminderMailInclude = $IncludeInput<$Schema, 'ReminderMail'>; +export type ReminderMailOmit = $OmitInput<$Schema, 'ReminderMail'>; +export type ReminderMailGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ReminderMail', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ReminderMail', Args, Options>; +export type PaymentFindManyArgs = $FindManyArgs<$Schema, 'Payment'>; +export type PaymentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Payment'>; +export type PaymentFindFirstArgs = $FindFirstArgs<$Schema, 'Payment'>; +export type PaymentExistsArgs = $ExistsArgs<$Schema, 'Payment'>; +export type PaymentCreateArgs = $CreateArgs<$Schema, 'Payment'>; +export type PaymentCreateManyArgs = $CreateManyArgs<$Schema, 'Payment'>; +export type PaymentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Payment'>; +export type PaymentUpdateArgs = $UpdateArgs<$Schema, 'Payment'>; +export type PaymentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Payment'>; +export type PaymentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Payment'>; +export type PaymentUpsertArgs = $UpsertArgs<$Schema, 'Payment'>; +export type PaymentDeleteArgs = $DeleteArgs<$Schema, 'Payment'>; +export type PaymentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Payment'>; +export type PaymentCountArgs = $CountArgs<$Schema, 'Payment'>; +export type PaymentAggregateArgs = $AggregateArgs<$Schema, 'Payment'>; +export type PaymentGroupByArgs = $GroupByArgs<$Schema, 'Payment'>; +export type PaymentWhereInput = $WhereInput<$Schema, 'Payment'>; +export type PaymentSelect = $SelectInput<$Schema, 'Payment'>; +export type PaymentInclude = $IncludeInput<$Schema, 'Payment'>; +export type PaymentOmit = $OmitInput<$Schema, 'Payment'>; +export type PaymentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Payment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Payment', Args, Options>; +export type WebhookFindManyArgs = $FindManyArgs<$Schema, 'Webhook'>; +export type WebhookFindUniqueArgs = $FindUniqueArgs<$Schema, 'Webhook'>; +export type WebhookFindFirstArgs = $FindFirstArgs<$Schema, 'Webhook'>; +export type WebhookExistsArgs = $ExistsArgs<$Schema, 'Webhook'>; +export type WebhookCreateArgs = $CreateArgs<$Schema, 'Webhook'>; +export type WebhookCreateManyArgs = $CreateManyArgs<$Schema, 'Webhook'>; +export type WebhookCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Webhook'>; +export type WebhookUpdateArgs = $UpdateArgs<$Schema, 'Webhook'>; +export type WebhookUpdateManyArgs = $UpdateManyArgs<$Schema, 'Webhook'>; +export type WebhookUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Webhook'>; +export type WebhookUpsertArgs = $UpsertArgs<$Schema, 'Webhook'>; +export type WebhookDeleteArgs = $DeleteArgs<$Schema, 'Webhook'>; +export type WebhookDeleteManyArgs = $DeleteManyArgs<$Schema, 'Webhook'>; +export type WebhookCountArgs = $CountArgs<$Schema, 'Webhook'>; +export type WebhookAggregateArgs = $AggregateArgs<$Schema, 'Webhook'>; +export type WebhookGroupByArgs = $GroupByArgs<$Schema, 'Webhook'>; +export type WebhookWhereInput = $WhereInput<$Schema, 'Webhook'>; +export type WebhookSelect = $SelectInput<$Schema, 'Webhook'>; +export type WebhookInclude = $IncludeInput<$Schema, 'Webhook'>; +export type WebhookOmit = $OmitInput<$Schema, 'Webhook'>; +export type WebhookGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Webhook', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Webhook', Args, Options>; +export type ImpersonationsFindManyArgs = $FindManyArgs<$Schema, 'Impersonations'>; +export type ImpersonationsFindUniqueArgs = $FindUniqueArgs<$Schema, 'Impersonations'>; +export type ImpersonationsFindFirstArgs = $FindFirstArgs<$Schema, 'Impersonations'>; +export type ImpersonationsExistsArgs = $ExistsArgs<$Schema, 'Impersonations'>; +export type ImpersonationsCreateArgs = $CreateArgs<$Schema, 'Impersonations'>; +export type ImpersonationsCreateManyArgs = $CreateManyArgs<$Schema, 'Impersonations'>; +export type ImpersonationsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Impersonations'>; +export type ImpersonationsUpdateArgs = $UpdateArgs<$Schema, 'Impersonations'>; +export type ImpersonationsUpdateManyArgs = $UpdateManyArgs<$Schema, 'Impersonations'>; +export type ImpersonationsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Impersonations'>; +export type ImpersonationsUpsertArgs = $UpsertArgs<$Schema, 'Impersonations'>; +export type ImpersonationsDeleteArgs = $DeleteArgs<$Schema, 'Impersonations'>; +export type ImpersonationsDeleteManyArgs = $DeleteManyArgs<$Schema, 'Impersonations'>; +export type ImpersonationsCountArgs = $CountArgs<$Schema, 'Impersonations'>; +export type ImpersonationsAggregateArgs = $AggregateArgs<$Schema, 'Impersonations'>; +export type ImpersonationsGroupByArgs = $GroupByArgs<$Schema, 'Impersonations'>; +export type ImpersonationsWhereInput = $WhereInput<$Schema, 'Impersonations'>; +export type ImpersonationsSelect = $SelectInput<$Schema, 'Impersonations'>; +export type ImpersonationsInclude = $IncludeInput<$Schema, 'Impersonations'>; +export type ImpersonationsOmit = $OmitInput<$Schema, 'Impersonations'>; +export type ImpersonationsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Impersonations', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Impersonations', Args, Options>; +export type ApiKeyFindManyArgs = $FindManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyFindUniqueArgs = $FindUniqueArgs<$Schema, 'ApiKey'>; +export type ApiKeyFindFirstArgs = $FindFirstArgs<$Schema, 'ApiKey'>; +export type ApiKeyExistsArgs = $ExistsArgs<$Schema, 'ApiKey'>; +export type ApiKeyCreateArgs = $CreateArgs<$Schema, 'ApiKey'>; +export type ApiKeyCreateManyArgs = $CreateManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpdateArgs = $UpdateArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpdateManyArgs = $UpdateManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpsertArgs = $UpsertArgs<$Schema, 'ApiKey'>; +export type ApiKeyDeleteArgs = $DeleteArgs<$Schema, 'ApiKey'>; +export type ApiKeyDeleteManyArgs = $DeleteManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyCountArgs = $CountArgs<$Schema, 'ApiKey'>; +export type ApiKeyAggregateArgs = $AggregateArgs<$Schema, 'ApiKey'>; +export type ApiKeyGroupByArgs = $GroupByArgs<$Schema, 'ApiKey'>; +export type ApiKeyWhereInput = $WhereInput<$Schema, 'ApiKey'>; +export type ApiKeySelect = $SelectInput<$Schema, 'ApiKey'>; +export type ApiKeyInclude = $IncludeInput<$Schema, 'ApiKey'>; +export type ApiKeyOmit = $OmitInput<$Schema, 'ApiKey'>; +export type ApiKeyGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ApiKey', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ApiKey', Args, Options>; +export type RateLimitFindManyArgs = $FindManyArgs<$Schema, 'RateLimit'>; +export type RateLimitFindUniqueArgs = $FindUniqueArgs<$Schema, 'RateLimit'>; +export type RateLimitFindFirstArgs = $FindFirstArgs<$Schema, 'RateLimit'>; +export type RateLimitExistsArgs = $ExistsArgs<$Schema, 'RateLimit'>; +export type RateLimitCreateArgs = $CreateArgs<$Schema, 'RateLimit'>; +export type RateLimitCreateManyArgs = $CreateManyArgs<$Schema, 'RateLimit'>; +export type RateLimitCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RateLimit'>; +export type RateLimitUpdateArgs = $UpdateArgs<$Schema, 'RateLimit'>; +export type RateLimitUpdateManyArgs = $UpdateManyArgs<$Schema, 'RateLimit'>; +export type RateLimitUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RateLimit'>; +export type RateLimitUpsertArgs = $UpsertArgs<$Schema, 'RateLimit'>; +export type RateLimitDeleteArgs = $DeleteArgs<$Schema, 'RateLimit'>; +export type RateLimitDeleteManyArgs = $DeleteManyArgs<$Schema, 'RateLimit'>; +export type RateLimitCountArgs = $CountArgs<$Schema, 'RateLimit'>; +export type RateLimitAggregateArgs = $AggregateArgs<$Schema, 'RateLimit'>; +export type RateLimitGroupByArgs = $GroupByArgs<$Schema, 'RateLimit'>; +export type RateLimitWhereInput = $WhereInput<$Schema, 'RateLimit'>; +export type RateLimitSelect = $SelectInput<$Schema, 'RateLimit'>; +export type RateLimitInclude = $IncludeInput<$Schema, 'RateLimit'>; +export type RateLimitOmit = $OmitInput<$Schema, 'RateLimit'>; +export type RateLimitGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RateLimit', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RateLimit', Args, Options>; +export type HashedLinkFindManyArgs = $FindManyArgs<$Schema, 'HashedLink'>; +export type HashedLinkFindUniqueArgs = $FindUniqueArgs<$Schema, 'HashedLink'>; +export type HashedLinkFindFirstArgs = $FindFirstArgs<$Schema, 'HashedLink'>; +export type HashedLinkExistsArgs = $ExistsArgs<$Schema, 'HashedLink'>; +export type HashedLinkCreateArgs = $CreateArgs<$Schema, 'HashedLink'>; +export type HashedLinkCreateManyArgs = $CreateManyArgs<$Schema, 'HashedLink'>; +export type HashedLinkCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'HashedLink'>; +export type HashedLinkUpdateArgs = $UpdateArgs<$Schema, 'HashedLink'>; +export type HashedLinkUpdateManyArgs = $UpdateManyArgs<$Schema, 'HashedLink'>; +export type HashedLinkUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'HashedLink'>; +export type HashedLinkUpsertArgs = $UpsertArgs<$Schema, 'HashedLink'>; +export type HashedLinkDeleteArgs = $DeleteArgs<$Schema, 'HashedLink'>; +export type HashedLinkDeleteManyArgs = $DeleteManyArgs<$Schema, 'HashedLink'>; +export type HashedLinkCountArgs = $CountArgs<$Schema, 'HashedLink'>; +export type HashedLinkAggregateArgs = $AggregateArgs<$Schema, 'HashedLink'>; +export type HashedLinkGroupByArgs = $GroupByArgs<$Schema, 'HashedLink'>; +export type HashedLinkWhereInput = $WhereInput<$Schema, 'HashedLink'>; +export type HashedLinkSelect = $SelectInput<$Schema, 'HashedLink'>; +export type HashedLinkInclude = $IncludeInput<$Schema, 'HashedLink'>; +export type HashedLinkOmit = $OmitInput<$Schema, 'HashedLink'>; +export type HashedLinkGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'HashedLink', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'HashedLink', Args, Options>; +export type AccountFindManyArgs = $FindManyArgs<$Schema, 'Account'>; +export type AccountFindUniqueArgs = $FindUniqueArgs<$Schema, 'Account'>; +export type AccountFindFirstArgs = $FindFirstArgs<$Schema, 'Account'>; +export type AccountExistsArgs = $ExistsArgs<$Schema, 'Account'>; +export type AccountCreateArgs = $CreateArgs<$Schema, 'Account'>; +export type AccountCreateManyArgs = $CreateManyArgs<$Schema, 'Account'>; +export type AccountCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Account'>; +export type AccountUpdateArgs = $UpdateArgs<$Schema, 'Account'>; +export type AccountUpdateManyArgs = $UpdateManyArgs<$Schema, 'Account'>; +export type AccountUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Account'>; +export type AccountUpsertArgs = $UpsertArgs<$Schema, 'Account'>; +export type AccountDeleteArgs = $DeleteArgs<$Schema, 'Account'>; +export type AccountDeleteManyArgs = $DeleteManyArgs<$Schema, 'Account'>; +export type AccountCountArgs = $CountArgs<$Schema, 'Account'>; +export type AccountAggregateArgs = $AggregateArgs<$Schema, 'Account'>; +export type AccountGroupByArgs = $GroupByArgs<$Schema, 'Account'>; +export type AccountWhereInput = $WhereInput<$Schema, 'Account'>; +export type AccountSelect = $SelectInput<$Schema, 'Account'>; +export type AccountInclude = $IncludeInput<$Schema, 'Account'>; +export type AccountOmit = $OmitInput<$Schema, 'Account'>; +export type AccountGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Account', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Account', Args, Options>; +export type SessionFindManyArgs = $FindManyArgs<$Schema, 'Session'>; +export type SessionFindUniqueArgs = $FindUniqueArgs<$Schema, 'Session'>; +export type SessionFindFirstArgs = $FindFirstArgs<$Schema, 'Session'>; +export type SessionExistsArgs = $ExistsArgs<$Schema, 'Session'>; +export type SessionCreateArgs = $CreateArgs<$Schema, 'Session'>; +export type SessionCreateManyArgs = $CreateManyArgs<$Schema, 'Session'>; +export type SessionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Session'>; +export type SessionUpdateArgs = $UpdateArgs<$Schema, 'Session'>; +export type SessionUpdateManyArgs = $UpdateManyArgs<$Schema, 'Session'>; +export type SessionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Session'>; +export type SessionUpsertArgs = $UpsertArgs<$Schema, 'Session'>; +export type SessionDeleteArgs = $DeleteArgs<$Schema, 'Session'>; +export type SessionDeleteManyArgs = $DeleteManyArgs<$Schema, 'Session'>; +export type SessionCountArgs = $CountArgs<$Schema, 'Session'>; +export type SessionAggregateArgs = $AggregateArgs<$Schema, 'Session'>; +export type SessionGroupByArgs = $GroupByArgs<$Schema, 'Session'>; +export type SessionWhereInput = $WhereInput<$Schema, 'Session'>; +export type SessionSelect = $SelectInput<$Schema, 'Session'>; +export type SessionInclude = $IncludeInput<$Schema, 'Session'>; +export type SessionOmit = $OmitInput<$Schema, 'Session'>; +export type SessionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Session', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Session', Args, Options>; +export type AppFindManyArgs = $FindManyArgs<$Schema, 'App'>; +export type AppFindUniqueArgs = $FindUniqueArgs<$Schema, 'App'>; +export type AppFindFirstArgs = $FindFirstArgs<$Schema, 'App'>; +export type AppExistsArgs = $ExistsArgs<$Schema, 'App'>; +export type AppCreateArgs = $CreateArgs<$Schema, 'App'>; +export type AppCreateManyArgs = $CreateManyArgs<$Schema, 'App'>; +export type AppCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'App'>; +export type AppUpdateArgs = $UpdateArgs<$Schema, 'App'>; +export type AppUpdateManyArgs = $UpdateManyArgs<$Schema, 'App'>; +export type AppUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'App'>; +export type AppUpsertArgs = $UpsertArgs<$Schema, 'App'>; +export type AppDeleteArgs = $DeleteArgs<$Schema, 'App'>; +export type AppDeleteManyArgs = $DeleteManyArgs<$Schema, 'App'>; +export type AppCountArgs = $CountArgs<$Schema, 'App'>; +export type AppAggregateArgs = $AggregateArgs<$Schema, 'App'>; +export type AppGroupByArgs = $GroupByArgs<$Schema, 'App'>; +export type AppWhereInput = $WhereInput<$Schema, 'App'>; +export type AppSelect = $SelectInput<$Schema, 'App'>; +export type AppInclude = $IncludeInput<$Schema, 'App'>; +export type AppOmit = $OmitInput<$Schema, 'App'>; +export type AppGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'App', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'App', Args, Options>; +export type App_RoutingForms_FormFindManyArgs = $FindManyArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormFindUniqueArgs = $FindUniqueArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormFindFirstArgs = $FindFirstArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormExistsArgs = $ExistsArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormCreateArgs = $CreateArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormCreateManyArgs = $CreateManyArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormUpdateArgs = $UpdateArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormUpdateManyArgs = $UpdateManyArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormUpsertArgs = $UpsertArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormDeleteArgs = $DeleteArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormDeleteManyArgs = $DeleteManyArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormCountArgs = $CountArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormAggregateArgs = $AggregateArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormGroupByArgs = $GroupByArgs<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormWhereInput = $WhereInput<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormSelect = $SelectInput<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormInclude = $IncludeInput<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormOmit = $OmitInput<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'App_RoutingForms_Form', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'App_RoutingForms_Form', Args, Options>; +export type App_RoutingForms_FormResponseFindManyArgs = $FindManyArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseFindUniqueArgs = $FindUniqueArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseFindFirstArgs = $FindFirstArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseExistsArgs = $ExistsArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseCreateArgs = $CreateArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseCreateManyArgs = $CreateManyArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'App_RoutingForms_FormResponse' +>; +export type App_RoutingForms_FormResponseUpdateArgs = $UpdateArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseUpdateManyArgs = $UpdateManyArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'App_RoutingForms_FormResponse' +>; +export type App_RoutingForms_FormResponseUpsertArgs = $UpsertArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseDeleteArgs = $DeleteArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseDeleteManyArgs = $DeleteManyArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseCountArgs = $CountArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseAggregateArgs = $AggregateArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseGroupByArgs = $GroupByArgs<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseWhereInput = $WhereInput<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseSelect = $SelectInput<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseInclude = $IncludeInput<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseOmit = $OmitInput<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_FormResponseGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'App_RoutingForms_FormResponse', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'App_RoutingForms_FormResponse', Args, Options>; +export type App_RoutingForms_QueuedFormResponseFindManyArgs = $FindManyArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseFindUniqueArgs = $FindUniqueArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseFindFirstArgs = $FindFirstArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseExistsArgs = $ExistsArgs<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseCreateArgs = $CreateArgs<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseCreateManyArgs = $CreateManyArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseUpdateArgs = $UpdateArgs<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseUpdateManyArgs = $UpdateManyArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseUpsertArgs = $UpsertArgs<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseDeleteArgs = $DeleteArgs<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseDeleteManyArgs = $DeleteManyArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseCountArgs = $CountArgs<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseAggregateArgs = $AggregateArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseGroupByArgs = $GroupByArgs< + $Schema, + 'App_RoutingForms_QueuedFormResponse' +>; +export type App_RoutingForms_QueuedFormResponseWhereInput = $WhereInput<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseSelect = $SelectInput<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseInclude = $IncludeInput<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseOmit = $OmitInput<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type App_RoutingForms_QueuedFormResponseGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'App_RoutingForms_QueuedFormResponse', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'App_RoutingForms_QueuedFormResponse', Args, Options>; +export type RoutingFormResponseFieldFindManyArgs = $FindManyArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldFindUniqueArgs = $FindUniqueArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldFindFirstArgs = $FindFirstArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldExistsArgs = $ExistsArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldCreateArgs = $CreateArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldCreateManyArgs = $CreateManyArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'RoutingFormResponseField' +>; +export type RoutingFormResponseFieldUpdateArgs = $UpdateArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldUpdateManyArgs = $UpdateManyArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'RoutingFormResponseField' +>; +export type RoutingFormResponseFieldUpsertArgs = $UpsertArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldDeleteArgs = $DeleteArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldDeleteManyArgs = $DeleteManyArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldCountArgs = $CountArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldAggregateArgs = $AggregateArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldGroupByArgs = $GroupByArgs<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldWhereInput = $WhereInput<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldSelect = $SelectInput<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldInclude = $IncludeInput<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldOmit = $OmitInput<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponseFieldGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RoutingFormResponseField', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RoutingFormResponseField', Args, Options>; +export type RoutingFormResponseFindManyArgs = $FindManyArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseFindUniqueArgs = $FindUniqueArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseFindFirstArgs = $FindFirstArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseExistsArgs = $ExistsArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseCreateArgs = $CreateArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseCreateManyArgs = $CreateManyArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseUpdateArgs = $UpdateArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseUpdateManyArgs = $UpdateManyArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseUpsertArgs = $UpsertArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseDeleteArgs = $DeleteArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseDeleteManyArgs = $DeleteManyArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseCountArgs = $CountArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseAggregateArgs = $AggregateArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseGroupByArgs = $GroupByArgs<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseWhereInput = $WhereInput<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseSelect = $SelectInput<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseInclude = $IncludeInput<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseOmit = $OmitInput<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RoutingFormResponse', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RoutingFormResponse', Args, Options>; +export type RoutingFormResponseDenormalizedFindManyArgs = $FindManyArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedFindUniqueArgs = $FindUniqueArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedFindFirstArgs = $FindFirstArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedExistsArgs = $ExistsArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedCreateArgs = $CreateArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedCreateManyArgs = $CreateManyArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'RoutingFormResponseDenormalized' +>; +export type RoutingFormResponseDenormalizedUpdateArgs = $UpdateArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedUpdateManyArgs = $UpdateManyArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'RoutingFormResponseDenormalized' +>; +export type RoutingFormResponseDenormalizedUpsertArgs = $UpsertArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedDeleteArgs = $DeleteArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedDeleteManyArgs = $DeleteManyArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedCountArgs = $CountArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedAggregateArgs = $AggregateArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedGroupByArgs = $GroupByArgs<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedWhereInput = $WhereInput<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedSelect = $SelectInput<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedInclude = $IncludeInput<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedOmit = $OmitInput<$Schema, 'RoutingFormResponseDenormalized'>; +export type RoutingFormResponseDenormalizedGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RoutingFormResponseDenormalized', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RoutingFormResponseDenormalized', Args, Options>; +export type FeedbackFindManyArgs = $FindManyArgs<$Schema, 'Feedback'>; +export type FeedbackFindUniqueArgs = $FindUniqueArgs<$Schema, 'Feedback'>; +export type FeedbackFindFirstArgs = $FindFirstArgs<$Schema, 'Feedback'>; +export type FeedbackExistsArgs = $ExistsArgs<$Schema, 'Feedback'>; +export type FeedbackCreateArgs = $CreateArgs<$Schema, 'Feedback'>; +export type FeedbackCreateManyArgs = $CreateManyArgs<$Schema, 'Feedback'>; +export type FeedbackCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Feedback'>; +export type FeedbackUpdateArgs = $UpdateArgs<$Schema, 'Feedback'>; +export type FeedbackUpdateManyArgs = $UpdateManyArgs<$Schema, 'Feedback'>; +export type FeedbackUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Feedback'>; +export type FeedbackUpsertArgs = $UpsertArgs<$Schema, 'Feedback'>; +export type FeedbackDeleteArgs = $DeleteArgs<$Schema, 'Feedback'>; +export type FeedbackDeleteManyArgs = $DeleteManyArgs<$Schema, 'Feedback'>; +export type FeedbackCountArgs = $CountArgs<$Schema, 'Feedback'>; +export type FeedbackAggregateArgs = $AggregateArgs<$Schema, 'Feedback'>; +export type FeedbackGroupByArgs = $GroupByArgs<$Schema, 'Feedback'>; +export type FeedbackWhereInput = $WhereInput<$Schema, 'Feedback'>; +export type FeedbackSelect = $SelectInput<$Schema, 'Feedback'>; +export type FeedbackInclude = $IncludeInput<$Schema, 'Feedback'>; +export type FeedbackOmit = $OmitInput<$Schema, 'Feedback'>; +export type FeedbackGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Feedback', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Feedback', Args, Options>; +export type WorkflowStepFindManyArgs = $FindManyArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepFindFirstArgs = $FindFirstArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepExistsArgs = $ExistsArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepCreateArgs = $CreateArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepCreateManyArgs = $CreateManyArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepUpdateArgs = $UpdateArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepUpsertArgs = $UpsertArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepDeleteArgs = $DeleteArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepCountArgs = $CountArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepAggregateArgs = $AggregateArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepGroupByArgs = $GroupByArgs<$Schema, 'WorkflowStep'>; +export type WorkflowStepWhereInput = $WhereInput<$Schema, 'WorkflowStep'>; +export type WorkflowStepSelect = $SelectInput<$Schema, 'WorkflowStep'>; +export type WorkflowStepInclude = $IncludeInput<$Schema, 'WorkflowStep'>; +export type WorkflowStepOmit = $OmitInput<$Schema, 'WorkflowStep'>; +export type WorkflowStepGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkflowStep', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkflowStep', Args, Options>; +export type WorkflowFindManyArgs = $FindManyArgs<$Schema, 'Workflow'>; +export type WorkflowFindUniqueArgs = $FindUniqueArgs<$Schema, 'Workflow'>; +export type WorkflowFindFirstArgs = $FindFirstArgs<$Schema, 'Workflow'>; +export type WorkflowExistsArgs = $ExistsArgs<$Schema, 'Workflow'>; +export type WorkflowCreateArgs = $CreateArgs<$Schema, 'Workflow'>; +export type WorkflowCreateManyArgs = $CreateManyArgs<$Schema, 'Workflow'>; +export type WorkflowCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Workflow'>; +export type WorkflowUpdateArgs = $UpdateArgs<$Schema, 'Workflow'>; +export type WorkflowUpdateManyArgs = $UpdateManyArgs<$Schema, 'Workflow'>; +export type WorkflowUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Workflow'>; +export type WorkflowUpsertArgs = $UpsertArgs<$Schema, 'Workflow'>; +export type WorkflowDeleteArgs = $DeleteArgs<$Schema, 'Workflow'>; +export type WorkflowDeleteManyArgs = $DeleteManyArgs<$Schema, 'Workflow'>; +export type WorkflowCountArgs = $CountArgs<$Schema, 'Workflow'>; +export type WorkflowAggregateArgs = $AggregateArgs<$Schema, 'Workflow'>; +export type WorkflowGroupByArgs = $GroupByArgs<$Schema, 'Workflow'>; +export type WorkflowWhereInput = $WhereInput<$Schema, 'Workflow'>; +export type WorkflowSelect = $SelectInput<$Schema, 'Workflow'>; +export type WorkflowInclude = $IncludeInput<$Schema, 'Workflow'>; +export type WorkflowOmit = $OmitInput<$Schema, 'Workflow'>; +export type WorkflowGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Workflow', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Workflow', Args, Options>; +export type AIPhoneCallConfigurationFindManyArgs = $FindManyArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationFindUniqueArgs = $FindUniqueArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationFindFirstArgs = $FindFirstArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationExistsArgs = $ExistsArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationCreateArgs = $CreateArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationCreateManyArgs = $CreateManyArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'AIPhoneCallConfiguration' +>; +export type AIPhoneCallConfigurationUpdateArgs = $UpdateArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationUpdateManyArgs = $UpdateManyArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'AIPhoneCallConfiguration' +>; +export type AIPhoneCallConfigurationUpsertArgs = $UpsertArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationDeleteArgs = $DeleteArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationDeleteManyArgs = $DeleteManyArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationCountArgs = $CountArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationAggregateArgs = $AggregateArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationGroupByArgs = $GroupByArgs<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationWhereInput = $WhereInput<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationSelect = $SelectInput<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationInclude = $IncludeInput<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationOmit = $OmitInput<$Schema, 'AIPhoneCallConfiguration'>; +export type AIPhoneCallConfigurationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'AIPhoneCallConfiguration', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'AIPhoneCallConfiguration', Args, Options>; +export type WorkflowsOnEventTypesFindManyArgs = $FindManyArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesFindFirstArgs = $FindFirstArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesExistsArgs = $ExistsArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesCreateArgs = $CreateArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesCreateManyArgs = $CreateManyArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesUpdateArgs = $UpdateArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesUpsertArgs = $UpsertArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesDeleteArgs = $DeleteArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesCountArgs = $CountArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesAggregateArgs = $AggregateArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesGroupByArgs = $GroupByArgs<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesWhereInput = $WhereInput<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesSelect = $SelectInput<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesInclude = $IncludeInput<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesOmit = $OmitInput<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnEventTypesGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkflowsOnEventTypes', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkflowsOnEventTypes', Args, Options>; +export type WorkflowsOnTeamsFindManyArgs = $FindManyArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsFindFirstArgs = $FindFirstArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsExistsArgs = $ExistsArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsCreateArgs = $CreateArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsCreateManyArgs = $CreateManyArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsUpdateArgs = $UpdateArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsUpsertArgs = $UpsertArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsDeleteArgs = $DeleteArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsCountArgs = $CountArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsAggregateArgs = $AggregateArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsGroupByArgs = $GroupByArgs<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsWhereInput = $WhereInput<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsSelect = $SelectInput<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsInclude = $IncludeInput<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsOmit = $OmitInput<$Schema, 'WorkflowsOnTeams'>; +export type WorkflowsOnTeamsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkflowsOnTeams', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkflowsOnTeams', Args, Options>; +export type DeploymentFindManyArgs = $FindManyArgs<$Schema, 'Deployment'>; +export type DeploymentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Deployment'>; +export type DeploymentFindFirstArgs = $FindFirstArgs<$Schema, 'Deployment'>; +export type DeploymentExistsArgs = $ExistsArgs<$Schema, 'Deployment'>; +export type DeploymentCreateArgs = $CreateArgs<$Schema, 'Deployment'>; +export type DeploymentCreateManyArgs = $CreateManyArgs<$Schema, 'Deployment'>; +export type DeploymentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Deployment'>; +export type DeploymentUpdateArgs = $UpdateArgs<$Schema, 'Deployment'>; +export type DeploymentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Deployment'>; +export type DeploymentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Deployment'>; +export type DeploymentUpsertArgs = $UpsertArgs<$Schema, 'Deployment'>; +export type DeploymentDeleteArgs = $DeleteArgs<$Schema, 'Deployment'>; +export type DeploymentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Deployment'>; +export type DeploymentCountArgs = $CountArgs<$Schema, 'Deployment'>; +export type DeploymentAggregateArgs = $AggregateArgs<$Schema, 'Deployment'>; +export type DeploymentGroupByArgs = $GroupByArgs<$Schema, 'Deployment'>; +export type DeploymentWhereInput = $WhereInput<$Schema, 'Deployment'>; +export type DeploymentSelect = $SelectInput<$Schema, 'Deployment'>; +export type DeploymentInclude = $IncludeInput<$Schema, 'Deployment'>; +export type DeploymentOmit = $OmitInput<$Schema, 'Deployment'>; +export type DeploymentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Deployment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Deployment', Args, Options>; +export type WorkflowReminderFindManyArgs = $FindManyArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderFindFirstArgs = $FindFirstArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderExistsArgs = $ExistsArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderCreateArgs = $CreateArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderCreateManyArgs = $CreateManyArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderUpdateArgs = $UpdateArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderUpsertArgs = $UpsertArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderDeleteArgs = $DeleteArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderCountArgs = $CountArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderAggregateArgs = $AggregateArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderGroupByArgs = $GroupByArgs<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderWhereInput = $WhereInput<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderSelect = $SelectInput<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderInclude = $IncludeInput<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderOmit = $OmitInput<$Schema, 'WorkflowReminder'>; +export type WorkflowReminderGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkflowReminder', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkflowReminder', Args, Options>; +export type WebhookScheduledTriggersFindManyArgs = $FindManyArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersFindUniqueArgs = $FindUniqueArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersFindFirstArgs = $FindFirstArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersExistsArgs = $ExistsArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersCreateArgs = $CreateArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersCreateManyArgs = $CreateManyArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'WebhookScheduledTriggers' +>; +export type WebhookScheduledTriggersUpdateArgs = $UpdateArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersUpdateManyArgs = $UpdateManyArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'WebhookScheduledTriggers' +>; +export type WebhookScheduledTriggersUpsertArgs = $UpsertArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersDeleteArgs = $DeleteArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersDeleteManyArgs = $DeleteManyArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersCountArgs = $CountArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersAggregateArgs = $AggregateArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersGroupByArgs = $GroupByArgs<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersWhereInput = $WhereInput<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersSelect = $SelectInput<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersInclude = $IncludeInput<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersOmit = $OmitInput<$Schema, 'WebhookScheduledTriggers'>; +export type WebhookScheduledTriggersGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WebhookScheduledTriggers', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WebhookScheduledTriggers', Args, Options>; +export type BookingSeatFindManyArgs = $FindManyArgs<$Schema, 'BookingSeat'>; +export type BookingSeatFindUniqueArgs = $FindUniqueArgs<$Schema, 'BookingSeat'>; +export type BookingSeatFindFirstArgs = $FindFirstArgs<$Schema, 'BookingSeat'>; +export type BookingSeatExistsArgs = $ExistsArgs<$Schema, 'BookingSeat'>; +export type BookingSeatCreateArgs = $CreateArgs<$Schema, 'BookingSeat'>; +export type BookingSeatCreateManyArgs = $CreateManyArgs<$Schema, 'BookingSeat'>; +export type BookingSeatCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BookingSeat'>; +export type BookingSeatUpdateArgs = $UpdateArgs<$Schema, 'BookingSeat'>; +export type BookingSeatUpdateManyArgs = $UpdateManyArgs<$Schema, 'BookingSeat'>; +export type BookingSeatUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BookingSeat'>; +export type BookingSeatUpsertArgs = $UpsertArgs<$Schema, 'BookingSeat'>; +export type BookingSeatDeleteArgs = $DeleteArgs<$Schema, 'BookingSeat'>; +export type BookingSeatDeleteManyArgs = $DeleteManyArgs<$Schema, 'BookingSeat'>; +export type BookingSeatCountArgs = $CountArgs<$Schema, 'BookingSeat'>; +export type BookingSeatAggregateArgs = $AggregateArgs<$Schema, 'BookingSeat'>; +export type BookingSeatGroupByArgs = $GroupByArgs<$Schema, 'BookingSeat'>; +export type BookingSeatWhereInput = $WhereInput<$Schema, 'BookingSeat'>; +export type BookingSeatSelect = $SelectInput<$Schema, 'BookingSeat'>; +export type BookingSeatInclude = $IncludeInput<$Schema, 'BookingSeat'>; +export type BookingSeatOmit = $OmitInput<$Schema, 'BookingSeat'>; +export type BookingSeatGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BookingSeat', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BookingSeat', Args, Options>; +export type VerifiedNumberFindManyArgs = $FindManyArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberFindUniqueArgs = $FindUniqueArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberFindFirstArgs = $FindFirstArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberExistsArgs = $ExistsArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberCreateArgs = $CreateArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberCreateManyArgs = $CreateManyArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberUpdateArgs = $UpdateArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberUpdateManyArgs = $UpdateManyArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberUpsertArgs = $UpsertArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberDeleteArgs = $DeleteArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberDeleteManyArgs = $DeleteManyArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberCountArgs = $CountArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberAggregateArgs = $AggregateArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberGroupByArgs = $GroupByArgs<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberWhereInput = $WhereInput<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberSelect = $SelectInput<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberInclude = $IncludeInput<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberOmit = $OmitInput<$Schema, 'VerifiedNumber'>; +export type VerifiedNumberGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'VerifiedNumber', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'VerifiedNumber', Args, Options>; +export type VerifiedEmailFindManyArgs = $FindManyArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailFindUniqueArgs = $FindUniqueArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailFindFirstArgs = $FindFirstArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailExistsArgs = $ExistsArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailCreateArgs = $CreateArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailCreateManyArgs = $CreateManyArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailUpdateArgs = $UpdateArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailUpdateManyArgs = $UpdateManyArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailUpsertArgs = $UpsertArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailDeleteArgs = $DeleteArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailDeleteManyArgs = $DeleteManyArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailCountArgs = $CountArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailAggregateArgs = $AggregateArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailGroupByArgs = $GroupByArgs<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailWhereInput = $WhereInput<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailSelect = $SelectInput<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailInclude = $IncludeInput<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailOmit = $OmitInput<$Schema, 'VerifiedEmail'>; +export type VerifiedEmailGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'VerifiedEmail', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'VerifiedEmail', Args, Options>; +export type FeatureFindManyArgs = $FindManyArgs<$Schema, 'Feature'>; +export type FeatureFindUniqueArgs = $FindUniqueArgs<$Schema, 'Feature'>; +export type FeatureFindFirstArgs = $FindFirstArgs<$Schema, 'Feature'>; +export type FeatureExistsArgs = $ExistsArgs<$Schema, 'Feature'>; +export type FeatureCreateArgs = $CreateArgs<$Schema, 'Feature'>; +export type FeatureCreateManyArgs = $CreateManyArgs<$Schema, 'Feature'>; +export type FeatureCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Feature'>; +export type FeatureUpdateArgs = $UpdateArgs<$Schema, 'Feature'>; +export type FeatureUpdateManyArgs = $UpdateManyArgs<$Schema, 'Feature'>; +export type FeatureUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Feature'>; +export type FeatureUpsertArgs = $UpsertArgs<$Schema, 'Feature'>; +export type FeatureDeleteArgs = $DeleteArgs<$Schema, 'Feature'>; +export type FeatureDeleteManyArgs = $DeleteManyArgs<$Schema, 'Feature'>; +export type FeatureCountArgs = $CountArgs<$Schema, 'Feature'>; +export type FeatureAggregateArgs = $AggregateArgs<$Schema, 'Feature'>; +export type FeatureGroupByArgs = $GroupByArgs<$Schema, 'Feature'>; +export type FeatureWhereInput = $WhereInput<$Schema, 'Feature'>; +export type FeatureSelect = $SelectInput<$Schema, 'Feature'>; +export type FeatureInclude = $IncludeInput<$Schema, 'Feature'>; +export type FeatureOmit = $OmitInput<$Schema, 'Feature'>; +export type FeatureGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Feature', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Feature', Args, Options>; +export type UserFeaturesFindManyArgs = $FindManyArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesFindUniqueArgs = $FindUniqueArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesFindFirstArgs = $FindFirstArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesExistsArgs = $ExistsArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesCreateArgs = $CreateArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesCreateManyArgs = $CreateManyArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesUpdateArgs = $UpdateArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesUpdateManyArgs = $UpdateManyArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesUpsertArgs = $UpsertArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesDeleteArgs = $DeleteArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesDeleteManyArgs = $DeleteManyArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesCountArgs = $CountArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesAggregateArgs = $AggregateArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesGroupByArgs = $GroupByArgs<$Schema, 'UserFeatures'>; +export type UserFeaturesWhereInput = $WhereInput<$Schema, 'UserFeatures'>; +export type UserFeaturesSelect = $SelectInput<$Schema, 'UserFeatures'>; +export type UserFeaturesInclude = $IncludeInput<$Schema, 'UserFeatures'>; +export type UserFeaturesOmit = $OmitInput<$Schema, 'UserFeatures'>; +export type UserFeaturesGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'UserFeatures', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'UserFeatures', Args, Options>; +export type TeamFeaturesFindManyArgs = $FindManyArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesFindUniqueArgs = $FindUniqueArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesFindFirstArgs = $FindFirstArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesExistsArgs = $ExistsArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesCreateArgs = $CreateArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesCreateManyArgs = $CreateManyArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesUpdateArgs = $UpdateArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesUpdateManyArgs = $UpdateManyArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesUpsertArgs = $UpsertArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesDeleteArgs = $DeleteArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesDeleteManyArgs = $DeleteManyArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesCountArgs = $CountArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesAggregateArgs = $AggregateArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesGroupByArgs = $GroupByArgs<$Schema, 'TeamFeatures'>; +export type TeamFeaturesWhereInput = $WhereInput<$Schema, 'TeamFeatures'>; +export type TeamFeaturesSelect = $SelectInput<$Schema, 'TeamFeatures'>; +export type TeamFeaturesInclude = $IncludeInput<$Schema, 'TeamFeatures'>; +export type TeamFeaturesOmit = $OmitInput<$Schema, 'TeamFeatures'>; +export type TeamFeaturesGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TeamFeatures', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TeamFeatures', Args, Options>; +export type SelectedSlotsFindManyArgs = $FindManyArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsFindUniqueArgs = $FindUniqueArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsFindFirstArgs = $FindFirstArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsExistsArgs = $ExistsArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsCreateArgs = $CreateArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsCreateManyArgs = $CreateManyArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsUpdateArgs = $UpdateArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsUpdateManyArgs = $UpdateManyArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsUpsertArgs = $UpsertArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsDeleteArgs = $DeleteArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsDeleteManyArgs = $DeleteManyArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsCountArgs = $CountArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsAggregateArgs = $AggregateArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsGroupByArgs = $GroupByArgs<$Schema, 'SelectedSlots'>; +export type SelectedSlotsWhereInput = $WhereInput<$Schema, 'SelectedSlots'>; +export type SelectedSlotsSelect = $SelectInput<$Schema, 'SelectedSlots'>; +export type SelectedSlotsInclude = $IncludeInput<$Schema, 'SelectedSlots'>; +export type SelectedSlotsOmit = $OmitInput<$Schema, 'SelectedSlots'>; +export type SelectedSlotsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SelectedSlots', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SelectedSlots', Args, Options>; +export type OAuthClientFindManyArgs = $FindManyArgs<$Schema, 'OAuthClient'>; +export type OAuthClientFindUniqueArgs = $FindUniqueArgs<$Schema, 'OAuthClient'>; +export type OAuthClientFindFirstArgs = $FindFirstArgs<$Schema, 'OAuthClient'>; +export type OAuthClientExistsArgs = $ExistsArgs<$Schema, 'OAuthClient'>; +export type OAuthClientCreateArgs = $CreateArgs<$Schema, 'OAuthClient'>; +export type OAuthClientCreateManyArgs = $CreateManyArgs<$Schema, 'OAuthClient'>; +export type OAuthClientCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'OAuthClient'>; +export type OAuthClientUpdateArgs = $UpdateArgs<$Schema, 'OAuthClient'>; +export type OAuthClientUpdateManyArgs = $UpdateManyArgs<$Schema, 'OAuthClient'>; +export type OAuthClientUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'OAuthClient'>; +export type OAuthClientUpsertArgs = $UpsertArgs<$Schema, 'OAuthClient'>; +export type OAuthClientDeleteArgs = $DeleteArgs<$Schema, 'OAuthClient'>; +export type OAuthClientDeleteManyArgs = $DeleteManyArgs<$Schema, 'OAuthClient'>; +export type OAuthClientCountArgs = $CountArgs<$Schema, 'OAuthClient'>; +export type OAuthClientAggregateArgs = $AggregateArgs<$Schema, 'OAuthClient'>; +export type OAuthClientGroupByArgs = $GroupByArgs<$Schema, 'OAuthClient'>; +export type OAuthClientWhereInput = $WhereInput<$Schema, 'OAuthClient'>; +export type OAuthClientSelect = $SelectInput<$Schema, 'OAuthClient'>; +export type OAuthClientInclude = $IncludeInput<$Schema, 'OAuthClient'>; +export type OAuthClientOmit = $OmitInput<$Schema, 'OAuthClient'>; +export type OAuthClientGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OAuthClient', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OAuthClient', Args, Options>; +export type AccessCodeFindManyArgs = $FindManyArgs<$Schema, 'AccessCode'>; +export type AccessCodeFindUniqueArgs = $FindUniqueArgs<$Schema, 'AccessCode'>; +export type AccessCodeFindFirstArgs = $FindFirstArgs<$Schema, 'AccessCode'>; +export type AccessCodeExistsArgs = $ExistsArgs<$Schema, 'AccessCode'>; +export type AccessCodeCreateArgs = $CreateArgs<$Schema, 'AccessCode'>; +export type AccessCodeCreateManyArgs = $CreateManyArgs<$Schema, 'AccessCode'>; +export type AccessCodeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'AccessCode'>; +export type AccessCodeUpdateArgs = $UpdateArgs<$Schema, 'AccessCode'>; +export type AccessCodeUpdateManyArgs = $UpdateManyArgs<$Schema, 'AccessCode'>; +export type AccessCodeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'AccessCode'>; +export type AccessCodeUpsertArgs = $UpsertArgs<$Schema, 'AccessCode'>; +export type AccessCodeDeleteArgs = $DeleteArgs<$Schema, 'AccessCode'>; +export type AccessCodeDeleteManyArgs = $DeleteManyArgs<$Schema, 'AccessCode'>; +export type AccessCodeCountArgs = $CountArgs<$Schema, 'AccessCode'>; +export type AccessCodeAggregateArgs = $AggregateArgs<$Schema, 'AccessCode'>; +export type AccessCodeGroupByArgs = $GroupByArgs<$Schema, 'AccessCode'>; +export type AccessCodeWhereInput = $WhereInput<$Schema, 'AccessCode'>; +export type AccessCodeSelect = $SelectInput<$Schema, 'AccessCode'>; +export type AccessCodeInclude = $IncludeInput<$Schema, 'AccessCode'>; +export type AccessCodeOmit = $OmitInput<$Schema, 'AccessCode'>; +export type AccessCodeGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'AccessCode', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'AccessCode', Args, Options>; +export type BookingTimeStatusFindManyArgs = $FindManyArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusFindUniqueArgs = $FindUniqueArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusFindFirstArgs = $FindFirstArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusExistsArgs = $ExistsArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusCreateArgs = $CreateArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusCreateManyArgs = $CreateManyArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusUpdateArgs = $UpdateArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusUpdateManyArgs = $UpdateManyArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusUpsertArgs = $UpsertArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusDeleteArgs = $DeleteArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusDeleteManyArgs = $DeleteManyArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusCountArgs = $CountArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusAggregateArgs = $AggregateArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusGroupByArgs = $GroupByArgs<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusWhereInput = $WhereInput<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusSelect = $SelectInput<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusInclude = $IncludeInput<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusOmit = $OmitInput<$Schema, 'BookingTimeStatus'>; +export type BookingTimeStatusGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BookingTimeStatus', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BookingTimeStatus', Args, Options>; +export type BookingDenormalizedFindManyArgs = $FindManyArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedFindUniqueArgs = $FindUniqueArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedFindFirstArgs = $FindFirstArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedExistsArgs = $ExistsArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedCreateArgs = $CreateArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedCreateManyArgs = $CreateManyArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedUpdateArgs = $UpdateArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedUpdateManyArgs = $UpdateManyArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedUpsertArgs = $UpsertArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedDeleteArgs = $DeleteArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedDeleteManyArgs = $DeleteManyArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedCountArgs = $CountArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedAggregateArgs = $AggregateArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedGroupByArgs = $GroupByArgs<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedWhereInput = $WhereInput<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedSelect = $SelectInput<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedInclude = $IncludeInput<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedOmit = $OmitInput<$Schema, 'BookingDenormalized'>; +export type BookingDenormalizedGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BookingDenormalized', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BookingDenormalized', Args, Options>; +export type BookingTimeStatusDenormalizedFindManyArgs = $FindManyArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedFindUniqueArgs = $FindUniqueArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedFindFirstArgs = $FindFirstArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedExistsArgs = $ExistsArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedCreateArgs = $CreateArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedCreateManyArgs = $CreateManyArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'BookingTimeStatusDenormalized' +>; +export type BookingTimeStatusDenormalizedUpdateArgs = $UpdateArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedUpdateManyArgs = $UpdateManyArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'BookingTimeStatusDenormalized' +>; +export type BookingTimeStatusDenormalizedUpsertArgs = $UpsertArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedDeleteArgs = $DeleteArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedDeleteManyArgs = $DeleteManyArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedCountArgs = $CountArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedAggregateArgs = $AggregateArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedGroupByArgs = $GroupByArgs<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedWhereInput = $WhereInput<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedSelect = $SelectInput<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedInclude = $IncludeInput<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedOmit = $OmitInput<$Schema, 'BookingTimeStatusDenormalized'>; +export type BookingTimeStatusDenormalizedGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BookingTimeStatusDenormalized', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BookingTimeStatusDenormalized', Args, Options>; +export type CalendarCacheFindManyArgs = $FindManyArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheFindUniqueArgs = $FindUniqueArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheFindFirstArgs = $FindFirstArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheExistsArgs = $ExistsArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheCreateArgs = $CreateArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheCreateManyArgs = $CreateManyArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheUpdateArgs = $UpdateArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheUpdateManyArgs = $UpdateManyArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheUpsertArgs = $UpsertArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheDeleteArgs = $DeleteArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheDeleteManyArgs = $DeleteManyArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheCountArgs = $CountArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheAggregateArgs = $AggregateArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheGroupByArgs = $GroupByArgs<$Schema, 'CalendarCache'>; +export type CalendarCacheWhereInput = $WhereInput<$Schema, 'CalendarCache'>; +export type CalendarCacheSelect = $SelectInput<$Schema, 'CalendarCache'>; +export type CalendarCacheInclude = $IncludeInput<$Schema, 'CalendarCache'>; +export type CalendarCacheOmit = $OmitInput<$Schema, 'CalendarCache'>; +export type CalendarCacheGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'CalendarCache', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'CalendarCache', Args, Options>; +export type TempOrgRedirectFindManyArgs = $FindManyArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectFindUniqueArgs = $FindUniqueArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectFindFirstArgs = $FindFirstArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectExistsArgs = $ExistsArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectCreateArgs = $CreateArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectCreateManyArgs = $CreateManyArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectUpdateArgs = $UpdateArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectUpdateManyArgs = $UpdateManyArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectUpsertArgs = $UpsertArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectDeleteArgs = $DeleteArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectDeleteManyArgs = $DeleteManyArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectCountArgs = $CountArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectAggregateArgs = $AggregateArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectGroupByArgs = $GroupByArgs<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectWhereInput = $WhereInput<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectSelect = $SelectInput<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectInclude = $IncludeInput<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectOmit = $OmitInput<$Schema, 'TempOrgRedirect'>; +export type TempOrgRedirectGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TempOrgRedirect', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TempOrgRedirect', Args, Options>; +export type AvatarFindManyArgs = $FindManyArgs<$Schema, 'Avatar'>; +export type AvatarFindUniqueArgs = $FindUniqueArgs<$Schema, 'Avatar'>; +export type AvatarFindFirstArgs = $FindFirstArgs<$Schema, 'Avatar'>; +export type AvatarExistsArgs = $ExistsArgs<$Schema, 'Avatar'>; +export type AvatarCreateArgs = $CreateArgs<$Schema, 'Avatar'>; +export type AvatarCreateManyArgs = $CreateManyArgs<$Schema, 'Avatar'>; +export type AvatarCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Avatar'>; +export type AvatarUpdateArgs = $UpdateArgs<$Schema, 'Avatar'>; +export type AvatarUpdateManyArgs = $UpdateManyArgs<$Schema, 'Avatar'>; +export type AvatarUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Avatar'>; +export type AvatarUpsertArgs = $UpsertArgs<$Schema, 'Avatar'>; +export type AvatarDeleteArgs = $DeleteArgs<$Schema, 'Avatar'>; +export type AvatarDeleteManyArgs = $DeleteManyArgs<$Schema, 'Avatar'>; +export type AvatarCountArgs = $CountArgs<$Schema, 'Avatar'>; +export type AvatarAggregateArgs = $AggregateArgs<$Schema, 'Avatar'>; +export type AvatarGroupByArgs = $GroupByArgs<$Schema, 'Avatar'>; +export type AvatarWhereInput = $WhereInput<$Schema, 'Avatar'>; +export type AvatarSelect = $SelectInput<$Schema, 'Avatar'>; +export type AvatarInclude = $IncludeInput<$Schema, 'Avatar'>; +export type AvatarOmit = $OmitInput<$Schema, 'Avatar'>; +export type AvatarGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Avatar', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Avatar', Args, Options>; +export type OutOfOfficeEntryFindManyArgs = $FindManyArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryFindUniqueArgs = $FindUniqueArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryFindFirstArgs = $FindFirstArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryExistsArgs = $ExistsArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryCreateArgs = $CreateArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryCreateManyArgs = $CreateManyArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryUpdateArgs = $UpdateArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryUpdateManyArgs = $UpdateManyArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryUpsertArgs = $UpsertArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryDeleteArgs = $DeleteArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryDeleteManyArgs = $DeleteManyArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryCountArgs = $CountArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryAggregateArgs = $AggregateArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryGroupByArgs = $GroupByArgs<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryWhereInput = $WhereInput<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntrySelect = $SelectInput<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryInclude = $IncludeInput<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryOmit = $OmitInput<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeEntryGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OutOfOfficeEntry', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OutOfOfficeEntry', Args, Options>; +export type OutOfOfficeReasonFindManyArgs = $FindManyArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonFindUniqueArgs = $FindUniqueArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonFindFirstArgs = $FindFirstArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonExistsArgs = $ExistsArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonCreateArgs = $CreateArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonCreateManyArgs = $CreateManyArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonUpdateArgs = $UpdateArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonUpdateManyArgs = $UpdateManyArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonUpsertArgs = $UpsertArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonDeleteArgs = $DeleteArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonDeleteManyArgs = $DeleteManyArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonCountArgs = $CountArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonAggregateArgs = $AggregateArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonGroupByArgs = $GroupByArgs<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonWhereInput = $WhereInput<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonSelect = $SelectInput<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonInclude = $IncludeInput<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonOmit = $OmitInput<$Schema, 'OutOfOfficeReason'>; +export type OutOfOfficeReasonGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OutOfOfficeReason', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OutOfOfficeReason', Args, Options>; +export type PlatformOAuthClientFindManyArgs = $FindManyArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientFindUniqueArgs = $FindUniqueArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientFindFirstArgs = $FindFirstArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientExistsArgs = $ExistsArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientCreateArgs = $CreateArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientCreateManyArgs = $CreateManyArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientUpdateArgs = $UpdateArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientUpdateManyArgs = $UpdateManyArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientUpsertArgs = $UpsertArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientDeleteArgs = $DeleteArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientDeleteManyArgs = $DeleteManyArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientCountArgs = $CountArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientAggregateArgs = $AggregateArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientGroupByArgs = $GroupByArgs<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientWhereInput = $WhereInput<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientSelect = $SelectInput<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientInclude = $IncludeInput<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientOmit = $OmitInput<$Schema, 'PlatformOAuthClient'>; +export type PlatformOAuthClientGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'PlatformOAuthClient', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'PlatformOAuthClient', Args, Options>; +export type PlatformAuthorizationTokenFindManyArgs = $FindManyArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenFindFirstArgs = $FindFirstArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenExistsArgs = $ExistsArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenCreateArgs = $CreateArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenCreateManyArgs = $CreateManyArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'PlatformAuthorizationToken' +>; +export type PlatformAuthorizationTokenUpdateArgs = $UpdateArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'PlatformAuthorizationToken' +>; +export type PlatformAuthorizationTokenUpsertArgs = $UpsertArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenDeleteArgs = $DeleteArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenCountArgs = $CountArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenAggregateArgs = $AggregateArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenGroupByArgs = $GroupByArgs<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenWhereInput = $WhereInput<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenSelect = $SelectInput<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenInclude = $IncludeInput<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenOmit = $OmitInput<$Schema, 'PlatformAuthorizationToken'>; +export type PlatformAuthorizationTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'PlatformAuthorizationToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'PlatformAuthorizationToken', Args, Options>; +export type AccessTokenFindManyArgs = $FindManyArgs<$Schema, 'AccessToken'>; +export type AccessTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'AccessToken'>; +export type AccessTokenFindFirstArgs = $FindFirstArgs<$Schema, 'AccessToken'>; +export type AccessTokenExistsArgs = $ExistsArgs<$Schema, 'AccessToken'>; +export type AccessTokenCreateArgs = $CreateArgs<$Schema, 'AccessToken'>; +export type AccessTokenCreateManyArgs = $CreateManyArgs<$Schema, 'AccessToken'>; +export type AccessTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'AccessToken'>; +export type AccessTokenUpdateArgs = $UpdateArgs<$Schema, 'AccessToken'>; +export type AccessTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'AccessToken'>; +export type AccessTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'AccessToken'>; +export type AccessTokenUpsertArgs = $UpsertArgs<$Schema, 'AccessToken'>; +export type AccessTokenDeleteArgs = $DeleteArgs<$Schema, 'AccessToken'>; +export type AccessTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'AccessToken'>; +export type AccessTokenCountArgs = $CountArgs<$Schema, 'AccessToken'>; +export type AccessTokenAggregateArgs = $AggregateArgs<$Schema, 'AccessToken'>; +export type AccessTokenGroupByArgs = $GroupByArgs<$Schema, 'AccessToken'>; +export type AccessTokenWhereInput = $WhereInput<$Schema, 'AccessToken'>; +export type AccessTokenSelect = $SelectInput<$Schema, 'AccessToken'>; +export type AccessTokenInclude = $IncludeInput<$Schema, 'AccessToken'>; +export type AccessTokenOmit = $OmitInput<$Schema, 'AccessToken'>; +export type AccessTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'AccessToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'AccessToken', Args, Options>; +export type RefreshTokenFindManyArgs = $FindManyArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenFindFirstArgs = $FindFirstArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenExistsArgs = $ExistsArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenCreateArgs = $CreateArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenCreateManyArgs = $CreateManyArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenUpdateArgs = $UpdateArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenUpsertArgs = $UpsertArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenDeleteArgs = $DeleteArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenCountArgs = $CountArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenAggregateArgs = $AggregateArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenGroupByArgs = $GroupByArgs<$Schema, 'RefreshToken'>; +export type RefreshTokenWhereInput = $WhereInput<$Schema, 'RefreshToken'>; +export type RefreshTokenSelect = $SelectInput<$Schema, 'RefreshToken'>; +export type RefreshTokenInclude = $IncludeInput<$Schema, 'RefreshToken'>; +export type RefreshTokenOmit = $OmitInput<$Schema, 'RefreshToken'>; +export type RefreshTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RefreshToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RefreshToken', Args, Options>; +export type DSyncDataFindManyArgs = $FindManyArgs<$Schema, 'DSyncData'>; +export type DSyncDataFindUniqueArgs = $FindUniqueArgs<$Schema, 'DSyncData'>; +export type DSyncDataFindFirstArgs = $FindFirstArgs<$Schema, 'DSyncData'>; +export type DSyncDataExistsArgs = $ExistsArgs<$Schema, 'DSyncData'>; +export type DSyncDataCreateArgs = $CreateArgs<$Schema, 'DSyncData'>; +export type DSyncDataCreateManyArgs = $CreateManyArgs<$Schema, 'DSyncData'>; +export type DSyncDataCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DSyncData'>; +export type DSyncDataUpdateArgs = $UpdateArgs<$Schema, 'DSyncData'>; +export type DSyncDataUpdateManyArgs = $UpdateManyArgs<$Schema, 'DSyncData'>; +export type DSyncDataUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DSyncData'>; +export type DSyncDataUpsertArgs = $UpsertArgs<$Schema, 'DSyncData'>; +export type DSyncDataDeleteArgs = $DeleteArgs<$Schema, 'DSyncData'>; +export type DSyncDataDeleteManyArgs = $DeleteManyArgs<$Schema, 'DSyncData'>; +export type DSyncDataCountArgs = $CountArgs<$Schema, 'DSyncData'>; +export type DSyncDataAggregateArgs = $AggregateArgs<$Schema, 'DSyncData'>; +export type DSyncDataGroupByArgs = $GroupByArgs<$Schema, 'DSyncData'>; +export type DSyncDataWhereInput = $WhereInput<$Schema, 'DSyncData'>; +export type DSyncDataSelect = $SelectInput<$Schema, 'DSyncData'>; +export type DSyncDataInclude = $IncludeInput<$Schema, 'DSyncData'>; +export type DSyncDataOmit = $OmitInput<$Schema, 'DSyncData'>; +export type DSyncDataGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DSyncData', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DSyncData', Args, Options>; +export type DSyncTeamGroupMappingFindManyArgs = $FindManyArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingFindUniqueArgs = $FindUniqueArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingFindFirstArgs = $FindFirstArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingExistsArgs = $ExistsArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingCreateArgs = $CreateArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingCreateManyArgs = $CreateManyArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingUpdateArgs = $UpdateArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingUpdateManyArgs = $UpdateManyArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingUpsertArgs = $UpsertArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingDeleteArgs = $DeleteArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingDeleteManyArgs = $DeleteManyArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingCountArgs = $CountArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingAggregateArgs = $AggregateArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingGroupByArgs = $GroupByArgs<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingWhereInput = $WhereInput<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingSelect = $SelectInput<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingInclude = $IncludeInput<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingOmit = $OmitInput<$Schema, 'DSyncTeamGroupMapping'>; +export type DSyncTeamGroupMappingGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DSyncTeamGroupMapping', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DSyncTeamGroupMapping', Args, Options>; +export type SecondaryEmailFindManyArgs = $FindManyArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailFindUniqueArgs = $FindUniqueArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailFindFirstArgs = $FindFirstArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailExistsArgs = $ExistsArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailCreateArgs = $CreateArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailCreateManyArgs = $CreateManyArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailUpdateArgs = $UpdateArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailUpdateManyArgs = $UpdateManyArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailUpsertArgs = $UpsertArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailDeleteArgs = $DeleteArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailDeleteManyArgs = $DeleteManyArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailCountArgs = $CountArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailAggregateArgs = $AggregateArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailGroupByArgs = $GroupByArgs<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailWhereInput = $WhereInput<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailSelect = $SelectInput<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailInclude = $IncludeInput<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailOmit = $OmitInput<$Schema, 'SecondaryEmail'>; +export type SecondaryEmailGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SecondaryEmail', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SecondaryEmail', Args, Options>; +export type TaskFindManyArgs = $FindManyArgs<$Schema, 'Task'>; +export type TaskFindUniqueArgs = $FindUniqueArgs<$Schema, 'Task'>; +export type TaskFindFirstArgs = $FindFirstArgs<$Schema, 'Task'>; +export type TaskExistsArgs = $ExistsArgs<$Schema, 'Task'>; +export type TaskCreateArgs = $CreateArgs<$Schema, 'Task'>; +export type TaskCreateManyArgs = $CreateManyArgs<$Schema, 'Task'>; +export type TaskCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Task'>; +export type TaskUpdateArgs = $UpdateArgs<$Schema, 'Task'>; +export type TaskUpdateManyArgs = $UpdateManyArgs<$Schema, 'Task'>; +export type TaskUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Task'>; +export type TaskUpsertArgs = $UpsertArgs<$Schema, 'Task'>; +export type TaskDeleteArgs = $DeleteArgs<$Schema, 'Task'>; +export type TaskDeleteManyArgs = $DeleteManyArgs<$Schema, 'Task'>; +export type TaskCountArgs = $CountArgs<$Schema, 'Task'>; +export type TaskAggregateArgs = $AggregateArgs<$Schema, 'Task'>; +export type TaskGroupByArgs = $GroupByArgs<$Schema, 'Task'>; +export type TaskWhereInput = $WhereInput<$Schema, 'Task'>; +export type TaskSelect = $SelectInput<$Schema, 'Task'>; +export type TaskInclude = $IncludeInput<$Schema, 'Task'>; +export type TaskOmit = $OmitInput<$Schema, 'Task'>; +export type TaskGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Task', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Task', Args, Options>; +export type ManagedOrganizationFindManyArgs = $FindManyArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationFindUniqueArgs = $FindUniqueArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationFindFirstArgs = $FindFirstArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationExistsArgs = $ExistsArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationCreateArgs = $CreateArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationCreateManyArgs = $CreateManyArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationUpdateArgs = $UpdateArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationUpdateManyArgs = $UpdateManyArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationUpsertArgs = $UpsertArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationDeleteArgs = $DeleteArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationDeleteManyArgs = $DeleteManyArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationCountArgs = $CountArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationAggregateArgs = $AggregateArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationGroupByArgs = $GroupByArgs<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationWhereInput = $WhereInput<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationSelect = $SelectInput<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationInclude = $IncludeInput<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationOmit = $OmitInput<$Schema, 'ManagedOrganization'>; +export type ManagedOrganizationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ManagedOrganization', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ManagedOrganization', Args, Options>; +export type PlatformBillingFindManyArgs = $FindManyArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingFindUniqueArgs = $FindUniqueArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingFindFirstArgs = $FindFirstArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingExistsArgs = $ExistsArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingCreateArgs = $CreateArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingCreateManyArgs = $CreateManyArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingUpdateArgs = $UpdateArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingUpdateManyArgs = $UpdateManyArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingUpsertArgs = $UpsertArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingDeleteArgs = $DeleteArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingDeleteManyArgs = $DeleteManyArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingCountArgs = $CountArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingAggregateArgs = $AggregateArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingGroupByArgs = $GroupByArgs<$Schema, 'PlatformBilling'>; +export type PlatformBillingWhereInput = $WhereInput<$Schema, 'PlatformBilling'>; +export type PlatformBillingSelect = $SelectInput<$Schema, 'PlatformBilling'>; +export type PlatformBillingInclude = $IncludeInput<$Schema, 'PlatformBilling'>; +export type PlatformBillingOmit = $OmitInput<$Schema, 'PlatformBilling'>; +export type PlatformBillingGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'PlatformBilling', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'PlatformBilling', Args, Options>; +export type AttributeOptionFindManyArgs = $FindManyArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionFindUniqueArgs = $FindUniqueArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionFindFirstArgs = $FindFirstArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionExistsArgs = $ExistsArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionCreateArgs = $CreateArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionCreateManyArgs = $CreateManyArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionUpdateArgs = $UpdateArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionUpdateManyArgs = $UpdateManyArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionUpsertArgs = $UpsertArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionDeleteArgs = $DeleteArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionDeleteManyArgs = $DeleteManyArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionCountArgs = $CountArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionAggregateArgs = $AggregateArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionGroupByArgs = $GroupByArgs<$Schema, 'AttributeOption'>; +export type AttributeOptionWhereInput = $WhereInput<$Schema, 'AttributeOption'>; +export type AttributeOptionSelect = $SelectInput<$Schema, 'AttributeOption'>; +export type AttributeOptionInclude = $IncludeInput<$Schema, 'AttributeOption'>; +export type AttributeOptionOmit = $OmitInput<$Schema, 'AttributeOption'>; +export type AttributeOptionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'AttributeOption', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'AttributeOption', Args, Options>; +export type AttributeFindManyArgs = $FindManyArgs<$Schema, 'Attribute'>; +export type AttributeFindUniqueArgs = $FindUniqueArgs<$Schema, 'Attribute'>; +export type AttributeFindFirstArgs = $FindFirstArgs<$Schema, 'Attribute'>; +export type AttributeExistsArgs = $ExistsArgs<$Schema, 'Attribute'>; +export type AttributeCreateArgs = $CreateArgs<$Schema, 'Attribute'>; +export type AttributeCreateManyArgs = $CreateManyArgs<$Schema, 'Attribute'>; +export type AttributeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Attribute'>; +export type AttributeUpdateArgs = $UpdateArgs<$Schema, 'Attribute'>; +export type AttributeUpdateManyArgs = $UpdateManyArgs<$Schema, 'Attribute'>; +export type AttributeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Attribute'>; +export type AttributeUpsertArgs = $UpsertArgs<$Schema, 'Attribute'>; +export type AttributeDeleteArgs = $DeleteArgs<$Schema, 'Attribute'>; +export type AttributeDeleteManyArgs = $DeleteManyArgs<$Schema, 'Attribute'>; +export type AttributeCountArgs = $CountArgs<$Schema, 'Attribute'>; +export type AttributeAggregateArgs = $AggregateArgs<$Schema, 'Attribute'>; +export type AttributeGroupByArgs = $GroupByArgs<$Schema, 'Attribute'>; +export type AttributeWhereInput = $WhereInput<$Schema, 'Attribute'>; +export type AttributeSelect = $SelectInput<$Schema, 'Attribute'>; +export type AttributeInclude = $IncludeInput<$Schema, 'Attribute'>; +export type AttributeOmit = $OmitInput<$Schema, 'Attribute'>; +export type AttributeGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Attribute', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Attribute', Args, Options>; +export type AttributeToUserFindManyArgs = $FindManyArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserFindUniqueArgs = $FindUniqueArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserFindFirstArgs = $FindFirstArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserExistsArgs = $ExistsArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserCreateArgs = $CreateArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserCreateManyArgs = $CreateManyArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserUpdateArgs = $UpdateArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserUpdateManyArgs = $UpdateManyArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserUpsertArgs = $UpsertArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserDeleteArgs = $DeleteArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserDeleteManyArgs = $DeleteManyArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserCountArgs = $CountArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserAggregateArgs = $AggregateArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserGroupByArgs = $GroupByArgs<$Schema, 'AttributeToUser'>; +export type AttributeToUserWhereInput = $WhereInput<$Schema, 'AttributeToUser'>; +export type AttributeToUserSelect = $SelectInput<$Schema, 'AttributeToUser'>; +export type AttributeToUserInclude = $IncludeInput<$Schema, 'AttributeToUser'>; +export type AttributeToUserOmit = $OmitInput<$Schema, 'AttributeToUser'>; +export type AttributeToUserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'AttributeToUser', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'AttributeToUser', Args, Options>; +export type AssignmentReasonFindManyArgs = $FindManyArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonFindUniqueArgs = $FindUniqueArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonFindFirstArgs = $FindFirstArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonExistsArgs = $ExistsArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonCreateArgs = $CreateArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonCreateManyArgs = $CreateManyArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonUpdateArgs = $UpdateArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonUpdateManyArgs = $UpdateManyArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonUpsertArgs = $UpsertArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonDeleteArgs = $DeleteArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonDeleteManyArgs = $DeleteManyArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonCountArgs = $CountArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonAggregateArgs = $AggregateArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonGroupByArgs = $GroupByArgs<$Schema, 'AssignmentReason'>; +export type AssignmentReasonWhereInput = $WhereInput<$Schema, 'AssignmentReason'>; +export type AssignmentReasonSelect = $SelectInput<$Schema, 'AssignmentReason'>; +export type AssignmentReasonInclude = $IncludeInput<$Schema, 'AssignmentReason'>; +export type AssignmentReasonOmit = $OmitInput<$Schema, 'AssignmentReason'>; +export type AssignmentReasonGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'AssignmentReason', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'AssignmentReason', Args, Options>; +export type DelegationCredentialFindManyArgs = $FindManyArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialFindUniqueArgs = $FindUniqueArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialFindFirstArgs = $FindFirstArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialExistsArgs = $ExistsArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialCreateArgs = $CreateArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialCreateManyArgs = $CreateManyArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialUpdateArgs = $UpdateArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialUpdateManyArgs = $UpdateManyArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialUpsertArgs = $UpsertArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialDeleteArgs = $DeleteArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialDeleteManyArgs = $DeleteManyArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialCountArgs = $CountArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialAggregateArgs = $AggregateArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialGroupByArgs = $GroupByArgs<$Schema, 'DelegationCredential'>; +export type DelegationCredentialWhereInput = $WhereInput<$Schema, 'DelegationCredential'>; +export type DelegationCredentialSelect = $SelectInput<$Schema, 'DelegationCredential'>; +export type DelegationCredentialInclude = $IncludeInput<$Schema, 'DelegationCredential'>; +export type DelegationCredentialOmit = $OmitInput<$Schema, 'DelegationCredential'>; +export type DelegationCredentialGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DelegationCredential', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DelegationCredential', Args, Options>; +export type DomainWideDelegationFindManyArgs = $FindManyArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationFindUniqueArgs = $FindUniqueArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationFindFirstArgs = $FindFirstArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationExistsArgs = $ExistsArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationCreateArgs = $CreateArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationCreateManyArgs = $CreateManyArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationUpdateArgs = $UpdateArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationUpdateManyArgs = $UpdateManyArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationUpsertArgs = $UpsertArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationDeleteArgs = $DeleteArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationDeleteManyArgs = $DeleteManyArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationCountArgs = $CountArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationAggregateArgs = $AggregateArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationGroupByArgs = $GroupByArgs<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationWhereInput = $WhereInput<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationSelect = $SelectInput<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationInclude = $IncludeInput<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationOmit = $OmitInput<$Schema, 'DomainWideDelegation'>; +export type DomainWideDelegationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DomainWideDelegation', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DomainWideDelegation', Args, Options>; +export type WorkspacePlatformFindManyArgs = $FindManyArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformFindFirstArgs = $FindFirstArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformExistsArgs = $ExistsArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformCreateArgs = $CreateArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformCreateManyArgs = $CreateManyArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformUpdateArgs = $UpdateArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformUpsertArgs = $UpsertArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformDeleteArgs = $DeleteArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformCountArgs = $CountArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformAggregateArgs = $AggregateArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformGroupByArgs = $GroupByArgs<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformWhereInput = $WhereInput<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformSelect = $SelectInput<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformInclude = $IncludeInput<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformOmit = $OmitInput<$Schema, 'WorkspacePlatform'>; +export type WorkspacePlatformGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkspacePlatform', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkspacePlatform', Args, Options>; +export type EventTypeTranslationFindManyArgs = $FindManyArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationFindUniqueArgs = $FindUniqueArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationFindFirstArgs = $FindFirstArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationExistsArgs = $ExistsArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationCreateArgs = $CreateArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationCreateManyArgs = $CreateManyArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationUpdateArgs = $UpdateArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationUpdateManyArgs = $UpdateManyArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationUpsertArgs = $UpsertArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationDeleteArgs = $DeleteArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationDeleteManyArgs = $DeleteManyArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationCountArgs = $CountArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationAggregateArgs = $AggregateArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationGroupByArgs = $GroupByArgs<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationWhereInput = $WhereInput<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationSelect = $SelectInput<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationInclude = $IncludeInput<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationOmit = $OmitInput<$Schema, 'EventTypeTranslation'>; +export type EventTypeTranslationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'EventTypeTranslation', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'EventTypeTranslation', Args, Options>; +export type WatchlistFindManyArgs = $FindManyArgs<$Schema, 'Watchlist'>; +export type WatchlistFindUniqueArgs = $FindUniqueArgs<$Schema, 'Watchlist'>; +export type WatchlistFindFirstArgs = $FindFirstArgs<$Schema, 'Watchlist'>; +export type WatchlistExistsArgs = $ExistsArgs<$Schema, 'Watchlist'>; +export type WatchlistCreateArgs = $CreateArgs<$Schema, 'Watchlist'>; +export type WatchlistCreateManyArgs = $CreateManyArgs<$Schema, 'Watchlist'>; +export type WatchlistCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Watchlist'>; +export type WatchlistUpdateArgs = $UpdateArgs<$Schema, 'Watchlist'>; +export type WatchlistUpdateManyArgs = $UpdateManyArgs<$Schema, 'Watchlist'>; +export type WatchlistUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Watchlist'>; +export type WatchlistUpsertArgs = $UpsertArgs<$Schema, 'Watchlist'>; +export type WatchlistDeleteArgs = $DeleteArgs<$Schema, 'Watchlist'>; +export type WatchlistDeleteManyArgs = $DeleteManyArgs<$Schema, 'Watchlist'>; +export type WatchlistCountArgs = $CountArgs<$Schema, 'Watchlist'>; +export type WatchlistAggregateArgs = $AggregateArgs<$Schema, 'Watchlist'>; +export type WatchlistGroupByArgs = $GroupByArgs<$Schema, 'Watchlist'>; +export type WatchlistWhereInput = $WhereInput<$Schema, 'Watchlist'>; +export type WatchlistSelect = $SelectInput<$Schema, 'Watchlist'>; +export type WatchlistInclude = $IncludeInput<$Schema, 'Watchlist'>; +export type WatchlistOmit = $OmitInput<$Schema, 'Watchlist'>; +export type WatchlistGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Watchlist', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Watchlist', Args, Options>; +export type OrganizationOnboardingFindManyArgs = $FindManyArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingFindUniqueArgs = $FindUniqueArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingFindFirstArgs = $FindFirstArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingExistsArgs = $ExistsArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingCreateArgs = $CreateArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingCreateManyArgs = $CreateManyArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingUpdateArgs = $UpdateArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingUpdateManyArgs = $UpdateManyArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingUpsertArgs = $UpsertArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingDeleteArgs = $DeleteArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingDeleteManyArgs = $DeleteManyArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingCountArgs = $CountArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingAggregateArgs = $AggregateArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingGroupByArgs = $GroupByArgs<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingWhereInput = $WhereInput<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingSelect = $SelectInput<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingInclude = $IncludeInput<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingOmit = $OmitInput<$Schema, 'OrganizationOnboarding'>; +export type OrganizationOnboardingGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OrganizationOnboarding', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OrganizationOnboarding', Args, Options>; +export type App_RoutingForms_IncompleteBookingActionsFindManyArgs = $FindManyArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsFindUniqueArgs = $FindUniqueArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsFindFirstArgs = $FindFirstArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsExistsArgs = $ExistsArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsCreateArgs = $CreateArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsCreateManyArgs = $CreateManyArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsUpdateArgs = $UpdateArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsUpdateManyArgs = $UpdateManyArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsUpsertArgs = $UpsertArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsDeleteArgs = $DeleteArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsDeleteManyArgs = $DeleteManyArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsCountArgs = $CountArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsAggregateArgs = $AggregateArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsGroupByArgs = $GroupByArgs< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsWhereInput = $WhereInput< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsSelect = $SelectInput< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsInclude = $IncludeInput< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsOmit = $OmitInput< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type App_RoutingForms_IncompleteBookingActionsGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'App_RoutingForms_IncompleteBookingActions', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'App_RoutingForms_IncompleteBookingActions', Args, Options>; +export type InternalNotePresetFindManyArgs = $FindManyArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetFindUniqueArgs = $FindUniqueArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetFindFirstArgs = $FindFirstArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetExistsArgs = $ExistsArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetCreateArgs = $CreateArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetCreateManyArgs = $CreateManyArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetUpdateArgs = $UpdateArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetUpdateManyArgs = $UpdateManyArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetUpsertArgs = $UpsertArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetDeleteArgs = $DeleteArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetDeleteManyArgs = $DeleteManyArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetCountArgs = $CountArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetAggregateArgs = $AggregateArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetGroupByArgs = $GroupByArgs<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetWhereInput = $WhereInput<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetSelect = $SelectInput<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetInclude = $IncludeInput<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetOmit = $OmitInput<$Schema, 'InternalNotePreset'>; +export type InternalNotePresetGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'InternalNotePreset', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'InternalNotePreset', Args, Options>; +export type FilterSegmentFindManyArgs = $FindManyArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentFindUniqueArgs = $FindUniqueArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentFindFirstArgs = $FindFirstArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentExistsArgs = $ExistsArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentCreateArgs = $CreateArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentCreateManyArgs = $CreateManyArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentUpdateArgs = $UpdateArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentUpdateManyArgs = $UpdateManyArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentUpsertArgs = $UpsertArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentDeleteArgs = $DeleteArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentDeleteManyArgs = $DeleteManyArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentCountArgs = $CountArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentAggregateArgs = $AggregateArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentGroupByArgs = $GroupByArgs<$Schema, 'FilterSegment'>; +export type FilterSegmentWhereInput = $WhereInput<$Schema, 'FilterSegment'>; +export type FilterSegmentSelect = $SelectInput<$Schema, 'FilterSegment'>; +export type FilterSegmentInclude = $IncludeInput<$Schema, 'FilterSegment'>; +export type FilterSegmentOmit = $OmitInput<$Schema, 'FilterSegment'>; +export type FilterSegmentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'FilterSegment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'FilterSegment', Args, Options>; +export type UserFilterSegmentPreferenceFindManyArgs = $FindManyArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceFindUniqueArgs = $FindUniqueArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceFindFirstArgs = $FindFirstArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceExistsArgs = $ExistsArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceCreateArgs = $CreateArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceCreateManyArgs = $CreateManyArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'UserFilterSegmentPreference' +>; +export type UserFilterSegmentPreferenceUpdateArgs = $UpdateArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceUpdateManyArgs = $UpdateManyArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'UserFilterSegmentPreference' +>; +export type UserFilterSegmentPreferenceUpsertArgs = $UpsertArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceDeleteArgs = $DeleteArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceDeleteManyArgs = $DeleteManyArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceCountArgs = $CountArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceAggregateArgs = $AggregateArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceGroupByArgs = $GroupByArgs<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceWhereInput = $WhereInput<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceSelect = $SelectInput<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceInclude = $IncludeInput<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceOmit = $OmitInput<$Schema, 'UserFilterSegmentPreference'>; +export type UserFilterSegmentPreferenceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'UserFilterSegmentPreference', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'UserFilterSegmentPreference', Args, Options>; +export type BookingInternalNoteFindManyArgs = $FindManyArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteFindUniqueArgs = $FindUniqueArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteFindFirstArgs = $FindFirstArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteExistsArgs = $ExistsArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteCreateArgs = $CreateArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteCreateManyArgs = $CreateManyArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteUpdateArgs = $UpdateArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteUpdateManyArgs = $UpdateManyArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteUpsertArgs = $UpsertArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteDeleteArgs = $DeleteArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteDeleteManyArgs = $DeleteManyArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteCountArgs = $CountArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteAggregateArgs = $AggregateArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteGroupByArgs = $GroupByArgs<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteWhereInput = $WhereInput<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteSelect = $SelectInput<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteInclude = $IncludeInput<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteOmit = $OmitInput<$Schema, 'BookingInternalNote'>; +export type BookingInternalNoteGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BookingInternalNote', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BookingInternalNote', Args, Options>; +export type WorkflowOptOutContactFindManyArgs = $FindManyArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactFindFirstArgs = $FindFirstArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactExistsArgs = $ExistsArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactCreateArgs = $CreateArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactCreateManyArgs = $CreateManyArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactUpdateArgs = $UpdateArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactUpsertArgs = $UpsertArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactDeleteArgs = $DeleteArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactCountArgs = $CountArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactAggregateArgs = $AggregateArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactGroupByArgs = $GroupByArgs<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactWhereInput = $WhereInput<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactSelect = $SelectInput<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactInclude = $IncludeInput<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactOmit = $OmitInput<$Schema, 'WorkflowOptOutContact'>; +export type WorkflowOptOutContactGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkflowOptOutContact', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkflowOptOutContact', Args, Options>; +export type RoleFindManyArgs = $FindManyArgs<$Schema, 'Role'>; +export type RoleFindUniqueArgs = $FindUniqueArgs<$Schema, 'Role'>; +export type RoleFindFirstArgs = $FindFirstArgs<$Schema, 'Role'>; +export type RoleExistsArgs = $ExistsArgs<$Schema, 'Role'>; +export type RoleCreateArgs = $CreateArgs<$Schema, 'Role'>; +export type RoleCreateManyArgs = $CreateManyArgs<$Schema, 'Role'>; +export type RoleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Role'>; +export type RoleUpdateArgs = $UpdateArgs<$Schema, 'Role'>; +export type RoleUpdateManyArgs = $UpdateManyArgs<$Schema, 'Role'>; +export type RoleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Role'>; +export type RoleUpsertArgs = $UpsertArgs<$Schema, 'Role'>; +export type RoleDeleteArgs = $DeleteArgs<$Schema, 'Role'>; +export type RoleDeleteManyArgs = $DeleteManyArgs<$Schema, 'Role'>; +export type RoleCountArgs = $CountArgs<$Schema, 'Role'>; +export type RoleAggregateArgs = $AggregateArgs<$Schema, 'Role'>; +export type RoleGroupByArgs = $GroupByArgs<$Schema, 'Role'>; +export type RoleWhereInput = $WhereInput<$Schema, 'Role'>; +export type RoleSelect = $SelectInput<$Schema, 'Role'>; +export type RoleInclude = $IncludeInput<$Schema, 'Role'>; +export type RoleOmit = $OmitInput<$Schema, 'Role'>; +export type RoleGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Role', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Role', Args, Options>; +export type RolePermissionFindManyArgs = $FindManyArgs<$Schema, 'RolePermission'>; +export type RolePermissionFindUniqueArgs = $FindUniqueArgs<$Schema, 'RolePermission'>; +export type RolePermissionFindFirstArgs = $FindFirstArgs<$Schema, 'RolePermission'>; +export type RolePermissionExistsArgs = $ExistsArgs<$Schema, 'RolePermission'>; +export type RolePermissionCreateArgs = $CreateArgs<$Schema, 'RolePermission'>; +export type RolePermissionCreateManyArgs = $CreateManyArgs<$Schema, 'RolePermission'>; +export type RolePermissionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RolePermission'>; +export type RolePermissionUpdateArgs = $UpdateArgs<$Schema, 'RolePermission'>; +export type RolePermissionUpdateManyArgs = $UpdateManyArgs<$Schema, 'RolePermission'>; +export type RolePermissionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RolePermission'>; +export type RolePermissionUpsertArgs = $UpsertArgs<$Schema, 'RolePermission'>; +export type RolePermissionDeleteArgs = $DeleteArgs<$Schema, 'RolePermission'>; +export type RolePermissionDeleteManyArgs = $DeleteManyArgs<$Schema, 'RolePermission'>; +export type RolePermissionCountArgs = $CountArgs<$Schema, 'RolePermission'>; +export type RolePermissionAggregateArgs = $AggregateArgs<$Schema, 'RolePermission'>; +export type RolePermissionGroupByArgs = $GroupByArgs<$Schema, 'RolePermission'>; +export type RolePermissionWhereInput = $WhereInput<$Schema, 'RolePermission'>; +export type RolePermissionSelect = $SelectInput<$Schema, 'RolePermission'>; +export type RolePermissionInclude = $IncludeInput<$Schema, 'RolePermission'>; +export type RolePermissionOmit = $OmitInput<$Schema, 'RolePermission'>; +export type RolePermissionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RolePermission', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RolePermission', Args, Options>; diff --git a/tests/e2e/github-repos/cal.com/models.ts b/tests/e2e/github-repos/cal.com/models.ts index c8f35c09f..2bb57e300 100644 --- a/tests/e2e/github-repos/cal.com/models.ts +++ b/tests/e2e/github-repos/cal.com/models.ts @@ -5,105 +5,108 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type Host = $ModelResult<$Schema, "Host">; -export type CalVideoSettings = $ModelResult<$Schema, "CalVideoSettings">; -export type EventType = $ModelResult<$Schema, "EventType">; -export type Credential = $ModelResult<$Schema, "Credential">; -export type DestinationCalendar = $ModelResult<$Schema, "DestinationCalendar">; -export type UserPassword = $ModelResult<$Schema, "UserPassword">; -export type TravelSchedule = $ModelResult<$Schema, "TravelSchedule">; -export type User = $ModelResult<$Schema, "User">; -export type NotificationsSubscriptions = $ModelResult<$Schema, "NotificationsSubscriptions">; -export type Profile = $ModelResult<$Schema, "Profile">; -export type Team = $ModelResult<$Schema, "Team">; -export type CreditBalance = $ModelResult<$Schema, "CreditBalance">; -export type CreditPurchaseLog = $ModelResult<$Schema, "CreditPurchaseLog">; -export type CreditExpenseLog = $ModelResult<$Schema, "CreditExpenseLog">; -export type OrganizationSettings = $ModelResult<$Schema, "OrganizationSettings">; -export type Membership = $ModelResult<$Schema, "Membership">; -export type VerificationToken = $ModelResult<$Schema, "VerificationToken">; -export type InstantMeetingToken = $ModelResult<$Schema, "InstantMeetingToken">; -export type BookingReference = $ModelResult<$Schema, "BookingReference">; -export type Attendee = $ModelResult<$Schema, "Attendee">; -export type Booking = $ModelResult<$Schema, "Booking">; -export type Tracking = $ModelResult<$Schema, "Tracking">; -export type Schedule = $ModelResult<$Schema, "Schedule">; -export type Availability = $ModelResult<$Schema, "Availability">; -export type SelectedCalendar = $ModelResult<$Schema, "SelectedCalendar">; -export type EventTypeCustomInput = $ModelResult<$Schema, "EventTypeCustomInput">; -export type ResetPasswordRequest = $ModelResult<$Schema, "ResetPasswordRequest">; -export type ReminderMail = $ModelResult<$Schema, "ReminderMail">; -export type Payment = $ModelResult<$Schema, "Payment">; -export type Webhook = $ModelResult<$Schema, "Webhook">; -export type Impersonations = $ModelResult<$Schema, "Impersonations">; -export type ApiKey = $ModelResult<$Schema, "ApiKey">; -export type RateLimit = $ModelResult<$Schema, "RateLimit">; -export type HashedLink = $ModelResult<$Schema, "HashedLink">; -export type Account = $ModelResult<$Schema, "Account">; -export type Session = $ModelResult<$Schema, "Session">; -export type App = $ModelResult<$Schema, "App">; -export type App_RoutingForms_Form = $ModelResult<$Schema, "App_RoutingForms_Form">; -export type App_RoutingForms_FormResponse = $ModelResult<$Schema, "App_RoutingForms_FormResponse">; -export type App_RoutingForms_QueuedFormResponse = $ModelResult<$Schema, "App_RoutingForms_QueuedFormResponse">; -export type RoutingFormResponseField = $ModelResult<$Schema, "RoutingFormResponseField">; -export type RoutingFormResponse = $ModelResult<$Schema, "RoutingFormResponse">; -export type RoutingFormResponseDenormalized = $ModelResult<$Schema, "RoutingFormResponseDenormalized">; -export type Feedback = $ModelResult<$Schema, "Feedback">; -export type WorkflowStep = $ModelResult<$Schema, "WorkflowStep">; -export type Workflow = $ModelResult<$Schema, "Workflow">; -export type AIPhoneCallConfiguration = $ModelResult<$Schema, "AIPhoneCallConfiguration">; -export type WorkflowsOnEventTypes = $ModelResult<$Schema, "WorkflowsOnEventTypes">; -export type WorkflowsOnTeams = $ModelResult<$Schema, "WorkflowsOnTeams">; -export type Deployment = $ModelResult<$Schema, "Deployment">; -export type WorkflowReminder = $ModelResult<$Schema, "WorkflowReminder">; -export type WebhookScheduledTriggers = $ModelResult<$Schema, "WebhookScheduledTriggers">; -export type BookingSeat = $ModelResult<$Schema, "BookingSeat">; -export type VerifiedNumber = $ModelResult<$Schema, "VerifiedNumber">; -export type VerifiedEmail = $ModelResult<$Schema, "VerifiedEmail">; -export type Feature = $ModelResult<$Schema, "Feature">; -export type UserFeatures = $ModelResult<$Schema, "UserFeatures">; -export type TeamFeatures = $ModelResult<$Schema, "TeamFeatures">; -export type SelectedSlots = $ModelResult<$Schema, "SelectedSlots">; -export type OAuthClient = $ModelResult<$Schema, "OAuthClient">; -export type AccessCode = $ModelResult<$Schema, "AccessCode">; -export type BookingTimeStatus = $ModelResult<$Schema, "BookingTimeStatus">; -export type BookingDenormalized = $ModelResult<$Schema, "BookingDenormalized">; -export type BookingTimeStatusDenormalized = $ModelResult<$Schema, "BookingTimeStatusDenormalized">; -export type CalendarCache = $ModelResult<$Schema, "CalendarCache">; -export type TempOrgRedirect = $ModelResult<$Schema, "TempOrgRedirect">; -export type Avatar = $ModelResult<$Schema, "Avatar">; -export type OutOfOfficeEntry = $ModelResult<$Schema, "OutOfOfficeEntry">; -export type OutOfOfficeReason = $ModelResult<$Schema, "OutOfOfficeReason">; -export type PlatformOAuthClient = $ModelResult<$Schema, "PlatformOAuthClient">; -export type PlatformAuthorizationToken = $ModelResult<$Schema, "PlatformAuthorizationToken">; -export type AccessToken = $ModelResult<$Schema, "AccessToken">; -export type RefreshToken = $ModelResult<$Schema, "RefreshToken">; -export type DSyncData = $ModelResult<$Schema, "DSyncData">; -export type DSyncTeamGroupMapping = $ModelResult<$Schema, "DSyncTeamGroupMapping">; -export type SecondaryEmail = $ModelResult<$Schema, "SecondaryEmail">; -export type Task = $ModelResult<$Schema, "Task">; -export type ManagedOrganization = $ModelResult<$Schema, "ManagedOrganization">; -export type PlatformBilling = $ModelResult<$Schema, "PlatformBilling">; -export type AttributeOption = $ModelResult<$Schema, "AttributeOption">; -export type Attribute = $ModelResult<$Schema, "Attribute">; -export type AttributeToUser = $ModelResult<$Schema, "AttributeToUser">; -export type AssignmentReason = $ModelResult<$Schema, "AssignmentReason">; -export type DelegationCredential = $ModelResult<$Schema, "DelegationCredential">; -export type DomainWideDelegation = $ModelResult<$Schema, "DomainWideDelegation">; -export type WorkspacePlatform = $ModelResult<$Schema, "WorkspacePlatform">; -export type EventTypeTranslation = $ModelResult<$Schema, "EventTypeTranslation">; -export type Watchlist = $ModelResult<$Schema, "Watchlist">; -export type OrganizationOnboarding = $ModelResult<$Schema, "OrganizationOnboarding">; -export type App_RoutingForms_IncompleteBookingActions = $ModelResult<$Schema, "App_RoutingForms_IncompleteBookingActions">; -export type InternalNotePreset = $ModelResult<$Schema, "InternalNotePreset">; -export type FilterSegment = $ModelResult<$Schema, "FilterSegment">; -export type UserFilterSegmentPreference = $ModelResult<$Schema, "UserFilterSegmentPreference">; -export type BookingInternalNote = $ModelResult<$Schema, "BookingInternalNote">; -export type WorkflowOptOutContact = $ModelResult<$Schema, "WorkflowOptOutContact">; -export type Role = $ModelResult<$Schema, "Role">; -export type RolePermission = $ModelResult<$Schema, "RolePermission">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type Host = $ModelResult<$Schema, 'Host'>; +export type CalVideoSettings = $ModelResult<$Schema, 'CalVideoSettings'>; +export type EventType = $ModelResult<$Schema, 'EventType'>; +export type Credential = $ModelResult<$Schema, 'Credential'>; +export type DestinationCalendar = $ModelResult<$Schema, 'DestinationCalendar'>; +export type UserPassword = $ModelResult<$Schema, 'UserPassword'>; +export type TravelSchedule = $ModelResult<$Schema, 'TravelSchedule'>; +export type User = $ModelResult<$Schema, 'User'>; +export type NotificationsSubscriptions = $ModelResult<$Schema, 'NotificationsSubscriptions'>; +export type Profile = $ModelResult<$Schema, 'Profile'>; +export type Team = $ModelResult<$Schema, 'Team'>; +export type CreditBalance = $ModelResult<$Schema, 'CreditBalance'>; +export type CreditPurchaseLog = $ModelResult<$Schema, 'CreditPurchaseLog'>; +export type CreditExpenseLog = $ModelResult<$Schema, 'CreditExpenseLog'>; +export type OrganizationSettings = $ModelResult<$Schema, 'OrganizationSettings'>; +export type Membership = $ModelResult<$Schema, 'Membership'>; +export type VerificationToken = $ModelResult<$Schema, 'VerificationToken'>; +export type InstantMeetingToken = $ModelResult<$Schema, 'InstantMeetingToken'>; +export type BookingReference = $ModelResult<$Schema, 'BookingReference'>; +export type Attendee = $ModelResult<$Schema, 'Attendee'>; +export type Booking = $ModelResult<$Schema, 'Booking'>; +export type Tracking = $ModelResult<$Schema, 'Tracking'>; +export type Schedule = $ModelResult<$Schema, 'Schedule'>; +export type Availability = $ModelResult<$Schema, 'Availability'>; +export type SelectedCalendar = $ModelResult<$Schema, 'SelectedCalendar'>; +export type EventTypeCustomInput = $ModelResult<$Schema, 'EventTypeCustomInput'>; +export type ResetPasswordRequest = $ModelResult<$Schema, 'ResetPasswordRequest'>; +export type ReminderMail = $ModelResult<$Schema, 'ReminderMail'>; +export type Payment = $ModelResult<$Schema, 'Payment'>; +export type Webhook = $ModelResult<$Schema, 'Webhook'>; +export type Impersonations = $ModelResult<$Schema, 'Impersonations'>; +export type ApiKey = $ModelResult<$Schema, 'ApiKey'>; +export type RateLimit = $ModelResult<$Schema, 'RateLimit'>; +export type HashedLink = $ModelResult<$Schema, 'HashedLink'>; +export type Account = $ModelResult<$Schema, 'Account'>; +export type Session = $ModelResult<$Schema, 'Session'>; +export type App = $ModelResult<$Schema, 'App'>; +export type App_RoutingForms_Form = $ModelResult<$Schema, 'App_RoutingForms_Form'>; +export type App_RoutingForms_FormResponse = $ModelResult<$Schema, 'App_RoutingForms_FormResponse'>; +export type App_RoutingForms_QueuedFormResponse = $ModelResult<$Schema, 'App_RoutingForms_QueuedFormResponse'>; +export type RoutingFormResponseField = $ModelResult<$Schema, 'RoutingFormResponseField'>; +export type RoutingFormResponse = $ModelResult<$Schema, 'RoutingFormResponse'>; +export type RoutingFormResponseDenormalized = $ModelResult<$Schema, 'RoutingFormResponseDenormalized'>; +export type Feedback = $ModelResult<$Schema, 'Feedback'>; +export type WorkflowStep = $ModelResult<$Schema, 'WorkflowStep'>; +export type Workflow = $ModelResult<$Schema, 'Workflow'>; +export type AIPhoneCallConfiguration = $ModelResult<$Schema, 'AIPhoneCallConfiguration'>; +export type WorkflowsOnEventTypes = $ModelResult<$Schema, 'WorkflowsOnEventTypes'>; +export type WorkflowsOnTeams = $ModelResult<$Schema, 'WorkflowsOnTeams'>; +export type Deployment = $ModelResult<$Schema, 'Deployment'>; +export type WorkflowReminder = $ModelResult<$Schema, 'WorkflowReminder'>; +export type WebhookScheduledTriggers = $ModelResult<$Schema, 'WebhookScheduledTriggers'>; +export type BookingSeat = $ModelResult<$Schema, 'BookingSeat'>; +export type VerifiedNumber = $ModelResult<$Schema, 'VerifiedNumber'>; +export type VerifiedEmail = $ModelResult<$Schema, 'VerifiedEmail'>; +export type Feature = $ModelResult<$Schema, 'Feature'>; +export type UserFeatures = $ModelResult<$Schema, 'UserFeatures'>; +export type TeamFeatures = $ModelResult<$Schema, 'TeamFeatures'>; +export type SelectedSlots = $ModelResult<$Schema, 'SelectedSlots'>; +export type OAuthClient = $ModelResult<$Schema, 'OAuthClient'>; +export type AccessCode = $ModelResult<$Schema, 'AccessCode'>; +export type BookingTimeStatus = $ModelResult<$Schema, 'BookingTimeStatus'>; +export type BookingDenormalized = $ModelResult<$Schema, 'BookingDenormalized'>; +export type BookingTimeStatusDenormalized = $ModelResult<$Schema, 'BookingTimeStatusDenormalized'>; +export type CalendarCache = $ModelResult<$Schema, 'CalendarCache'>; +export type TempOrgRedirect = $ModelResult<$Schema, 'TempOrgRedirect'>; +export type Avatar = $ModelResult<$Schema, 'Avatar'>; +export type OutOfOfficeEntry = $ModelResult<$Schema, 'OutOfOfficeEntry'>; +export type OutOfOfficeReason = $ModelResult<$Schema, 'OutOfOfficeReason'>; +export type PlatformOAuthClient = $ModelResult<$Schema, 'PlatformOAuthClient'>; +export type PlatformAuthorizationToken = $ModelResult<$Schema, 'PlatformAuthorizationToken'>; +export type AccessToken = $ModelResult<$Schema, 'AccessToken'>; +export type RefreshToken = $ModelResult<$Schema, 'RefreshToken'>; +export type DSyncData = $ModelResult<$Schema, 'DSyncData'>; +export type DSyncTeamGroupMapping = $ModelResult<$Schema, 'DSyncTeamGroupMapping'>; +export type SecondaryEmail = $ModelResult<$Schema, 'SecondaryEmail'>; +export type Task = $ModelResult<$Schema, 'Task'>; +export type ManagedOrganization = $ModelResult<$Schema, 'ManagedOrganization'>; +export type PlatformBilling = $ModelResult<$Schema, 'PlatformBilling'>; +export type AttributeOption = $ModelResult<$Schema, 'AttributeOption'>; +export type Attribute = $ModelResult<$Schema, 'Attribute'>; +export type AttributeToUser = $ModelResult<$Schema, 'AttributeToUser'>; +export type AssignmentReason = $ModelResult<$Schema, 'AssignmentReason'>; +export type DelegationCredential = $ModelResult<$Schema, 'DelegationCredential'>; +export type DomainWideDelegation = $ModelResult<$Schema, 'DomainWideDelegation'>; +export type WorkspacePlatform = $ModelResult<$Schema, 'WorkspacePlatform'>; +export type EventTypeTranslation = $ModelResult<$Schema, 'EventTypeTranslation'>; +export type Watchlist = $ModelResult<$Schema, 'Watchlist'>; +export type OrganizationOnboarding = $ModelResult<$Schema, 'OrganizationOnboarding'>; +export type App_RoutingForms_IncompleteBookingActions = $ModelResult< + $Schema, + 'App_RoutingForms_IncompleteBookingActions' +>; +export type InternalNotePreset = $ModelResult<$Schema, 'InternalNotePreset'>; +export type FilterSegment = $ModelResult<$Schema, 'FilterSegment'>; +export type UserFilterSegmentPreference = $ModelResult<$Schema, 'UserFilterSegmentPreference'>; +export type BookingInternalNote = $ModelResult<$Schema, 'BookingInternalNote'>; +export type WorkflowOptOutContact = $ModelResult<$Schema, 'WorkflowOptOutContact'>; +export type Role = $ModelResult<$Schema, 'Role'>; +export type RolePermission = $ModelResult<$Schema, 'RolePermission'>; export const SchedulingType = $schema.enums.SchedulingType.values; export type SchedulingType = (typeof SchedulingType)[keyof typeof SchedulingType]; export const PeriodType = $schema.enums.PeriodType.values; @@ -157,7 +160,8 @@ export type AttributeType = (typeof AttributeType)[keyof typeof AttributeType]; export const AssignmentReasonEnum = $schema.enums.AssignmentReasonEnum.values; export type AssignmentReasonEnum = (typeof AssignmentReasonEnum)[keyof typeof AssignmentReasonEnum]; export const EventTypeAutoTranslatedField = $schema.enums.EventTypeAutoTranslatedField.values; -export type EventTypeAutoTranslatedField = (typeof EventTypeAutoTranslatedField)[keyof typeof EventTypeAutoTranslatedField]; +export type EventTypeAutoTranslatedField = + (typeof EventTypeAutoTranslatedField)[keyof typeof EventTypeAutoTranslatedField]; export const WatchlistType = $schema.enums.WatchlistType.values; export type WatchlistType = (typeof WatchlistType)[keyof typeof WatchlistType]; export const WatchlistSeverity = $schema.enums.WatchlistSeverity.values; @@ -165,7 +169,8 @@ export type WatchlistSeverity = (typeof WatchlistSeverity)[keyof typeof Watchlis export const BillingPeriod = $schema.enums.BillingPeriod.values; export type BillingPeriod = (typeof BillingPeriod)[keyof typeof BillingPeriod]; export const IncompleteBookingActionType = $schema.enums.IncompleteBookingActionType.values; -export type IncompleteBookingActionType = (typeof IncompleteBookingActionType)[keyof typeof IncompleteBookingActionType]; +export type IncompleteBookingActionType = + (typeof IncompleteBookingActionType)[keyof typeof IncompleteBookingActionType]; export const FilterSegmentScope = $schema.enums.FilterSegmentScope.values; export type FilterSegmentScope = (typeof FilterSegmentScope)[keyof typeof FilterSegmentScope]; export const WorkflowContactType = $schema.enums.WorkflowContactType.values; diff --git a/tests/e2e/github-repos/cal.com/schema.ts b/tests/e2e/github-repos/cal.com/schema.ts index 787417aee..2af7655de 100644 --- a/tests/e2e/github-repos/cal.com/schema.ts +++ b/tests/e2e/github-repos/cal.com/schema.ts @@ -5,9673 +5,14666 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { Host: { - name: "Host", + name: 'Host', fields: { user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "hosts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'hosts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', id: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, eventType: { - name: "eventType", - type: "EventType", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "hosts", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + name: 'eventType', + type: 'EventType', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'hosts', fields: ['eventTypeId'], references: ['id'], onDelete: 'Cascade' }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", + name: 'eventTypeId', + type: 'Int', id: true, - foreignKeyFor: [ - "eventType" - ] as readonly string[] + foreignKeyFor: ['eventType'] as readonly string[], }, isFixed: { - name: "isFixed", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isFixed', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, priority: { - name: "priority", - type: "Int", - optional: true + name: 'priority', + type: 'Int', + optional: true, }, weight: { - name: "weight", - type: "Int", - optional: true + name: 'weight', + type: 'Int', + optional: true, }, weightAdjustment: { - name: "weightAdjustment", - type: "Int", - optional: true + name: 'weightAdjustment', + type: 'Int', + optional: true, }, schedule: { - name: "schedule", - type: "Schedule", + name: 'schedule', + type: 'Schedule', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "Host", fields: ["scheduleId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'Host', fields: ['scheduleId'], references: ['id'] }, }, scheduleId: { - name: "scheduleId", - type: "Int", + name: 'scheduleId', + type: 'Int', optional: true, - foreignKeyFor: [ - "schedule" - ] as readonly string[] + foreignKeyFor: ['schedule'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('eventTypeId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["userId", "eventTypeId"], + idFields: ['userId', 'eventTypeId'], uniqueFields: { - userId_eventTypeId: { userId: { type: "Int" }, eventTypeId: { type: "Int" } } - } + userId_eventTypeId: { userId: { type: 'Int' }, eventTypeId: { type: 'Int' } }, + }, }, CalVideoSettings: { - name: "CalVideoSettings", + name: 'CalVideoSettings', fields: { eventTypeId: { - name: "eventTypeId", - type: "Int", + name: 'eventTypeId', + type: 'Int', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "eventType" - ] as readonly string[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], + foreignKeyFor: ['eventType'] as readonly string[], }, eventType: { - name: "eventType", - type: "EventType", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "calVideoSettings", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + name: 'eventType', + type: 'EventType', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'calVideoSettings', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, disableRecordingForOrganizer: { - name: "disableRecordingForOrganizer", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableRecordingForOrganizer', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, disableRecordingForGuests: { - name: "disableRecordingForGuests", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableRecordingForGuests', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, enableAutomaticTranscription: { - name: "enableAutomaticTranscription", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'enableAutomaticTranscription', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, redirectUrlOnExit: { - name: "redirectUrlOnExit", - type: "String", - optional: true + name: 'redirectUrlOnExit', + type: 'String', + optional: true, }, disableTranscriptionForGuests: { - name: "disableTranscriptionForGuests", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableTranscriptionForGuests', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, disableTranscriptionForOrganizer: { - name: "disableTranscriptionForOrganizer", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableTranscriptionForOrganizer', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["eventTypeId"], + idFields: ['eventTypeId'], uniqueFields: { - eventTypeId: { type: "Int" } - } + eventTypeId: { type: 'Int' }, + }, }, EventType: { - name: "EventType", + name: 'EventType', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, slug: { - name: "slug", - type: "String" + name: 'slug', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, interfaceLanguage: { - name: "interfaceLanguage", - type: "String", - optional: true + name: 'interfaceLanguage', + type: 'String', + optional: true, }, position: { - name: "position", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'position', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, locations: { - name: "locations", - type: "Json", - optional: true + name: 'locations', + type: 'Json', + optional: true, }, length: { - name: "length", - type: "Int" + name: 'length', + type: 'Int', }, offsetStart: { - name: "offsetStart", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'offsetStart', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, hidden: { - name: "hidden", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hidden', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hosts: { - name: "hosts", - type: "Host", + name: 'hosts', + type: 'Host', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, users: { - name: "users", - type: "User", + name: 'users', + type: 'User', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("user_eventtype") }] }] as readonly AttributeApplication[], - relation: { opposite: "eventTypes", name: "user_eventtype" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('user_eventtype') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'eventTypes', name: 'user_eventtype' }, }, owner: { - name: "owner", - type: "User", + name: 'owner', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("owner") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "ownedEventTypes", name: "owner", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('owner') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'ownedEventTypes', + name: 'owner', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "owner" - ] as readonly string[] + foreignKeyFor: ['owner'] as readonly string[], }, profileId: { - name: "profileId", - type: "Int", + name: 'profileId', + type: 'Int', optional: true, - foreignKeyFor: [ - "profile" - ] as readonly string[] + foreignKeyFor: ['profile'] as readonly string[], }, profile: { - name: "profile", - type: "Profile", + name: 'profile', + type: 'Profile', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("profileId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "eventTypes", fields: ["profileId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('profileId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'eventTypes', fields: ['profileId'], references: ['id'] }, }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "eventTypes", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'eventTypes', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, hashedLink: { - name: "hashedLink", - type: "HashedLink", + name: 'hashedLink', + type: 'HashedLink', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, bookings: { - name: "bookings", - type: "Booking", + name: 'bookings', + type: 'Booking', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, availability: { - name: "availability", - type: "Availability", + name: 'availability', + type: 'Availability', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, webhooks: { - name: "webhooks", - type: "Webhook", + name: 'webhooks', + type: 'Webhook', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, destinationCalendar: { - name: "destinationCalendar", - type: "DestinationCalendar", + name: 'destinationCalendar', + type: 'DestinationCalendar', optional: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, useEventLevelSelectedCalendars: { - name: "useEventLevelSelectedCalendars", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'useEventLevelSelectedCalendars', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, eventName: { - name: "eventName", - type: "String", - optional: true + name: 'eventName', + type: 'String', + optional: true, }, customInputs: { - name: "customInputs", - type: "EventTypeCustomInput", + name: 'customInputs', + type: 'EventTypeCustomInput', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - foreignKeyFor: [ - "parent" - ] as readonly string[] + foreignKeyFor: ['parent'] as readonly string[], }, parent: { - name: "parent", - type: "EventType", + name: 'parent', + type: 'EventType', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("managed_eventtype") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "children", name: "managed_eventtype", fields: ["parentId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('managed_eventtype') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'children', + name: 'managed_eventtype', + fields: ['parentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, children: { - name: "children", - type: "EventType", + name: 'children', + type: 'EventType', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("managed_eventtype") }] }] as readonly AttributeApplication[], - relation: { opposite: "parent", name: "managed_eventtype" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('managed_eventtype') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parent', name: 'managed_eventtype' }, }, bookingFields: { - name: "bookingFields", - type: "Json", - optional: true + name: 'bookingFields', + type: 'Json', + optional: true, }, timeZone: { - name: "timeZone", - type: "String", - optional: true + name: 'timeZone', + type: 'String', + optional: true, }, periodType: { - name: "periodType", - type: "PeriodType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNLIMITED") }] }] as readonly AttributeApplication[], - default: "UNLIMITED" as FieldDefault + name: 'periodType', + type: 'PeriodType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNLIMITED') }] }, + ] as readonly AttributeApplication[], + default: 'UNLIMITED' as FieldDefault, }, periodStartDate: { - name: "periodStartDate", - type: "DateTime", - optional: true + name: 'periodStartDate', + type: 'DateTime', + optional: true, }, periodEndDate: { - name: "periodEndDate", - type: "DateTime", - optional: true + name: 'periodEndDate', + type: 'DateTime', + optional: true, }, periodDays: { - name: "periodDays", - type: "Int", - optional: true + name: 'periodDays', + type: 'Int', + optional: true, }, periodCountCalendarDays: { - name: "periodCountCalendarDays", - type: "Boolean", - optional: true + name: 'periodCountCalendarDays', + type: 'Boolean', + optional: true, }, lockTimeZoneToggleOnBookingPage: { - name: "lockTimeZoneToggleOnBookingPage", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'lockTimeZoneToggleOnBookingPage', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, requiresConfirmation: { - name: "requiresConfirmation", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'requiresConfirmation', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, requiresConfirmationWillBlockSlot: { - name: "requiresConfirmationWillBlockSlot", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'requiresConfirmationWillBlockSlot', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, requiresConfirmationForFreeEmail: { - name: "requiresConfirmationForFreeEmail", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'requiresConfirmationForFreeEmail', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, requiresBookerEmailVerification: { - name: "requiresBookerEmailVerification", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'requiresBookerEmailVerification', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, canSendCalVideoTranscriptionEmails: { - name: "canSendCalVideoTranscriptionEmails", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'canSendCalVideoTranscriptionEmails', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, autoTranslateDescriptionEnabled: { - name: "autoTranslateDescriptionEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'autoTranslateDescriptionEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, recurringEvent: { - name: "recurringEvent", - type: "Json", - optional: true + name: 'recurringEvent', + type: 'Json', + optional: true, }, disableGuests: { - name: "disableGuests", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableGuests', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hideCalendarNotes: { - name: "hideCalendarNotes", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideCalendarNotes', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hideCalendarEventDetails: { - name: "hideCalendarEventDetails", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideCalendarEventDetails', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, minimumBookingNotice: { - name: "minimumBookingNotice", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(120) }] }] as readonly AttributeApplication[], - default: 120 as FieldDefault + name: 'minimumBookingNotice', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(120) }] }, + ] as readonly AttributeApplication[], + default: 120 as FieldDefault, }, beforeEventBuffer: { - name: "beforeEventBuffer", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'beforeEventBuffer', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, afterEventBuffer: { - name: "afterEventBuffer", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'afterEventBuffer', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, seatsPerTimeSlot: { - name: "seatsPerTimeSlot", - type: "Int", - optional: true + name: 'seatsPerTimeSlot', + type: 'Int', + optional: true, }, onlyShowFirstAvailableSlot: { - name: "onlyShowFirstAvailableSlot", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'onlyShowFirstAvailableSlot', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, disableCancelling: { - name: "disableCancelling", - type: "Boolean", + name: 'disableCancelling', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, disableRescheduling: { - name: "disableRescheduling", - type: "Boolean", + name: 'disableRescheduling', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, seatsShowAttendees: { - name: "seatsShowAttendees", - type: "Boolean", + name: 'seatsShowAttendees', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, seatsShowAvailabilityCount: { - name: "seatsShowAvailabilityCount", - type: "Boolean", + name: 'seatsShowAvailabilityCount', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, schedulingType: { - name: "schedulingType", - type: "SchedulingType", - optional: true + name: 'schedulingType', + type: 'SchedulingType', + optional: true, }, schedule: { - name: "schedule", - type: "Schedule", + name: 'schedule', + type: 'Schedule', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "eventType", fields: ["scheduleId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'eventType', fields: ['scheduleId'], references: ['id'] }, }, scheduleId: { - name: "scheduleId", - type: "Int", + name: 'scheduleId', + type: 'Int', optional: true, - foreignKeyFor: [ - "schedule" - ] as readonly string[] + foreignKeyFor: ['schedule'] as readonly string[], }, allowReschedulingCancelledBookings: { - name: "allowReschedulingCancelledBookings", - type: "Boolean", + name: 'allowReschedulingCancelledBookings', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, price: { - name: "price", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'price', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, currency: { - name: "currency", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("usd") }] }] as readonly AttributeApplication[], - default: "usd" as FieldDefault + name: 'currency', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('usd') }] }, + ] as readonly AttributeApplication[], + default: 'usd' as FieldDefault, }, slotInterval: { - name: "slotInterval", - type: "Int", - optional: true + name: 'slotInterval', + type: 'Int', + optional: true, }, metadata: { - name: "metadata", - type: "Json", - optional: true + name: 'metadata', + type: 'Json', + optional: true, }, successRedirectUrl: { - name: "successRedirectUrl", - type: "String", - optional: true + name: 'successRedirectUrl', + type: 'String', + optional: true, }, forwardParamsSuccessRedirect: { - name: "forwardParamsSuccessRedirect", - type: "Boolean", + name: 'forwardParamsSuccessRedirect', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, workflows: { - name: "workflows", - type: "WorkflowsOnEventTypes", + name: 'workflows', + type: 'WorkflowsOnEventTypes', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, bookingLimits: { - name: "bookingLimits", - type: "Json", - optional: true + name: 'bookingLimits', + type: 'Json', + optional: true, }, durationLimits: { - name: "durationLimits", - type: "Json", - optional: true + name: 'durationLimits', + type: 'Json', + optional: true, }, isInstantEvent: { - name: "isInstantEvent", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isInstantEvent', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, instantMeetingExpiryTimeOffsetInSeconds: { - name: "instantMeetingExpiryTimeOffsetInSeconds", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(90) }] }] as readonly AttributeApplication[], - default: 90 as FieldDefault + name: 'instantMeetingExpiryTimeOffsetInSeconds', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(90) }] }, + ] as readonly AttributeApplication[], + default: 90 as FieldDefault, }, instantMeetingScheduleId: { - name: "instantMeetingScheduleId", - type: "Int", + name: 'instantMeetingScheduleId', + type: 'Int', optional: true, - foreignKeyFor: [ - "instantMeetingSchedule" - ] as readonly string[] + foreignKeyFor: ['instantMeetingSchedule'] as readonly string[], }, instantMeetingSchedule: { - name: "instantMeetingSchedule", - type: "Schedule", + name: 'instantMeetingSchedule', + type: 'Schedule', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("InstantMeetingSchedule") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("instantMeetingScheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "instantMeetingEvents", name: "InstantMeetingSchedule", fields: ["instantMeetingScheduleId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('InstantMeetingSchedule') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('instantMeetingScheduleId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'instantMeetingEvents', + name: 'InstantMeetingSchedule', + fields: ['instantMeetingScheduleId'], + references: ['id'], + }, }, instantMeetingParameters: { - name: "instantMeetingParameters", - type: "String", - array: true + name: 'instantMeetingParameters', + type: 'String', + array: true, }, assignAllTeamMembers: { - name: "assignAllTeamMembers", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'assignAllTeamMembers', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, assignRRMembersUsingSegment: { - name: "assignRRMembersUsingSegment", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'assignRRMembersUsingSegment', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, rrSegmentQueryValue: { - name: "rrSegmentQueryValue", - type: "Json", - optional: true + name: 'rrSegmentQueryValue', + type: 'Json', + optional: true, }, useEventTypeDestinationCalendarEmail: { - name: "useEventTypeDestinationCalendarEmail", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'useEventTypeDestinationCalendarEmail', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, aiPhoneCallConfig: { - name: "aiPhoneCallConfig", - type: "AIPhoneCallConfiguration", + name: 'aiPhoneCallConfig', + type: 'AIPhoneCallConfiguration', optional: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, isRRWeightsEnabled: { - name: "isRRWeightsEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isRRWeightsEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, fieldTranslations: { - name: "fieldTranslations", - type: "EventTypeTranslation", + name: 'fieldTranslations', + type: 'EventTypeTranslation', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, maxLeadThreshold: { - name: "maxLeadThreshold", - type: "Int", - optional: true + name: 'maxLeadThreshold', + type: 'Int', + optional: true, }, includeNoShowInRRCalculation: { - name: "includeNoShowInRRCalculation", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'includeNoShowInRRCalculation', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, selectedCalendars: { - name: "selectedCalendars", - type: "SelectedCalendar", + name: 'selectedCalendars', + type: 'SelectedCalendar', array: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, allowReschedulingPastBookings: { - name: "allowReschedulingPastBookings", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'allowReschedulingPastBookings', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hideOrganizerEmail: { - name: "hideOrganizerEmail", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideOrganizerEmail', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, maxActiveBookingsPerBooker: { - name: "maxActiveBookingsPerBooker", - type: "Int", - optional: true + name: 'maxActiveBookingsPerBooker', + type: 'Int', + optional: true, }, maxActiveBookingPerBookerOfferReschedule: { - name: "maxActiveBookingPerBookerOfferReschedule", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'maxActiveBookingPerBookerOfferReschedule', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, customReplyToEmail: { - name: "customReplyToEmail", - type: "String", - optional: true + name: 'customReplyToEmail', + type: 'String', + optional: true, }, calVideoSettings: { - name: "calVideoSettings", - type: "CalVideoSettings", + name: 'calVideoSettings', + type: 'CalVideoSettings', optional: true, - relation: { opposite: "eventType" } + relation: { opposite: 'eventType' }, }, eventTypeColor: { - name: "eventTypeColor", - type: "Json", - optional: true + name: 'eventTypeColor', + type: 'Json', + optional: true, }, rescheduleWithSameRoundRobinHost: { - name: "rescheduleWithSameRoundRobinHost", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'rescheduleWithSameRoundRobinHost', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, secondaryEmailId: { - name: "secondaryEmailId", - type: "Int", + name: 'secondaryEmailId', + type: 'Int', optional: true, - foreignKeyFor: [ - "secondaryEmail" - ] as readonly string[] + foreignKeyFor: ['secondaryEmail'] as readonly string[], }, secondaryEmail: { - name: "secondaryEmail", - type: "SecondaryEmail", + name: 'secondaryEmail', + type: 'SecondaryEmail', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "eventTypes", fields: ["secondaryEmailId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'eventTypes', + fields: ['secondaryEmailId'], + references: ['id'], + onDelete: 'Cascade', + }, }, useBookerTimezone: { - name: "useBookerTimezone", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'useBookerTimezone', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, restrictionScheduleId: { - name: "restrictionScheduleId", - type: "Int", + name: 'restrictionScheduleId', + type: 'Int', optional: true, - foreignKeyFor: [ - "restrictionSchedule" - ] as readonly string[] + foreignKeyFor: ['restrictionSchedule'] as readonly string[], }, restrictionSchedule: { - name: "restrictionSchedule", - type: "Schedule", + name: 'restrictionSchedule', + type: 'Schedule', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("restrictionSchedule") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("restrictionScheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "restrictionSchedule", name: "restrictionSchedule", fields: ["restrictionScheduleId"], references: ["id"] } - } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('restrictionSchedule') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('restrictionScheduleId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'restrictionSchedule', + name: 'restrictionSchedule', + fields: ['restrictionScheduleId'], + references: ['id'], + }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("slug")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("slug")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("parentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("profileId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("restrictionScheduleId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('slug'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('slug'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('parentId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('profileId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('restrictionScheduleId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId_slug: { userId: { type: "Int" }, slug: { type: "String" } }, - teamId_slug: { teamId: { type: "Int" }, slug: { type: "String" } }, - userId_parentId: { userId: { type: "Int" }, parentId: { type: "Int" } } - } + id: { type: 'Int' }, + userId_slug: { userId: { type: 'Int' }, slug: { type: 'String' } }, + teamId_slug: { teamId: { type: 'Int' }, slug: { type: 'String' } }, + userId_parentId: { userId: { type: 'Int' }, parentId: { type: 'Int' } }, + }, }, Credential: { - name: "Credential", + name: 'Credential', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, type: { - name: "type", - type: "String" + name: 'type', + type: 'String', }, key: { - name: "key", - type: "Json" + name: 'key', + type: 'Json', }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "credentials", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'credentials', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "credentials", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'credentials', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, app: { - name: "app", - type: "App", + name: 'app', + type: 'App', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "credentials", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'credentials', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, }, appId: { - name: "appId", - type: "String", + name: 'appId', + type: 'String', optional: true, - foreignKeyFor: [ - "app" - ] as readonly string[] + foreignKeyFor: ['app'] as readonly string[], }, subscriptionId: { - name: "subscriptionId", - type: "String", - optional: true + name: 'subscriptionId', + type: 'String', + optional: true, }, paymentStatus: { - name: "paymentStatus", - type: "String", - optional: true + name: 'paymentStatus', + type: 'String', + optional: true, }, billingCycleStart: { - name: "billingCycleStart", - type: "Int", - optional: true + name: 'billingCycleStart', + type: 'Int', + optional: true, }, destinationCalendars: { - name: "destinationCalendars", - type: "DestinationCalendar", + name: 'destinationCalendars', + type: 'DestinationCalendar', array: true, - relation: { opposite: "credential" } + relation: { opposite: 'credential' }, }, selectedCalendars: { - name: "selectedCalendars", - type: "SelectedCalendar", + name: 'selectedCalendars', + type: 'SelectedCalendar', array: true, - relation: { opposite: "credential" } + relation: { opposite: 'credential' }, }, invalid: { - name: "invalid", - type: "Boolean", + name: 'invalid', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, CalendarCache: { - name: "CalendarCache", - type: "CalendarCache", + name: 'CalendarCache', + type: 'CalendarCache', array: true, - relation: { opposite: "credential" } + relation: { opposite: 'credential' }, }, references: { - name: "references", - type: "BookingReference", + name: 'references', + type: 'BookingReference', array: true, - relation: { opposite: "credential" } + relation: { opposite: 'credential' }, }, delegationCredentialId: { - name: "delegationCredentialId", - type: "String", + name: 'delegationCredentialId', + type: 'String', optional: true, - foreignKeyFor: [ - "delegationCredential" - ] as readonly string[] + foreignKeyFor: ['delegationCredential'] as readonly string[], }, delegationCredential: { - name: "delegationCredential", - type: "DelegationCredential", + name: 'delegationCredential', + type: 'DelegationCredential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "credentials", fields: ["delegationCredentialId"], references: ["id"], onDelete: "Cascade" } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('delegationCredentialId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'credentials', + fields: ['delegationCredentialId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("subscriptionId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("invalid")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("delegationCredentialId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('subscriptionId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('invalid')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('delegationCredentialId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, DestinationCalendar: { - name: "DestinationCalendar", + name: 'DestinationCalendar', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, integration: { - name: "integration", - type: "String" + name: 'integration', + type: 'String', }, externalId: { - name: "externalId", - type: "String" + name: 'externalId', + type: 'String', }, primaryEmail: { - name: "primaryEmail", - type: "String", - optional: true + name: 'primaryEmail', + type: 'String', + optional: true, }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "destinationCalendar", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'destinationCalendar', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', array: true, - relation: { opposite: "destinationCalendar" } + relation: { opposite: 'destinationCalendar' }, }, eventType: { - name: "eventType", - type: "EventType", + name: 'eventType', + type: 'EventType', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "destinationCalendar", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'destinationCalendar', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", + name: 'eventTypeId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "eventType" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['eventType'] as readonly string[], }, credentialId: { - name: "credentialId", - type: "Int", + name: 'credentialId', + type: 'Int', optional: true, - foreignKeyFor: [ - "credential" - ] as readonly string[] + foreignKeyFor: ['credential'] as readonly string[], }, credential: { - name: "credential", - type: "Credential", + name: 'credential', + type: 'Credential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "destinationCalendars", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'destinationCalendars', + fields: ['credentialId'], + references: ['id'], + onDelete: 'Cascade', + }, }, delegationCredential: { - name: "delegationCredential", - type: "DelegationCredential", + name: 'delegationCredential', + type: 'DelegationCredential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "destinationCalendar", fields: ["delegationCredentialId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('delegationCredentialId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'destinationCalendar', + fields: ['delegationCredentialId'], + references: ['id'], + onDelete: 'Cascade', + }, }, delegationCredentialId: { - name: "delegationCredentialId", - type: "String", + name: 'delegationCredentialId', + type: 'String', optional: true, - foreignKeyFor: [ - "delegationCredential" - ] as readonly string[] + foreignKeyFor: ['delegationCredential'] as readonly string[], }, domainWideDelegation: { - name: "domainWideDelegation", - type: "DomainWideDelegation", + name: 'domainWideDelegation', + type: 'DomainWideDelegation', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("domainWideDelegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "destinationCalendar", fields: ["domainWideDelegationCredentialId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('domainWideDelegationCredentialId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'destinationCalendar', + fields: ['domainWideDelegationCredentialId'], + references: ['id'], + onDelete: 'Cascade', + }, }, domainWideDelegationCredentialId: { - name: "domainWideDelegationCredentialId", - type: "String", + name: 'domainWideDelegationCredentialId', + type: 'String', optional: true, - foreignKeyFor: [ - "domainWideDelegation" - ] as readonly string[] - } + foreignKeyFor: ['domainWideDelegation'] as readonly string[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId: { type: "Int" }, - eventTypeId: { type: "Int" } - } + id: { type: 'Int' }, + userId: { type: 'Int' }, + eventTypeId: { type: 'Int' }, + }, }, UserPassword: { - name: "UserPassword", + name: 'UserPassword', fields: { hash: { - name: "hash", - type: "String" + name: 'hash', + type: 'String', }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "password", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'password', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + }, }, - idFields: ["userId"], + idFields: ['userId'], uniqueFields: { - userId: { type: "Int" } - } + userId: { type: 'Int' }, + }, }, TravelSchedule: { - name: "TravelSchedule", + name: 'TravelSchedule', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "travelSchedules", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'travelSchedules', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, timeZone: { - name: "timeZone", - type: "String" + name: 'timeZone', + type: 'String', }, startDate: { - name: "startDate", - type: "DateTime" + name: 'startDate', + type: 'DateTime', }, endDate: { - name: "endDate", - type: "DateTime", - optional: true + name: 'endDate', + type: 'DateTime', + optional: true, }, prevTimeZone: { - name: "prevTimeZone", - type: "String", - optional: true - } + name: 'prevTimeZone', + type: 'String', + optional: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("startDate")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("endDate")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('startDate')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('endDate')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, username: { - name: "username", - type: "String", - optional: true + name: 'username', + type: 'String', + optional: true, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, emailVerified: { - name: "emailVerified", - type: "DateTime", - optional: true + name: 'emailVerified', + type: 'DateTime', + optional: true, }, password: { - name: "password", - type: "UserPassword", + name: 'password', + type: 'UserPassword', optional: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, bio: { - name: "bio", - type: "String", - optional: true + name: 'bio', + type: 'String', + optional: true, }, avatarUrl: { - name: "avatarUrl", - type: "String", - optional: true + name: 'avatarUrl', + type: 'String', + optional: true, }, timeZone: { - name: "timeZone", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Europe/London") }] }] as readonly AttributeApplication[], - default: "Europe/London" as FieldDefault + name: 'timeZone', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('Europe/London') }], + }, + ] as readonly AttributeApplication[], + default: 'Europe/London' as FieldDefault, }, travelSchedules: { - name: "travelSchedules", - type: "TravelSchedule", + name: 'travelSchedules', + type: 'TravelSchedule', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, weekStart: { - name: "weekStart", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Sunday") }] }] as readonly AttributeApplication[], - default: "Sunday" as FieldDefault + name: 'weekStart', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('Sunday') }] }, + ] as readonly AttributeApplication[], + default: 'Sunday' as FieldDefault, }, startTime: { - name: "startTime", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'startTime', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, endTime: { - name: "endTime", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1440) }] }] as readonly AttributeApplication[], - default: 1440 as FieldDefault + name: 'endTime', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1440) }] }, + ] as readonly AttributeApplication[], + default: 1440 as FieldDefault, }, bufferTime: { - name: "bufferTime", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'bufferTime', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, hideBranding: { - name: "hideBranding", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideBranding', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, theme: { - name: "theme", - type: "String", - optional: true + name: 'theme', + type: 'String', + optional: true, }, appTheme: { - name: "appTheme", - type: "String", - optional: true + name: 'appTheme', + type: 'String', + optional: true, }, createdDate: { - name: "createdDate", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdDate', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, trialEndsAt: { - name: "trialEndsAt", - type: "DateTime", - optional: true + name: 'trialEndsAt', + type: 'DateTime', + optional: true, }, lastActiveAt: { - name: "lastActiveAt", - type: "DateTime", - optional: true + name: 'lastActiveAt', + type: 'DateTime', + optional: true, }, eventTypes: { - name: "eventTypes", - type: "EventType", + name: 'eventTypes', + type: 'EventType', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("user_eventtype") }] }] as readonly AttributeApplication[], - relation: { opposite: "users", name: "user_eventtype" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('user_eventtype') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'users', name: 'user_eventtype' }, }, credentials: { - name: "credentials", - type: "Credential", + name: 'credentials', + type: 'Credential', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, teams: { - name: "teams", - type: "Membership", + name: 'teams', + type: 'Membership', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, bookings: { - name: "bookings", - type: "Booking", + name: 'bookings', + type: 'Booking', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, schedules: { - name: "schedules", - type: "Schedule", + name: 'schedules', + type: 'Schedule', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, defaultScheduleId: { - name: "defaultScheduleId", - type: "Int", - optional: true + name: 'defaultScheduleId', + type: 'Int', + optional: true, }, selectedCalendars: { - name: "selectedCalendars", - type: "SelectedCalendar", + name: 'selectedCalendars', + type: 'SelectedCalendar', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, completedOnboarding: { - name: "completedOnboarding", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'completedOnboarding', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, locale: { - name: "locale", - type: "String", - optional: true + name: 'locale', + type: 'String', + optional: true, }, timeFormat: { - name: "timeFormat", - type: "Int", + name: 'timeFormat', + type: 'Int', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(12) }] }] as readonly AttributeApplication[], - default: 12 as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(12) }] }, + ] as readonly AttributeApplication[], + default: 12 as FieldDefault, }, twoFactorSecret: { - name: "twoFactorSecret", - type: "String", - optional: true + name: 'twoFactorSecret', + type: 'String', + optional: true, }, twoFactorEnabled: { - name: "twoFactorEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'twoFactorEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, backupCodes: { - name: "backupCodes", - type: "String", - optional: true + name: 'backupCodes', + type: 'String', + optional: true, }, identityProvider: { - name: "identityProvider", - type: "IdentityProvider", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CAL") }] }] as readonly AttributeApplication[], - default: "CAL" as FieldDefault + name: 'identityProvider', + type: 'IdentityProvider', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CAL') }] }, + ] as readonly AttributeApplication[], + default: 'CAL' as FieldDefault, }, identityProviderId: { - name: "identityProviderId", - type: "String", - optional: true + name: 'identityProviderId', + type: 'String', + optional: true, }, availability: { - name: "availability", - type: "Availability", + name: 'availability', + type: 'Availability', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, invitedTo: { - name: "invitedTo", - type: "Int", - optional: true + name: 'invitedTo', + type: 'Int', + optional: true, }, webhooks: { - name: "webhooks", - type: "Webhook", + name: 'webhooks', + type: 'Webhook', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, brandColor: { - name: "brandColor", - type: "String", - optional: true + name: 'brandColor', + type: 'String', + optional: true, }, darkBrandColor: { - name: "darkBrandColor", - type: "String", - optional: true + name: 'darkBrandColor', + type: 'String', + optional: true, }, destinationCalendar: { - name: "destinationCalendar", - type: "DestinationCalendar", + name: 'destinationCalendar', + type: 'DestinationCalendar', optional: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, allowDynamicBooking: { - name: "allowDynamicBooking", - type: "Boolean", + name: 'allowDynamicBooking', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, allowSEOIndexing: { - name: "allowSEOIndexing", - type: "Boolean", + name: 'allowSEOIndexing', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, receiveMonthlyDigestEmail: { - name: "receiveMonthlyDigestEmail", - type: "Boolean", + name: 'receiveMonthlyDigestEmail', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, metadata: { - name: "metadata", - type: "Json", - optional: true + name: 'metadata', + type: 'Json', + optional: true, }, verified: { - name: "verified", - type: "Boolean", + name: 'verified', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, role: { - name: "role", - type: "UserPermissionRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], - default: "USER" as FieldDefault + name: 'role', + type: 'UserPermissionRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, + ] as readonly AttributeApplication[], + default: 'USER' as FieldDefault, }, disableImpersonation: { - name: "disableImpersonation", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableImpersonation', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, impersonatedUsers: { - name: "impersonatedUsers", - type: "Impersonations", + name: 'impersonatedUsers', + type: 'Impersonations', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_user") }] }] as readonly AttributeApplication[], - relation: { opposite: "impersonatedUser", name: "impersonated_user" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('impersonated_user') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'impersonatedUser', name: 'impersonated_user' }, }, impersonatedBy: { - name: "impersonatedBy", - type: "Impersonations", + name: 'impersonatedBy', + type: 'Impersonations', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_by_user") }] }] as readonly AttributeApplication[], - relation: { opposite: "impersonatedBy", name: "impersonated_by_user" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('impersonated_by_user') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'impersonatedBy', name: 'impersonated_by_user' }, }, apiKeys: { - name: "apiKeys", - type: "ApiKey", + name: 'apiKeys', + type: 'ApiKey', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, accounts: { - name: "accounts", - type: "Account", + name: 'accounts', + type: 'Account', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, sessions: { - name: "sessions", - type: "Session", + name: 'sessions', + type: 'Session', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, Feedback: { - name: "Feedback", - type: "Feedback", + name: 'Feedback', + type: 'Feedback', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, ownedEventTypes: { - name: "ownedEventTypes", - type: "EventType", + name: 'ownedEventTypes', + type: 'EventType', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("owner") }] }] as readonly AttributeApplication[], - relation: { opposite: "owner", name: "owner" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('owner') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'owner', name: 'owner' }, }, workflows: { - name: "workflows", - type: "Workflow", + name: 'workflows', + type: 'Workflow', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, routingForms: { - name: "routingForms", - type: "App_RoutingForms_Form", + name: 'routingForms', + type: 'App_RoutingForms_Form', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("routing-form") }] }] as readonly AttributeApplication[], - relation: { opposite: "user", name: "routing-form" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('routing-form') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'user', name: 'routing-form' }, }, updatedRoutingForms: { - name: "updatedRoutingForms", - type: "App_RoutingForms_Form", + name: 'updatedRoutingForms', + type: 'App_RoutingForms_Form', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updated-routing-form") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedBy", name: "updated-routing-form" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('updated-routing-form') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'updatedBy', name: 'updated-routing-form' }, }, verifiedNumbers: { - name: "verifiedNumbers", - type: "VerifiedNumber", + name: 'verifiedNumbers', + type: 'VerifiedNumber', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, verifiedEmails: { - name: "verifiedEmails", - type: "VerifiedEmail", + name: 'verifiedEmails', + type: 'VerifiedEmail', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, hosts: { - name: "hosts", - type: "Host", + name: 'hosts', + type: 'Host', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, organizationId: { - name: "organizationId", - type: "Int", + name: 'organizationId', + type: 'Int', optional: true, - foreignKeyFor: [ - "organization" - ] as readonly string[] + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Team", + name: 'organization', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("scope") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "orgUsers", name: "scope", fields: ["organizationId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('scope') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'orgUsers', + name: 'scope', + fields: ['organizationId'], + references: ['id'], + onDelete: 'SetNull', + }, }, accessCodes: { - name: "accessCodes", - type: "AccessCode", + name: 'accessCodes', + type: 'AccessCode', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, bookingRedirects: { - name: "bookingRedirects", - type: "OutOfOfficeEntry", + name: 'bookingRedirects', + type: 'OutOfOfficeEntry', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, bookingRedirectsTo: { - name: "bookingRedirectsTo", - type: "OutOfOfficeEntry", + name: 'bookingRedirectsTo', + type: 'OutOfOfficeEntry', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("toUser") }] }] as readonly AttributeApplication[], - relation: { opposite: "toUser", name: "toUser" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('toUser') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'toUser', name: 'toUser' }, }, locked: { - name: "locked", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'locked', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, platformOAuthClients: { - name: "platformOAuthClients", - type: "PlatformOAuthClient", + name: 'platformOAuthClients', + type: 'PlatformOAuthClient', array: true, - relation: { opposite: "users" } + relation: { opposite: 'users' }, }, AccessToken: { - name: "AccessToken", - type: "AccessToken", + name: 'AccessToken', + type: 'AccessToken', array: true, - relation: { opposite: "owner" } + relation: { opposite: 'owner' }, }, RefreshToken: { - name: "RefreshToken", - type: "RefreshToken", + name: 'RefreshToken', + type: 'RefreshToken', array: true, - relation: { opposite: "owner" } + relation: { opposite: 'owner' }, }, PlatformAuthorizationToken: { - name: "PlatformAuthorizationToken", - type: "PlatformAuthorizationToken", + name: 'PlatformAuthorizationToken', + type: 'PlatformAuthorizationToken', array: true, - relation: { opposite: "owner" } + relation: { opposite: 'owner' }, }, profiles: { - name: "profiles", - type: "Profile", + name: 'profiles', + type: 'Profile', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, movedToProfileId: { - name: "movedToProfileId", - type: "Int", + name: 'movedToProfileId', + type: 'Int', optional: true, - foreignKeyFor: [ - "movedToProfile" - ] as readonly string[] + foreignKeyFor: ['movedToProfile'] as readonly string[], }, movedToProfile: { - name: "movedToProfile", - type: "Profile", + name: 'movedToProfile', + type: 'Profile', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("moved_to_profile") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("movedToProfileId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "movedFromUser", name: "moved_to_profile", fields: ["movedToProfileId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('moved_to_profile') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('movedToProfileId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'movedFromUser', + name: 'moved_to_profile', + fields: ['movedToProfileId'], + references: ['id'], + onDelete: 'SetNull', + }, }, secondaryEmails: { - name: "secondaryEmails", - type: "SecondaryEmail", + name: 'secondaryEmails', + type: 'SecondaryEmail', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, isPlatformManaged: { - name: "isPlatformManaged", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isPlatformManaged', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, OutOfOfficeReasons: { - name: "OutOfOfficeReasons", - type: "OutOfOfficeReason", + name: 'OutOfOfficeReasons', + type: 'OutOfOfficeReason', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, smsLockState: { - name: "smsLockState", - type: "SMSLockState", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNLOCKED") }] }] as readonly AttributeApplication[], - default: "UNLOCKED" as FieldDefault + name: 'smsLockState', + type: 'SMSLockState', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNLOCKED') }] }, + ] as readonly AttributeApplication[], + default: 'UNLOCKED' as FieldDefault, }, smsLockReviewedByAdmin: { - name: "smsLockReviewedByAdmin", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'smsLockReviewedByAdmin', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, NotificationsSubscriptions: { - name: "NotificationsSubscriptions", - type: "NotificationsSubscriptions", + name: 'NotificationsSubscriptions', + type: 'NotificationsSubscriptions', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, referralLinkId: { - name: "referralLinkId", - type: "String", - optional: true + name: 'referralLinkId', + type: 'String', + optional: true, }, features: { - name: "features", - type: "UserFeatures", + name: 'features', + type: 'UserFeatures', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, reassignedBookings: { - name: "reassignedBookings", - type: "Booking", + name: 'reassignedBookings', + type: 'Booking', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("reassignByUser") }] }] as readonly AttributeApplication[], - relation: { opposite: "reassignBy", name: "reassignByUser" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('reassignByUser') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'reassignBy', name: 'reassignByUser' }, }, createdAttributeToUsers: { - name: "createdAttributeToUsers", - type: "AttributeToUser", + name: 'createdAttributeToUsers', + type: 'AttributeToUser', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdBy") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdBy", name: "createdBy" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('createdBy') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'createdBy', name: 'createdBy' }, }, updatedAttributeToUsers: { - name: "updatedAttributeToUsers", - type: "AttributeToUser", + name: 'updatedAttributeToUsers', + type: 'AttributeToUser', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedBy") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedBy", name: "updatedBy" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('updatedBy') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'updatedBy', name: 'updatedBy' }, }, createdTranslations: { - name: "createdTranslations", - type: "EventTypeTranslation", + name: 'createdTranslations', + type: 'EventTypeTranslation', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedEventTypeTranslations") }] }] as readonly AttributeApplication[], - relation: { opposite: "creator", name: "CreatedEventTypeTranslations" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CreatedEventTypeTranslations') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'creator', name: 'CreatedEventTypeTranslations' }, }, updatedTranslations: { - name: "updatedTranslations", - type: "EventTypeTranslation", + name: 'updatedTranslations', + type: 'EventTypeTranslation', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedEventTypeTranslations") }] }] as readonly AttributeApplication[], - relation: { opposite: "updater", name: "UpdatedEventTypeTranslations" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('UpdatedEventTypeTranslations') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'updater', name: 'UpdatedEventTypeTranslations' }, }, createdWatchlists: { - name: "createdWatchlists", - type: "Watchlist", + name: 'createdWatchlists', + type: 'Watchlist', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedWatchlists") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdBy", name: "CreatedWatchlists" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CreatedWatchlists') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'createdBy', name: 'CreatedWatchlists' }, }, updatedWatchlists: { - name: "updatedWatchlists", - type: "Watchlist", + name: 'updatedWatchlists', + type: 'Watchlist', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedWatchlists") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedBy", name: "UpdatedWatchlists" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('UpdatedWatchlists') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'updatedBy', name: 'UpdatedWatchlists' }, }, BookingInternalNote: { - name: "BookingInternalNote", - type: "BookingInternalNote", + name: 'BookingInternalNote', + type: 'BookingInternalNote', array: true, - relation: { opposite: "createdBy" } + relation: { opposite: 'createdBy' }, }, creationSource: { - name: "creationSource", - type: "CreationSource", - optional: true + name: 'creationSource', + type: 'CreationSource', + optional: true, }, createdOrganizationOnboardings: { - name: "createdOrganizationOnboardings", - type: "OrganizationOnboarding", + name: 'createdOrganizationOnboardings', + type: 'OrganizationOnboarding', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedOrganizationOnboardings") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdBy", name: "CreatedOrganizationOnboardings" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CreatedOrganizationOnboardings') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'createdBy', name: 'CreatedOrganizationOnboardings' }, }, filterSegments: { - name: "filterSegments", - type: "FilterSegment", + name: 'filterSegments', + type: 'FilterSegment', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, filterSegmentPreferences: { - name: "filterSegmentPreferences", - type: "UserFilterSegmentPreference", + name: 'filterSegmentPreferences', + type: 'UserFilterSegmentPreference', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, creditBalance: { - name: "creditBalance", - type: "CreditBalance", + name: 'creditBalance', + type: 'CreditBalance', optional: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, whitelistWorkflows: { - name: "whitelistWorkflows", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'whitelistWorkflows', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email"), ExpressionUtils.field("username")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("username"), ExpressionUtils.field("organizationId")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("movedToProfileId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("username")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("emailVerified")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("IdentityProvider", [ExpressionUtils.field("identityProvider")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("identityProviderId")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("users") }] } + { + name: '@@unique', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('email'), + ExpressionUtils.field('username'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('username'), + ExpressionUtils.field('organizationId'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('movedToProfileId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('username')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('emailVerified')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('IdentityProvider', [ + ExpressionUtils.field('identityProvider'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('identityProviderId')]), + }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('users') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - email: { type: "String" }, - email_username: { email: { type: "String" }, username: { type: "String" } }, - username_organizationId: { username: { type: "String" }, organizationId: { type: "Int" } }, - movedToProfileId: { type: "Int" } - } + id: { type: 'Int' }, + email: { type: 'String' }, + email_username: { email: { type: 'String' }, username: { type: 'String' } }, + username_organizationId: { username: { type: 'String' }, organizationId: { type: 'Int' } }, + movedToProfileId: { type: 'Int' }, + }, }, NotificationsSubscriptions: { - name: "NotificationsSubscriptions", + name: 'NotificationsSubscriptions', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "NotificationsSubscriptions", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'NotificationsSubscriptions', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, subscription: { - name: "subscription", - type: "String" - } + name: 'subscription', + type: 'String', + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("subscription")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('subscription'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Profile: { - name: "Profile", + name: 'Profile', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, uid: { - name: "uid", - type: "String" + name: 'uid', + type: 'String', }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "profiles", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'profiles', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "orgProfiles", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'orgProfiles', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, username: { - name: "username", - type: "String" + name: 'username', + type: 'String', }, eventTypes: { - name: "eventTypes", - type: "EventType", + name: 'eventTypes', + type: 'EventType', array: true, - relation: { opposite: "profile" } + relation: { opposite: 'profile' }, }, movedFromUser: { - name: "movedFromUser", - type: "User", + name: 'movedFromUser', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("moved_to_profile") }] }] as readonly AttributeApplication[], - relation: { opposite: "movedToProfile", name: "moved_to_profile" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('moved_to_profile') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'movedToProfile', name: 'moved_to_profile' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("organizationId")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("username"), ExpressionUtils.field("organizationId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('organizationId'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('username'), + ExpressionUtils.field('organizationId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId_organizationId: { userId: { type: "Int" }, organizationId: { type: "Int" } }, - username_organizationId: { username: { type: "String" }, organizationId: { type: "Int" } } - } + id: { type: 'Int' }, + userId_organizationId: { userId: { type: 'Int' }, organizationId: { type: 'Int' } }, + username_organizationId: { username: { type: 'String' }, organizationId: { type: 'Int' } }, + }, }, Team: { - name: "Team", + name: 'Team', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, slug: { - name: "slug", - type: "String", - optional: true + name: 'slug', + type: 'String', + optional: true, }, logoUrl: { - name: "logoUrl", - type: "String", - optional: true + name: 'logoUrl', + type: 'String', + optional: true, }, calVideoLogo: { - name: "calVideoLogo", - type: "String", - optional: true + name: 'calVideoLogo', + type: 'String', + optional: true, }, appLogo: { - name: "appLogo", - type: "String", - optional: true + name: 'appLogo', + type: 'String', + optional: true, }, appIconLogo: { - name: "appIconLogo", - type: "String", - optional: true + name: 'appIconLogo', + type: 'String', + optional: true, }, bio: { - name: "bio", - type: "String", - optional: true + name: 'bio', + type: 'String', + optional: true, }, hideBranding: { - name: "hideBranding", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideBranding', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hideTeamProfileLink: { - name: "hideTeamProfileLink", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideTeamProfileLink', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isPrivate: { - name: "isPrivate", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isPrivate', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hideBookATeamMember: { - name: "hideBookATeamMember", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hideBookATeamMember', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, members: { - name: "members", - type: "Membership", + name: 'members', + type: 'Membership', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, eventTypes: { - name: "eventTypes", - type: "EventType", + name: 'eventTypes', + type: 'EventType', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, workflows: { - name: "workflows", - type: "Workflow", + name: 'workflows', + type: 'Workflow', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, metadata: { - name: "metadata", - type: "Json", - optional: true + name: 'metadata', + type: 'Json', + optional: true, }, theme: { - name: "theme", - type: "String", - optional: true + name: 'theme', + type: 'String', + optional: true, }, rrResetInterval: { - name: "rrResetInterval", - type: "RRResetInterval", + name: 'rrResetInterval', + type: 'RRResetInterval', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MONTH") }] }] as readonly AttributeApplication[], - default: "MONTH" as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MONTH') }] }, + ] as readonly AttributeApplication[], + default: 'MONTH' as FieldDefault, }, rrTimestampBasis: { - name: "rrTimestampBasis", - type: "RRTimestampBasis", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CREATED_AT") }] }] as readonly AttributeApplication[], - default: "CREATED_AT" as FieldDefault + name: 'rrTimestampBasis', + type: 'RRTimestampBasis', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CREATED_AT') }] }, + ] as readonly AttributeApplication[], + default: 'CREATED_AT' as FieldDefault, }, brandColor: { - name: "brandColor", - type: "String", - optional: true + name: 'brandColor', + type: 'String', + optional: true, }, darkBrandColor: { - name: "darkBrandColor", - type: "String", - optional: true + name: 'darkBrandColor', + type: 'String', + optional: true, }, verifiedNumbers: { - name: "verifiedNumbers", - type: "VerifiedNumber", + name: 'verifiedNumbers', + type: 'VerifiedNumber', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, verifiedEmails: { - name: "verifiedEmails", - type: "VerifiedEmail", + name: 'verifiedEmails', + type: 'VerifiedEmail', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, bannerUrl: { - name: "bannerUrl", - type: "String", - optional: true + name: 'bannerUrl', + type: 'String', + optional: true, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - foreignKeyFor: [ - "parent" - ] as readonly string[] + foreignKeyFor: ['parent'] as readonly string[], }, parent: { - name: "parent", - type: "Team", + name: 'parent', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("organization") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "children", name: "organization", fields: ["parentId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('organization') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'children', + name: 'organization', + fields: ['parentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, children: { - name: "children", - type: "Team", + name: 'children', + type: 'Team', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("organization") }] }] as readonly AttributeApplication[], - relation: { opposite: "parent", name: "organization" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('organization') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parent', name: 'organization' }, }, orgUsers: { - name: "orgUsers", - type: "User", + name: 'orgUsers', + type: 'User', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("scope") }] }] as readonly AttributeApplication[], - relation: { opposite: "organization", name: "scope" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('scope') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'organization', name: 'scope' }, }, inviteTokens: { - name: "inviteTokens", - type: "VerificationToken", + name: 'inviteTokens', + type: 'VerificationToken', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, webhooks: { - name: "webhooks", - type: "Webhook", + name: 'webhooks', + type: 'Webhook', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, timeFormat: { - name: "timeFormat", - type: "Int", - optional: true + name: 'timeFormat', + type: 'Int', + optional: true, }, timeZone: { - name: "timeZone", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Europe/London") }] }] as readonly AttributeApplication[], - default: "Europe/London" as FieldDefault + name: 'timeZone', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('Europe/London') }], + }, + ] as readonly AttributeApplication[], + default: 'Europe/London' as FieldDefault, }, weekStart: { - name: "weekStart", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Sunday") }] }] as readonly AttributeApplication[], - default: "Sunday" as FieldDefault + name: 'weekStart', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('Sunday') }] }, + ] as readonly AttributeApplication[], + default: 'Sunday' as FieldDefault, }, routingForms: { - name: "routingForms", - type: "App_RoutingForms_Form", + name: 'routingForms', + type: 'App_RoutingForms_Form', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, apiKeys: { - name: "apiKeys", - type: "ApiKey", + name: 'apiKeys', + type: 'ApiKey', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, credentials: { - name: "credentials", - type: "Credential", + name: 'credentials', + type: 'Credential', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, accessCodes: { - name: "accessCodes", - type: "AccessCode", + name: 'accessCodes', + type: 'AccessCode', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, isOrganization: { - name: "isOrganization", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isOrganization', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, organizationSettings: { - name: "organizationSettings", - type: "OrganizationSettings", + name: 'organizationSettings', + type: 'OrganizationSettings', optional: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, instantMeetingTokens: { - name: "instantMeetingTokens", - type: "InstantMeetingToken", + name: 'instantMeetingTokens', + type: 'InstantMeetingToken', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, orgProfiles: { - name: "orgProfiles", - type: "Profile", + name: 'orgProfiles', + type: 'Profile', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, pendingPayment: { - name: "pendingPayment", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'pendingPayment', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, dsyncTeamGroupMapping: { - name: "dsyncTeamGroupMapping", - type: "DSyncTeamGroupMapping", + name: 'dsyncTeamGroupMapping', + type: 'DSyncTeamGroupMapping', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, isPlatform: { - name: "isPlatform", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isPlatform', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, platformOAuthClient: { - name: "platformOAuthClient", - type: "PlatformOAuthClient", + name: 'platformOAuthClient', + type: 'PlatformOAuthClient', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, createdByOAuthClient: { - name: "createdByOAuthClient", - type: "PlatformOAuthClient", + name: 'createdByOAuthClient', + type: 'PlatformOAuthClient', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedByOAuthClient") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("createdByOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "teams", name: "CreatedByOAuthClient", fields: ["createdByOAuthClientId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CreatedByOAuthClient') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('createdByOAuthClientId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'teams', + name: 'CreatedByOAuthClient', + fields: ['createdByOAuthClientId'], + references: ['id'], + onDelete: 'Cascade', + }, }, createdByOAuthClientId: { - name: "createdByOAuthClientId", - type: "String", + name: 'createdByOAuthClientId', + type: 'String', optional: true, - foreignKeyFor: [ - "createdByOAuthClient" - ] as readonly string[] + foreignKeyFor: ['createdByOAuthClient'] as readonly string[], }, smsLockState: { - name: "smsLockState", - type: "SMSLockState", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNLOCKED") }] }] as readonly AttributeApplication[], - default: "UNLOCKED" as FieldDefault + name: 'smsLockState', + type: 'SMSLockState', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNLOCKED') }] }, + ] as readonly AttributeApplication[], + default: 'UNLOCKED' as FieldDefault, }, platformBilling: { - name: "platformBilling", - type: "PlatformBilling", + name: 'platformBilling', + type: 'PlatformBilling', optional: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, activeOrgWorkflows: { - name: "activeOrgWorkflows", - type: "WorkflowsOnTeams", + name: 'activeOrgWorkflows', + type: 'WorkflowsOnTeams', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, attributes: { - name: "attributes", - type: "Attribute", + name: 'attributes', + type: 'Attribute', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, smsLockReviewedByAdmin: { - name: "smsLockReviewedByAdmin", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'smsLockReviewedByAdmin', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, delegationCredentials: { - name: "delegationCredentials", - type: "DelegationCredential", + name: 'delegationCredentials', + type: 'DelegationCredential', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, domainWideDelegations: { - name: "domainWideDelegations", - type: "DomainWideDelegation", + name: 'domainWideDelegations', + type: 'DomainWideDelegation', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, roles: { - name: "roles", - type: "Role", + name: 'roles', + type: 'Role', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, features: { - name: "features", - type: "TeamFeatures", + name: 'features', + type: 'TeamFeatures', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, bookingLimits: { - name: "bookingLimits", - type: "Json", - optional: true + name: 'bookingLimits', + type: 'Json', + optional: true, }, includeManagedEventsInLimits: { - name: "includeManagedEventsInLimits", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'includeManagedEventsInLimits', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, internalNotePresets: { - name: "internalNotePresets", - type: "InternalNotePreset", + name: 'internalNotePresets', + type: 'InternalNotePreset', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, creditBalance: { - name: "creditBalance", - type: "CreditBalance", + name: 'creditBalance', + type: 'CreditBalance', optional: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, organizationOnboarding: { - name: "organizationOnboarding", - type: "OrganizationOnboarding", + name: 'organizationOnboarding', + type: 'OrganizationOnboarding', optional: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, managedOrganization: { - name: "managedOrganization", - type: "ManagedOrganization", + name: 'managedOrganization', + type: 'ManagedOrganization', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagedOrganization") }] }] as readonly AttributeApplication[], - relation: { opposite: "managedOrganization", name: "ManagedOrganization" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('ManagedOrganization') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'managedOrganization', name: 'ManagedOrganization' }, }, managedOrganizations: { - name: "managedOrganizations", - type: "ManagedOrganization", + name: 'managedOrganizations', + type: 'ManagedOrganization', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagerOrganization") }] }] as readonly AttributeApplication[], - relation: { opposite: "managerOrganization", name: "ManagerOrganization" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('ManagerOrganization') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'managerOrganization', name: 'ManagerOrganization' }, }, filterSegments: { - name: "filterSegments", - type: "FilterSegment", + name: 'filterSegments', + type: 'FilterSegment', array: true, - relation: { opposite: "team" } - } + relation: { opposite: 'team' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug"), ExpressionUtils.field("parentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('slug'), + ExpressionUtils.field('parentId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - slug_parentId: { slug: { type: "String" }, parentId: { type: "Int" } } - } + id: { type: 'Int' }, + slug_parentId: { slug: { type: 'String' }, parentId: { type: 'Int' } }, + }, }, CreditBalance: { - name: "CreditBalance", + name: 'CreditBalance', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "creditBalance", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'creditBalance', + fields: ['teamId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "team" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['team'] as readonly string[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "creditBalance", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'creditBalance', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], }, additionalCredits: { - name: "additionalCredits", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'additionalCredits', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, limitReachedAt: { - name: "limitReachedAt", - type: "DateTime", - optional: true + name: 'limitReachedAt', + type: 'DateTime', + optional: true, }, warningSentAt: { - name: "warningSentAt", - type: "DateTime", - optional: true + name: 'warningSentAt', + type: 'DateTime', + optional: true, }, expenseLogs: { - name: "expenseLogs", - type: "CreditExpenseLog", + name: 'expenseLogs', + type: 'CreditExpenseLog', array: true, - relation: { opposite: "creditBalance" } + relation: { opposite: 'creditBalance' }, }, purchaseLogs: { - name: "purchaseLogs", - type: "CreditPurchaseLog", + name: 'purchaseLogs', + type: 'CreditPurchaseLog', array: true, - relation: { opposite: "creditBalance" } - } + relation: { opposite: 'creditBalance' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - teamId: { type: "Int" }, - userId: { type: "Int" } - } + id: { type: 'String' }, + teamId: { type: 'Int' }, + userId: { type: 'Int' }, + }, }, CreditPurchaseLog: { - name: "CreditPurchaseLog", + name: 'CreditPurchaseLog', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, creditBalanceId: { - name: "creditBalanceId", - type: "String", - foreignKeyFor: [ - "creditBalance" - ] as readonly string[] + name: 'creditBalanceId', + type: 'String', + foreignKeyFor: ['creditBalance'] as readonly string[], }, creditBalance: { - name: "creditBalance", - type: "CreditBalance", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("creditBalanceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "purchaseLogs", fields: ["creditBalanceId"], references: ["id"], onDelete: "Cascade" } + name: 'creditBalance', + type: 'CreditBalance', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('creditBalanceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'purchaseLogs', + fields: ['creditBalanceId'], + references: ['id'], + onDelete: 'Cascade', + }, }, credits: { - name: "credits", - type: "Int" + name: 'credits', + type: 'Int', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, CreditExpenseLog: { - name: "CreditExpenseLog", + name: 'CreditExpenseLog', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, creditBalanceId: { - name: "creditBalanceId", - type: "String", - foreignKeyFor: [ - "creditBalance" - ] as readonly string[] + name: 'creditBalanceId', + type: 'String', + foreignKeyFor: ['creditBalance'] as readonly string[], }, creditBalance: { - name: "creditBalance", - type: "CreditBalance", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("creditBalanceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "expenseLogs", fields: ["creditBalanceId"], references: ["id"], onDelete: "Cascade" } + name: 'creditBalance', + type: 'CreditBalance', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('creditBalanceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'expenseLogs', + fields: ['creditBalanceId'], + references: ['id'], + onDelete: 'Cascade', + }, }, bookingUid: { - name: "bookingUid", - type: "String", + name: 'bookingUid', + type: 'String', optional: true, - foreignKeyFor: [ - "booking" - ] as readonly string[] + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("bookingUid")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "expenseLogs", fields: ["bookingUid"], references: ["uid"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('bookingUid')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'expenseLogs', + fields: ['bookingUid'], + references: ['uid'], + onDelete: 'Cascade', + }, }, credits: { - name: "credits", - type: "Int", - optional: true + name: 'credits', + type: 'Int', + optional: true, }, creditType: { - name: "creditType", - type: "CreditType" + name: 'creditType', + type: 'CreditType', }, date: { - name: "date", - type: "DateTime" + name: 'date', + type: 'DateTime', }, smsSid: { - name: "smsSid", - type: "String", - optional: true + name: 'smsSid', + type: 'String', + optional: true, }, smsSegments: { - name: "smsSegments", - type: "Int", - optional: true - } + name: 'smsSegments', + type: 'Int', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, OrganizationSettings: { - name: "OrganizationSettings", + name: 'OrganizationSettings', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, organization: { - name: "organization", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "organizationSettings", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'organizationSettings', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "Int", + name: 'organizationId', + type: 'Int', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "organization" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['organization'] as readonly string[], }, isOrganizationConfigured: { - name: "isOrganizationConfigured", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isOrganizationConfigured', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isOrganizationVerified: { - name: "isOrganizationVerified", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isOrganizationVerified', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, orgAutoAcceptEmail: { - name: "orgAutoAcceptEmail", - type: "String" + name: 'orgAutoAcceptEmail', + type: 'String', }, lockEventTypeCreationForUsers: { - name: "lockEventTypeCreationForUsers", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'lockEventTypeCreationForUsers', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, adminGetsNoSlotsNotification: { - name: "adminGetsNoSlotsNotification", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'adminGetsNoSlotsNotification', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isAdminReviewed: { - name: "isAdminReviewed", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isAdminReviewed', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, dSyncData: { - name: "dSyncData", - type: "DSyncData", + name: 'dSyncData', + type: 'DSyncData', optional: true, - relation: { opposite: "org" } + relation: { opposite: 'org' }, }, isAdminAPIEnabled: { - name: "isAdminAPIEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isAdminAPIEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, allowSEOIndexing: { - name: "allowSEOIndexing", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'allowSEOIndexing', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, orgProfileRedirectsToVerifiedDomain: { - name: "orgProfileRedirectsToVerifiedDomain", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'orgProfileRedirectsToVerifiedDomain', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, disablePhoneOnlySMSNotifications: { - name: "disablePhoneOnlySMSNotifications", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'disablePhoneOnlySMSNotifications', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - organizationId: { type: "Int" } - } + id: { type: 'Int' }, + organizationId: { type: 'Int' }, + }, }, Membership: { - name: "Membership", + name: 'Membership', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, accepted: { - name: "accepted", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'accepted', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, role: { - name: "role", - type: "MembershipRole" + name: 'role', + type: 'MembershipRole', }, customRoleId: { - name: "customRoleId", - type: "String", + name: 'customRoleId', + type: 'String', optional: true, - foreignKeyFor: [ - "customRole" - ] as readonly string[] + foreignKeyFor: ['customRole'] as readonly string[], }, customRole: { - name: "customRole", - type: "Role", + name: 'customRole', + type: 'Role', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("customRoleId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "memberships", fields: ["customRoleId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('customRoleId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'memberships', fields: ['customRoleId'], references: ['id'] }, }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "members", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'members', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "teams", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'teams', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, disableImpersonation: { - name: "disableImpersonation", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disableImpersonation', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, AttributeToUser: { - name: "AttributeToUser", - type: "AttributeToUser", + name: 'AttributeToUser', + type: 'AttributeToUser', array: true, - relation: { opposite: "member" } + relation: { opposite: 'member' }, }, createdAt: { - name: "createdAt", - type: "DateTime", + name: 'createdAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("accepted")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("MembershipRole", [ExpressionUtils.field("role")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("customRoleId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('teamId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('accepted')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('MembershipRole', [ExpressionUtils.field('role')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('customRoleId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId_teamId: { userId: { type: "Int" }, teamId: { type: "Int" } } - } + id: { type: 'Int' }, + userId_teamId: { userId: { type: 'Int' }, teamId: { type: 'Int' } }, + }, }, VerificationToken: { - name: "VerificationToken", + name: 'VerificationToken', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, identifier: { - name: "identifier", - type: "String" + name: 'identifier', + type: 'String', }, token: { - name: "token", - type: "String", + name: 'token', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, expires: { - name: "expires", - type: "DateTime" + name: 'expires', + type: 'DateTime', }, expiresInDays: { - name: "expiresInDays", - type: "Int", - optional: true + name: 'expiresInDays', + type: 'Int', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "inviteTokens", fields: ["teamId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'inviteTokens', fields: ['teamId'], references: ['id'] }, }, secondaryEmailId: { - name: "secondaryEmailId", - type: "Int", + name: 'secondaryEmailId', + type: 'Int', optional: true, - foreignKeyFor: [ - "secondaryEmail" - ] as readonly string[] + foreignKeyFor: ['secondaryEmail'] as readonly string[], }, secondaryEmail: { - name: "secondaryEmail", - type: "SecondaryEmail", + name: 'secondaryEmail', + type: 'SecondaryEmail', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "verificationTokens", fields: ["secondaryEmailId"], references: ["id"] } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'verificationTokens', fields: ['secondaryEmailId'], references: ['id'] }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("identifier"), ExpressionUtils.field("token")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("token")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('identifier'), + ExpressionUtils.field('token'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('token')]) }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - token: { type: "String" }, - identifier_token: { identifier: { type: "String" }, token: { type: "String" } } - } + id: { type: 'Int' }, + token: { type: 'String' }, + identifier_token: { identifier: { type: 'String' }, token: { type: 'String' } }, + }, }, InstantMeetingToken: { - name: "InstantMeetingToken", + name: 'InstantMeetingToken', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, token: { - name: "token", - type: "String", + name: 'token', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, expires: { - name: "expires", - type: "DateTime" + name: 'expires', + type: 'DateTime', }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "instantMeetingTokens", fields: ["teamId"], references: ["id"] } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'instantMeetingTokens', fields: ['teamId'], references: ['id'] }, }, bookingId: { - name: "bookingId", - type: "Int", + name: 'bookingId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "booking" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "instantMeetingToken", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'instantMeetingToken', + fields: ['bookingId'], + references: ['id'], + onDelete: 'Cascade', + }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("token")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('token')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - token: { type: "String" }, - bookingId: { type: "Int" } - } + id: { type: 'Int' }, + token: { type: 'String' }, + bookingId: { type: 'Int' }, + }, }, BookingReference: { - name: "BookingReference", + name: 'BookingReference', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, type: { - name: "type", - type: "String" + name: 'type', + type: 'String', }, uid: { - name: "uid", - type: "String" + name: 'uid', + type: 'String', }, meetingId: { - name: "meetingId", - type: "String", - optional: true + name: 'meetingId', + type: 'String', + optional: true, }, thirdPartyRecurringEventId: { - name: "thirdPartyRecurringEventId", - type: "String", - optional: true + name: 'thirdPartyRecurringEventId', + type: 'String', + optional: true, }, meetingPassword: { - name: "meetingPassword", - type: "String", - optional: true + name: 'meetingPassword', + type: 'String', + optional: true, }, meetingUrl: { - name: "meetingUrl", - type: "String", - optional: true + name: 'meetingUrl', + type: 'String', + optional: true, }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "references", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'references', + fields: ['bookingId'], + references: ['id'], + onDelete: 'Cascade', + }, }, bookingId: { - name: "bookingId", - type: "Int", + name: 'bookingId', + type: 'Int', optional: true, - foreignKeyFor: [ - "booking" - ] as readonly string[] + foreignKeyFor: ['booking'] as readonly string[], }, externalCalendarId: { - name: "externalCalendarId", - type: "String", - optional: true + name: 'externalCalendarId', + type: 'String', + optional: true, }, deleted: { - name: "deleted", - type: "Boolean", - optional: true + name: 'deleted', + type: 'Boolean', + optional: true, }, credential: { - name: "credential", - type: "Credential", + name: 'credential', + type: 'Credential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "references", fields: ["credentialId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'references', + fields: ['credentialId'], + references: ['id'], + onDelete: 'SetNull', + }, }, credentialId: { - name: "credentialId", - type: "Int", + name: 'credentialId', + type: 'Int', optional: true, - foreignKeyFor: [ - "credential" - ] as readonly string[] + foreignKeyFor: ['credential'] as readonly string[], }, delegationCredential: { - name: "delegationCredential", - type: "DelegationCredential", + name: 'delegationCredential', + type: 'DelegationCredential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "bookingReferences", fields: ["delegationCredentialId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('delegationCredentialId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'bookingReferences', + fields: ['delegationCredentialId'], + references: ['id'], + onDelete: 'SetNull', + }, }, delegationCredentialId: { - name: "delegationCredentialId", - type: "String", + name: 'delegationCredentialId', + type: 'String', optional: true, - foreignKeyFor: [ - "delegationCredential" - ] as readonly string[] + foreignKeyFor: ['delegationCredential'] as readonly string[], }, domainWideDelegation: { - name: "domainWideDelegation", - type: "DomainWideDelegation", + name: 'domainWideDelegation', + type: 'DomainWideDelegation', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("domainWideDelegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "bookingReferences", fields: ["domainWideDelegationCredentialId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('domainWideDelegationCredentialId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'bookingReferences', + fields: ['domainWideDelegationCredentialId'], + references: ['id'], + onDelete: 'SetNull', + }, }, domainWideDelegationCredentialId: { - name: "domainWideDelegationCredentialId", - type: "String", + name: 'domainWideDelegationCredentialId', + type: 'String', optional: true, - foreignKeyFor: [ - "domainWideDelegation" - ] as readonly string[] - } + foreignKeyFor: ['domainWideDelegation'] as readonly string[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("type")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('type')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Attendee: { - name: "Attendee", + name: 'Attendee', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, timeZone: { - name: "timeZone", - type: "String" + name: 'timeZone', + type: 'String', }, phoneNumber: { - name: "phoneNumber", - type: "String", - optional: true + name: 'phoneNumber', + type: 'String', + optional: true, }, locale: { - name: "locale", - type: "String", + name: 'locale', + type: 'String', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("en") }] }] as readonly AttributeApplication[], - default: "en" as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('en') }] }, + ] as readonly AttributeApplication[], + default: 'en' as FieldDefault, }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attendees", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'attendees', fields: ['bookingId'], references: ['id'], onDelete: 'Cascade' }, }, bookingId: { - name: "bookingId", - type: "Int", + name: 'bookingId', + type: 'Int', optional: true, - foreignKeyFor: [ - "booking" - ] as readonly string[] + foreignKeyFor: ['booking'] as readonly string[], }, bookingSeat: { - name: "bookingSeat", - type: "BookingSeat", + name: 'bookingSeat', + type: 'BookingSeat', optional: true, - relation: { opposite: "attendee" } + relation: { opposite: 'attendee' }, }, noShow: { - name: "noShow", - type: "Boolean", + name: 'noShow', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Booking: { - name: "Booking", + name: 'Booking', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, uid: { - name: "uid", - type: "String", + name: 'uid', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, idempotencyKey: { - name: "idempotencyKey", - type: "String", + name: 'idempotencyKey', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "bookings", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'bookings', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, userPrimaryEmail: { - name: "userPrimaryEmail", - type: "String", - optional: true + name: 'userPrimaryEmail', + type: 'String', + optional: true, }, references: { - name: "references", - type: "BookingReference", + name: 'references', + type: 'BookingReference', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, eventType: { - name: "eventType", - type: "EventType", + name: 'eventType', + type: 'EventType', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "bookings", fields: ["eventTypeId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'bookings', fields: ['eventTypeId'], references: ['id'] }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", + name: 'eventTypeId', + type: 'Int', optional: true, - foreignKeyFor: [ - "eventType" - ] as readonly string[] + foreignKeyFor: ['eventType'] as readonly string[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, customInputs: { - name: "customInputs", - type: "Json", - optional: true + name: 'customInputs', + type: 'Json', + optional: true, }, responses: { - name: "responses", - type: "Json", - optional: true + name: 'responses', + type: 'Json', + optional: true, }, startTime: { - name: "startTime", - type: "DateTime" + name: 'startTime', + type: 'DateTime', }, endTime: { - name: "endTime", - type: "DateTime" + name: 'endTime', + type: 'DateTime', }, attendees: { - name: "attendees", - type: "Attendee", + name: 'attendees', + type: 'Attendee', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, location: { - name: "location", - type: "String", - optional: true + name: 'location', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, status: { - name: "status", - type: "BookingStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACCEPTED") }] }] as readonly AttributeApplication[], - default: "ACCEPTED" as FieldDefault + name: 'status', + type: 'BookingStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACCEPTED') }] }, + ] as readonly AttributeApplication[], + default: 'ACCEPTED' as FieldDefault, }, paid: { - name: "paid", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'paid', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, payment: { - name: "payment", - type: "Payment", + name: 'payment', + type: 'Payment', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, destinationCalendar: { - name: "destinationCalendar", - type: "DestinationCalendar", + name: 'destinationCalendar', + type: 'DestinationCalendar', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("destinationCalendarId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "booking", fields: ["destinationCalendarId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('destinationCalendarId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'booking', fields: ['destinationCalendarId'], references: ['id'] }, }, destinationCalendarId: { - name: "destinationCalendarId", - type: "Int", + name: 'destinationCalendarId', + type: 'Int', optional: true, - foreignKeyFor: [ - "destinationCalendar" - ] as readonly string[] + foreignKeyFor: ['destinationCalendar'] as readonly string[], }, cancellationReason: { - name: "cancellationReason", - type: "String", - optional: true + name: 'cancellationReason', + type: 'String', + optional: true, }, rejectionReason: { - name: "rejectionReason", - type: "String", - optional: true + name: 'rejectionReason', + type: 'String', + optional: true, }, reassignReason: { - name: "reassignReason", - type: "String", - optional: true + name: 'reassignReason', + type: 'String', + optional: true, }, reassignBy: { - name: "reassignBy", - type: "User", + name: 'reassignBy', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("reassignByUser") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reassignById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "reassignedBookings", name: "reassignByUser", fields: ["reassignById"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('reassignByUser') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('reassignById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'reassignedBookings', + name: 'reassignByUser', + fields: ['reassignById'], + references: ['id'], + }, }, reassignById: { - name: "reassignById", - type: "Int", + name: 'reassignById', + type: 'Int', optional: true, - foreignKeyFor: [ - "reassignBy" - ] as readonly string[] + foreignKeyFor: ['reassignBy'] as readonly string[], }, dynamicEventSlugRef: { - name: "dynamicEventSlugRef", - type: "String", - optional: true + name: 'dynamicEventSlugRef', + type: 'String', + optional: true, }, dynamicGroupSlugRef: { - name: "dynamicGroupSlugRef", - type: "String", - optional: true + name: 'dynamicGroupSlugRef', + type: 'String', + optional: true, }, rescheduled: { - name: "rescheduled", - type: "Boolean", - optional: true + name: 'rescheduled', + type: 'Boolean', + optional: true, }, fromReschedule: { - name: "fromReschedule", - type: "String", - optional: true + name: 'fromReschedule', + type: 'String', + optional: true, }, recurringEventId: { - name: "recurringEventId", - type: "String", - optional: true + name: 'recurringEventId', + type: 'String', + optional: true, }, smsReminderNumber: { - name: "smsReminderNumber", - type: "String", - optional: true + name: 'smsReminderNumber', + type: 'String', + optional: true, }, workflowReminders: { - name: "workflowReminders", - type: "WorkflowReminder", + name: 'workflowReminders', + type: 'WorkflowReminder', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, scheduledJobs: { - name: "scheduledJobs", - type: "String", - array: true + name: 'scheduledJobs', + type: 'String', + array: true, }, seatsReferences: { - name: "seatsReferences", - type: "BookingSeat", + name: 'seatsReferences', + type: 'BookingSeat', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, metadata: { - name: "metadata", - type: "Json", - optional: true + name: 'metadata', + type: 'Json', + optional: true, }, isRecorded: { - name: "isRecorded", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isRecorded', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, iCalUID: { - name: "iCalUID", - type: "String", + name: 'iCalUID', + type: 'String', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("") }] }] as readonly AttributeApplication[], - default: "" as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('') }] }, + ] as readonly AttributeApplication[], + default: '' as FieldDefault, }, iCalSequence: { - name: "iCalSequence", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'iCalSequence', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, instantMeetingToken: { - name: "instantMeetingToken", - type: "InstantMeetingToken", + name: 'instantMeetingToken', + type: 'InstantMeetingToken', optional: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, rating: { - name: "rating", - type: "Int", - optional: true + name: 'rating', + type: 'Int', + optional: true, }, ratingFeedback: { - name: "ratingFeedback", - type: "String", - optional: true + name: 'ratingFeedback', + type: 'String', + optional: true, }, noShowHost: { - name: "noShowHost", - type: "Boolean", + name: 'noShowHost', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, scheduledTriggers: { - name: "scheduledTriggers", - type: "WebhookScheduledTriggers", + name: 'scheduledTriggers', + type: 'WebhookScheduledTriggers', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, oneTimePassword: { - name: "oneTimePassword", - type: "String", + name: 'oneTimePassword', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@unique' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, cancelledBy: { - name: "cancelledBy", - type: "String", - optional: true + name: 'cancelledBy', + type: 'String', + optional: true, }, rescheduledBy: { - name: "rescheduledBy", - type: "String", - optional: true + name: 'rescheduledBy', + type: 'String', + optional: true, }, routedFromRoutingFormReponse: { - name: "routedFromRoutingFormReponse", - type: "App_RoutingForms_FormResponse", + name: 'routedFromRoutingFormReponse', + type: 'App_RoutingForms_FormResponse', optional: true, - relation: { opposite: "routedToBooking" } + relation: { opposite: 'routedToBooking' }, }, assignmentReason: { - name: "assignmentReason", - type: "AssignmentReason", + name: 'assignmentReason', + type: 'AssignmentReason', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, internalNote: { - name: "internalNote", - type: "BookingInternalNote", + name: 'internalNote', + type: 'BookingInternalNote', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, creationSource: { - name: "creationSource", - type: "CreationSource", - optional: true + name: 'creationSource', + type: 'CreationSource', + optional: true, }, tracking: { - name: "tracking", - type: "Tracking", + name: 'tracking', + type: 'Tracking', optional: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, routingFormResponses: { - name: "routingFormResponses", - type: "RoutingFormResponseDenormalized", + name: 'routingFormResponses', + type: 'RoutingFormResponseDenormalized', array: true, - relation: { opposite: "booking" } + relation: { opposite: 'booking' }, }, expenseLogs: { - name: "expenseLogs", - type: "CreditExpenseLog", + name: 'expenseLogs', + type: 'CreditExpenseLog', array: true, - relation: { opposite: "booking" } - } + relation: { opposite: 'booking' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("destinationCalendarId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("recurringEventId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("BookingStatus", [ExpressionUtils.field("status")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("startTime"), ExpressionUtils.field("endTime"), ExpressionUtils.field("status")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('destinationCalendarId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('recurringEventId')]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('BookingStatus', [ExpressionUtils.field('status')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ + ExpressionUtils.field('startTime'), + ExpressionUtils.field('endTime'), + ExpressionUtils.field('status'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - uid: { type: "String" }, - idempotencyKey: { type: "String" }, - oneTimePassword: { type: "String" } - } + id: { type: 'Int' }, + uid: { type: 'String' }, + idempotencyKey: { type: 'String' }, + oneTimePassword: { type: 'String' }, + }, }, Tracking: { - name: "Tracking", + name: 'Tracking', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, bookingId: { - name: "bookingId", - type: "Int", - foreignKeyFor: [ - "booking" - ] as readonly string[] + name: 'bookingId', + type: 'Int', + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "tracking", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + name: 'booking', + type: 'Booking', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'tracking', fields: ['bookingId'], references: ['id'], onDelete: 'Cascade' }, }, utm_source: { - name: "utm_source", - type: "String", - optional: true + name: 'utm_source', + type: 'String', + optional: true, }, utm_medium: { - name: "utm_medium", - type: "String", - optional: true + name: 'utm_medium', + type: 'String', + optional: true, }, utm_campaign: { - name: "utm_campaign", - type: "String", - optional: true + name: 'utm_campaign', + type: 'String', + optional: true, }, utm_term: { - name: "utm_term", - type: "String", - optional: true + name: 'utm_term', + type: 'String', + optional: true, }, utm_content: { - name: "utm_content", - type: "String", - optional: true - } + name: 'utm_content', + type: 'String', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } + { + name: '@@unique', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - bookingId: { type: "Int" } - } + id: { type: 'Int' }, + bookingId: { type: 'Int' }, + }, }, Schedule: { - name: "Schedule", + name: 'Schedule', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "schedules", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'schedules', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, eventType: { - name: "eventType", - type: "EventType", + name: 'eventType', + type: 'EventType', array: true, - relation: { opposite: "schedule" } + relation: { opposite: 'schedule' }, }, instantMeetingEvents: { - name: "instantMeetingEvents", - type: "EventType", + name: 'instantMeetingEvents', + type: 'EventType', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("InstantMeetingSchedule") }] }] as readonly AttributeApplication[], - relation: { opposite: "instantMeetingSchedule", name: "InstantMeetingSchedule" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('InstantMeetingSchedule') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'instantMeetingSchedule', name: 'InstantMeetingSchedule' }, }, restrictionSchedule: { - name: "restrictionSchedule", - type: "EventType", + name: 'restrictionSchedule', + type: 'EventType', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("restrictionSchedule") }] }] as readonly AttributeApplication[], - relation: { opposite: "restrictionSchedule", name: "restrictionSchedule" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('restrictionSchedule') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'restrictionSchedule', name: 'restrictionSchedule' }, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, timeZone: { - name: "timeZone", - type: "String", - optional: true + name: 'timeZone', + type: 'String', + optional: true, }, availability: { - name: "availability", - type: "Availability", + name: 'availability', + type: 'Availability', array: true, - relation: { opposite: "Schedule" } + relation: { opposite: 'Schedule' }, }, Host: { - name: "Host", - type: "Host", + name: 'Host', + type: 'Host', array: true, - relation: { opposite: "schedule" } - } + relation: { opposite: 'schedule' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Availability: { - name: "Availability", + name: 'Availability', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "availability", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'availability', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, eventType: { - name: "eventType", - type: "EventType", + name: 'eventType', + type: 'EventType', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "availability", fields: ["eventTypeId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'availability', fields: ['eventTypeId'], references: ['id'] }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", + name: 'eventTypeId', + type: 'Int', optional: true, - foreignKeyFor: [ - "eventType" - ] as readonly string[] + foreignKeyFor: ['eventType'] as readonly string[], }, days: { - name: "days", - type: "Int", - array: true + name: 'days', + type: 'Int', + array: true, }, startTime: { - name: "startTime", - type: "DateTime", - attributes: [{ name: "@db.Time" }] as readonly AttributeApplication[] + name: 'startTime', + type: 'DateTime', + attributes: [{ name: '@db.Time' }] as readonly AttributeApplication[], }, endTime: { - name: "endTime", - type: "DateTime", - attributes: [{ name: "@db.Time" }] as readonly AttributeApplication[] + name: 'endTime', + type: 'DateTime', + attributes: [{ name: '@db.Time' }] as readonly AttributeApplication[], }, date: { - name: "date", - type: "DateTime", + name: 'date', + type: 'DateTime', optional: true, - attributes: [{ name: "@db.Date" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Date' }] as readonly AttributeApplication[], }, Schedule: { - name: "Schedule", - type: "Schedule", + name: 'Schedule', + type: 'Schedule', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "availability", fields: ["scheduleId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'availability', fields: ['scheduleId'], references: ['id'] }, }, scheduleId: { - name: "scheduleId", - type: "Int", + name: 'scheduleId', + type: 'Int', optional: true, - foreignKeyFor: [ - "Schedule" - ] as readonly string[] - } + foreignKeyFor: ['Schedule'] as readonly string[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, SelectedCalendar: { - name: "SelectedCalendar", + name: 'SelectedCalendar', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "selectedCalendars", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'selectedCalendars', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, integration: { - name: "integration", - type: "String" + name: 'integration', + type: 'String', }, externalId: { - name: "externalId", - type: "String" + name: 'externalId', + type: 'String', }, credential: { - name: "credential", - type: "Credential", + name: 'credential', + type: 'Credential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "selectedCalendars", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'selectedCalendars', + fields: ['credentialId'], + references: ['id'], + onDelete: 'Cascade', + }, }, credentialId: { - name: "credentialId", - type: "Int", + name: 'credentialId', + type: 'Int', optional: true, - foreignKeyFor: [ - "credential" - ] as readonly string[] + foreignKeyFor: ['credential'] as readonly string[], }, googleChannelId: { - name: "googleChannelId", - type: "String", - optional: true + name: 'googleChannelId', + type: 'String', + optional: true, }, googleChannelKind: { - name: "googleChannelKind", - type: "String", - optional: true + name: 'googleChannelKind', + type: 'String', + optional: true, }, googleChannelResourceId: { - name: "googleChannelResourceId", - type: "String", - optional: true + name: 'googleChannelResourceId', + type: 'String', + optional: true, }, googleChannelResourceUri: { - name: "googleChannelResourceUri", - type: "String", - optional: true + name: 'googleChannelResourceUri', + type: 'String', + optional: true, }, googleChannelExpiration: { - name: "googleChannelExpiration", - type: "String", - optional: true + name: 'googleChannelExpiration', + type: 'String', + optional: true, }, delegationCredential: { - name: "delegationCredential", - type: "DelegationCredential", + name: 'delegationCredential', + type: 'DelegationCredential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "selectedCalendars", fields: ["delegationCredentialId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('delegationCredentialId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'selectedCalendars', + fields: ['delegationCredentialId'], + references: ['id'], + onDelete: 'Cascade', + }, }, delegationCredentialId: { - name: "delegationCredentialId", - type: "String", + name: 'delegationCredentialId', + type: 'String', optional: true, - foreignKeyFor: [ - "delegationCredential" - ] as readonly string[] + foreignKeyFor: ['delegationCredential'] as readonly string[], }, domainWideDelegationCredential: { - name: "domainWideDelegationCredential", - type: "DomainWideDelegation", + name: 'domainWideDelegationCredential', + type: 'DomainWideDelegation', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("domainWideDelegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "selectedCalendars", fields: ["domainWideDelegationCredentialId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('domainWideDelegationCredentialId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'selectedCalendars', + fields: ['domainWideDelegationCredentialId'], + references: ['id'], + onDelete: 'Cascade', + }, }, domainWideDelegationCredentialId: { - name: "domainWideDelegationCredentialId", - type: "String", + name: 'domainWideDelegationCredentialId', + type: 'String', optional: true, - foreignKeyFor: [ - "domainWideDelegationCredential" - ] as readonly string[] + foreignKeyFor: ['domainWideDelegationCredential'] as readonly string[], }, error: { - name: "error", - type: "String", - optional: true + name: 'error', + type: 'String', + optional: true, }, lastErrorAt: { - name: "lastErrorAt", - type: "DateTime", - optional: true + name: 'lastErrorAt', + type: 'DateTime', + optional: true, }, watchAttempts: { - name: "watchAttempts", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'watchAttempts', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, unwatchAttempts: { - name: "unwatchAttempts", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'unwatchAttempts', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, maxAttempts: { - name: "maxAttempts", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[], - default: 3 as FieldDefault + name: 'maxAttempts', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(3) }] }, + ] as readonly AttributeApplication[], + default: 3 as FieldDefault, }, eventTypeId: { - name: "eventTypeId", - type: "Int", + name: 'eventTypeId', + type: 'Int', optional: true, - foreignKeyFor: [ - "eventType" - ] as readonly string[] + foreignKeyFor: ['eventType'] as readonly string[], }, eventType: { - name: "eventType", - type: "EventType", + name: 'eventType', + type: 'EventType', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "selectedCalendars", fields: ["eventTypeId"], references: ["id"] } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'selectedCalendars', fields: ['eventTypeId'], references: ['id'] }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("integration"), ExpressionUtils.field("externalId"), ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("googleChannelId"), ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("externalId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("integration"), ExpressionUtils.field("googleChannelExpiration"), ExpressionUtils.field("error"), ExpressionUtils.field("watchAttempts"), ExpressionUtils.field("maxAttempts")]) }, { name: "name", value: ExpressionUtils.literal("SelectedCalendar_watch_idx") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("integration"), ExpressionUtils.field("googleChannelExpiration"), ExpressionUtils.field("error"), ExpressionUtils.field("unwatchAttempts"), ExpressionUtils.field("maxAttempts")]) }, { name: "name", value: ExpressionUtils.literal("SelectedCalendar_unwatch_idx") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('integration'), + ExpressionUtils.field('externalId'), + ExpressionUtils.field('eventTypeId'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('googleChannelId'), + ExpressionUtils.field('eventTypeId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('externalId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('integration'), + ExpressionUtils.field('googleChannelExpiration'), + ExpressionUtils.field('error'), + ExpressionUtils.field('watchAttempts'), + ExpressionUtils.field('maxAttempts'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('SelectedCalendar_watch_idx') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('integration'), + ExpressionUtils.field('googleChannelExpiration'), + ExpressionUtils.field('error'), + ExpressionUtils.field('unwatchAttempts'), + ExpressionUtils.field('maxAttempts'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('SelectedCalendar_unwatch_idx') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - userId_integration_externalId_eventTypeId: { userId: { type: "Int" }, integration: { type: "String" }, externalId: { type: "String" }, eventTypeId: { type: "Int" } }, - googleChannelId_eventTypeId: { googleChannelId: { type: "String" }, eventTypeId: { type: "Int" } } - } + id: { type: 'String' }, + userId_integration_externalId_eventTypeId: { + userId: { type: 'Int' }, + integration: { type: 'String' }, + externalId: { type: 'String' }, + eventTypeId: { type: 'Int' }, + }, + googleChannelId_eventTypeId: { googleChannelId: { type: 'String' }, eventTypeId: { type: 'Int' } }, + }, }, EventTypeCustomInput: { - name: "EventTypeCustomInput", + name: 'EventTypeCustomInput', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, eventTypeId: { - name: "eventTypeId", - type: "Int", - foreignKeyFor: [ - "eventType" - ] as readonly string[] + name: 'eventTypeId', + type: 'Int', + foreignKeyFor: ['eventType'] as readonly string[], }, eventType: { - name: "eventType", - type: "EventType", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "customInputs", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + name: 'eventType', + type: 'EventType', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'customInputs', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, label: { - name: "label", - type: "String" + name: 'label', + type: 'String', }, type: { - name: "type", - type: "EventTypeCustomInputType" + name: 'type', + type: 'EventTypeCustomInputType', }, options: { - name: "options", - type: "Json", - optional: true + name: 'options', + type: 'Json', + optional: true, }, required: { - name: "required", - type: "Boolean" + name: 'required', + type: 'Boolean', }, placeholder: { - name: "placeholder", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("") }] }] as readonly AttributeApplication[], - default: "" as FieldDefault - } + name: 'placeholder', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('') }] }, + ] as readonly AttributeApplication[], + default: '' as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, ResetPasswordRequest: { - name: "ResetPasswordRequest", + name: 'ResetPasswordRequest', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, expires: { - name: "expires", - type: "DateTime" - } + name: 'expires', + type: 'DateTime', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ReminderMail: { - name: "ReminderMail", + name: 'ReminderMail', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, referenceId: { - name: "referenceId", - type: "Int" + name: 'referenceId', + type: 'Int', }, reminderType: { - name: "reminderType", - type: "ReminderType" + name: 'reminderType', + type: 'ReminderType', }, elapsedMinutes: { - name: "elapsedMinutes", - type: "Int" + name: 'elapsedMinutes', + type: 'Int', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("referenceId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("ReminderType", [ExpressionUtils.field("reminderType")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('referenceId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('ReminderType', [ExpressionUtils.field('reminderType')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Payment: { - name: "Payment", + name: 'Payment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, uid: { - name: "uid", - type: "String", + name: 'uid', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, app: { - name: "app", - type: "App", + name: 'app', + type: 'App', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "payments", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'payments', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, }, appId: { - name: "appId", - type: "String", + name: 'appId', + type: 'String', optional: true, - foreignKeyFor: [ - "app" - ] as readonly string[] + foreignKeyFor: ['app'] as readonly string[], }, bookingId: { - name: "bookingId", - type: "Int", - foreignKeyFor: [ - "booking" - ] as readonly string[] + name: 'bookingId', + type: 'Int', + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "payment", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'payment', fields: ['bookingId'], references: ['id'], onDelete: 'Cascade' }, }, amount: { - name: "amount", - type: "Int" + name: 'amount', + type: 'Int', }, fee: { - name: "fee", - type: "Int" + name: 'fee', + type: 'Int', }, currency: { - name: "currency", - type: "String" + name: 'currency', + type: 'String', }, success: { - name: "success", - type: "Boolean" + name: 'success', + type: 'Boolean', }, refunded: { - name: "refunded", - type: "Boolean" + name: 'refunded', + type: 'Boolean', }, data: { - name: "data", - type: "Json" + name: 'data', + type: 'Json', }, externalId: { - name: "externalId", - type: "String", + name: 'externalId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, paymentOption: { - name: "paymentOption", - type: "PaymentOption", + name: 'paymentOption', + type: 'PaymentOption', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ON_BOOKING") }] }] as readonly AttributeApplication[], - default: "ON_BOOKING" as FieldDefault - } + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ON_BOOKING') }] }, + ] as readonly AttributeApplication[], + default: 'ON_BOOKING' as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("externalId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('externalId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - uid: { type: "String" }, - externalId: { type: "String" } - } + id: { type: 'Int' }, + uid: { type: 'String' }, + externalId: { type: 'String' }, + }, }, Webhook: { - name: "Webhook", + name: 'Webhook', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, eventTypeId: { - name: "eventTypeId", - type: "Int", + name: 'eventTypeId', + type: 'Int', optional: true, - foreignKeyFor: [ - "eventType" - ] as readonly string[] + foreignKeyFor: ['eventType'] as readonly string[], }, platformOAuthClientId: { - name: "platformOAuthClientId", - type: "String", + name: 'platformOAuthClientId', + type: 'String', optional: true, - foreignKeyFor: [ - "platformOAuthClient" - ] as readonly string[] + foreignKeyFor: ['platformOAuthClient'] as readonly string[], }, subscriberUrl: { - name: "subscriberUrl", - type: "String" + name: 'subscriberUrl', + type: 'String', }, payloadTemplate: { - name: "payloadTemplate", - type: "String", - optional: true + name: 'payloadTemplate', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, active: { - name: "active", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'active', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, eventTriggers: { - name: "eventTriggers", - type: "WebhookTriggerEvents", - array: true + name: 'eventTriggers', + type: 'WebhookTriggerEvents', + array: true, }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "webhooks", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'webhooks', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "webhooks", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'webhooks', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, eventType: { - name: "eventType", - type: "EventType", + name: 'eventType', + type: 'EventType', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "webhooks", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'webhooks', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, platformOAuthClient: { - name: "platformOAuthClient", - type: "PlatformOAuthClient", + name: 'platformOAuthClient', + type: 'PlatformOAuthClient', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "webhook", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('platformOAuthClientId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'webhook', + fields: ['platformOAuthClientId'], + references: ['id'], + onDelete: 'Cascade', + }, }, app: { - name: "app", - type: "App", + name: 'app', + type: 'App', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "Webhook", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'Webhook', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, }, appId: { - name: "appId", - type: "String", + name: 'appId', + type: 'String', optional: true, - foreignKeyFor: [ - "app" - ] as readonly string[] + foreignKeyFor: ['app'] as readonly string[], }, secret: { - name: "secret", - type: "String", - optional: true + name: 'secret', + type: 'String', + optional: true, }, platform: { - name: "platform", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'platform', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, scheduledTriggers: { - name: "scheduledTriggers", - type: "WebhookScheduledTriggers", + name: 'scheduledTriggers', + type: 'WebhookScheduledTriggers', array: true, - relation: { opposite: "webhook" } + relation: { opposite: 'webhook' }, }, time: { - name: "time", - type: "Int", - optional: true + name: 'time', + type: 'Int', + optional: true, }, timeUnit: { - name: "timeUnit", - type: "TimeUnit", - optional: true - } + name: 'timeUnit', + type: 'TimeUnit', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("subscriberUrl")]) }, { name: "name", value: ExpressionUtils.literal("courseIdentifier") }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId"), ExpressionUtils.field("subscriberUrl")]) }, { name: "name", value: ExpressionUtils.literal("oauthclientwebhook") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("active")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('subscriberUrl'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('courseIdentifier') }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('platformOAuthClientId'), + ExpressionUtils.field('subscriberUrl'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('oauthclientwebhook') }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('active')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - courseIdentifier: { userId: { type: "Int" }, subscriberUrl: { type: "String" } }, - oauthclientwebhook: { platformOAuthClientId: { type: "String" }, subscriberUrl: { type: "String" } } - } + id: { type: 'String' }, + courseIdentifier: { userId: { type: 'Int' }, subscriberUrl: { type: 'String' } }, + oauthclientwebhook: { platformOAuthClientId: { type: 'String' }, subscriberUrl: { type: 'String' } }, + }, }, Impersonations: { - name: "Impersonations", + name: 'Impersonations', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, impersonatedUser: { - name: "impersonatedUser", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_user") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedUserId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "impersonatedUsers", name: "impersonated_user", fields: ["impersonatedUserId"], references: ["id"], onDelete: "Cascade" } + name: 'impersonatedUser', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('impersonated_user') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedUserId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'impersonatedUsers', + name: 'impersonated_user', + fields: ['impersonatedUserId'], + references: ['id'], + onDelete: 'Cascade', + }, }, impersonatedBy: { - name: "impersonatedBy", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_by_user") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "impersonatedBy", name: "impersonated_by_user", fields: ["impersonatedById"], references: ["id"], onDelete: "Cascade" } + name: 'impersonatedBy', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('impersonated_by_user') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'impersonatedBy', + name: 'impersonated_by_user', + fields: ['impersonatedById'], + references: ['id'], + onDelete: 'Cascade', + }, }, impersonatedUserId: { - name: "impersonatedUserId", - type: "Int", - foreignKeyFor: [ - "impersonatedUser" - ] as readonly string[] + name: 'impersonatedUserId', + type: 'Int', + foreignKeyFor: ['impersonatedUser'] as readonly string[], }, impersonatedById: { - name: "impersonatedById", - type: "Int", - foreignKeyFor: [ - "impersonatedBy" - ] as readonly string[] - } + name: 'impersonatedById', + type: 'Int', + foreignKeyFor: ['impersonatedBy'] as readonly string[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedUserId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedById")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedUserId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedById')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, ApiKey: { - name: "ApiKey", + name: 'ApiKey', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@unique' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, note: { - name: "note", - type: "String", - optional: true + name: 'note', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, expiresAt: { - name: "expiresAt", - type: "DateTime", - optional: true + name: 'expiresAt', + type: 'DateTime', + optional: true, }, lastUsedAt: { - name: "lastUsedAt", - type: "DateTime", - optional: true + name: 'lastUsedAt', + type: 'DateTime', + optional: true, }, hashedKey: { - name: "hashedKey", - type: "String", + name: 'hashedKey', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "apiKeys", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'apiKeys', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "apiKeys", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'apiKeys', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, app: { - name: "app", - type: "App", + name: 'app', + type: 'App', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "ApiKey", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'ApiKey', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, }, appId: { - name: "appId", - type: "String", + name: 'appId', + type: 'String', optional: true, - foreignKeyFor: [ - "app" - ] as readonly string[] + foreignKeyFor: ['app'] as readonly string[], }, rateLimits: { - name: "rateLimits", - type: "RateLimit", + name: 'rateLimits', + type: 'RateLimit', array: true, - relation: { opposite: "apiKey" } - } + relation: { opposite: 'apiKey' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - hashedKey: { type: "String" } - } + id: { type: 'String' }, + hashedKey: { type: 'String' }, + }, }, RateLimit: { - name: "RateLimit", + name: 'RateLimit', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, apiKeyId: { - name: "apiKeyId", - type: "String", - foreignKeyFor: [ - "apiKey" - ] as readonly string[] + name: 'apiKeyId', + type: 'String', + foreignKeyFor: ['apiKey'] as readonly string[], }, ttl: { - name: "ttl", - type: "Int" + name: 'ttl', + type: 'Int', }, limit: { - name: "limit", - type: "Int" + name: 'limit', + type: 'Int', }, blockDuration: { - name: "blockDuration", - type: "Int" + name: 'blockDuration', + type: 'Int', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, apiKey: { - name: "apiKey", - type: "ApiKey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "rateLimits", fields: ["apiKeyId"], references: ["id"], onDelete: "Cascade" } - } + name: 'apiKey', + type: 'ApiKey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('apiKeyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'rateLimits', fields: ['apiKeyId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('apiKeyId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, HashedLink: { - name: "HashedLink", + name: 'HashedLink', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, link: { - name: "link", - type: "String", + name: 'link', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, eventType: { - name: "eventType", - type: "EventType", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "hashedLink", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + name: 'eventType', + type: 'EventType', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'hashedLink', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", - foreignKeyFor: [ - "eventType" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'eventTypeId', + type: 'Int', + foreignKeyFor: ['eventType'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - link: { type: "String" } - } + id: { type: 'Int' }, + link: { type: 'String' }, + }, }, Account: { - name: "Account", + name: 'Account', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, type: { - name: "type", - type: "String" + name: 'type', + type: 'String', }, provider: { - name: "provider", - type: "String" + name: 'provider', + type: 'String', }, providerAccountId: { - name: "providerAccountId", - type: "String" + name: 'providerAccountId', + type: 'String', }, providerEmail: { - name: "providerEmail", - type: "String", - optional: true + name: 'providerEmail', + type: 'String', + optional: true, }, refresh_token: { - name: "refresh_token", - type: "String", + name: 'refresh_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, access_token: { - name: "access_token", - type: "String", + name: 'access_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, expires_at: { - name: "expires_at", - type: "Int", - optional: true + name: 'expires_at', + type: 'Int', + optional: true, }, token_type: { - name: "token_type", - type: "String", - optional: true + name: 'token_type', + type: 'String', + optional: true, }, scope: { - name: "scope", - type: "String", - optional: true + name: 'scope', + type: 'String', + optional: true, }, id_token: { - name: "id_token", - type: "String", + name: 'id_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, session_state: { - name: "session_state", - type: "String", - optional: true + name: 'session_state', + type: 'String', + optional: true, }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "accounts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'accounts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("type")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('provider'), + ExpressionUtils.field('providerAccountId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('type')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - provider_providerAccountId: { provider: { type: "String" }, providerAccountId: { type: "String" } } - } + id: { type: 'String' }, + provider_providerAccountId: { provider: { type: 'String' }, providerAccountId: { type: 'String' } }, + }, }, Session: { - name: "Session", + name: 'Session', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, sessionToken: { - name: "sessionToken", - type: "String", + name: 'sessionToken', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, expires: { - name: "expires", - type: "DateTime" + name: 'expires', + type: 'DateTime', }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "sessions", fields: ["userId"], references: ["id"], onDelete: "Cascade" } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'sessions', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - sessionToken: { type: "String" } - } + id: { type: 'String' }, + sessionToken: { type: 'String' }, + }, }, App: { - name: "App", + name: 'App', fields: { slug: { - name: "slug", - type: "String", + name: 'slug', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], }, dirName: { - name: "dirName", - type: "String", + name: 'dirName', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, keys: { - name: "keys", - type: "Json", - optional: true + name: 'keys', + type: 'Json', + optional: true, }, categories: { - name: "categories", - type: "AppCategories", - array: true + name: 'categories', + type: 'AppCategories', + array: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, credentials: { - name: "credentials", - type: "Credential", + name: 'credentials', + type: 'Credential', array: true, - relation: { opposite: "app" } + relation: { opposite: 'app' }, }, payments: { - name: "payments", - type: "Payment", + name: 'payments', + type: 'Payment', array: true, - relation: { opposite: "app" } + relation: { opposite: 'app' }, }, Webhook: { - name: "Webhook", - type: "Webhook", + name: 'Webhook', + type: 'Webhook', array: true, - relation: { opposite: "app" } + relation: { opposite: 'app' }, }, ApiKey: { - name: "ApiKey", - type: "ApiKey", + name: 'ApiKey', + type: 'ApiKey', array: true, - relation: { opposite: "app" } + relation: { opposite: 'app' }, }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("enabled")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('enabled')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["slug"], + idFields: ['slug'], uniqueFields: { - slug: { type: "String" }, - dirName: { type: "String" } - } + slug: { type: 'String' }, + dirName: { type: 'String' }, + }, }, App_RoutingForms_Form: { - name: "App_RoutingForms_Form", + name: 'App_RoutingForms_Form', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, position: { - name: "position", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'position', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, routes: { - name: "routes", - type: "Json", - optional: true + name: 'routes', + type: 'Json', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, fields: { - name: "fields", - type: "Json", - optional: true + name: 'fields', + type: 'Json', + optional: true, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("routing-form") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "routingForms", name: "routing-form", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('routing-form') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'routingForms', + name: 'routing-form', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, updatedBy: { - name: "updatedBy", - type: "User", + name: 'updatedBy', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updated-routing-form") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedRoutingForms", name: "updated-routing-form", fields: ["updatedById"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('updated-routing-form') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'updatedRoutingForms', + name: 'updated-routing-form', + fields: ['updatedById'], + references: ['id'], + onDelete: 'SetNull', + }, }, updatedById: { - name: "updatedById", - type: "Int", + name: 'updatedById', + type: 'Int', optional: true, - foreignKeyFor: [ - "updatedBy" - ] as readonly string[] + foreignKeyFor: ['updatedBy'] as readonly string[], }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "routingForms", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'routingForms', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, responses: { - name: "responses", - type: "App_RoutingForms_FormResponse", + name: 'responses', + type: 'App_RoutingForms_FormResponse', array: true, - relation: { opposite: "form" } + relation: { opposite: 'form' }, }, queuedResponses: { - name: "queuedResponses", - type: "App_RoutingForms_QueuedFormResponse", + name: 'queuedResponses', + type: 'App_RoutingForms_QueuedFormResponse', array: true, - relation: { opposite: "form" } + relation: { opposite: 'form' }, }, disabled: { - name: "disabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'disabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, settings: { - name: "settings", - type: "Json", - optional: true + name: 'settings', + type: 'Json', + optional: true, }, incompleteBookingActions: { - name: "incompleteBookingActions", - type: "App_RoutingForms_IncompleteBookingActions", + name: 'incompleteBookingActions', + type: 'App_RoutingForms_IncompleteBookingActions', array: true, - relation: { opposite: "form" } - } + relation: { opposite: 'form' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("disabled")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('disabled')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, App_RoutingForms_FormResponse: { - name: "App_RoutingForms_FormResponse", + name: 'App_RoutingForms_FormResponse', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, formFillerId: { - name: "formFillerId", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + name: 'formFillerId', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, form: { - name: "form", - type: "App_RoutingForms_Form", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "responses", fields: ["formId"], references: ["id"], onDelete: "Cascade" } + name: 'form', + type: 'App_RoutingForms_Form', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'responses', fields: ['formId'], references: ['id'], onDelete: 'Cascade' }, }, formId: { - name: "formId", - type: "String", - foreignKeyFor: [ - "form" - ] as readonly string[] + name: 'formId', + type: 'String', + foreignKeyFor: ['form'] as readonly string[], }, response: { - name: "response", - type: "Json" + name: 'response', + type: 'Json', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, routedToBookingUid: { - name: "routedToBookingUid", - type: "String", + name: 'routedToBookingUid', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "routedToBooking" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['routedToBooking'] as readonly string[], }, routedToBooking: { - name: "routedToBooking", - type: "Booking", + name: 'routedToBooking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("routedToBookingUid")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "routedFromRoutingFormReponse", fields: ["routedToBookingUid"], references: ["uid"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('routedToBookingUid'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'routedFromRoutingFormReponse', + fields: ['routedToBookingUid'], + references: ['uid'], + }, }, chosenRouteId: { - name: "chosenRouteId", - type: "String", - optional: true + name: 'chosenRouteId', + type: 'String', + optional: true, }, routingFormResponseFields: { - name: "routingFormResponseFields", - type: "RoutingFormResponseField", + name: 'routingFormResponseFields', + type: 'RoutingFormResponseField', array: true, - relation: { opposite: "response" } + relation: { opposite: 'response' }, }, routingFormResponses: { - name: "routingFormResponses", - type: "RoutingFormResponseDenormalized", + name: 'routingFormResponses', + type: 'RoutingFormResponseDenormalized', array: true, - relation: { opposite: "response" } + relation: { opposite: 'response' }, }, queuedFormResponse: { - name: "queuedFormResponse", - type: "App_RoutingForms_QueuedFormResponse", + name: 'queuedFormResponse', + type: 'App_RoutingForms_QueuedFormResponse', optional: true, - relation: { opposite: "actualResponse" } - } + relation: { opposite: 'actualResponse' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formFillerId"), ExpressionUtils.field("formId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formFillerId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("routedToBookingUid")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('formFillerId'), + ExpressionUtils.field('formId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('formFillerId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('routedToBookingUid')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - routedToBookingUid: { type: "String" }, - formFillerId_formId: { formFillerId: { type: "String" }, formId: { type: "String" } } - } + id: { type: 'Int' }, + routedToBookingUid: { type: 'String' }, + formFillerId_formId: { formFillerId: { type: 'String' }, formId: { type: 'String' } }, + }, }, App_RoutingForms_QueuedFormResponse: { - name: "App_RoutingForms_QueuedFormResponse", + name: 'App_RoutingForms_QueuedFormResponse', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, form: { - name: "form", - type: "App_RoutingForms_Form", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "queuedResponses", fields: ["formId"], references: ["id"], onDelete: "Cascade" } + name: 'form', + type: 'App_RoutingForms_Form', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'queuedResponses', + fields: ['formId'], + references: ['id'], + onDelete: 'Cascade', + }, }, formId: { - name: "formId", - type: "String", - foreignKeyFor: [ - "form" - ] as readonly string[] + name: 'formId', + type: 'String', + foreignKeyFor: ['form'] as readonly string[], }, response: { - name: "response", - type: "Json" + name: 'response', + type: 'Json', }, chosenRouteId: { - name: "chosenRouteId", - type: "String", - optional: true + name: 'chosenRouteId', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, actualResponseId: { - name: "actualResponseId", - type: "Int", + name: 'actualResponseId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "actualResponse" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['actualResponse'] as readonly string[], }, actualResponse: { - name: "actualResponse", - type: "App_RoutingForms_FormResponse", + name: 'actualResponse', + type: 'App_RoutingForms_FormResponse', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("actualResponseId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "queuedFormResponse", fields: ["actualResponseId"], references: ["id"], onDelete: "Cascade" } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('actualResponseId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'queuedFormResponse', + fields: ['actualResponseId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - actualResponseId: { type: "Int" } - } + id: { type: 'String' }, + actualResponseId: { type: 'Int' }, + }, }, RoutingFormResponseField: { - name: "RoutingFormResponseField", + name: 'RoutingFormResponseField', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, responseId: { - name: "responseId", - type: "Int", - foreignKeyFor: [ - "response", - "denormalized" - ] as readonly string[] + name: 'responseId', + type: 'Int', + foreignKeyFor: ['response', 'denormalized'] as readonly string[], }, fieldId: { - name: "fieldId", - type: "String" + name: 'fieldId', + type: 'String', }, valueString: { - name: "valueString", - type: "String", - optional: true + name: 'valueString', + type: 'String', + optional: true, }, valueNumber: { - name: "valueNumber", - type: "Decimal", - optional: true + name: 'valueNumber', + type: 'Decimal', + optional: true, }, valueStringArray: { - name: "valueStringArray", - type: "String", - array: true + name: 'valueStringArray', + type: 'String', + array: true, }, response: { - name: "response", - type: "App_RoutingForms_FormResponse", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "map", value: ExpressionUtils.literal("RoutingFormResponseField_response_fkey") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "routingFormResponseFields", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } + name: 'response', + type: 'App_RoutingForms_FormResponse', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('responseId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { + name: 'map', + value: ExpressionUtils.literal('RoutingFormResponseField_response_fkey'), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'routingFormResponseFields', + fields: ['responseId'], + references: ['id'], + onDelete: 'Cascade', + }, }, denormalized: { - name: "denormalized", - type: "RoutingFormResponseDenormalized", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DenormalizedResponseToFields") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "fields", name: "DenormalizedResponseToFields", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } - } + name: 'denormalized', + type: 'RoutingFormResponseDenormalized', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('DenormalizedResponseToFields') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('responseId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'fields', + name: 'DenormalizedResponseToFields', + fields: ['responseId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("responseId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("fieldId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Float", [ExpressionUtils.field("valueNumber")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("valueStringArray")]) }, { name: "type", value: ExpressionUtils.literal("Gin") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('responseId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('fieldId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Float', [ExpressionUtils.field('valueNumber')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('valueStringArray')]), + }, + { name: 'type', value: ExpressionUtils.literal('Gin') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, RoutingFormResponse: { - name: "RoutingFormResponse", + name: 'RoutingFormResponse', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, response: { - name: "response", - type: "Json" + name: 'response', + type: 'Json', }, responseLowercase: { - name: "responseLowercase", - type: "Json" + name: 'responseLowercase', + type: 'Json', }, formId: { - name: "formId", - type: "String" + name: 'formId', + type: 'String', }, formName: { - name: "formName", - type: "String" + name: 'formName', + type: 'String', }, formTeamId: { - name: "formTeamId", - type: "Int", - optional: true + name: 'formTeamId', + type: 'Int', + optional: true, }, formUserId: { - name: "formUserId", - type: "Int", - optional: true + name: 'formUserId', + type: 'Int', + optional: true, }, bookingUid: { - name: "bookingUid", - type: "String", - optional: true + name: 'bookingUid', + type: 'String', + optional: true, }, bookingStatus: { - name: "bookingStatus", - type: "BookingStatus", - optional: true + name: 'bookingStatus', + type: 'BookingStatus', + optional: true, }, bookingStatusOrder: { - name: "bookingStatusOrder", - type: "Int", - optional: true + name: 'bookingStatusOrder', + type: 'Int', + optional: true, }, bookingCreatedAt: { - name: "bookingCreatedAt", - type: "DateTime", - optional: true + name: 'bookingCreatedAt', + type: 'DateTime', + optional: true, }, bookingAttendees: { - name: "bookingAttendees", - type: "Json", - optional: true + name: 'bookingAttendees', + type: 'Json', + optional: true, }, bookingUserId: { - name: "bookingUserId", - type: "Int", - optional: true + name: 'bookingUserId', + type: 'Int', + optional: true, }, bookingUserName: { - name: "bookingUserName", - type: "String", - optional: true + name: 'bookingUserName', + type: 'String', + optional: true, }, bookingUserEmail: { - name: "bookingUserEmail", - type: "String", - optional: true + name: 'bookingUserEmail', + type: 'String', + optional: true, }, bookingUserAvatarUrl: { - name: "bookingUserAvatarUrl", - type: "String", - optional: true + name: 'bookingUserAvatarUrl', + type: 'String', + optional: true, }, bookingAssignmentReason: { - name: "bookingAssignmentReason", - type: "String", - optional: true + name: 'bookingAssignmentReason', + type: 'String', + optional: true, }, bookingAssignmentReasonLowercase: { - name: "bookingAssignmentReasonLowercase", - type: "String", - optional: true + name: 'bookingAssignmentReasonLowercase', + type: 'String', + optional: true, }, bookingStartTime: { - name: "bookingStartTime", - type: "DateTime", - optional: true + name: 'bookingStartTime', + type: 'DateTime', + optional: true, }, bookingEndTime: { - name: "bookingEndTime", - type: "DateTime", - optional: true + name: 'bookingEndTime', + type: 'DateTime', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime" + name: 'createdAt', + type: 'DateTime', }, utm_source: { - name: "utm_source", - type: "String", - optional: true + name: 'utm_source', + type: 'String', + optional: true, }, utm_medium: { - name: "utm_medium", - type: "String", - optional: true + name: 'utm_medium', + type: 'String', + optional: true, }, utm_campaign: { - name: "utm_campaign", - type: "String", - optional: true + name: 'utm_campaign', + type: 'String', + optional: true, }, utm_term: { - name: "utm_term", - type: "String", - optional: true + name: 'utm_term', + type: 'String', + optional: true, }, utm_content: { - name: "utm_content", - type: "String", - optional: true - } + name: 'utm_content', + type: 'String', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, - isView: true + isView: true, }, RoutingFormResponseDenormalized: { - name: "RoutingFormResponseDenormalized", + name: 'RoutingFormResponseDenormalized', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "response" - ] as readonly string[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], + foreignKeyFor: ['response'] as readonly string[], }, formId: { - name: "formId", - type: "String" + name: 'formId', + type: 'String', }, formName: { - name: "formName", - type: "String" + name: 'formName', + type: 'String', }, formTeamId: { - name: "formTeamId", - type: "Int", - optional: true + name: 'formTeamId', + type: 'Int', + optional: true, }, formUserId: { - name: "formUserId", - type: "Int" + name: 'formUserId', + type: 'Int', }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "routingFormResponses", fields: ["bookingId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'routingFormResponses', + fields: ['bookingId'], + references: ['id'], + onDelete: 'SetNull', + }, }, bookingUid: { - name: "bookingUid", - type: "String", - optional: true + name: 'bookingUid', + type: 'String', + optional: true, }, bookingId: { - name: "bookingId", - type: "Int", + name: 'bookingId', + type: 'Int', optional: true, - foreignKeyFor: [ - "booking" - ] as readonly string[] + foreignKeyFor: ['booking'] as readonly string[], }, bookingStatus: { - name: "bookingStatus", - type: "BookingStatus", - optional: true + name: 'bookingStatus', + type: 'BookingStatus', + optional: true, }, bookingStatusOrder: { - name: "bookingStatusOrder", - type: "Int", - optional: true + name: 'bookingStatusOrder', + type: 'Int', + optional: true, }, bookingCreatedAt: { - name: "bookingCreatedAt", - type: "DateTime", + name: 'bookingCreatedAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, + ] as readonly AttributeApplication[], }, bookingStartTime: { - name: "bookingStartTime", - type: "DateTime", + name: 'bookingStartTime', + type: 'DateTime', optional: true, - attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, + ] as readonly AttributeApplication[], }, bookingEndTime: { - name: "bookingEndTime", - type: "DateTime", + name: 'bookingEndTime', + type: 'DateTime', optional: true, - attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, + ] as readonly AttributeApplication[], }, bookingUserId: { - name: "bookingUserId", - type: "Int", - optional: true + name: 'bookingUserId', + type: 'Int', + optional: true, }, bookingUserName: { - name: "bookingUserName", - type: "String", - optional: true + name: 'bookingUserName', + type: 'String', + optional: true, }, bookingUserEmail: { - name: "bookingUserEmail", - type: "String", - optional: true + name: 'bookingUserEmail', + type: 'String', + optional: true, }, bookingUserAvatarUrl: { - name: "bookingUserAvatarUrl", - type: "String", - optional: true + name: 'bookingUserAvatarUrl', + type: 'String', + optional: true, }, bookingAssignmentReason: { - name: "bookingAssignmentReason", - type: "String", - optional: true + name: 'bookingAssignmentReason', + type: 'String', + optional: true, }, eventTypeId: { - name: "eventTypeId", - type: "Int", - optional: true + name: 'eventTypeId', + type: 'Int', + optional: true, }, eventTypeParentId: { - name: "eventTypeParentId", - type: "Int", - optional: true + name: 'eventTypeParentId', + type: 'Int', + optional: true, }, eventTypeSchedulingType: { - name: "eventTypeSchedulingType", - type: "String", - optional: true + name: 'eventTypeSchedulingType', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, + ] as readonly AttributeApplication[], }, utm_source: { - name: "utm_source", - type: "String", - optional: true + name: 'utm_source', + type: 'String', + optional: true, }, utm_medium: { - name: "utm_medium", - type: "String", - optional: true + name: 'utm_medium', + type: 'String', + optional: true, }, utm_campaign: { - name: "utm_campaign", - type: "String", - optional: true + name: 'utm_campaign', + type: 'String', + optional: true, }, utm_term: { - name: "utm_term", - type: "String", - optional: true + name: 'utm_term', + type: 'String', + optional: true, }, utm_content: { - name: "utm_content", - type: "String", - optional: true + name: 'utm_content', + type: 'String', + optional: true, }, response: { - name: "response", - type: "App_RoutingForms_FormResponse", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "routingFormResponses", fields: ["id"], references: ["id"], onDelete: "Cascade" } + name: 'response', + type: 'App_RoutingForms_FormResponse', + attributes: [ + { + name: '@relation', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]) }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'routingFormResponses', + fields: ['id'], + references: ['id'], + onDelete: 'Cascade', + }, }, fields: { - name: "fields", - type: "RoutingFormResponseField", + name: 'fields', + type: 'RoutingFormResponseField', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DenormalizedResponseToFields") }] }] as readonly AttributeApplication[], - relation: { opposite: "denormalized", name: "DenormalizedResponseToFields" } - } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('DenormalizedResponseToFields') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'denormalized', name: 'DenormalizedResponseToFields' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("formTeamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("formUserId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId"), ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingUserId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId"), ExpressionUtils.field("eventTypeParentId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('formTeamId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('formUserId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('formId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingUserId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('eventTypeId'), + ExpressionUtils.field('eventTypeParentId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Feedback: { - name: "Feedback", + name: 'Feedback', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, date: { - name: "date", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'date', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "Feedback", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'Feedback', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, rating: { - name: "rating", - type: "String" + name: 'rating', + type: 'String', }, comment: { - name: "comment", - type: "String", - optional: true - } + name: 'comment', + type: 'String', + optional: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("rating")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('rating')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, WorkflowStep: { - name: "WorkflowStep", + name: 'WorkflowStep', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, stepNumber: { - name: "stepNumber", - type: "Int" + name: 'stepNumber', + type: 'Int', }, action: { - name: "action", - type: "WorkflowActions" + name: 'action', + type: 'WorkflowActions', }, workflowId: { - name: "workflowId", - type: "Int", - foreignKeyFor: [ - "workflow" - ] as readonly string[] + name: 'workflowId', + type: 'Int', + foreignKeyFor: ['workflow'] as readonly string[], }, workflow: { - name: "workflow", - type: "Workflow", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "steps", fields: ["workflowId"], references: ["id"], onDelete: "Cascade" } + name: 'workflow', + type: 'Workflow', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'steps', fields: ['workflowId'], references: ['id'], onDelete: 'Cascade' }, }, sendTo: { - name: "sendTo", - type: "String", - optional: true + name: 'sendTo', + type: 'String', + optional: true, }, reminderBody: { - name: "reminderBody", - type: "String", - optional: true + name: 'reminderBody', + type: 'String', + optional: true, }, emailSubject: { - name: "emailSubject", - type: "String", - optional: true + name: 'emailSubject', + type: 'String', + optional: true, }, template: { - name: "template", - type: "WorkflowTemplates", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("REMINDER") }] }] as readonly AttributeApplication[], - default: "REMINDER" as FieldDefault + name: 'template', + type: 'WorkflowTemplates', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('REMINDER') }] }, + ] as readonly AttributeApplication[], + default: 'REMINDER' as FieldDefault, }, workflowReminders: { - name: "workflowReminders", - type: "WorkflowReminder", + name: 'workflowReminders', + type: 'WorkflowReminder', array: true, - relation: { opposite: "workflowStep" } + relation: { opposite: 'workflowStep' }, }, numberRequired: { - name: "numberRequired", - type: "Boolean", - optional: true + name: 'numberRequired', + type: 'Boolean', + optional: true, }, sender: { - name: "sender", - type: "String", - optional: true + name: 'sender', + type: 'String', + optional: true, }, numberVerificationPending: { - name: "numberVerificationPending", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'numberVerificationPending', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, includeCalendarEvent: { - name: "includeCalendarEvent", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'includeCalendarEvent', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, verifiedAt: { - name: "verifiedAt", - type: "DateTime", - optional: true - } + name: 'verifiedAt', + type: 'DateTime', + optional: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Workflow: { - name: "Workflow", + name: 'Workflow', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, position: { - name: "position", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'position', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workflows", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'workflows', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workflows", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'workflows', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, activeOn: { - name: "activeOn", - type: "WorkflowsOnEventTypes", + name: 'activeOn', + type: 'WorkflowsOnEventTypes', array: true, - relation: { opposite: "workflow" } + relation: { opposite: 'workflow' }, }, activeOnTeams: { - name: "activeOnTeams", - type: "WorkflowsOnTeams", + name: 'activeOnTeams', + type: 'WorkflowsOnTeams', array: true, - relation: { opposite: "workflow" } + relation: { opposite: 'workflow' }, }, isActiveOnAll: { - name: "isActiveOnAll", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isActiveOnAll', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, trigger: { - name: "trigger", - type: "WorkflowTriggerEvents" + name: 'trigger', + type: 'WorkflowTriggerEvents', }, time: { - name: "time", - type: "Int", - optional: true + name: 'time', + type: 'Int', + optional: true, }, timeUnit: { - name: "timeUnit", - type: "TimeUnit", - optional: true + name: 'timeUnit', + type: 'TimeUnit', + optional: true, }, steps: { - name: "steps", - type: "WorkflowStep", + name: 'steps', + type: 'WorkflowStep', array: true, - relation: { opposite: "workflow" } - } + relation: { opposite: 'workflow' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, AIPhoneCallConfiguration: { - name: "AIPhoneCallConfiguration", + name: 'AIPhoneCallConfiguration', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, eventType: { - name: "eventType", - type: "EventType", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "aiPhoneCallConfig", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + name: 'eventType', + type: 'EventType', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'aiPhoneCallConfig', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", - foreignKeyFor: [ - "eventType" - ] as readonly string[] + name: 'eventTypeId', + type: 'Int', + foreignKeyFor: ['eventType'] as readonly string[], }, templateType: { - name: "templateType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CUSTOM_TEMPLATE") }] }] as readonly AttributeApplication[], - default: "CUSTOM_TEMPLATE" as FieldDefault + name: 'templateType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('CUSTOM_TEMPLATE') }], + }, + ] as readonly AttributeApplication[], + default: 'CUSTOM_TEMPLATE' as FieldDefault, }, schedulerName: { - name: "schedulerName", - type: "String", - optional: true + name: 'schedulerName', + type: 'String', + optional: true, }, generalPrompt: { - name: "generalPrompt", - type: "String", - optional: true + name: 'generalPrompt', + type: 'String', + optional: true, }, yourPhoneNumber: { - name: "yourPhoneNumber", - type: "String" + name: 'yourPhoneNumber', + type: 'String', }, numberToCall: { - name: "numberToCall", - type: "String" + name: 'numberToCall', + type: 'String', }, guestName: { - name: "guestName", - type: "String", - optional: true + name: 'guestName', + type: 'String', + optional: true, }, guestEmail: { - name: "guestEmail", - type: "String", - optional: true + name: 'guestEmail', + type: 'String', + optional: true, }, guestCompany: { - name: "guestCompany", - type: "String", - optional: true + name: 'guestCompany', + type: 'String', + optional: true, }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, beginMessage: { - name: "beginMessage", - type: "String", - optional: true + name: 'beginMessage', + type: 'String', + optional: true, }, llmId: { - name: "llmId", - type: "String", - optional: true - } + name: 'llmId', + type: 'String', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] } + { + name: '@@unique', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - eventTypeId: { type: "Int" } - } + id: { type: 'Int' }, + eventTypeId: { type: 'Int' }, + }, }, WorkflowsOnEventTypes: { - name: "WorkflowsOnEventTypes", + name: 'WorkflowsOnEventTypes', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, workflow: { - name: "workflow", - type: "Workflow", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "activeOn", fields: ["workflowId"], references: ["id"], onDelete: "Cascade" } + name: 'workflow', + type: 'Workflow', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'activeOn', fields: ['workflowId'], references: ['id'], onDelete: 'Cascade' }, }, workflowId: { - name: "workflowId", - type: "Int", - foreignKeyFor: [ - "workflow" - ] as readonly string[] + name: 'workflowId', + type: 'Int', + foreignKeyFor: ['workflow'] as readonly string[], }, eventType: { - name: "eventType", - type: "EventType", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workflows", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + name: 'eventType', + type: 'EventType', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workflows', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", - foreignKeyFor: [ - "eventType" - ] as readonly string[] - } + name: 'eventTypeId', + type: 'Int', + foreignKeyFor: ['eventType'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId"), ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('workflowId'), + ExpressionUtils.field('eventTypeId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - workflowId_eventTypeId: { workflowId: { type: "Int" }, eventTypeId: { type: "Int" } } - } + id: { type: 'Int' }, + workflowId_eventTypeId: { workflowId: { type: 'Int' }, eventTypeId: { type: 'Int' } }, + }, }, WorkflowsOnTeams: { - name: "WorkflowsOnTeams", + name: 'WorkflowsOnTeams', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, workflow: { - name: "workflow", - type: "Workflow", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "activeOnTeams", fields: ["workflowId"], references: ["id"], onDelete: "Cascade" } + name: 'workflow', + type: 'Workflow', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'activeOnTeams', + fields: ['workflowId'], + references: ['id'], + onDelete: 'Cascade', + }, }, workflowId: { - name: "workflowId", - type: "Int", - foreignKeyFor: [ - "workflow" - ] as readonly string[] + name: 'workflowId', + type: 'Int', + foreignKeyFor: ['workflow'] as readonly string[], }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "activeOrgWorkflows", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'activeOrgWorkflows', + fields: ['teamId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] - } + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId"), ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('workflowId'), + ExpressionUtils.field('teamId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]) }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - workflowId_teamId: { workflowId: { type: "Int" }, teamId: { type: "Int" } } - } + id: { type: 'Int' }, + workflowId_teamId: { workflowId: { type: 'Int' }, teamId: { type: 'Int' } }, + }, }, Deployment: { - name: "Deployment", + name: 'Deployment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], - default: 1 as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, + ] as readonly AttributeApplication[], + default: 1 as FieldDefault, }, logo: { - name: "logo", - type: "String", - optional: true + name: 'logo', + type: 'String', + optional: true, }, theme: { - name: "theme", - type: "Json", - optional: true + name: 'theme', + type: 'Json', + optional: true, }, licenseKey: { - name: "licenseKey", - type: "String", - optional: true + name: 'licenseKey', + type: 'String', + optional: true, }, agreedLicenseAt: { - name: "agreedLicenseAt", - type: "DateTime", - optional: true - } + name: 'agreedLicenseAt', + type: 'DateTime', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, WorkflowReminder: { - name: "WorkflowReminder", + name: 'WorkflowReminder', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, uuid: { - name: "uuid", - type: "String", + name: 'uuid', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@unique' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, bookingUid: { - name: "bookingUid", - type: "String", + name: 'bookingUid', + type: 'String', optional: true, - foreignKeyFor: [ - "booking" - ] as readonly string[] + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("bookingUid")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "workflowReminders", fields: ["bookingUid"], references: ["uid"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('bookingUid')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'workflowReminders', fields: ['bookingUid'], references: ['uid'] }, }, method: { - name: "method", - type: "WorkflowMethods" + name: 'method', + type: 'WorkflowMethods', }, scheduledDate: { - name: "scheduledDate", - type: "DateTime" + name: 'scheduledDate', + type: 'DateTime', }, referenceId: { - name: "referenceId", - type: "String", + name: 'referenceId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, scheduled: { - name: "scheduled", - type: "Boolean" + name: 'scheduled', + type: 'Boolean', }, workflowStepId: { - name: "workflowStepId", - type: "Int", + name: 'workflowStepId', + type: 'Int', optional: true, - foreignKeyFor: [ - "workflowStep" - ] as readonly string[] + foreignKeyFor: ['workflowStep'] as readonly string[], }, workflowStep: { - name: "workflowStep", - type: "WorkflowStep", + name: 'workflowStep', + type: 'WorkflowStep', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowStepId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workflowReminders", fields: ["workflowStepId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowStepId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workflowReminders', + fields: ['workflowStepId'], + references: ['id'], + onDelete: 'Cascade', + }, }, cancelled: { - name: "cancelled", - type: "Boolean", - optional: true + name: 'cancelled', + type: 'Boolean', + optional: true, }, seatReferenceId: { - name: "seatReferenceId", - type: "String", - optional: true + name: 'seatReferenceId', + type: 'String', + optional: true, }, isMandatoryReminder: { - name: "isMandatoryReminder", - type: "Boolean", + name: 'isMandatoryReminder', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, retryCount: { - name: "retryCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault - } + name: 'retryCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("bookingUid")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowStepId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("seatReferenceId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("WorkflowMethods", [ExpressionUtils.field("method"), ExpressionUtils.field("scheduled"), ExpressionUtils.field("scheduledDate")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("cancelled"), ExpressionUtils.field("scheduledDate")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('bookingUid')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowStepId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('seatReferenceId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('WorkflowMethods', [ + ExpressionUtils.field('method'), + ExpressionUtils.field('scheduled'), + ExpressionUtils.field('scheduledDate'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Boolean', [ + ExpressionUtils.field('cancelled'), + ExpressionUtils.field('scheduledDate'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - uuid: { type: "String" }, - referenceId: { type: "String" } - } + id: { type: 'Int' }, + uuid: { type: 'String' }, + referenceId: { type: 'String' }, + }, }, WebhookScheduledTriggers: { - name: "WebhookScheduledTriggers", + name: 'WebhookScheduledTriggers', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, jobName: { - name: "jobName", - type: "String", - optional: true + name: 'jobName', + type: 'String', + optional: true, }, subscriberUrl: { - name: "subscriberUrl", - type: "String" + name: 'subscriberUrl', + type: 'String', }, payload: { - name: "payload", - type: "String" + name: 'payload', + type: 'String', }, startAfter: { - name: "startAfter", - type: "DateTime" + name: 'startAfter', + type: 'DateTime', }, retryCount: { - name: "retryCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'retryCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", + name: 'createdAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, appId: { - name: "appId", - type: "String", - optional: true + name: 'appId', + type: 'String', + optional: true, }, webhookId: { - name: "webhookId", - type: "String", + name: 'webhookId', + type: 'String', optional: true, - foreignKeyFor: [ - "webhook" - ] as readonly string[] + foreignKeyFor: ['webhook'] as readonly string[], }, webhook: { - name: "webhook", - type: "Webhook", + name: 'webhook', + type: 'Webhook', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("webhookId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "scheduledTriggers", fields: ["webhookId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('webhookId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'scheduledTriggers', + fields: ['webhookId'], + references: ['id'], + onDelete: 'Cascade', + }, }, bookingId: { - name: "bookingId", - type: "Int", + name: 'bookingId', + type: 'Int', optional: true, - foreignKeyFor: [ - "booking" - ] as readonly string[] + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", + name: 'booking', + type: 'Booking', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "scheduledTriggers", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'scheduledTriggers', + fields: ['bookingId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, BookingSeat: { - name: "BookingSeat", + name: 'BookingSeat', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, referenceUid: { - name: "referenceUid", - type: "String", + name: 'referenceUid', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, bookingId: { - name: "bookingId", - type: "Int", - foreignKeyFor: [ - "booking" - ] as readonly string[] + name: 'bookingId', + type: 'Int', + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "seatsReferences", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + name: 'booking', + type: 'Booking', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'seatsReferences', + fields: ['bookingId'], + references: ['id'], + onDelete: 'Cascade', + }, }, attendeeId: { - name: "attendeeId", - type: "Int", + name: 'attendeeId', + type: 'Int', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "attendee" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['attendee'] as readonly string[], }, attendee: { - name: "attendee", - type: "Attendee", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("attendeeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "bookingSeat", fields: ["attendeeId"], references: ["id"], onDelete: "Cascade" } + name: 'attendee', + type: 'Attendee', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('attendeeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'bookingSeat', + fields: ['attendeeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, data: { - name: "data", - type: "Json", - optional: true + name: 'data', + type: 'Json', + optional: true, }, metadata: { - name: "metadata", - type: "Json", - optional: true - } + name: 'metadata', + type: 'Json', + optional: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("attendeeId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('attendeeId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - referenceUid: { type: "String" }, - attendeeId: { type: "Int" } - } + id: { type: 'Int' }, + referenceUid: { type: 'String' }, + attendeeId: { type: 'Int' }, + }, }, VerifiedNumber: { - name: "VerifiedNumber", + name: 'VerifiedNumber', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "verifiedNumbers", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'verifiedNumbers', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "verifiedNumbers", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'verifiedNumbers', + fields: ['teamId'], + references: ['id'], + onDelete: 'Cascade', + }, }, phoneNumber: { - name: "phoneNumber", - type: "String" - } + name: 'phoneNumber', + type: 'String', + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, VerifiedEmail: { - name: "VerifiedEmail", + name: 'VerifiedEmail', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "verifiedEmails", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'verifiedEmails', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "verifiedEmails", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'verifiedEmails', + fields: ['teamId'], + references: ['id'], + onDelete: 'Cascade', + }, }, email: { - name: "email", - type: "String" - } + name: 'email', + type: 'String', + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Feature: { - name: "Feature", + name: 'Feature', fields: { slug: { - name: "slug", - type: "String", + name: 'slug', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, type: { - name: "type", - type: "FeatureType", + name: 'type', + type: 'FeatureType', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("RELEASE") }] }] as readonly AttributeApplication[], - default: "RELEASE" as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('RELEASE') }] }, + ] as readonly AttributeApplication[], + default: 'RELEASE' as FieldDefault, }, stale: { - name: "stale", - type: "Boolean", + name: 'stale', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, lastUsedAt: { - name: "lastUsedAt", - type: "DateTime", - optional: true + name: 'lastUsedAt', + type: 'DateTime', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", + name: 'createdAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@updatedAt' }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedBy: { - name: "updatedBy", - type: "Int", - optional: true + name: 'updatedBy', + type: 'Int', + optional: true, }, users: { - name: "users", - type: "UserFeatures", + name: 'users', + type: 'UserFeatures', array: true, - relation: { opposite: "feature" } + relation: { opposite: 'feature' }, }, teams: { - name: "teams", - type: "TeamFeatures", + name: 'teams', + type: 'TeamFeatures', array: true, - relation: { opposite: "feature" } - } + relation: { opposite: 'feature' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("enabled")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("stale")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('enabled')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('stale')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["slug"], + idFields: ['slug'], uniqueFields: { - slug: { type: "String" } - } + slug: { type: 'String' }, + }, }, UserFeatures: { - name: "UserFeatures", + name: 'UserFeatures', fields: { user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "features", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'features', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', id: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, feature: { - name: "feature", - type: "Feature", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("featureId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "users", fields: ["featureId"], references: ["slug"], onDelete: "Cascade" } + name: 'feature', + type: 'Feature', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('featureId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'users', fields: ['featureId'], references: ['slug'], onDelete: 'Cascade' }, }, featureId: { - name: "featureId", - type: "String", + name: 'featureId', + type: 'String', id: true, - foreignKeyFor: [ - "feature" - ] as readonly string[] + foreignKeyFor: ['feature'] as readonly string[], }, assignedAt: { - name: "assignedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'assignedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, assignedBy: { - name: "assignedBy", - type: "String" + name: 'assignedBy', + type: 'String', }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("featureId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("featureId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('featureId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('featureId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["userId", "featureId"], + idFields: ['userId', 'featureId'], uniqueFields: { - userId_featureId: { userId: { type: "Int" }, featureId: { type: "String" } } - } + userId_featureId: { userId: { type: 'Int' }, featureId: { type: 'String' } }, + }, }, TeamFeatures: { - name: "TeamFeatures", + name: 'TeamFeatures', fields: { team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "features", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'features', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', id: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, feature: { - name: "feature", - type: "Feature", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("featureId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "teams", fields: ["featureId"], references: ["slug"], onDelete: "Cascade" } + name: 'feature', + type: 'Feature', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('featureId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'teams', fields: ['featureId'], references: ['slug'], onDelete: 'Cascade' }, }, featureId: { - name: "featureId", - type: "String", + name: 'featureId', + type: 'String', id: true, - foreignKeyFor: [ - "feature" - ] as readonly string[] + foreignKeyFor: ['feature'] as readonly string[], }, assignedAt: { - name: "assignedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'assignedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, assignedBy: { - name: "assignedBy", - type: "String" + name: 'assignedBy', + type: 'String', }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("featureId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("featureId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('featureId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('featureId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["teamId", "featureId"], + idFields: ['teamId', 'featureId'], uniqueFields: { - teamId_featureId: { teamId: { type: "Int" }, featureId: { type: "String" } } - } + teamId_featureId: { teamId: { type: 'Int' }, featureId: { type: 'String' } }, + }, }, SelectedSlots: { - name: "SelectedSlots", + name: 'SelectedSlots', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, eventTypeId: { - name: "eventTypeId", - type: "Int" + name: 'eventTypeId', + type: 'Int', }, userId: { - name: "userId", - type: "Int" + name: 'userId', + type: 'Int', }, slotUtcStartDate: { - name: "slotUtcStartDate", - type: "DateTime" + name: 'slotUtcStartDate', + type: 'DateTime', }, slotUtcEndDate: { - name: "slotUtcEndDate", - type: "DateTime" + name: 'slotUtcEndDate', + type: 'DateTime', }, uid: { - name: "uid", - type: "String" + name: 'uid', + type: 'String', }, releaseAt: { - name: "releaseAt", - type: "DateTime" + name: 'releaseAt', + type: 'DateTime', }, isSeat: { - name: "isSeat", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'isSeat', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("slotUtcStartDate"), ExpressionUtils.field("slotUtcEndDate"), ExpressionUtils.field("uid")]) }, { name: "name", value: ExpressionUtils.literal("selectedSlotUnique") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('slotUtcStartDate'), + ExpressionUtils.field('slotUtcEndDate'), + ExpressionUtils.field('uid'), + ]), + }, + { name: 'name', value: ExpressionUtils.literal('selectedSlotUnique') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - selectedSlotUnique: { userId: { type: "Int" }, slotUtcStartDate: { type: "DateTime" }, slotUtcEndDate: { type: "DateTime" }, uid: { type: "String" } } - } + id: { type: 'Int' }, + selectedSlotUnique: { + userId: { type: 'Int' }, + slotUtcStartDate: { type: 'DateTime' }, + slotUtcEndDate: { type: 'DateTime' }, + uid: { type: 'String' }, + }, + }, }, OAuthClient: { - name: "OAuthClient", + name: 'OAuthClient', fields: { clientId: { - name: "clientId", - type: "String", + name: 'clientId', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], }, redirectUri: { - name: "redirectUri", - type: "String" + name: 'redirectUri', + type: 'String', }, clientSecret: { - name: "clientSecret", - type: "String" + name: 'clientSecret', + type: 'String', }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, logo: { - name: "logo", - type: "String", - optional: true + name: 'logo', + type: 'String', + optional: true, }, accessCodes: { - name: "accessCodes", - type: "AccessCode", + name: 'accessCodes', + type: 'AccessCode', array: true, - relation: { opposite: "client" } - } + relation: { opposite: 'client' }, + }, }, - idFields: ["clientId"], + idFields: ['clientId'], uniqueFields: { - clientId: { type: "String" } - } + clientId: { type: 'String' }, + }, }, AccessCode: { - name: "AccessCode", + name: 'AccessCode', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, code: { - name: "code", - type: "String" + name: 'code', + type: 'String', }, clientId: { - name: "clientId", - type: "String", + name: 'clientId', + type: 'String', optional: true, - foreignKeyFor: [ - "client" - ] as readonly string[] + foreignKeyFor: ['client'] as readonly string[], }, client: { - name: "client", - type: "OAuthClient", + name: 'client', + type: 'OAuthClient', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("clientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("clientId")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "accessCodes", fields: ["clientId"], references: ["clientId"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('clientId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('clientId')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'accessCodes', + fields: ['clientId'], + references: ['clientId'], + onDelete: 'Cascade', + }, }, expiresAt: { - name: "expiresAt", - type: "DateTime" + name: 'expiresAt', + type: 'DateTime', }, scopes: { - name: "scopes", - type: "AccessScope", - array: true + name: 'scopes', + type: 'AccessScope', + array: true, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "accessCodes", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'accessCodes', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "accessCodes", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'accessCodes', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, BookingTimeStatus: { - name: "BookingTimeStatus", + name: 'BookingTimeStatus', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, uid: { - name: "uid", - type: "String", - optional: true + name: 'uid', + type: 'String', + optional: true, }, eventTypeId: { - name: "eventTypeId", - type: "Int", - optional: true + name: 'eventTypeId', + type: 'Int', + optional: true, }, title: { - name: "title", - type: "String", - optional: true + name: 'title', + type: 'String', + optional: true, }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, startTime: { - name: "startTime", - type: "DateTime", - optional: true + name: 'startTime', + type: 'DateTime', + optional: true, }, endTime: { - name: "endTime", - type: "DateTime", - optional: true + name: 'endTime', + type: 'DateTime', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - optional: true + name: 'createdAt', + type: 'DateTime', + optional: true, }, location: { - name: "location", - type: "String", - optional: true + name: 'location', + type: 'String', + optional: true, }, paid: { - name: "paid", - type: "Boolean", - optional: true + name: 'paid', + type: 'Boolean', + optional: true, }, status: { - name: "status", - type: "BookingStatus", - optional: true + name: 'status', + type: 'BookingStatus', + optional: true, }, rescheduled: { - name: "rescheduled", - type: "Boolean", - optional: true + name: 'rescheduled', + type: 'Boolean', + optional: true, }, userId: { - name: "userId", - type: "Int", - optional: true + name: 'userId', + type: 'Int', + optional: true, }, teamId: { - name: "teamId", - type: "Int", - optional: true + name: 'teamId', + type: 'Int', + optional: true, }, eventLength: { - name: "eventLength", - type: "Int", - optional: true + name: 'eventLength', + type: 'Int', + optional: true, }, timeStatus: { - name: "timeStatus", - type: "String", - optional: true + name: 'timeStatus', + type: 'String', + optional: true, }, eventParentId: { - name: "eventParentId", - type: "Int", - optional: true + name: 'eventParentId', + type: 'Int', + optional: true, }, userEmail: { - name: "userEmail", - type: "String", - optional: true + name: 'userEmail', + type: 'String', + optional: true, }, username: { - name: "username", - type: "String", - optional: true + name: 'username', + type: 'String', + optional: true, }, ratingFeedback: { - name: "ratingFeedback", - type: "String", - optional: true + name: 'ratingFeedback', + type: 'String', + optional: true, }, rating: { - name: "rating", - type: "Int", - optional: true + name: 'rating', + type: 'Int', + optional: true, }, noShowHost: { - name: "noShowHost", - type: "Boolean", - optional: true + name: 'noShowHost', + type: 'Boolean', + optional: true, }, isTeamBooking: { - name: "isTeamBooking", - type: "Boolean" - } + name: 'isTeamBooking', + type: 'Boolean', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, - isView: true + isView: true, }, BookingDenormalized: { - name: "BookingDenormalized", + name: 'BookingDenormalized', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], }, uid: { - name: "uid", - type: "String" + name: 'uid', + type: 'String', }, eventTypeId: { - name: "eventTypeId", - type: "Int", - optional: true + name: 'eventTypeId', + type: 'Int', + optional: true, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, startTime: { - name: "startTime", - type: "DateTime" + name: 'startTime', + type: 'DateTime', }, endTime: { - name: "endTime", - type: "DateTime" + name: 'endTime', + type: 'DateTime', }, createdAt: { - name: "createdAt", - type: "DateTime" + name: 'createdAt', + type: 'DateTime', }, updatedAt: { - name: "updatedAt", - type: "DateTime", - optional: true + name: 'updatedAt', + type: 'DateTime', + optional: true, }, location: { - name: "location", - type: "String", - optional: true + name: 'location', + type: 'String', + optional: true, }, paid: { - name: "paid", - type: "Boolean" + name: 'paid', + type: 'Boolean', }, status: { - name: "status", - type: "BookingStatus" + name: 'status', + type: 'BookingStatus', }, rescheduled: { - name: "rescheduled", - type: "Boolean", - optional: true + name: 'rescheduled', + type: 'Boolean', + optional: true, }, userId: { - name: "userId", - type: "Int", - optional: true + name: 'userId', + type: 'Int', + optional: true, }, teamId: { - name: "teamId", - type: "Int", - optional: true + name: 'teamId', + type: 'Int', + optional: true, }, eventLength: { - name: "eventLength", - type: "Int", - optional: true + name: 'eventLength', + type: 'Int', + optional: true, }, eventParentId: { - name: "eventParentId", - type: "Int", - optional: true + name: 'eventParentId', + type: 'Int', + optional: true, }, userEmail: { - name: "userEmail", - type: "String", - optional: true + name: 'userEmail', + type: 'String', + optional: true, }, userName: { - name: "userName", - type: "String", - optional: true + name: 'userName', + type: 'String', + optional: true, }, userUsername: { - name: "userUsername", - type: "String", - optional: true + name: 'userUsername', + type: 'String', + optional: true, }, ratingFeedback: { - name: "ratingFeedback", - type: "String", - optional: true + name: 'ratingFeedback', + type: 'String', + optional: true, }, rating: { - name: "rating", - type: "Int", - optional: true + name: 'rating', + type: 'Int', + optional: true, }, noShowHost: { - name: "noShowHost", - type: "Boolean", - optional: true + name: 'noShowHost', + type: 'Boolean', + optional: true, }, isTeamBooking: { - name: "isTeamBooking", - type: "Boolean" - } + name: 'isTeamBooking', + type: 'Boolean', + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventParentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("startTime")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("endTime")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("BookingStatus", [ExpressionUtils.field("status")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("isTeamBooking")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("isTeamBooking")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventParentId')]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('startTime')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('endTime')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('BookingStatus', [ExpressionUtils.field('status')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('isTeamBooking'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('isTeamBooking'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, BookingTimeStatusDenormalized: { - name: "BookingTimeStatusDenormalized", + name: 'BookingTimeStatusDenormalized', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, uid: { - name: "uid", - type: "String" + name: 'uid', + type: 'String', }, eventTypeId: { - name: "eventTypeId", - type: "Int", - optional: true + name: 'eventTypeId', + type: 'Int', + optional: true, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, startTime: { - name: "startTime", - type: "DateTime" + name: 'startTime', + type: 'DateTime', }, endTime: { - name: "endTime", - type: "DateTime" + name: 'endTime', + type: 'DateTime', }, createdAt: { - name: "createdAt", - type: "DateTime" + name: 'createdAt', + type: 'DateTime', }, updatedAt: { - name: "updatedAt", - type: "DateTime", - optional: true + name: 'updatedAt', + type: 'DateTime', + optional: true, }, location: { - name: "location", - type: "String", - optional: true + name: 'location', + type: 'String', + optional: true, }, paid: { - name: "paid", - type: "Boolean" + name: 'paid', + type: 'Boolean', }, status: { - name: "status", - type: "BookingStatus" + name: 'status', + type: 'BookingStatus', }, rescheduled: { - name: "rescheduled", - type: "Boolean", - optional: true + name: 'rescheduled', + type: 'Boolean', + optional: true, }, userId: { - name: "userId", - type: "Int", - optional: true + name: 'userId', + type: 'Int', + optional: true, }, teamId: { - name: "teamId", - type: "Int", - optional: true + name: 'teamId', + type: 'Int', + optional: true, }, eventLength: { - name: "eventLength", - type: "Int", - optional: true + name: 'eventLength', + type: 'Int', + optional: true, }, eventParentId: { - name: "eventParentId", - type: "Int", - optional: true + name: 'eventParentId', + type: 'Int', + optional: true, }, userEmail: { - name: "userEmail", - type: "String", - optional: true + name: 'userEmail', + type: 'String', + optional: true, }, userName: { - name: "userName", - type: "String", - optional: true + name: 'userName', + type: 'String', + optional: true, }, userUsername: { - name: "userUsername", - type: "String", - optional: true + name: 'userUsername', + type: 'String', + optional: true, }, ratingFeedback: { - name: "ratingFeedback", - type: "String", - optional: true + name: 'ratingFeedback', + type: 'String', + optional: true, }, rating: { - name: "rating", - type: "Int", - optional: true + name: 'rating', + type: 'Int', + optional: true, }, noShowHost: { - name: "noShowHost", - type: "Boolean", - optional: true + name: 'noShowHost', + type: 'Boolean', + optional: true, }, isTeamBooking: { - name: "isTeamBooking", - type: "Boolean" + name: 'isTeamBooking', + type: 'Boolean', }, timeStatus: { - name: "timeStatus", - type: "String", - optional: true - } + name: 'timeStatus', + type: 'String', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, - isView: true + isView: true, }, CalendarCache: { - name: "CalendarCache", + name: 'CalendarCache', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, key: { - name: "key", - type: "String", - id: true + name: 'key', + type: 'String', + id: true, }, value: { - name: "value", - type: "Json" + name: 'value', + type: 'Json', }, expiresAt: { - name: "expiresAt", - type: "DateTime" + name: 'expiresAt', + type: 'DateTime', }, credentialId: { - name: "credentialId", - type: "Int", + name: 'credentialId', + type: 'Int', id: true, - foreignKeyFor: [ - "credential" - ] as readonly string[] + foreignKeyFor: ['credential'] as readonly string[], }, userId: { - name: "userId", - type: "Int", - optional: true + name: 'userId', + type: 'Int', + optional: true, }, credential: { - name: "credential", - type: "Credential", + name: 'credential', + type: 'Credential', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "CalendarCache", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'CalendarCache', + fields: ['credentialId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId"), ExpressionUtils.field("key")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId"), ExpressionUtils.field("key")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("key")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('credentialId'), + ExpressionUtils.field('key'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('credentialId'), + ExpressionUtils.field('key'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('key'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["key", "credentialId"], + idFields: ['key', 'credentialId'], uniqueFields: { - credentialId_key: { credentialId: { type: "Int" }, key: { type: "String" } } - } + credentialId_key: { credentialId: { type: 'Int' }, key: { type: 'String' } }, + }, }, TempOrgRedirect: { - name: "TempOrgRedirect", + name: 'TempOrgRedirect', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, from: { - name: "from", - type: "String" + name: 'from', + type: 'String', }, fromOrgId: { - name: "fromOrgId", - type: "Int" + name: 'fromOrgId', + type: 'Int', }, type: { - name: "type", - type: "RedirectType" + name: 'type', + type: 'RedirectType', }, toUrl: { - name: "toUrl", - type: "String" + name: 'toUrl', + type: 'String', }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("from"), ExpressionUtils.field("type"), ExpressionUtils.field("fromOrgId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('from'), + ExpressionUtils.field('type'), + ExpressionUtils.field('fromOrgId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - from_type_fromOrgId: { from: { type: "String" }, type: { type: "RedirectType" }, fromOrgId: { type: "Int" } } - } + id: { type: 'Int' }, + from_type_fromOrgId: { + from: { type: 'String' }, + type: { type: 'RedirectType' }, + fromOrgId: { type: 'Int' }, + }, + }, }, Avatar: { - name: "Avatar", + name: 'Avatar', fields: { teamId: { - name: "teamId", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'teamId', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, userId: { - name: "userId", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'userId', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, data: { - name: "data", - type: "String" + name: 'data', + type: 'String', }, objectKey: { - name: "objectKey", - type: "String", + name: 'objectKey', + type: 'String', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, isBanner: { - name: "isBanner", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'isBanner', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("userId"), ExpressionUtils.field("isBanner")]) }] }, - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("avatars") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('userId'), + ExpressionUtils.field('isBanner'), + ]), + }, + ], + }, + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('avatars') }] }, ] as readonly AttributeApplication[], - idFields: ["objectKey"], + idFields: ['objectKey'], uniqueFields: { - objectKey: { type: "String" }, - teamId_userId_isBanner: { teamId: { type: "Int" }, userId: { type: "Int" }, isBanner: { type: "Boolean" } } - } + objectKey: { type: 'String' }, + teamId_userId_isBanner: { + teamId: { type: 'Int' }, + userId: { type: 'Int' }, + isBanner: { type: 'Boolean' }, + }, + }, }, OutOfOfficeEntry: { - name: "OutOfOfficeEntry", + name: 'OutOfOfficeEntry', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, uuid: { - name: "uuid", - type: "String", + name: 'uuid', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, start: { - name: "start", - type: "DateTime" + name: 'start', + type: 'DateTime', }, end: { - name: "end", - type: "DateTime" + name: 'end', + type: 'DateTime', }, notes: { - name: "notes", - type: "String", - optional: true + name: 'notes', + type: 'String', + optional: true, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "bookingRedirects", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'bookingRedirects', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, toUserId: { - name: "toUserId", - type: "Int", + name: 'toUserId', + type: 'Int', optional: true, - foreignKeyFor: [ - "toUser" - ] as readonly string[] + foreignKeyFor: ['toUser'] as readonly string[], }, toUser: { - name: "toUser", - type: "User", + name: 'toUser', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("toUser") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("toUserId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "bookingRedirectsTo", name: "toUser", fields: ["toUserId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('toUser') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('toUserId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'bookingRedirectsTo', + name: 'toUser', + fields: ['toUserId'], + references: ['id'], + onDelete: 'Cascade', + }, }, reasonId: { - name: "reasonId", - type: "Int", + name: 'reasonId', + type: 'Int', optional: true, - foreignKeyFor: [ - "reason" - ] as readonly string[] + foreignKeyFor: ['reason'] as readonly string[], }, reason: { - name: "reason", - type: "OutOfOfficeReason", + name: 'reason', + type: 'OutOfOfficeReason', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reasonId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "entries", fields: ["reasonId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('reasonId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'entries', fields: ['reasonId'], references: ['id'], onDelete: 'SetNull' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uuid")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("toUserId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("start"), ExpressionUtils.field("end")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uuid')]) }], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('toUserId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ + ExpressionUtils.field('start'), + ExpressionUtils.field('end'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - uuid: { type: "String" } - } + id: { type: 'Int' }, + uuid: { type: 'String' }, + }, }, OutOfOfficeReason: { - name: "OutOfOfficeReason", + name: 'OutOfOfficeReason', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, emoji: { - name: "emoji", - type: "String" + name: 'emoji', + type: 'String', }, reason: { - name: "reason", - type: "String", + name: 'reason', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "OutOfOfficeReasons", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'OutOfOfficeReasons', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, entries: { - name: "entries", - type: "OutOfOfficeEntry", + name: 'entries', + type: 'OutOfOfficeEntry', array: true, - relation: { opposite: "reason" } - } + relation: { opposite: 'reason' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - reason: { type: "String" } - } + id: { type: 'Int' }, + reason: { type: 'String' }, + }, }, PlatformOAuthClient: { - name: "PlatformOAuthClient", + name: 'PlatformOAuthClient', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, secret: { - name: "secret", - type: "String" + name: 'secret', + type: 'String', }, permissions: { - name: "permissions", - type: "Int" + name: 'permissions', + type: 'Int', }, users: { - name: "users", - type: "User", + name: 'users', + type: 'User', array: true, - relation: { opposite: "platformOAuthClients" } + relation: { opposite: 'platformOAuthClients' }, }, logo: { - name: "logo", - type: "String", - optional: true + name: 'logo', + type: 'String', + optional: true, }, redirectUris: { - name: "redirectUris", - type: "String", - array: true + name: 'redirectUris', + type: 'String', + array: true, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "platformOAuthClient", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'platformOAuthClient', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teams: { - name: "teams", - type: "Team", + name: 'teams', + type: 'Team', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedByOAuthClient") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdByOAuthClient", name: "CreatedByOAuthClient" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CreatedByOAuthClient') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'createdByOAuthClient', name: 'CreatedByOAuthClient' }, }, accessTokens: { - name: "accessTokens", - type: "AccessToken", + name: 'accessTokens', + type: 'AccessToken', array: true, - relation: { opposite: "client" } + relation: { opposite: 'client' }, }, refreshToken: { - name: "refreshToken", - type: "RefreshToken", + name: 'refreshToken', + type: 'RefreshToken', array: true, - relation: { opposite: "client" } + relation: { opposite: 'client' }, }, authorizationTokens: { - name: "authorizationTokens", - type: "PlatformAuthorizationToken", + name: 'authorizationTokens', + type: 'PlatformAuthorizationToken', array: true, - relation: { opposite: "client" } + relation: { opposite: 'client' }, }, webhook: { - name: "webhook", - type: "Webhook", + name: 'webhook', + type: 'Webhook', array: true, - relation: { opposite: "platformOAuthClient" } + relation: { opposite: 'platformOAuthClient' }, }, bookingRedirectUri: { - name: "bookingRedirectUri", - type: "String", - optional: true + name: 'bookingRedirectUri', + type: 'String', + optional: true, }, bookingCancelRedirectUri: { - name: "bookingCancelRedirectUri", - type: "String", - optional: true + name: 'bookingCancelRedirectUri', + type: 'String', + optional: true, }, bookingRescheduleRedirectUri: { - name: "bookingRescheduleRedirectUri", - type: "String", - optional: true + name: 'bookingRescheduleRedirectUri', + type: 'String', + optional: true, }, areEmailsEnabled: { - name: "areEmailsEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'areEmailsEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, areDefaultEventTypesEnabled: { - name: "areDefaultEventTypesEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'areDefaultEventTypesEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, areCalendarEventsEnabled: { - name: "areCalendarEventsEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'areCalendarEventsEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, PlatformAuthorizationToken: { - name: "PlatformAuthorizationToken", + name: 'PlatformAuthorizationToken', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, owner: { - name: "owner", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "PlatformAuthorizationToken", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'owner', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'PlatformAuthorizationToken', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, client: { - name: "client", - type: "PlatformOAuthClient", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "authorizationTokens", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } + name: 'client', + type: 'PlatformOAuthClient', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('platformOAuthClientId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'authorizationTokens', + fields: ['platformOAuthClientId'], + references: ['id'], + onDelete: 'Cascade', + }, }, platformOAuthClientId: { - name: "platformOAuthClientId", - type: "String", - foreignKeyFor: [ - "client" - ] as readonly string[] + name: 'platformOAuthClientId', + type: 'String', + foreignKeyFor: ['client'] as readonly string[], }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "owner" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['owner'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("platformOAuthClientId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('platformOAuthClientId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - userId_platformOAuthClientId: { userId: { type: "Int" }, platformOAuthClientId: { type: "String" } } - } + id: { type: 'String' }, + userId_platformOAuthClientId: { userId: { type: 'Int' }, platformOAuthClientId: { type: 'String' } }, + }, }, AccessToken: { - name: "AccessToken", + name: 'AccessToken', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, secret: { - name: "secret", - type: "String", + name: 'secret', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, expiresAt: { - name: "expiresAt", - type: "DateTime" + name: 'expiresAt', + type: 'DateTime', }, owner: { - name: "owner", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "AccessToken", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'owner', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'AccessToken', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, client: { - name: "client", - type: "PlatformOAuthClient", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "accessTokens", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } + name: 'client', + type: 'PlatformOAuthClient', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('platformOAuthClientId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'accessTokens', + fields: ['platformOAuthClientId'], + references: ['id'], + onDelete: 'Cascade', + }, }, platformOAuthClientId: { - name: "platformOAuthClientId", - type: "String", - foreignKeyFor: [ - "client" - ] as readonly string[] + name: 'platformOAuthClientId', + type: 'String', + foreignKeyFor: ['client'] as readonly string[], }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "owner" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'userId', + type: 'Int', + foreignKeyFor: ['owner'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - secret: { type: "String" } - } + id: { type: 'Int' }, + secret: { type: 'String' }, + }, }, RefreshToken: { - name: "RefreshToken", + name: 'RefreshToken', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, secret: { - name: "secret", - type: "String", + name: 'secret', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, expiresAt: { - name: "expiresAt", - type: "DateTime" + name: 'expiresAt', + type: 'DateTime', }, owner: { - name: "owner", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "RefreshToken", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'owner', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'RefreshToken', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, client: { - name: "client", - type: "PlatformOAuthClient", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "refreshToken", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } + name: 'client', + type: 'PlatformOAuthClient', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('platformOAuthClientId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'refreshToken', + fields: ['platformOAuthClientId'], + references: ['id'], + onDelete: 'Cascade', + }, }, platformOAuthClientId: { - name: "platformOAuthClientId", - type: "String", - foreignKeyFor: [ - "client" - ] as readonly string[] + name: 'platformOAuthClientId', + type: 'String', + foreignKeyFor: ['client'] as readonly string[], }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "owner" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'userId', + type: 'Int', + foreignKeyFor: ['owner'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - secret: { type: "String" } - } + id: { type: 'Int' }, + secret: { type: 'String' }, + }, }, DSyncData: { - name: "DSyncData", + name: 'DSyncData', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, directoryId: { - name: "directoryId", - type: "String", + name: 'directoryId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, tenant: { - name: "tenant", - type: "String" + name: 'tenant', + type: 'String', }, organizationId: { - name: "organizationId", - type: "Int", + name: 'organizationId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "org" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['org'] as readonly string[], }, org: { - name: "org", - type: "OrganizationSettings", + name: 'org', + type: 'OrganizationSettings', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "dSyncData", fields: ["organizationId"], references: ["organizationId"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'dSyncData', + fields: ['organizationId'], + references: ['organizationId'], + onDelete: 'Cascade', + }, }, teamGroupMapping: { - name: "teamGroupMapping", - type: "DSyncTeamGroupMapping", + name: 'teamGroupMapping', + type: 'DSyncTeamGroupMapping', array: true, - relation: { opposite: "directory" } + relation: { opposite: 'directory' }, }, createdAttributeToUsers: { - name: "createdAttributeToUsers", - type: "AttributeToUser", + name: 'createdAttributeToUsers', + type: 'AttributeToUser', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdByDSync") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdByDSync", name: "createdByDSync" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('createdByDSync') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'createdByDSync', name: 'createdByDSync' }, }, updatedAttributeToUsers: { - name: "updatedAttributeToUsers", - type: "AttributeToUser", + name: 'updatedAttributeToUsers', + type: 'AttributeToUser', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedByDSync") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedByDSync", name: "updatedByDSync" } - } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('updatedByDSync') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'updatedByDSync', name: 'updatedByDSync' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - directoryId: { type: "String" }, - organizationId: { type: "Int" } - } + id: { type: 'Int' }, + directoryId: { type: 'String' }, + organizationId: { type: 'Int' }, + }, }, DSyncTeamGroupMapping: { - name: "DSyncTeamGroupMapping", + name: 'DSyncTeamGroupMapping', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, organizationId: { - name: "organizationId", - type: "Int" + name: 'organizationId', + type: 'Int', }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "dsyncTeamGroupMapping", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'dsyncTeamGroupMapping', + fields: ['teamId'], + references: ['id'], + onDelete: 'Cascade', + }, }, directoryId: { - name: "directoryId", - type: "String", - foreignKeyFor: [ - "directory" - ] as readonly string[] + name: 'directoryId', + type: 'String', + foreignKeyFor: ['directory'] as readonly string[], }, directory: { - name: "directory", - type: "DSyncData", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "teamGroupMapping", fields: ["directoryId"], references: ["directoryId"], onDelete: "Cascade" } + name: 'directory', + type: 'DSyncData', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'teamGroupMapping', + fields: ['directoryId'], + references: ['directoryId'], + onDelete: 'Cascade', + }, }, groupName: { - name: "groupName", - type: "String" - } + name: 'groupName', + type: 'String', + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("groupName")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('groupName'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - teamId_groupName: { teamId: { type: "Int" }, groupName: { type: "String" } } - } + id: { type: 'Int' }, + teamId_groupName: { teamId: { type: 'Int' }, groupName: { type: 'String' } }, + }, }, SecondaryEmail: { - name: "SecondaryEmail", + name: 'SecondaryEmail', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "secondaryEmails", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'secondaryEmails', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, emailVerified: { - name: "emailVerified", - type: "DateTime", - optional: true + name: 'emailVerified', + type: 'DateTime', + optional: true, }, verificationTokens: { - name: "verificationTokens", - type: "VerificationToken", + name: 'verificationTokens', + type: 'VerificationToken', array: true, - relation: { opposite: "secondaryEmail" } + relation: { opposite: 'secondaryEmail' }, }, eventTypes: { - name: "eventTypes", - type: "EventType", + name: 'eventTypes', + type: 'EventType', array: true, - relation: { opposite: "secondaryEmail" } - } + relation: { opposite: 'secondaryEmail' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("email")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } + { + name: '@@unique', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('email'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - email: { type: "String" }, - userId_email: { userId: { type: "Int" }, email: { type: "String" } } - } + id: { type: 'Int' }, + email: { type: 'String' }, + userId_email: { userId: { type: 'Int' }, email: { type: 'String' } }, + }, }, Task: { - name: "Task", + name: 'Task', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@unique' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, scheduledAt: { - name: "scheduledAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'scheduledAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, succeededAt: { - name: "succeededAt", - type: "DateTime", - optional: true + name: 'succeededAt', + type: 'DateTime', + optional: true, }, type: { - name: "type", - type: "String" + name: 'type', + type: 'String', }, payload: { - name: "payload", - type: "String" + name: 'payload', + type: 'String', }, attempts: { - name: "attempts", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'attempts', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, maxAttempts: { - name: "maxAttempts", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[], - default: 3 as FieldDefault + name: 'maxAttempts', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(3) }] }, + ] as readonly AttributeApplication[], + default: 3 as FieldDefault, }, lastError: { - name: "lastError", - type: "String", - optional: true + name: 'lastError', + type: 'String', + optional: true, }, lastFailedAttemptAt: { - name: "lastFailedAttemptAt", - type: "DateTime", - optional: true + name: 'lastFailedAttemptAt', + type: 'DateTime', + optional: true, }, referenceUid: { - name: "referenceUid", - type: "String", - optional: true - } + name: 'referenceUid', + type: 'String', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ManagedOrganization: { - name: "ManagedOrganization", + name: 'ManagedOrganization', fields: { managedOrganizationId: { - name: "managedOrganizationId", - type: "Int", + name: 'managedOrganizationId', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "managedOrganization" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['managedOrganization'] as readonly string[], }, managedOrganization: { - name: "managedOrganization", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagedOrganization") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managedOrganizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "managedOrganization", name: "ManagedOrganization", fields: ["managedOrganizationId"], references: ["id"], onDelete: "Cascade" } + name: 'managedOrganization', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('ManagedOrganization') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('managedOrganizationId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'managedOrganization', + name: 'ManagedOrganization', + fields: ['managedOrganizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, managerOrganizationId: { - name: "managerOrganizationId", - type: "Int", - foreignKeyFor: [ - "managerOrganization" - ] as readonly string[] + name: 'managerOrganizationId', + type: 'Int', + foreignKeyFor: ['managerOrganization'] as readonly string[], }, managerOrganization: { - name: "managerOrganization", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagerOrganization") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerOrganizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "managedOrganizations", name: "ManagerOrganization", fields: ["managerOrganizationId"], references: ["id"], onDelete: "Cascade" } + name: 'managerOrganization', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('ManagerOrganization') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('managerOrganizationId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'managedOrganizations', + name: 'ManagerOrganization', + fields: ['managerOrganizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerOrganizationId"), ExpressionUtils.field("managedOrganizationId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerOrganizationId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('managerOrganizationId'), + ExpressionUtils.field('managedOrganizationId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('managerOrganizationId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["managedOrganizationId"], + idFields: ['managedOrganizationId'], uniqueFields: { - managedOrganizationId: { type: "Int" }, - managerOrganizationId_managedOrganizationId: { managerOrganizationId: { type: "Int" }, managedOrganizationId: { type: "Int" } } - } + managedOrganizationId: { type: 'Int' }, + managerOrganizationId_managedOrganizationId: { + managerOrganizationId: { type: 'Int' }, + managedOrganizationId: { type: 'Int' }, + }, + }, }, PlatformBilling: { - name: "PlatformBilling", + name: 'PlatformBilling', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "team" - ] as readonly string[] + attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['team'] as readonly string[], }, customerId: { - name: "customerId", - type: "String" + name: 'customerId', + type: 'String', }, subscriptionId: { - name: "subscriptionId", - type: "String", - optional: true + name: 'subscriptionId', + type: 'String', + optional: true, }, priceId: { - name: "priceId", - type: "String", - optional: true + name: 'priceId', + type: 'String', + optional: true, }, plan: { - name: "plan", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("none") }] }] as readonly AttributeApplication[], - default: "none" as FieldDefault + name: 'plan', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('none') }] }, + ] as readonly AttributeApplication[], + default: 'none' as FieldDefault, }, billingCycleStart: { - name: "billingCycleStart", - type: "Int", - optional: true + name: 'billingCycleStart', + type: 'Int', + optional: true, }, billingCycleEnd: { - name: "billingCycleEnd", - type: "Int", - optional: true + name: 'billingCycleEnd', + type: 'Int', + optional: true, }, overdue: { - name: "overdue", - type: "Boolean", + name: 'overdue', + type: 'Boolean', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, managerBillingId: { - name: "managerBillingId", - type: "Int", + name: 'managerBillingId', + type: 'Int', optional: true, - foreignKeyFor: [ - "managerBilling" - ] as readonly string[] + foreignKeyFor: ['managerBilling'] as readonly string[], }, managerBilling: { - name: "managerBilling", - type: "PlatformBilling", + name: 'managerBilling', + type: 'PlatformBilling', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("PlatformManagedBilling") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerBillingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "managedBillings", name: "PlatformManagedBilling", fields: ["managerBillingId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('PlatformManagedBilling') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('managerBillingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'managedBillings', + name: 'PlatformManagedBilling', + fields: ['managerBillingId'], + references: ['id'], + }, }, managedBillings: { - name: "managedBillings", - type: "PlatformBilling", + name: 'managedBillings', + type: 'PlatformBilling', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("PlatformManagedBilling") }] }] as readonly AttributeApplication[], - relation: { opposite: "managerBilling", name: "PlatformManagedBilling" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('PlatformManagedBilling') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'managerBilling', name: 'PlatformManagedBilling' }, }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "platformBilling", fields: ["id"], references: ["id"], onDelete: "Cascade" } - } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]) }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'platformBilling', fields: ['id'], references: ['id'], onDelete: 'Cascade' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, AttributeOption: { - name: "AttributeOption", + name: 'AttributeOption', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, attribute: { - name: "attribute", - type: "Attribute", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "options", fields: ["attributeId"], references: ["id"], onDelete: "Cascade" } + name: 'attribute', + type: 'Attribute', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'options', fields: ['attributeId'], references: ['id'], onDelete: 'Cascade' }, }, attributeId: { - name: "attributeId", - type: "String", - foreignKeyFor: [ - "attribute" - ] as readonly string[] + name: 'attributeId', + type: 'String', + foreignKeyFor: ['attribute'] as readonly string[], }, value: { - name: "value", - type: "String" + name: 'value', + type: 'String', }, slug: { - name: "slug", - type: "String" + name: 'slug', + type: 'String', }, isGroup: { - name: "isGroup", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isGroup', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, contains: { - name: "contains", - type: "String", - array: true + name: 'contains', + type: 'String', + array: true, }, assignedUsers: { - name: "assignedUsers", - type: "AttributeToUser", + name: 'assignedUsers', + type: 'AttributeToUser', array: true, - relation: { opposite: "attributeOption" } - } + relation: { opposite: 'attributeOption' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Attribute: { - name: "Attribute", + name: 'Attribute', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attributes", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'attributes', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], }, type: { - name: "type", - type: "AttributeType" + name: 'type', + type: 'AttributeType', }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, slug: { - name: "slug", - type: "String", + name: 'slug', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, usersCanEditRelation: { - name: "usersCanEditRelation", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'usersCanEditRelation', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, options: { - name: "options", - type: "AttributeOption", + name: 'options', + type: 'AttributeOption', array: true, - relation: { opposite: "attribute" } + relation: { opposite: 'attribute' }, }, isWeightsEnabled: { - name: "isWeightsEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isWeightsEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isLocked: { - name: "isLocked", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'isLocked', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - slug: { type: "String" } - } + id: { type: 'String' }, + slug: { type: 'String' }, + }, }, AttributeToUser: { - name: "AttributeToUser", + name: 'AttributeToUser', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, member: { - name: "member", - type: "Membership", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("memberId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "AttributeToUser", fields: ["memberId"], references: ["id"], onDelete: "Cascade" } + name: 'member', + type: 'Membership', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('memberId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'AttributeToUser', + fields: ['memberId'], + references: ['id'], + onDelete: 'Cascade', + }, }, memberId: { - name: "memberId", - type: "Int", - foreignKeyFor: [ - "member" - ] as readonly string[] + name: 'memberId', + type: 'Int', + foreignKeyFor: ['member'] as readonly string[], }, attributeOption: { - name: "attributeOption", - type: "AttributeOption", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeOptionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "assignedUsers", fields: ["attributeOptionId"], references: ["id"], onDelete: "Cascade" } + name: 'attributeOption', + type: 'AttributeOption', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('attributeOptionId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'assignedUsers', + fields: ['attributeOptionId'], + references: ['id'], + onDelete: 'Cascade', + }, }, attributeOptionId: { - name: "attributeOptionId", - type: "String", - foreignKeyFor: [ - "attributeOption" - ] as readonly string[] + name: 'attributeOptionId', + type: 'String', + foreignKeyFor: ['attributeOption'] as readonly string[], }, weight: { - name: "weight", - type: "Int", - optional: true + name: 'weight', + type: 'Int', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, createdById: { - name: "createdById", - type: "Int", + name: 'createdById', + type: 'Int', optional: true, - foreignKeyFor: [ - "createdBy" - ] as readonly string[] + foreignKeyFor: ['createdBy'] as readonly string[], }, createdBy: { - name: "createdBy", - type: "User", + name: 'createdBy', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdBy") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdAttributeToUsers", name: "createdBy", fields: ["createdById"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('createdBy') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'createdAttributeToUsers', + name: 'createdBy', + fields: ['createdById'], + references: ['id'], + onDelete: 'SetNull', + }, }, createdByDSyncId: { - name: "createdByDSyncId", - type: "String", + name: 'createdByDSyncId', + type: 'String', optional: true, - foreignKeyFor: [ - "createdByDSync" - ] as readonly string[] + foreignKeyFor: ['createdByDSync'] as readonly string[], }, createdByDSync: { - name: "createdByDSync", - type: "DSyncData", + name: 'createdByDSync', + type: 'DSyncData', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdByDSync") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("createdByDSyncId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdAttributeToUsers", name: "createdByDSync", fields: ["createdByDSyncId"], references: ["directoryId"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('createdByDSync') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('createdByDSyncId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'createdAttributeToUsers', + name: 'createdByDSync', + fields: ['createdByDSyncId'], + references: ['directoryId'], + onDelete: 'SetNull', + }, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', optional: true, updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, updatedBy: { - name: "updatedBy", - type: "User", + name: 'updatedBy', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedBy") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedAttributeToUsers", name: "updatedBy", fields: ["updatedById"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('updatedBy') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'updatedAttributeToUsers', + name: 'updatedBy', + fields: ['updatedById'], + references: ['id'], + onDelete: 'SetNull', + }, }, updatedById: { - name: "updatedById", - type: "Int", + name: 'updatedById', + type: 'Int', optional: true, - foreignKeyFor: [ - "updatedBy" - ] as readonly string[] + foreignKeyFor: ['updatedBy'] as readonly string[], }, updatedByDSyncId: { - name: "updatedByDSyncId", - type: "String", + name: 'updatedByDSyncId', + type: 'String', optional: true, - foreignKeyFor: [ - "updatedByDSync" - ] as readonly string[] + foreignKeyFor: ['updatedByDSync'] as readonly string[], }, updatedByDSync: { - name: "updatedByDSync", - type: "DSyncData", + name: 'updatedByDSync', + type: 'DSyncData', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedByDSync") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("updatedByDSyncId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedAttributeToUsers", name: "updatedByDSync", fields: ["updatedByDSyncId"], references: ["directoryId"], onDelete: "SetNull" } - } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('updatedByDSync') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('updatedByDSyncId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'updatedAttributeToUsers', + name: 'updatedByDSync', + fields: ['updatedByDSyncId'], + references: ['directoryId'], + onDelete: 'SetNull', + }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("memberId"), ExpressionUtils.field("attributeOptionId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('memberId'), + ExpressionUtils.field('attributeOptionId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - memberId_attributeOptionId: { memberId: { type: "Int" }, attributeOptionId: { type: "String" } } - } + id: { type: 'String' }, + memberId_attributeOptionId: { memberId: { type: 'Int' }, attributeOptionId: { type: 'String' } }, + }, }, AssignmentReason: { - name: "AssignmentReason", + name: 'AssignmentReason', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@unique' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, bookingId: { - name: "bookingId", - type: "Int", - foreignKeyFor: [ - "booking" - ] as readonly string[] + name: 'bookingId', + type: 'Int', + foreignKeyFor: ['booking'] as readonly string[], }, booking: { - name: "booking", - type: "Booking", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "assignmentReason", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + name: 'booking', + type: 'Booking', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'assignmentReason', + fields: ['bookingId'], + references: ['id'], + onDelete: 'Cascade', + }, }, reasonEnum: { - name: "reasonEnum", - type: "AssignmentReasonEnum" + name: 'reasonEnum', + type: 'AssignmentReasonEnum', }, reasonString: { - name: "reasonString", - type: "String" - } + name: 'reasonString', + type: 'String', + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, DelegationCredential: { - name: "DelegationCredential", + name: 'DelegationCredential', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, workspacePlatform: { - name: "workspacePlatform", - type: "WorkspacePlatform", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workspacePlatformId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "delegationCredentials", fields: ["workspacePlatformId"], references: ["id"], onDelete: "Cascade" } + name: 'workspacePlatform', + type: 'WorkspacePlatform', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('workspacePlatformId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'delegationCredentials', + fields: ['workspacePlatformId'], + references: ['id'], + onDelete: 'Cascade', + }, }, workspacePlatformId: { - name: "workspacePlatformId", - type: "Int", - foreignKeyFor: [ - "workspacePlatform" - ] as readonly string[] + name: 'workspacePlatformId', + type: 'Int', + foreignKeyFor: ['workspacePlatform'] as readonly string[], }, serviceAccountKey: { - name: "serviceAccountKey", - type: "Json" + name: 'serviceAccountKey', + type: 'Json', }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, lastEnabledAt: { - name: "lastEnabledAt", - type: "DateTime", - optional: true + name: 'lastEnabledAt', + type: 'DateTime', + optional: true, }, lastDisabledAt: { - name: "lastDisabledAt", - type: "DateTime", - optional: true + name: 'lastDisabledAt', + type: 'DateTime', + optional: true, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "delegationCredentials", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'delegationCredentials', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, domain: { - name: "domain", - type: "String" + name: 'domain', + type: 'String', }, selectedCalendars: { - name: "selectedCalendars", - type: "SelectedCalendar", + name: 'selectedCalendars', + type: 'SelectedCalendar', array: true, - relation: { opposite: "delegationCredential" } + relation: { opposite: 'delegationCredential' }, }, destinationCalendar: { - name: "destinationCalendar", - type: "DestinationCalendar", + name: 'destinationCalendar', + type: 'DestinationCalendar', array: true, - relation: { opposite: "delegationCredential" } + relation: { opposite: 'delegationCredential' }, }, bookingReferences: { - name: "bookingReferences", - type: "BookingReference", + name: 'bookingReferences', + type: 'BookingReference', array: true, - relation: { opposite: "delegationCredential" } + relation: { opposite: 'delegationCredential' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, credentials: { - name: "credentials", - type: "Credential", + name: 'credentials', + type: 'Credential', array: true, - relation: { opposite: "delegationCredential" } - } + relation: { opposite: 'delegationCredential' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("domain")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("enabled")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('domain'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('enabled')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - organizationId_domain: { organizationId: { type: "Int" }, domain: { type: "String" } } - } + id: { type: 'String' }, + organizationId_domain: { organizationId: { type: 'Int' }, domain: { type: 'String' } }, + }, }, DomainWideDelegation: { - name: "DomainWideDelegation", + name: 'DomainWideDelegation', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, workspacePlatform: { - name: "workspacePlatform", - type: "WorkspacePlatform", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workspacePlatformId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "domainWideDelegations", fields: ["workspacePlatformId"], references: ["id"], onDelete: "Cascade" } + name: 'workspacePlatform', + type: 'WorkspacePlatform', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('workspacePlatformId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'domainWideDelegations', + fields: ['workspacePlatformId'], + references: ['id'], + onDelete: 'Cascade', + }, }, workspacePlatformId: { - name: "workspacePlatformId", - type: "Int", - foreignKeyFor: [ - "workspacePlatform" - ] as readonly string[] + name: 'workspacePlatformId', + type: 'Int', + foreignKeyFor: ['workspacePlatform'] as readonly string[], }, serviceAccountKey: { - name: "serviceAccountKey", - type: "Json" + name: 'serviceAccountKey', + type: 'Json', }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "domainWideDelegations", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'domainWideDelegations', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, domain: { - name: "domain", - type: "String" + name: 'domain', + type: 'String', }, selectedCalendars: { - name: "selectedCalendars", - type: "SelectedCalendar", + name: 'selectedCalendars', + type: 'SelectedCalendar', array: true, - relation: { opposite: "domainWideDelegationCredential" } + relation: { opposite: 'domainWideDelegationCredential' }, }, destinationCalendar: { - name: "destinationCalendar", - type: "DestinationCalendar", + name: 'destinationCalendar', + type: 'DestinationCalendar', array: true, - relation: { opposite: "domainWideDelegation" } + relation: { opposite: 'domainWideDelegation' }, }, bookingReferences: { - name: "bookingReferences", - type: "BookingReference", + name: 'bookingReferences', + type: 'BookingReference', array: true, - relation: { opposite: "domainWideDelegation" } + relation: { opposite: 'domainWideDelegation' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("domain")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('domain'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - organizationId_domain: { organizationId: { type: "Int" }, domain: { type: "String" } } - } + id: { type: 'String' }, + organizationId_domain: { organizationId: { type: 'Int' }, domain: { type: 'String' } }, + }, }, WorkspacePlatform: { - name: "WorkspacePlatform", + name: 'WorkspacePlatform', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, slug: { - name: "slug", - type: "String" + name: 'slug', + type: 'String', }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, description: { - name: "description", - type: "String" + name: 'description', + type: 'String', }, defaultServiceAccountKey: { - name: "defaultServiceAccountKey", - type: "Json" + name: 'defaultServiceAccountKey', + type: 'Json', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, delegationCredentials: { - name: "delegationCredentials", - type: "DelegationCredential", + name: 'delegationCredentials', + type: 'DelegationCredential', array: true, - relation: { opposite: "workspacePlatform" } + relation: { opposite: 'workspacePlatform' }, }, domainWideDelegations: { - name: "domainWideDelegations", - type: "DomainWideDelegation", + name: 'domainWideDelegations', + type: 'DomainWideDelegation', array: true, - relation: { opposite: "workspacePlatform" } - } + relation: { opposite: 'workspacePlatform' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }] } + { + name: '@@unique', + args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - slug: { type: "String" } - } + id: { type: 'Int' }, + slug: { type: 'String' }, + }, }, EventTypeTranslation: { - name: "EventTypeTranslation", + name: 'EventTypeTranslation', fields: { uid: { - name: "uid", - type: "String", + name: 'uid', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, eventType: { - name: "eventType", - type: "EventType", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "fieldTranslations", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } + name: 'eventType', + type: 'EventType', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'fieldTranslations', + fields: ['eventTypeId'], + references: ['id'], + onDelete: 'Cascade', + }, }, eventTypeId: { - name: "eventTypeId", - type: "Int", - foreignKeyFor: [ - "eventType" - ] as readonly string[] + name: 'eventTypeId', + type: 'Int', + foreignKeyFor: ['eventType'] as readonly string[], }, field: { - name: "field", - type: "EventTypeAutoTranslatedField" + name: 'field', + type: 'EventTypeAutoTranslatedField', }, sourceLocale: { - name: "sourceLocale", - type: "String" + name: 'sourceLocale', + type: 'String', }, targetLocale: { - name: "targetLocale", - type: "String" + name: 'targetLocale', + type: 'String', }, translatedText: { - name: "translatedText", - type: "String", - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + name: 'translatedText', + type: 'String', + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, createdBy: { - name: "createdBy", - type: "Int", - foreignKeyFor: [ - "creator" - ] as readonly string[] + name: 'createdBy', + type: 'Int', + foreignKeyFor: ['creator'] as readonly string[], }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, updatedBy: { - name: "updatedBy", - type: "Int", + name: 'updatedBy', + type: 'Int', optional: true, - foreignKeyFor: [ - "updater" - ] as readonly string[] + foreignKeyFor: ['updater'] as readonly string[], }, creator: { - name: "creator", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedEventTypeTranslations") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdBy")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "createdTranslations", name: "CreatedEventTypeTranslations", fields: ["createdBy"], references: ["id"] } + name: 'creator', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CreatedEventTypeTranslations') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdBy')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'createdTranslations', + name: 'CreatedEventTypeTranslations', + fields: ['createdBy'], + references: ['id'], + }, }, updater: { - name: "updater", - type: "User", + name: 'updater', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedEventTypeTranslations") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedBy")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedTranslations", name: "UpdatedEventTypeTranslations", fields: ["updatedBy"], references: ["id"], onDelete: "SetNull" } - } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('UpdatedEventTypeTranslations') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedBy')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'updatedTranslations', + name: 'UpdatedEventTypeTranslations', + fields: ['updatedBy'], + references: ['id'], + onDelete: 'SetNull', + }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId"), ExpressionUtils.field("field"), ExpressionUtils.field("targetLocale")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId"), ExpressionUtils.field("field"), ExpressionUtils.field("targetLocale")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('eventTypeId'), + ExpressionUtils.field('field'), + ExpressionUtils.field('targetLocale'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('eventTypeId'), + ExpressionUtils.field('field'), + ExpressionUtils.field('targetLocale'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["uid"], + idFields: ['uid'], uniqueFields: { - uid: { type: "String" }, - eventTypeId_field_targetLocale: { eventTypeId: { type: "Int" }, field: { type: "EventTypeAutoTranslatedField" }, targetLocale: { type: "String" } } - } + uid: { type: 'String' }, + eventTypeId_field_targetLocale: { + eventTypeId: { type: 'Int' }, + field: { type: 'EventTypeAutoTranslatedField' }, + targetLocale: { type: 'String' }, + }, + }, }, Watchlist: { - name: "Watchlist", + name: 'Watchlist', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, unique: true, - attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@unique' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, type: { - name: "type", - type: "WatchlistType" + name: 'type', + type: 'WatchlistType', }, value: { - name: "value", - type: "String" + name: 'value', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, createdBy: { - name: "createdBy", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedWatchlists") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "createdWatchlists", name: "CreatedWatchlists", onDelete: "Cascade", fields: ["createdById"], references: ["id"] } + name: 'createdBy', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CreatedWatchlists') }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'createdWatchlists', + name: 'CreatedWatchlists', + onDelete: 'Cascade', + fields: ['createdById'], + references: ['id'], + }, }, createdById: { - name: "createdById", - type: "Int", - foreignKeyFor: [ - "createdBy" - ] as readonly string[] + name: 'createdById', + type: 'Int', + foreignKeyFor: ['createdBy'] as readonly string[], }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, updatedBy: { - name: "updatedBy", - type: "User", + name: 'updatedBy', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedWatchlists") }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "updatedWatchlists", name: "UpdatedWatchlists", onDelete: "SetNull", fields: ["updatedById"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('UpdatedWatchlists') }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'updatedWatchlists', + name: 'UpdatedWatchlists', + onDelete: 'SetNull', + fields: ['updatedById'], + references: ['id'], + }, }, updatedById: { - name: "updatedById", - type: "Int", + name: 'updatedById', + type: 'Int', optional: true, - foreignKeyFor: [ - "updatedBy" - ] as readonly string[] + foreignKeyFor: ['updatedBy'] as readonly string[], }, severity: { - name: "severity", - type: "WatchlistSeverity", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("LOW") }] }] as readonly AttributeApplication[], - default: "LOW" as FieldDefault - } + name: 'severity', + type: 'WatchlistSeverity', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('LOW') }] }, + ] as readonly AttributeApplication[], + default: 'LOW' as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("WatchlistType", [ExpressionUtils.field("type"), ExpressionUtils.field("value")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("WatchlistType", [ExpressionUtils.field("type"), ExpressionUtils.field("value")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('WatchlistType', [ + ExpressionUtils.field('type'), + ExpressionUtils.field('value'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('WatchlistType', [ + ExpressionUtils.field('type'), + ExpressionUtils.field('value'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - type_value: { type: { type: "WatchlistType" }, value: { type: "String" } } - } + id: { type: 'String' }, + type_value: { type: { type: 'WatchlistType' }, value: { type: 'String' } }, + }, }, OrganizationOnboarding: { - name: "OrganizationOnboarding", + name: 'OrganizationOnboarding', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, createdBy: { - name: "createdBy", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedOrganizationOnboardings") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "createdOrganizationOnboardings", name: "CreatedOrganizationOnboardings", fields: ["createdById"], references: ["id"], onDelete: "Cascade" } + name: 'createdBy', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CreatedOrganizationOnboardings') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'createdOrganizationOnboardings', + name: 'CreatedOrganizationOnboardings', + fields: ['createdById'], + references: ['id'], + onDelete: 'Cascade', + }, }, createdById: { - name: "createdById", - type: "Int", - foreignKeyFor: [ - "createdBy" - ] as readonly string[] + name: 'createdById', + type: 'Int', + foreignKeyFor: ['createdBy'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, orgOwnerEmail: { - name: "orgOwnerEmail", - type: "String", + name: 'orgOwnerEmail', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, error: { - name: "error", - type: "String", - optional: true + name: 'error', + type: 'String', + optional: true, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, organizationId: { - name: "organizationId", - type: "Int", + name: 'organizationId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "organization" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Team", + name: 'organization', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "organizationOnboarding", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'organizationOnboarding', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, billingPeriod: { - name: "billingPeriod", - type: "BillingPeriod" + name: 'billingPeriod', + type: 'BillingPeriod', }, pricePerSeat: { - name: "pricePerSeat", - type: "Float" + name: 'pricePerSeat', + type: 'Float', }, seats: { - name: "seats", - type: "Int" + name: 'seats', + type: 'Int', }, isPlatform: { - name: "isPlatform", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isPlatform', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, slug: { - name: "slug", - type: "String" + name: 'slug', + type: 'String', }, logo: { - name: "logo", - type: "String", - optional: true + name: 'logo', + type: 'String', + optional: true, }, bio: { - name: "bio", - type: "String", - optional: true + name: 'bio', + type: 'String', + optional: true, }, isDomainConfigured: { - name: "isDomainConfigured", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isDomainConfigured', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, stripeCustomerId: { - name: "stripeCustomerId", - type: "String", + name: 'stripeCustomerId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, stripeSubscriptionId: { - name: "stripeSubscriptionId", - type: "String", - optional: true + name: 'stripeSubscriptionId', + type: 'String', + optional: true, }, stripeSubscriptionItemId: { - name: "stripeSubscriptionItemId", - type: "String", - optional: true + name: 'stripeSubscriptionItemId', + type: 'String', + optional: true, }, invitedMembers: { - name: "invitedMembers", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], - default: "[]" as FieldDefault + name: 'invitedMembers', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, + ] as readonly AttributeApplication[], + default: '[]' as FieldDefault, }, teams: { - name: "teams", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], - default: "[]" as FieldDefault + name: 'teams', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, + ] as readonly AttributeApplication[], + default: '[]' as FieldDefault, }, isComplete: { - name: "isComplete", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'isComplete', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("orgOwnerEmail")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("stripeCustomerId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('orgOwnerEmail')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('stripeCustomerId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - orgOwnerEmail: { type: "String" }, - organizationId: { type: "Int" }, - stripeCustomerId: { type: "String" } - } + id: { type: 'String' }, + orgOwnerEmail: { type: 'String' }, + organizationId: { type: 'Int' }, + stripeCustomerId: { type: 'String' }, + }, }, App_RoutingForms_IncompleteBookingActions: { - name: "App_RoutingForms_IncompleteBookingActions", + name: 'App_RoutingForms_IncompleteBookingActions', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, form: { - name: "form", - type: "App_RoutingForms_Form", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "incompleteBookingActions", fields: ["formId"], references: ["id"], onDelete: "Cascade" } + name: 'form', + type: 'App_RoutingForms_Form', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'incompleteBookingActions', + fields: ['formId'], + references: ['id'], + onDelete: 'Cascade', + }, }, formId: { - name: "formId", - type: "String", - foreignKeyFor: [ - "form" - ] as readonly string[] + name: 'formId', + type: 'String', + foreignKeyFor: ['form'] as readonly string[], }, actionType: { - name: "actionType", - type: "IncompleteBookingActionType" + name: 'actionType', + type: 'IncompleteBookingActionType', }, data: { - name: "data", - type: "Json" + name: 'data', + type: 'Json', }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, credentialId: { - name: "credentialId", - type: "Int", - optional: true - } + name: 'credentialId', + type: 'Int', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, InternalNotePreset: { - name: "InternalNotePreset", + name: 'InternalNotePreset', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, cancellationReason: { - name: "cancellationReason", - type: "String", - optional: true + name: 'cancellationReason', + type: 'String', + optional: true, }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "internalNotePresets", fields: ["teamId"], references: ["id"] } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'internalNotePresets', fields: ['teamId'], references: ['id'] }, }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, BookingInternalNote: { - name: "BookingInternalNote", - type: "BookingInternalNote", + name: 'BookingInternalNote', + type: 'BookingInternalNote', array: true, - relation: { opposite: "notePreset" } - } + relation: { opposite: 'notePreset' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("name")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - teamId_name: { teamId: { type: "Int" }, name: { type: "String" } } - } + id: { type: 'Int' }, + teamId_name: { teamId: { type: 'Int' }, name: { type: 'String' } }, + }, }, FilterSegment: { - name: "FilterSegment", + name: 'FilterSegment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, tableIdentifier: { - name: "tableIdentifier", - type: "String" + name: 'tableIdentifier', + type: 'String', }, scope: { - name: "scope", - type: "FilterSegmentScope" + name: 'scope', + type: 'FilterSegmentScope', }, activeFilters: { - name: "activeFilters", - type: "Json", - optional: true + name: 'activeFilters', + type: 'Json', + optional: true, }, sorting: { - name: "sorting", - type: "Json", - optional: true + name: 'sorting', + type: 'Json', + optional: true, }, columnVisibility: { - name: "columnVisibility", - type: "Json", - optional: true + name: 'columnVisibility', + type: 'Json', + optional: true, }, columnSizing: { - name: "columnSizing", - type: "Json", - optional: true + name: 'columnSizing', + type: 'Json', + optional: true, }, perPage: { - name: "perPage", - type: "Int" + name: 'perPage', + type: 'Int', }, searchTerm: { - name: "searchTerm", - type: "String", + name: 'searchTerm', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "filterSegments", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'filterSegments', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "filterSegments", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'filterSegments', + fields: ['teamId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, userPreferences: { - name: "userPreferences", - type: "UserFilterSegmentPreference", + name: 'userPreferences', + type: 'UserFilterSegmentPreference', array: true, - relation: { opposite: "segment" } - } + relation: { opposite: 'segment' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("FilterSegmentScope", [ExpressionUtils.field("scope"), ExpressionUtils.field("userId"), ExpressionUtils.field("tableIdentifier")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("FilterSegmentScope", [ExpressionUtils.field("scope"), ExpressionUtils.field("teamId"), ExpressionUtils.field("tableIdentifier")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('FilterSegmentScope', [ + ExpressionUtils.field('scope'), + ExpressionUtils.field('userId'), + ExpressionUtils.field('tableIdentifier'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('FilterSegmentScope', [ + ExpressionUtils.field('scope'), + ExpressionUtils.field('teamId'), + ExpressionUtils.field('tableIdentifier'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, UserFilterSegmentPreference: { - name: "UserFilterSegmentPreference", + name: 'UserFilterSegmentPreference', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, tableIdentifier: { - name: "tableIdentifier", - type: "String" + name: 'tableIdentifier', + type: 'String', }, segmentId: { - name: "segmentId", - type: "Int", - foreignKeyFor: [ - "segment" - ] as readonly string[] + name: 'segmentId', + type: 'Int', + foreignKeyFor: ['segment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "filterSegmentPreferences", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'filterSegmentPreferences', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, segment: { - name: "segment", - type: "FilterSegment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("segmentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "userPreferences", fields: ["segmentId"], references: ["id"], onDelete: "Cascade" } - } + name: 'segment', + type: 'FilterSegment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('segmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'userPreferences', + fields: ['segmentId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("tableIdentifier")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("segmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('tableIdentifier'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('segmentId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId_tableIdentifier: { userId: { type: "Int" }, tableIdentifier: { type: "String" } } - } + id: { type: 'Int' }, + userId_tableIdentifier: { userId: { type: 'Int' }, tableIdentifier: { type: 'String' } }, + }, }, BookingInternalNote: { - name: "BookingInternalNote", + name: 'BookingInternalNote', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, notePreset: { - name: "notePreset", - type: "InternalNotePreset", + name: 'notePreset', + type: 'InternalNotePreset', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("notePresetId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "BookingInternalNote", fields: ["notePresetId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('notePresetId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'BookingInternalNote', + fields: ['notePresetId'], + references: ['id'], + onDelete: 'Cascade', + }, }, notePresetId: { - name: "notePresetId", - type: "Int", + name: 'notePresetId', + type: 'Int', optional: true, - foreignKeyFor: [ - "notePreset" - ] as readonly string[] + foreignKeyFor: ['notePreset'] as readonly string[], }, text: { - name: "text", - type: "String", - optional: true + name: 'text', + type: 'String', + optional: true, }, booking: { - name: "booking", - type: "Booking", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "internalNote", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + name: 'booking', + type: 'Booking', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'internalNote', + fields: ['bookingId'], + references: ['id'], + onDelete: 'Cascade', + }, }, bookingId: { - name: "bookingId", - type: "Int", - foreignKeyFor: [ - "booking" - ] as readonly string[] + name: 'bookingId', + type: 'Int', + foreignKeyFor: ['booking'] as readonly string[], }, createdBy: { - name: "createdBy", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "BookingInternalNote", fields: ["createdById"], references: ["id"] } + name: 'createdBy', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'BookingInternalNote', fields: ['createdById'], references: ['id'] }, }, createdById: { - name: "createdById", - type: "Int", - foreignKeyFor: [ - "createdBy" - ] as readonly string[] + name: 'createdById', + type: 'Int', + foreignKeyFor: ['createdBy'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId"), ExpressionUtils.field("notePresetId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('bookingId'), + ExpressionUtils.field('notePresetId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - bookingId_notePresetId: { bookingId: { type: "Int" }, notePresetId: { type: "Int" } } - } + id: { type: 'Int' }, + bookingId_notePresetId: { bookingId: { type: 'Int' }, notePresetId: { type: 'Int' } }, + }, }, WorkflowOptOutContact: { - name: "WorkflowOptOutContact", + name: 'WorkflowOptOutContact', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, type: { - name: "type", - type: "WorkflowContactType" + name: 'type', + type: 'WorkflowContactType', }, value: { - name: "value", - type: "String" + name: 'value', + type: 'String', }, optedOut: { - name: "optedOut", - type: "Boolean" + name: 'optedOut', + type: 'Boolean', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("WorkflowContactType", [ExpressionUtils.field("type"), ExpressionUtils.field("value")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('WorkflowContactType', [ + ExpressionUtils.field('type'), + ExpressionUtils.field('value'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - type_value: { type: { type: "WorkflowContactType" }, value: { type: "String" } } - } + id: { type: 'Int' }, + type_value: { type: { type: 'WorkflowContactType' }, value: { type: 'String' } }, + }, }, Role: { - name: "Role", + name: 'Role', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, teamId: { - name: "teamId", - type: "Int", + name: 'teamId', + type: 'Int', optional: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", + name: 'team', + type: 'Team', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "roles", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'roles', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, permissions: { - name: "permissions", - type: "RolePermission", + name: 'permissions', + type: 'RolePermission', array: true, - relation: { opposite: "role" } + relation: { opposite: 'role' }, }, memberships: { - name: "memberships", - type: "Membership", + name: 'memberships', + type: 'Membership', array: true, - relation: { opposite: "customRole" } + relation: { opposite: 'customRole' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, type: { - name: "type", - type: "RoleType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CUSTOM") }] }] as readonly AttributeApplication[], - default: "CUSTOM" as FieldDefault - } + name: 'type', + type: 'RoleType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CUSTOM') }] }, + ] as readonly AttributeApplication[], + default: 'CUSTOM' as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("name"), ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('name'), + ExpressionUtils.field('teamId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - name_teamId: { name: { type: "String" }, teamId: { type: "Int" } } - } + id: { type: 'String' }, + name_teamId: { name: { type: 'String' }, teamId: { type: 'Int' } }, + }, }, RolePermission: { - name: "RolePermission", + name: 'RolePermission', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, roleId: { - name: "roleId", - type: "String", - foreignKeyFor: [ - "role" - ] as readonly string[] + name: 'roleId', + type: 'String', + foreignKeyFor: ['role'] as readonly string[], }, role: { - name: "role", - type: "Role", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("roleId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "permissions", fields: ["roleId"], references: ["id"], onDelete: "Cascade" } + name: 'role', + type: 'Role', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('roleId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'permissions', fields: ['roleId'], references: ['id'], onDelete: 'Cascade' }, }, resource: { - name: "resource", - type: "String" + name: 'resource', + type: 'String', }, action: { - name: "action", - type: "String" + name: 'action', + type: 'String', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("roleId"), ExpressionUtils.field("resource"), ExpressionUtils.field("action")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("roleId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("action")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('roleId'), + ExpressionUtils.field('resource'), + ExpressionUtils.field('action'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('roleId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('action')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - roleId_resource_action: { roleId: { type: "String" }, resource: { type: "String" }, action: { type: "String" } } - } - } + id: { type: 'String' }, + roleId_resource_action: { + roleId: { type: 'String' }, + resource: { type: 'String' }, + action: { type: 'String' }, + }, + }, + }, } as const; enums = { SchedulingType: { - name: "SchedulingType", + name: 'SchedulingType', values: { - ROUND_ROBIN: "ROUND_ROBIN", - COLLECTIVE: "COLLECTIVE", - MANAGED: "MANAGED" + ROUND_ROBIN: 'ROUND_ROBIN', + COLLECTIVE: 'COLLECTIVE', + MANAGED: 'MANAGED', }, fields: { ROUND_ROBIN: { - name: "ROUND_ROBIN", + name: 'ROUND_ROBIN', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("roundRobin") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('roundRobin') }] }, + ] as readonly AttributeApplication[], }, COLLECTIVE: { - name: "COLLECTIVE", + name: 'COLLECTIVE', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("collective") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('collective') }] }, + ] as readonly AttributeApplication[], }, MANAGED: { - name: "MANAGED", + name: 'MANAGED', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("managed") }] } - ] as readonly AttributeApplication[] - } - } + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('managed') }] }, + ] as readonly AttributeApplication[], + }, + }, }, PeriodType: { - name: "PeriodType", + name: 'PeriodType', values: { - UNLIMITED: "UNLIMITED", - ROLLING: "ROLLING", - ROLLING_WINDOW: "ROLLING_WINDOW", - RANGE: "RANGE" + UNLIMITED: 'UNLIMITED', + ROLLING: 'ROLLING', + ROLLING_WINDOW: 'ROLLING_WINDOW', + RANGE: 'RANGE', }, fields: { UNLIMITED: { - name: "UNLIMITED", + name: 'UNLIMITED', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("unlimited") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('unlimited') }] }, + ] as readonly AttributeApplication[], }, ROLLING: { - name: "ROLLING", + name: 'ROLLING', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("rolling") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('rolling') }] }, + ] as readonly AttributeApplication[], }, ROLLING_WINDOW: { - name: "ROLLING_WINDOW", + name: 'ROLLING_WINDOW', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("rolling_window") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('rolling_window') }] }, + ] as readonly AttributeApplication[], }, RANGE: { - name: "RANGE", + name: 'RANGE', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("range") }] } - ] as readonly AttributeApplication[] - } - } + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('range') }] }, + ] as readonly AttributeApplication[], + }, + }, }, CreationSource: { - name: "CreationSource", + name: 'CreationSource', values: { - API_V1: "API_V1", - API_V2: "API_V2", - WEBAPP: "WEBAPP" + API_V1: 'API_V1', + API_V2: 'API_V2', + WEBAPP: 'WEBAPP', }, fields: { API_V1: { - name: "API_V1", + name: 'API_V1', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("api_v1") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('api_v1') }] }, + ] as readonly AttributeApplication[], }, API_V2: { - name: "API_V2", + name: 'API_V2', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("api_v2") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('api_v2') }] }, + ] as readonly AttributeApplication[], }, WEBAPP: { - name: "WEBAPP", + name: 'WEBAPP', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("webapp") }] } - ] as readonly AttributeApplication[] - } - } + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('webapp') }] }, + ] as readonly AttributeApplication[], + }, + }, }, IdentityProvider: { - name: "IdentityProvider", + name: 'IdentityProvider', values: { - CAL: "CAL", - GOOGLE: "GOOGLE", - SAML: "SAML" - } + CAL: 'CAL', + GOOGLE: 'GOOGLE', + SAML: 'SAML', + }, }, UserPermissionRole: { - name: "UserPermissionRole", + name: 'UserPermissionRole', values: { - USER: "USER", - ADMIN: "ADMIN" - } + USER: 'USER', + ADMIN: 'ADMIN', + }, }, CreditType: { - name: "CreditType", + name: 'CreditType', values: { - MONTHLY: "MONTHLY", - ADDITIONAL: "ADDITIONAL" - } + MONTHLY: 'MONTHLY', + ADDITIONAL: 'ADDITIONAL', + }, }, MembershipRole: { - name: "MembershipRole", + name: 'MembershipRole', values: { - MEMBER: "MEMBER", - ADMIN: "ADMIN", - OWNER: "OWNER" - } + MEMBER: 'MEMBER', + ADMIN: 'ADMIN', + OWNER: 'OWNER', + }, }, BookingStatus: { - name: "BookingStatus", + name: 'BookingStatus', values: { - CANCELLED: "CANCELLED", - ACCEPTED: "ACCEPTED", - REJECTED: "REJECTED", - PENDING: "PENDING", - AWAITING_HOST: "AWAITING_HOST" + CANCELLED: 'CANCELLED', + ACCEPTED: 'ACCEPTED', + REJECTED: 'REJECTED', + PENDING: 'PENDING', + AWAITING_HOST: 'AWAITING_HOST', }, fields: { CANCELLED: { - name: "CANCELLED", + name: 'CANCELLED', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("cancelled") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('cancelled') }] }, + ] as readonly AttributeApplication[], }, ACCEPTED: { - name: "ACCEPTED", + name: 'ACCEPTED', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("accepted") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('accepted') }] }, + ] as readonly AttributeApplication[], }, REJECTED: { - name: "REJECTED", + name: 'REJECTED', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("rejected") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('rejected') }] }, + ] as readonly AttributeApplication[], }, PENDING: { - name: "PENDING", + name: 'PENDING', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("pending") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('pending') }] }, + ] as readonly AttributeApplication[], }, AWAITING_HOST: { - name: "AWAITING_HOST", + name: 'AWAITING_HOST', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("awaiting_host") }] } - ] as readonly AttributeApplication[] - } - } + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('awaiting_host') }] }, + ] as readonly AttributeApplication[], + }, + }, }, EventTypeCustomInputType: { - name: "EventTypeCustomInputType", + name: 'EventTypeCustomInputType', values: { - TEXT: "TEXT", - TEXTLONG: "TEXTLONG", - NUMBER: "NUMBER", - BOOL: "BOOL", - RADIO: "RADIO", - PHONE: "PHONE" + TEXT: 'TEXT', + TEXTLONG: 'TEXTLONG', + NUMBER: 'NUMBER', + BOOL: 'BOOL', + RADIO: 'RADIO', + PHONE: 'PHONE', }, fields: { TEXT: { - name: "TEXT", + name: 'TEXT', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("text") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('text') }] }, + ] as readonly AttributeApplication[], }, TEXTLONG: { - name: "TEXTLONG", + name: 'TEXTLONG', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("textLong") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('textLong') }] }, + ] as readonly AttributeApplication[], }, NUMBER: { - name: "NUMBER", + name: 'NUMBER', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("number") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('number') }] }, + ] as readonly AttributeApplication[], }, BOOL: { - name: "BOOL", + name: 'BOOL', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("bool") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('bool') }] }, + ] as readonly AttributeApplication[], }, RADIO: { - name: "RADIO", + name: 'RADIO', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("radio") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('radio') }] }, + ] as readonly AttributeApplication[], }, PHONE: { - name: "PHONE", + name: 'PHONE', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("phone") }] } - ] as readonly AttributeApplication[] - } - } + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('phone') }] }, + ] as readonly AttributeApplication[], + }, + }, }, ReminderType: { - name: "ReminderType", + name: 'ReminderType', values: { - PENDING_BOOKING_CONFIRMATION: "PENDING_BOOKING_CONFIRMATION" - } + PENDING_BOOKING_CONFIRMATION: 'PENDING_BOOKING_CONFIRMATION', + }, }, PaymentOption: { - name: "PaymentOption", + name: 'PaymentOption', values: { - ON_BOOKING: "ON_BOOKING", - HOLD: "HOLD" - } + ON_BOOKING: 'ON_BOOKING', + HOLD: 'HOLD', + }, }, WebhookTriggerEvents: { - name: "WebhookTriggerEvents", + name: 'WebhookTriggerEvents', values: { - BOOKING_CREATED: "BOOKING_CREATED", - BOOKING_PAYMENT_INITIATED: "BOOKING_PAYMENT_INITIATED", - BOOKING_PAID: "BOOKING_PAID", - BOOKING_RESCHEDULED: "BOOKING_RESCHEDULED", - BOOKING_REQUESTED: "BOOKING_REQUESTED", - BOOKING_CANCELLED: "BOOKING_CANCELLED", - BOOKING_REJECTED: "BOOKING_REJECTED", - BOOKING_NO_SHOW_UPDATED: "BOOKING_NO_SHOW_UPDATED", - FORM_SUBMITTED: "FORM_SUBMITTED", - MEETING_ENDED: "MEETING_ENDED", - MEETING_STARTED: "MEETING_STARTED", - RECORDING_READY: "RECORDING_READY", - INSTANT_MEETING: "INSTANT_MEETING", - RECORDING_TRANSCRIPTION_GENERATED: "RECORDING_TRANSCRIPTION_GENERATED", - OOO_CREATED: "OOO_CREATED", - AFTER_HOSTS_CAL_VIDEO_NO_SHOW: "AFTER_HOSTS_CAL_VIDEO_NO_SHOW", - AFTER_GUESTS_CAL_VIDEO_NO_SHOW: "AFTER_GUESTS_CAL_VIDEO_NO_SHOW", - FORM_SUBMITTED_NO_EVENT: "FORM_SUBMITTED_NO_EVENT" - } + BOOKING_CREATED: 'BOOKING_CREATED', + BOOKING_PAYMENT_INITIATED: 'BOOKING_PAYMENT_INITIATED', + BOOKING_PAID: 'BOOKING_PAID', + BOOKING_RESCHEDULED: 'BOOKING_RESCHEDULED', + BOOKING_REQUESTED: 'BOOKING_REQUESTED', + BOOKING_CANCELLED: 'BOOKING_CANCELLED', + BOOKING_REJECTED: 'BOOKING_REJECTED', + BOOKING_NO_SHOW_UPDATED: 'BOOKING_NO_SHOW_UPDATED', + FORM_SUBMITTED: 'FORM_SUBMITTED', + MEETING_ENDED: 'MEETING_ENDED', + MEETING_STARTED: 'MEETING_STARTED', + RECORDING_READY: 'RECORDING_READY', + INSTANT_MEETING: 'INSTANT_MEETING', + RECORDING_TRANSCRIPTION_GENERATED: 'RECORDING_TRANSCRIPTION_GENERATED', + OOO_CREATED: 'OOO_CREATED', + AFTER_HOSTS_CAL_VIDEO_NO_SHOW: 'AFTER_HOSTS_CAL_VIDEO_NO_SHOW', + AFTER_GUESTS_CAL_VIDEO_NO_SHOW: 'AFTER_GUESTS_CAL_VIDEO_NO_SHOW', + FORM_SUBMITTED_NO_EVENT: 'FORM_SUBMITTED_NO_EVENT', + }, }, AppCategories: { - name: "AppCategories", + name: 'AppCategories', values: { - calendar: "calendar", - messaging: "messaging", - other: "other", - payment: "payment", - video: "video", - web3: "web3", - automation: "automation", - analytics: "analytics", - conferencing: "conferencing", - crm: "crm" - } + calendar: 'calendar', + messaging: 'messaging', + other: 'other', + payment: 'payment', + video: 'video', + web3: 'web3', + automation: 'automation', + analytics: 'analytics', + conferencing: 'conferencing', + crm: 'crm', + }, }, WorkflowTriggerEvents: { - name: "WorkflowTriggerEvents", + name: 'WorkflowTriggerEvents', values: { - BEFORE_EVENT: "BEFORE_EVENT", - EVENT_CANCELLED: "EVENT_CANCELLED", - NEW_EVENT: "NEW_EVENT", - AFTER_EVENT: "AFTER_EVENT", - RESCHEDULE_EVENT: "RESCHEDULE_EVENT", - AFTER_HOSTS_CAL_VIDEO_NO_SHOW: "AFTER_HOSTS_CAL_VIDEO_NO_SHOW", - AFTER_GUESTS_CAL_VIDEO_NO_SHOW: "AFTER_GUESTS_CAL_VIDEO_NO_SHOW" - } + BEFORE_EVENT: 'BEFORE_EVENT', + EVENT_CANCELLED: 'EVENT_CANCELLED', + NEW_EVENT: 'NEW_EVENT', + AFTER_EVENT: 'AFTER_EVENT', + RESCHEDULE_EVENT: 'RESCHEDULE_EVENT', + AFTER_HOSTS_CAL_VIDEO_NO_SHOW: 'AFTER_HOSTS_CAL_VIDEO_NO_SHOW', + AFTER_GUESTS_CAL_VIDEO_NO_SHOW: 'AFTER_GUESTS_CAL_VIDEO_NO_SHOW', + }, }, WorkflowActions: { - name: "WorkflowActions", + name: 'WorkflowActions', values: { - EMAIL_HOST: "EMAIL_HOST", - EMAIL_ATTENDEE: "EMAIL_ATTENDEE", - SMS_ATTENDEE: "SMS_ATTENDEE", - SMS_NUMBER: "SMS_NUMBER", - EMAIL_ADDRESS: "EMAIL_ADDRESS", - WHATSAPP_ATTENDEE: "WHATSAPP_ATTENDEE", - WHATSAPP_NUMBER: "WHATSAPP_NUMBER" - } + EMAIL_HOST: 'EMAIL_HOST', + EMAIL_ATTENDEE: 'EMAIL_ATTENDEE', + SMS_ATTENDEE: 'SMS_ATTENDEE', + SMS_NUMBER: 'SMS_NUMBER', + EMAIL_ADDRESS: 'EMAIL_ADDRESS', + WHATSAPP_ATTENDEE: 'WHATSAPP_ATTENDEE', + WHATSAPP_NUMBER: 'WHATSAPP_NUMBER', + }, }, TimeUnit: { - name: "TimeUnit", + name: 'TimeUnit', values: { - DAY: "DAY", - HOUR: "HOUR", - MINUTE: "MINUTE" + DAY: 'DAY', + HOUR: 'HOUR', + MINUTE: 'MINUTE', }, fields: { DAY: { - name: "DAY", + name: 'DAY', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("day") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('day') }] }, + ] as readonly AttributeApplication[], }, HOUR: { - name: "HOUR", + name: 'HOUR', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("hour") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('hour') }] }, + ] as readonly AttributeApplication[], }, MINUTE: { - name: "MINUTE", + name: 'MINUTE', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("minute") }] } - ] as readonly AttributeApplication[] - } - } + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('minute') }] }, + ] as readonly AttributeApplication[], + }, + }, }, WorkflowTemplates: { - name: "WorkflowTemplates", + name: 'WorkflowTemplates', values: { - REMINDER: "REMINDER", - CUSTOM: "CUSTOM", - CANCELLED: "CANCELLED", - RESCHEDULED: "RESCHEDULED", - COMPLETED: "COMPLETED", - RATING: "RATING" - } + REMINDER: 'REMINDER', + CUSTOM: 'CUSTOM', + CANCELLED: 'CANCELLED', + RESCHEDULED: 'RESCHEDULED', + COMPLETED: 'COMPLETED', + RATING: 'RATING', + }, }, WorkflowMethods: { - name: "WorkflowMethods", + name: 'WorkflowMethods', values: { - EMAIL: "EMAIL", - SMS: "SMS", - WHATSAPP: "WHATSAPP" - } + EMAIL: 'EMAIL', + SMS: 'SMS', + WHATSAPP: 'WHATSAPP', + }, }, FeatureType: { - name: "FeatureType", + name: 'FeatureType', values: { - RELEASE: "RELEASE", - EXPERIMENT: "EXPERIMENT", - OPERATIONAL: "OPERATIONAL", - KILL_SWITCH: "KILL_SWITCH", - PERMISSION: "PERMISSION" - } + RELEASE: 'RELEASE', + EXPERIMENT: 'EXPERIMENT', + OPERATIONAL: 'OPERATIONAL', + KILL_SWITCH: 'KILL_SWITCH', + PERMISSION: 'PERMISSION', + }, }, RRResetInterval: { - name: "RRResetInterval", + name: 'RRResetInterval', values: { - MONTH: "MONTH", - DAY: "DAY" - } + MONTH: 'MONTH', + DAY: 'DAY', + }, }, RRTimestampBasis: { - name: "RRTimestampBasis", + name: 'RRTimestampBasis', values: { - CREATED_AT: "CREATED_AT", - START_TIME: "START_TIME" - } + CREATED_AT: 'CREATED_AT', + START_TIME: 'START_TIME', + }, }, AccessScope: { - name: "AccessScope", + name: 'AccessScope', values: { - READ_BOOKING: "READ_BOOKING", - READ_PROFILE: "READ_PROFILE" - } + READ_BOOKING: 'READ_BOOKING', + READ_PROFILE: 'READ_PROFILE', + }, }, RedirectType: { - name: "RedirectType", + name: 'RedirectType', values: { - UserEventType: "UserEventType", - TeamEventType: "TeamEventType", - User: "User", - Team: "Team" + UserEventType: 'UserEventType', + TeamEventType: 'TeamEventType', + User: 'User', + Team: 'Team', }, fields: { UserEventType: { - name: "UserEventType", + name: 'UserEventType', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user-event-type") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user-event-type') }] }, + ] as readonly AttributeApplication[], }, TeamEventType: { - name: "TeamEventType", + name: 'TeamEventType', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("team-event-type") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('team-event-type') }] }, + ] as readonly AttributeApplication[], }, User: { - name: "User", + name: 'User', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user') }] }, + ] as readonly AttributeApplication[], }, Team: { - name: "Team", + name: 'Team', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("team") }] } - ] as readonly AttributeApplication[] - } - } + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('team') }] }, + ] as readonly AttributeApplication[], + }, + }, }, SMSLockState: { - name: "SMSLockState", + name: 'SMSLockState', values: { - LOCKED: "LOCKED", - UNLOCKED: "UNLOCKED", - REVIEW_NEEDED: "REVIEW_NEEDED" - } + LOCKED: 'LOCKED', + UNLOCKED: 'UNLOCKED', + REVIEW_NEEDED: 'REVIEW_NEEDED', + }, }, AttributeType: { - name: "AttributeType", + name: 'AttributeType', values: { - TEXT: "TEXT", - NUMBER: "NUMBER", - SINGLE_SELECT: "SINGLE_SELECT", - MULTI_SELECT: "MULTI_SELECT" - } + TEXT: 'TEXT', + NUMBER: 'NUMBER', + SINGLE_SELECT: 'SINGLE_SELECT', + MULTI_SELECT: 'MULTI_SELECT', + }, }, AssignmentReasonEnum: { - name: "AssignmentReasonEnum", + name: 'AssignmentReasonEnum', values: { - ROUTING_FORM_ROUTING: "ROUTING_FORM_ROUTING", - ROUTING_FORM_ROUTING_FALLBACK: "ROUTING_FORM_ROUTING_FALLBACK", - REASSIGNED: "REASSIGNED", - RR_REASSIGNED: "RR_REASSIGNED", - REROUTED: "REROUTED", - SALESFORCE_ASSIGNMENT: "SALESFORCE_ASSIGNMENT" - } + ROUTING_FORM_ROUTING: 'ROUTING_FORM_ROUTING', + ROUTING_FORM_ROUTING_FALLBACK: 'ROUTING_FORM_ROUTING_FALLBACK', + REASSIGNED: 'REASSIGNED', + RR_REASSIGNED: 'RR_REASSIGNED', + REROUTED: 'REROUTED', + SALESFORCE_ASSIGNMENT: 'SALESFORCE_ASSIGNMENT', + }, }, EventTypeAutoTranslatedField: { - name: "EventTypeAutoTranslatedField", + name: 'EventTypeAutoTranslatedField', values: { - DESCRIPTION: "DESCRIPTION", - TITLE: "TITLE" - } + DESCRIPTION: 'DESCRIPTION', + TITLE: 'TITLE', + }, }, WatchlistType: { - name: "WatchlistType", + name: 'WatchlistType', values: { - EMAIL: "EMAIL", - DOMAIN: "DOMAIN", - USERNAME: "USERNAME" - } + EMAIL: 'EMAIL', + DOMAIN: 'DOMAIN', + USERNAME: 'USERNAME', + }, }, WatchlistSeverity: { - name: "WatchlistSeverity", + name: 'WatchlistSeverity', values: { - LOW: "LOW", - MEDIUM: "MEDIUM", - HIGH: "HIGH", - CRITICAL: "CRITICAL" - } + LOW: 'LOW', + MEDIUM: 'MEDIUM', + HIGH: 'HIGH', + CRITICAL: 'CRITICAL', + }, }, BillingPeriod: { - name: "BillingPeriod", + name: 'BillingPeriod', values: { - MONTHLY: "MONTHLY", - ANNUALLY: "ANNUALLY" - } + MONTHLY: 'MONTHLY', + ANNUALLY: 'ANNUALLY', + }, }, IncompleteBookingActionType: { - name: "IncompleteBookingActionType", + name: 'IncompleteBookingActionType', values: { - SALESFORCE: "SALESFORCE" - } + SALESFORCE: 'SALESFORCE', + }, }, FilterSegmentScope: { - name: "FilterSegmentScope", + name: 'FilterSegmentScope', values: { - USER: "USER", - TEAM: "TEAM" - } + USER: 'USER', + TEAM: 'TEAM', + }, }, WorkflowContactType: { - name: "WorkflowContactType", + name: 'WorkflowContactType', values: { - PHONE: "PHONE", - EMAIL: "EMAIL" - } + PHONE: 'PHONE', + EMAIL: 'EMAIL', + }, }, RoleType: { - name: "RoleType", + name: 'RoleType', values: { - SYSTEM: "SYSTEM", - CUSTOM: "CUSTOM" - } - } + SYSTEM: 'SYSTEM', + CUSTOM: 'CUSTOM', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/github-repos/formbricks/input.ts b/tests/e2e/github-repos/formbricks/input.ts index 87f2b983b..f6bdb4807 100644 --- a/tests/e2e/github-repos/formbricks/input.ts +++ b/tests/e2e/github-repos/formbricks/input.ts @@ -5,741 +5,868 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type WebhookFindManyArgs = $FindManyArgs<$Schema, "Webhook">; -export type WebhookFindUniqueArgs = $FindUniqueArgs<$Schema, "Webhook">; -export type WebhookFindFirstArgs = $FindFirstArgs<$Schema, "Webhook">; -export type WebhookExistsArgs = $ExistsArgs<$Schema, "Webhook">; -export type WebhookCreateArgs = $CreateArgs<$Schema, "Webhook">; -export type WebhookCreateManyArgs = $CreateManyArgs<$Schema, "Webhook">; -export type WebhookCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Webhook">; -export type WebhookUpdateArgs = $UpdateArgs<$Schema, "Webhook">; -export type WebhookUpdateManyArgs = $UpdateManyArgs<$Schema, "Webhook">; -export type WebhookUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Webhook">; -export type WebhookUpsertArgs = $UpsertArgs<$Schema, "Webhook">; -export type WebhookDeleteArgs = $DeleteArgs<$Schema, "Webhook">; -export type WebhookDeleteManyArgs = $DeleteManyArgs<$Schema, "Webhook">; -export type WebhookCountArgs = $CountArgs<$Schema, "Webhook">; -export type WebhookAggregateArgs = $AggregateArgs<$Schema, "Webhook">; -export type WebhookGroupByArgs = $GroupByArgs<$Schema, "Webhook">; -export type WebhookWhereInput = $WhereInput<$Schema, "Webhook">; -export type WebhookSelect = $SelectInput<$Schema, "Webhook">; -export type WebhookInclude = $IncludeInput<$Schema, "Webhook">; -export type WebhookOmit = $OmitInput<$Schema, "Webhook">; -export type WebhookGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Webhook", Args, Options>; -export type ContactAttributeFindManyArgs = $FindManyArgs<$Schema, "ContactAttribute">; -export type ContactAttributeFindUniqueArgs = $FindUniqueArgs<$Schema, "ContactAttribute">; -export type ContactAttributeFindFirstArgs = $FindFirstArgs<$Schema, "ContactAttribute">; -export type ContactAttributeExistsArgs = $ExistsArgs<$Schema, "ContactAttribute">; -export type ContactAttributeCreateArgs = $CreateArgs<$Schema, "ContactAttribute">; -export type ContactAttributeCreateManyArgs = $CreateManyArgs<$Schema, "ContactAttribute">; -export type ContactAttributeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ContactAttribute">; -export type ContactAttributeUpdateArgs = $UpdateArgs<$Schema, "ContactAttribute">; -export type ContactAttributeUpdateManyArgs = $UpdateManyArgs<$Schema, "ContactAttribute">; -export type ContactAttributeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ContactAttribute">; -export type ContactAttributeUpsertArgs = $UpsertArgs<$Schema, "ContactAttribute">; -export type ContactAttributeDeleteArgs = $DeleteArgs<$Schema, "ContactAttribute">; -export type ContactAttributeDeleteManyArgs = $DeleteManyArgs<$Schema, "ContactAttribute">; -export type ContactAttributeCountArgs = $CountArgs<$Schema, "ContactAttribute">; -export type ContactAttributeAggregateArgs = $AggregateArgs<$Schema, "ContactAttribute">; -export type ContactAttributeGroupByArgs = $GroupByArgs<$Schema, "ContactAttribute">; -export type ContactAttributeWhereInput = $WhereInput<$Schema, "ContactAttribute">; -export type ContactAttributeSelect = $SelectInput<$Schema, "ContactAttribute">; -export type ContactAttributeInclude = $IncludeInput<$Schema, "ContactAttribute">; -export type ContactAttributeOmit = $OmitInput<$Schema, "ContactAttribute">; -export type ContactAttributeGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ContactAttribute", Args, Options>; -export type ContactAttributeKeyFindManyArgs = $FindManyArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyFindUniqueArgs = $FindUniqueArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyFindFirstArgs = $FindFirstArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyExistsArgs = $ExistsArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyCreateArgs = $CreateArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyCreateManyArgs = $CreateManyArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyUpdateArgs = $UpdateArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyUpdateManyArgs = $UpdateManyArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyUpsertArgs = $UpsertArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyDeleteArgs = $DeleteArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyDeleteManyArgs = $DeleteManyArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyCountArgs = $CountArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyAggregateArgs = $AggregateArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyGroupByArgs = $GroupByArgs<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyWhereInput = $WhereInput<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeySelect = $SelectInput<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyInclude = $IncludeInput<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyOmit = $OmitInput<$Schema, "ContactAttributeKey">; -export type ContactAttributeKeyGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ContactAttributeKey", Args, Options>; -export type ContactFindManyArgs = $FindManyArgs<$Schema, "Contact">; -export type ContactFindUniqueArgs = $FindUniqueArgs<$Schema, "Contact">; -export type ContactFindFirstArgs = $FindFirstArgs<$Schema, "Contact">; -export type ContactExistsArgs = $ExistsArgs<$Schema, "Contact">; -export type ContactCreateArgs = $CreateArgs<$Schema, "Contact">; -export type ContactCreateManyArgs = $CreateManyArgs<$Schema, "Contact">; -export type ContactCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Contact">; -export type ContactUpdateArgs = $UpdateArgs<$Schema, "Contact">; -export type ContactUpdateManyArgs = $UpdateManyArgs<$Schema, "Contact">; -export type ContactUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Contact">; -export type ContactUpsertArgs = $UpsertArgs<$Schema, "Contact">; -export type ContactDeleteArgs = $DeleteArgs<$Schema, "Contact">; -export type ContactDeleteManyArgs = $DeleteManyArgs<$Schema, "Contact">; -export type ContactCountArgs = $CountArgs<$Schema, "Contact">; -export type ContactAggregateArgs = $AggregateArgs<$Schema, "Contact">; -export type ContactGroupByArgs = $GroupByArgs<$Schema, "Contact">; -export type ContactWhereInput = $WhereInput<$Schema, "Contact">; -export type ContactSelect = $SelectInput<$Schema, "Contact">; -export type ContactInclude = $IncludeInput<$Schema, "Contact">; -export type ContactOmit = $OmitInput<$Schema, "Contact">; -export type ContactGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Contact", Args, Options>; -export type ResponseFindManyArgs = $FindManyArgs<$Schema, "Response">; -export type ResponseFindUniqueArgs = $FindUniqueArgs<$Schema, "Response">; -export type ResponseFindFirstArgs = $FindFirstArgs<$Schema, "Response">; -export type ResponseExistsArgs = $ExistsArgs<$Schema, "Response">; -export type ResponseCreateArgs = $CreateArgs<$Schema, "Response">; -export type ResponseCreateManyArgs = $CreateManyArgs<$Schema, "Response">; -export type ResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Response">; -export type ResponseUpdateArgs = $UpdateArgs<$Schema, "Response">; -export type ResponseUpdateManyArgs = $UpdateManyArgs<$Schema, "Response">; -export type ResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Response">; -export type ResponseUpsertArgs = $UpsertArgs<$Schema, "Response">; -export type ResponseDeleteArgs = $DeleteArgs<$Schema, "Response">; -export type ResponseDeleteManyArgs = $DeleteManyArgs<$Schema, "Response">; -export type ResponseCountArgs = $CountArgs<$Schema, "Response">; -export type ResponseAggregateArgs = $AggregateArgs<$Schema, "Response">; -export type ResponseGroupByArgs = $GroupByArgs<$Schema, "Response">; -export type ResponseWhereInput = $WhereInput<$Schema, "Response">; -export type ResponseSelect = $SelectInput<$Schema, "Response">; -export type ResponseInclude = $IncludeInput<$Schema, "Response">; -export type ResponseOmit = $OmitInput<$Schema, "Response">; -export type ResponseGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Response", Args, Options>; -export type ResponseNoteFindManyArgs = $FindManyArgs<$Schema, "ResponseNote">; -export type ResponseNoteFindUniqueArgs = $FindUniqueArgs<$Schema, "ResponseNote">; -export type ResponseNoteFindFirstArgs = $FindFirstArgs<$Schema, "ResponseNote">; -export type ResponseNoteExistsArgs = $ExistsArgs<$Schema, "ResponseNote">; -export type ResponseNoteCreateArgs = $CreateArgs<$Schema, "ResponseNote">; -export type ResponseNoteCreateManyArgs = $CreateManyArgs<$Schema, "ResponseNote">; -export type ResponseNoteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ResponseNote">; -export type ResponseNoteUpdateArgs = $UpdateArgs<$Schema, "ResponseNote">; -export type ResponseNoteUpdateManyArgs = $UpdateManyArgs<$Schema, "ResponseNote">; -export type ResponseNoteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ResponseNote">; -export type ResponseNoteUpsertArgs = $UpsertArgs<$Schema, "ResponseNote">; -export type ResponseNoteDeleteArgs = $DeleteArgs<$Schema, "ResponseNote">; -export type ResponseNoteDeleteManyArgs = $DeleteManyArgs<$Schema, "ResponseNote">; -export type ResponseNoteCountArgs = $CountArgs<$Schema, "ResponseNote">; -export type ResponseNoteAggregateArgs = $AggregateArgs<$Schema, "ResponseNote">; -export type ResponseNoteGroupByArgs = $GroupByArgs<$Schema, "ResponseNote">; -export type ResponseNoteWhereInput = $WhereInput<$Schema, "ResponseNote">; -export type ResponseNoteSelect = $SelectInput<$Schema, "ResponseNote">; -export type ResponseNoteInclude = $IncludeInput<$Schema, "ResponseNote">; -export type ResponseNoteOmit = $OmitInput<$Schema, "ResponseNote">; -export type ResponseNoteGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ResponseNote", Args, Options>; -export type TagFindManyArgs = $FindManyArgs<$Schema, "Tag">; -export type TagFindUniqueArgs = $FindUniqueArgs<$Schema, "Tag">; -export type TagFindFirstArgs = $FindFirstArgs<$Schema, "Tag">; -export type TagExistsArgs = $ExistsArgs<$Schema, "Tag">; -export type TagCreateArgs = $CreateArgs<$Schema, "Tag">; -export type TagCreateManyArgs = $CreateManyArgs<$Schema, "Tag">; -export type TagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Tag">; -export type TagUpdateArgs = $UpdateArgs<$Schema, "Tag">; -export type TagUpdateManyArgs = $UpdateManyArgs<$Schema, "Tag">; -export type TagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Tag">; -export type TagUpsertArgs = $UpsertArgs<$Schema, "Tag">; -export type TagDeleteArgs = $DeleteArgs<$Schema, "Tag">; -export type TagDeleteManyArgs = $DeleteManyArgs<$Schema, "Tag">; -export type TagCountArgs = $CountArgs<$Schema, "Tag">; -export type TagAggregateArgs = $AggregateArgs<$Schema, "Tag">; -export type TagGroupByArgs = $GroupByArgs<$Schema, "Tag">; -export type TagWhereInput = $WhereInput<$Schema, "Tag">; -export type TagSelect = $SelectInput<$Schema, "Tag">; -export type TagInclude = $IncludeInput<$Schema, "Tag">; -export type TagOmit = $OmitInput<$Schema, "Tag">; -export type TagGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Tag", Args, Options>; -export type TagsOnResponsesFindManyArgs = $FindManyArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesFindUniqueArgs = $FindUniqueArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesFindFirstArgs = $FindFirstArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesExistsArgs = $ExistsArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesCreateArgs = $CreateArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesCreateManyArgs = $CreateManyArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesUpdateArgs = $UpdateArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesUpdateManyArgs = $UpdateManyArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesUpsertArgs = $UpsertArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesDeleteArgs = $DeleteArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesDeleteManyArgs = $DeleteManyArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesCountArgs = $CountArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesAggregateArgs = $AggregateArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesGroupByArgs = $GroupByArgs<$Schema, "TagsOnResponses">; -export type TagsOnResponsesWhereInput = $WhereInput<$Schema, "TagsOnResponses">; -export type TagsOnResponsesSelect = $SelectInput<$Schema, "TagsOnResponses">; -export type TagsOnResponsesInclude = $IncludeInput<$Schema, "TagsOnResponses">; -export type TagsOnResponsesOmit = $OmitInput<$Schema, "TagsOnResponses">; -export type TagsOnResponsesGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TagsOnResponses", Args, Options>; -export type DisplayFindManyArgs = $FindManyArgs<$Schema, "Display">; -export type DisplayFindUniqueArgs = $FindUniqueArgs<$Schema, "Display">; -export type DisplayFindFirstArgs = $FindFirstArgs<$Schema, "Display">; -export type DisplayExistsArgs = $ExistsArgs<$Schema, "Display">; -export type DisplayCreateArgs = $CreateArgs<$Schema, "Display">; -export type DisplayCreateManyArgs = $CreateManyArgs<$Schema, "Display">; -export type DisplayCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Display">; -export type DisplayUpdateArgs = $UpdateArgs<$Schema, "Display">; -export type DisplayUpdateManyArgs = $UpdateManyArgs<$Schema, "Display">; -export type DisplayUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Display">; -export type DisplayUpsertArgs = $UpsertArgs<$Schema, "Display">; -export type DisplayDeleteArgs = $DeleteArgs<$Schema, "Display">; -export type DisplayDeleteManyArgs = $DeleteManyArgs<$Schema, "Display">; -export type DisplayCountArgs = $CountArgs<$Schema, "Display">; -export type DisplayAggregateArgs = $AggregateArgs<$Schema, "Display">; -export type DisplayGroupByArgs = $GroupByArgs<$Schema, "Display">; -export type DisplayWhereInput = $WhereInput<$Schema, "Display">; -export type DisplaySelect = $SelectInput<$Schema, "Display">; -export type DisplayInclude = $IncludeInput<$Schema, "Display">; -export type DisplayOmit = $OmitInput<$Schema, "Display">; -export type DisplayGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Display", Args, Options>; -export type SurveyTriggerFindManyArgs = $FindManyArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerFindUniqueArgs = $FindUniqueArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerFindFirstArgs = $FindFirstArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerExistsArgs = $ExistsArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerCreateArgs = $CreateArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerCreateManyArgs = $CreateManyArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerUpdateArgs = $UpdateArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerUpdateManyArgs = $UpdateManyArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerUpsertArgs = $UpsertArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerDeleteArgs = $DeleteArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerDeleteManyArgs = $DeleteManyArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerCountArgs = $CountArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerAggregateArgs = $AggregateArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerGroupByArgs = $GroupByArgs<$Schema, "SurveyTrigger">; -export type SurveyTriggerWhereInput = $WhereInput<$Schema, "SurveyTrigger">; -export type SurveyTriggerSelect = $SelectInput<$Schema, "SurveyTrigger">; -export type SurveyTriggerInclude = $IncludeInput<$Schema, "SurveyTrigger">; -export type SurveyTriggerOmit = $OmitInput<$Schema, "SurveyTrigger">; -export type SurveyTriggerGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SurveyTrigger", Args, Options>; -export type SurveyAttributeFilterFindManyArgs = $FindManyArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterFindUniqueArgs = $FindUniqueArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterFindFirstArgs = $FindFirstArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterExistsArgs = $ExistsArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterCreateArgs = $CreateArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterCreateManyArgs = $CreateManyArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterUpdateArgs = $UpdateArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterUpdateManyArgs = $UpdateManyArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterUpsertArgs = $UpsertArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterDeleteArgs = $DeleteArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterDeleteManyArgs = $DeleteManyArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterCountArgs = $CountArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterAggregateArgs = $AggregateArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterGroupByArgs = $GroupByArgs<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterWhereInput = $WhereInput<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterSelect = $SelectInput<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterInclude = $IncludeInput<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterOmit = $OmitInput<$Schema, "SurveyAttributeFilter">; -export type SurveyAttributeFilterGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SurveyAttributeFilter", Args, Options>; -export type SurveyFindManyArgs = $FindManyArgs<$Schema, "Survey">; -export type SurveyFindUniqueArgs = $FindUniqueArgs<$Schema, "Survey">; -export type SurveyFindFirstArgs = $FindFirstArgs<$Schema, "Survey">; -export type SurveyExistsArgs = $ExistsArgs<$Schema, "Survey">; -export type SurveyCreateArgs = $CreateArgs<$Schema, "Survey">; -export type SurveyCreateManyArgs = $CreateManyArgs<$Schema, "Survey">; -export type SurveyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Survey">; -export type SurveyUpdateArgs = $UpdateArgs<$Schema, "Survey">; -export type SurveyUpdateManyArgs = $UpdateManyArgs<$Schema, "Survey">; -export type SurveyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Survey">; -export type SurveyUpsertArgs = $UpsertArgs<$Schema, "Survey">; -export type SurveyDeleteArgs = $DeleteArgs<$Schema, "Survey">; -export type SurveyDeleteManyArgs = $DeleteManyArgs<$Schema, "Survey">; -export type SurveyCountArgs = $CountArgs<$Schema, "Survey">; -export type SurveyAggregateArgs = $AggregateArgs<$Schema, "Survey">; -export type SurveyGroupByArgs = $GroupByArgs<$Schema, "Survey">; -export type SurveyWhereInput = $WhereInput<$Schema, "Survey">; -export type SurveySelect = $SelectInput<$Schema, "Survey">; -export type SurveyInclude = $IncludeInput<$Schema, "Survey">; -export type SurveyOmit = $OmitInput<$Schema, "Survey">; -export type SurveyGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Survey", Args, Options>; -export type SurveyFollowUpFindManyArgs = $FindManyArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpFindUniqueArgs = $FindUniqueArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpFindFirstArgs = $FindFirstArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpExistsArgs = $ExistsArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpCreateArgs = $CreateArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpCreateManyArgs = $CreateManyArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpUpdateArgs = $UpdateArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpUpdateManyArgs = $UpdateManyArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpUpsertArgs = $UpsertArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpDeleteArgs = $DeleteArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpDeleteManyArgs = $DeleteManyArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpCountArgs = $CountArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpAggregateArgs = $AggregateArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpGroupByArgs = $GroupByArgs<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpWhereInput = $WhereInput<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpSelect = $SelectInput<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpInclude = $IncludeInput<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpOmit = $OmitInput<$Schema, "SurveyFollowUp">; -export type SurveyFollowUpGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SurveyFollowUp", Args, Options>; -export type ActionClassFindManyArgs = $FindManyArgs<$Schema, "ActionClass">; -export type ActionClassFindUniqueArgs = $FindUniqueArgs<$Schema, "ActionClass">; -export type ActionClassFindFirstArgs = $FindFirstArgs<$Schema, "ActionClass">; -export type ActionClassExistsArgs = $ExistsArgs<$Schema, "ActionClass">; -export type ActionClassCreateArgs = $CreateArgs<$Schema, "ActionClass">; -export type ActionClassCreateManyArgs = $CreateManyArgs<$Schema, "ActionClass">; -export type ActionClassCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ActionClass">; -export type ActionClassUpdateArgs = $UpdateArgs<$Schema, "ActionClass">; -export type ActionClassUpdateManyArgs = $UpdateManyArgs<$Schema, "ActionClass">; -export type ActionClassUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ActionClass">; -export type ActionClassUpsertArgs = $UpsertArgs<$Schema, "ActionClass">; -export type ActionClassDeleteArgs = $DeleteArgs<$Schema, "ActionClass">; -export type ActionClassDeleteManyArgs = $DeleteManyArgs<$Schema, "ActionClass">; -export type ActionClassCountArgs = $CountArgs<$Schema, "ActionClass">; -export type ActionClassAggregateArgs = $AggregateArgs<$Schema, "ActionClass">; -export type ActionClassGroupByArgs = $GroupByArgs<$Schema, "ActionClass">; -export type ActionClassWhereInput = $WhereInput<$Schema, "ActionClass">; -export type ActionClassSelect = $SelectInput<$Schema, "ActionClass">; -export type ActionClassInclude = $IncludeInput<$Schema, "ActionClass">; -export type ActionClassOmit = $OmitInput<$Schema, "ActionClass">; -export type ActionClassGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ActionClass", Args, Options>; -export type IntegrationFindManyArgs = $FindManyArgs<$Schema, "Integration">; -export type IntegrationFindUniqueArgs = $FindUniqueArgs<$Schema, "Integration">; -export type IntegrationFindFirstArgs = $FindFirstArgs<$Schema, "Integration">; -export type IntegrationExistsArgs = $ExistsArgs<$Schema, "Integration">; -export type IntegrationCreateArgs = $CreateArgs<$Schema, "Integration">; -export type IntegrationCreateManyArgs = $CreateManyArgs<$Schema, "Integration">; -export type IntegrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Integration">; -export type IntegrationUpdateArgs = $UpdateArgs<$Schema, "Integration">; -export type IntegrationUpdateManyArgs = $UpdateManyArgs<$Schema, "Integration">; -export type IntegrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Integration">; -export type IntegrationUpsertArgs = $UpsertArgs<$Schema, "Integration">; -export type IntegrationDeleteArgs = $DeleteArgs<$Schema, "Integration">; -export type IntegrationDeleteManyArgs = $DeleteManyArgs<$Schema, "Integration">; -export type IntegrationCountArgs = $CountArgs<$Schema, "Integration">; -export type IntegrationAggregateArgs = $AggregateArgs<$Schema, "Integration">; -export type IntegrationGroupByArgs = $GroupByArgs<$Schema, "Integration">; -export type IntegrationWhereInput = $WhereInput<$Schema, "Integration">; -export type IntegrationSelect = $SelectInput<$Schema, "Integration">; -export type IntegrationInclude = $IncludeInput<$Schema, "Integration">; -export type IntegrationOmit = $OmitInput<$Schema, "Integration">; -export type IntegrationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Integration", Args, Options>; -export type DataMigrationFindManyArgs = $FindManyArgs<$Schema, "DataMigration">; -export type DataMigrationFindUniqueArgs = $FindUniqueArgs<$Schema, "DataMigration">; -export type DataMigrationFindFirstArgs = $FindFirstArgs<$Schema, "DataMigration">; -export type DataMigrationExistsArgs = $ExistsArgs<$Schema, "DataMigration">; -export type DataMigrationCreateArgs = $CreateArgs<$Schema, "DataMigration">; -export type DataMigrationCreateManyArgs = $CreateManyArgs<$Schema, "DataMigration">; -export type DataMigrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DataMigration">; -export type DataMigrationUpdateArgs = $UpdateArgs<$Schema, "DataMigration">; -export type DataMigrationUpdateManyArgs = $UpdateManyArgs<$Schema, "DataMigration">; -export type DataMigrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DataMigration">; -export type DataMigrationUpsertArgs = $UpsertArgs<$Schema, "DataMigration">; -export type DataMigrationDeleteArgs = $DeleteArgs<$Schema, "DataMigration">; -export type DataMigrationDeleteManyArgs = $DeleteManyArgs<$Schema, "DataMigration">; -export type DataMigrationCountArgs = $CountArgs<$Schema, "DataMigration">; -export type DataMigrationAggregateArgs = $AggregateArgs<$Schema, "DataMigration">; -export type DataMigrationGroupByArgs = $GroupByArgs<$Schema, "DataMigration">; -export type DataMigrationWhereInput = $WhereInput<$Schema, "DataMigration">; -export type DataMigrationSelect = $SelectInput<$Schema, "DataMigration">; -export type DataMigrationInclude = $IncludeInput<$Schema, "DataMigration">; -export type DataMigrationOmit = $OmitInput<$Schema, "DataMigration">; -export type DataMigrationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DataMigration", Args, Options>; -export type EnvironmentFindManyArgs = $FindManyArgs<$Schema, "Environment">; -export type EnvironmentFindUniqueArgs = $FindUniqueArgs<$Schema, "Environment">; -export type EnvironmentFindFirstArgs = $FindFirstArgs<$Schema, "Environment">; -export type EnvironmentExistsArgs = $ExistsArgs<$Schema, "Environment">; -export type EnvironmentCreateArgs = $CreateArgs<$Schema, "Environment">; -export type EnvironmentCreateManyArgs = $CreateManyArgs<$Schema, "Environment">; -export type EnvironmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Environment">; -export type EnvironmentUpdateArgs = $UpdateArgs<$Schema, "Environment">; -export type EnvironmentUpdateManyArgs = $UpdateManyArgs<$Schema, "Environment">; -export type EnvironmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Environment">; -export type EnvironmentUpsertArgs = $UpsertArgs<$Schema, "Environment">; -export type EnvironmentDeleteArgs = $DeleteArgs<$Schema, "Environment">; -export type EnvironmentDeleteManyArgs = $DeleteManyArgs<$Schema, "Environment">; -export type EnvironmentCountArgs = $CountArgs<$Schema, "Environment">; -export type EnvironmentAggregateArgs = $AggregateArgs<$Schema, "Environment">; -export type EnvironmentGroupByArgs = $GroupByArgs<$Schema, "Environment">; -export type EnvironmentWhereInput = $WhereInput<$Schema, "Environment">; -export type EnvironmentSelect = $SelectInput<$Schema, "Environment">; -export type EnvironmentInclude = $IncludeInput<$Schema, "Environment">; -export type EnvironmentOmit = $OmitInput<$Schema, "Environment">; -export type EnvironmentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Environment", Args, Options>; -export type ProjectFindManyArgs = $FindManyArgs<$Schema, "Project">; -export type ProjectFindUniqueArgs = $FindUniqueArgs<$Schema, "Project">; -export type ProjectFindFirstArgs = $FindFirstArgs<$Schema, "Project">; -export type ProjectExistsArgs = $ExistsArgs<$Schema, "Project">; -export type ProjectCreateArgs = $CreateArgs<$Schema, "Project">; -export type ProjectCreateManyArgs = $CreateManyArgs<$Schema, "Project">; -export type ProjectCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Project">; -export type ProjectUpdateArgs = $UpdateArgs<$Schema, "Project">; -export type ProjectUpdateManyArgs = $UpdateManyArgs<$Schema, "Project">; -export type ProjectUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Project">; -export type ProjectUpsertArgs = $UpsertArgs<$Schema, "Project">; -export type ProjectDeleteArgs = $DeleteArgs<$Schema, "Project">; -export type ProjectDeleteManyArgs = $DeleteManyArgs<$Schema, "Project">; -export type ProjectCountArgs = $CountArgs<$Schema, "Project">; -export type ProjectAggregateArgs = $AggregateArgs<$Schema, "Project">; -export type ProjectGroupByArgs = $GroupByArgs<$Schema, "Project">; -export type ProjectWhereInput = $WhereInput<$Schema, "Project">; -export type ProjectSelect = $SelectInput<$Schema, "Project">; -export type ProjectInclude = $IncludeInput<$Schema, "Project">; -export type ProjectOmit = $OmitInput<$Schema, "Project">; -export type ProjectGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Project", Args, Options>; -export type OrganizationFindManyArgs = $FindManyArgs<$Schema, "Organization">; -export type OrganizationFindUniqueArgs = $FindUniqueArgs<$Schema, "Organization">; -export type OrganizationFindFirstArgs = $FindFirstArgs<$Schema, "Organization">; -export type OrganizationExistsArgs = $ExistsArgs<$Schema, "Organization">; -export type OrganizationCreateArgs = $CreateArgs<$Schema, "Organization">; -export type OrganizationCreateManyArgs = $CreateManyArgs<$Schema, "Organization">; -export type OrganizationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Organization">; -export type OrganizationUpdateArgs = $UpdateArgs<$Schema, "Organization">; -export type OrganizationUpdateManyArgs = $UpdateManyArgs<$Schema, "Organization">; -export type OrganizationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Organization">; -export type OrganizationUpsertArgs = $UpsertArgs<$Schema, "Organization">; -export type OrganizationDeleteArgs = $DeleteArgs<$Schema, "Organization">; -export type OrganizationDeleteManyArgs = $DeleteManyArgs<$Schema, "Organization">; -export type OrganizationCountArgs = $CountArgs<$Schema, "Organization">; -export type OrganizationAggregateArgs = $AggregateArgs<$Schema, "Organization">; -export type OrganizationGroupByArgs = $GroupByArgs<$Schema, "Organization">; -export type OrganizationWhereInput = $WhereInput<$Schema, "Organization">; -export type OrganizationSelect = $SelectInput<$Schema, "Organization">; -export type OrganizationInclude = $IncludeInput<$Schema, "Organization">; -export type OrganizationOmit = $OmitInput<$Schema, "Organization">; -export type OrganizationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Organization", Args, Options>; -export type MembershipFindManyArgs = $FindManyArgs<$Schema, "Membership">; -export type MembershipFindUniqueArgs = $FindUniqueArgs<$Schema, "Membership">; -export type MembershipFindFirstArgs = $FindFirstArgs<$Schema, "Membership">; -export type MembershipExistsArgs = $ExistsArgs<$Schema, "Membership">; -export type MembershipCreateArgs = $CreateArgs<$Schema, "Membership">; -export type MembershipCreateManyArgs = $CreateManyArgs<$Schema, "Membership">; -export type MembershipCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Membership">; -export type MembershipUpdateArgs = $UpdateArgs<$Schema, "Membership">; -export type MembershipUpdateManyArgs = $UpdateManyArgs<$Schema, "Membership">; -export type MembershipUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Membership">; -export type MembershipUpsertArgs = $UpsertArgs<$Schema, "Membership">; -export type MembershipDeleteArgs = $DeleteArgs<$Schema, "Membership">; -export type MembershipDeleteManyArgs = $DeleteManyArgs<$Schema, "Membership">; -export type MembershipCountArgs = $CountArgs<$Schema, "Membership">; -export type MembershipAggregateArgs = $AggregateArgs<$Schema, "Membership">; -export type MembershipGroupByArgs = $GroupByArgs<$Schema, "Membership">; -export type MembershipWhereInput = $WhereInput<$Schema, "Membership">; -export type MembershipSelect = $SelectInput<$Schema, "Membership">; -export type MembershipInclude = $IncludeInput<$Schema, "Membership">; -export type MembershipOmit = $OmitInput<$Schema, "Membership">; -export type MembershipGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Membership", Args, Options>; -export type InviteFindManyArgs = $FindManyArgs<$Schema, "Invite">; -export type InviteFindUniqueArgs = $FindUniqueArgs<$Schema, "Invite">; -export type InviteFindFirstArgs = $FindFirstArgs<$Schema, "Invite">; -export type InviteExistsArgs = $ExistsArgs<$Schema, "Invite">; -export type InviteCreateArgs = $CreateArgs<$Schema, "Invite">; -export type InviteCreateManyArgs = $CreateManyArgs<$Schema, "Invite">; -export type InviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Invite">; -export type InviteUpdateArgs = $UpdateArgs<$Schema, "Invite">; -export type InviteUpdateManyArgs = $UpdateManyArgs<$Schema, "Invite">; -export type InviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Invite">; -export type InviteUpsertArgs = $UpsertArgs<$Schema, "Invite">; -export type InviteDeleteArgs = $DeleteArgs<$Schema, "Invite">; -export type InviteDeleteManyArgs = $DeleteManyArgs<$Schema, "Invite">; -export type InviteCountArgs = $CountArgs<$Schema, "Invite">; -export type InviteAggregateArgs = $AggregateArgs<$Schema, "Invite">; -export type InviteGroupByArgs = $GroupByArgs<$Schema, "Invite">; -export type InviteWhereInput = $WhereInput<$Schema, "Invite">; -export type InviteSelect = $SelectInput<$Schema, "Invite">; -export type InviteInclude = $IncludeInput<$Schema, "Invite">; -export type InviteOmit = $OmitInput<$Schema, "Invite">; -export type InviteGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Invite", Args, Options>; -export type ApiKeyFindManyArgs = $FindManyArgs<$Schema, "ApiKey">; -export type ApiKeyFindUniqueArgs = $FindUniqueArgs<$Schema, "ApiKey">; -export type ApiKeyFindFirstArgs = $FindFirstArgs<$Schema, "ApiKey">; -export type ApiKeyExistsArgs = $ExistsArgs<$Schema, "ApiKey">; -export type ApiKeyCreateArgs = $CreateArgs<$Schema, "ApiKey">; -export type ApiKeyCreateManyArgs = $CreateManyArgs<$Schema, "ApiKey">; -export type ApiKeyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ApiKey">; -export type ApiKeyUpdateArgs = $UpdateArgs<$Schema, "ApiKey">; -export type ApiKeyUpdateManyArgs = $UpdateManyArgs<$Schema, "ApiKey">; -export type ApiKeyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ApiKey">; -export type ApiKeyUpsertArgs = $UpsertArgs<$Schema, "ApiKey">; -export type ApiKeyDeleteArgs = $DeleteArgs<$Schema, "ApiKey">; -export type ApiKeyDeleteManyArgs = $DeleteManyArgs<$Schema, "ApiKey">; -export type ApiKeyCountArgs = $CountArgs<$Schema, "ApiKey">; -export type ApiKeyAggregateArgs = $AggregateArgs<$Schema, "ApiKey">; -export type ApiKeyGroupByArgs = $GroupByArgs<$Schema, "ApiKey">; -export type ApiKeyWhereInput = $WhereInput<$Schema, "ApiKey">; -export type ApiKeySelect = $SelectInput<$Schema, "ApiKey">; -export type ApiKeyInclude = $IncludeInput<$Schema, "ApiKey">; -export type ApiKeyOmit = $OmitInput<$Schema, "ApiKey">; -export type ApiKeyGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ApiKey", Args, Options>; -export type ApiKeyEnvironmentFindManyArgs = $FindManyArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentFindUniqueArgs = $FindUniqueArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentFindFirstArgs = $FindFirstArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentExistsArgs = $ExistsArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentCreateArgs = $CreateArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentCreateManyArgs = $CreateManyArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentUpdateArgs = $UpdateArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentUpdateManyArgs = $UpdateManyArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentUpsertArgs = $UpsertArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentDeleteArgs = $DeleteArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentDeleteManyArgs = $DeleteManyArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentCountArgs = $CountArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentAggregateArgs = $AggregateArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentGroupByArgs = $GroupByArgs<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentWhereInput = $WhereInput<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentSelect = $SelectInput<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentInclude = $IncludeInput<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentOmit = $OmitInput<$Schema, "ApiKeyEnvironment">; -export type ApiKeyEnvironmentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ApiKeyEnvironment", Args, Options>; -export type AccountFindManyArgs = $FindManyArgs<$Schema, "Account">; -export type AccountFindUniqueArgs = $FindUniqueArgs<$Schema, "Account">; -export type AccountFindFirstArgs = $FindFirstArgs<$Schema, "Account">; -export type AccountExistsArgs = $ExistsArgs<$Schema, "Account">; -export type AccountCreateArgs = $CreateArgs<$Schema, "Account">; -export type AccountCreateManyArgs = $CreateManyArgs<$Schema, "Account">; -export type AccountCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Account">; -export type AccountUpdateArgs = $UpdateArgs<$Schema, "Account">; -export type AccountUpdateManyArgs = $UpdateManyArgs<$Schema, "Account">; -export type AccountUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Account">; -export type AccountUpsertArgs = $UpsertArgs<$Schema, "Account">; -export type AccountDeleteArgs = $DeleteArgs<$Schema, "Account">; -export type AccountDeleteManyArgs = $DeleteManyArgs<$Schema, "Account">; -export type AccountCountArgs = $CountArgs<$Schema, "Account">; -export type AccountAggregateArgs = $AggregateArgs<$Schema, "Account">; -export type AccountGroupByArgs = $GroupByArgs<$Schema, "Account">; -export type AccountWhereInput = $WhereInput<$Schema, "Account">; -export type AccountSelect = $SelectInput<$Schema, "Account">; -export type AccountInclude = $IncludeInput<$Schema, "Account">; -export type AccountOmit = $OmitInput<$Schema, "Account">; -export type AccountGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Account", Args, Options>; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type ShortUrlFindManyArgs = $FindManyArgs<$Schema, "ShortUrl">; -export type ShortUrlFindUniqueArgs = $FindUniqueArgs<$Schema, "ShortUrl">; -export type ShortUrlFindFirstArgs = $FindFirstArgs<$Schema, "ShortUrl">; -export type ShortUrlExistsArgs = $ExistsArgs<$Schema, "ShortUrl">; -export type ShortUrlCreateArgs = $CreateArgs<$Schema, "ShortUrl">; -export type ShortUrlCreateManyArgs = $CreateManyArgs<$Schema, "ShortUrl">; -export type ShortUrlCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ShortUrl">; -export type ShortUrlUpdateArgs = $UpdateArgs<$Schema, "ShortUrl">; -export type ShortUrlUpdateManyArgs = $UpdateManyArgs<$Schema, "ShortUrl">; -export type ShortUrlUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ShortUrl">; -export type ShortUrlUpsertArgs = $UpsertArgs<$Schema, "ShortUrl">; -export type ShortUrlDeleteArgs = $DeleteArgs<$Schema, "ShortUrl">; -export type ShortUrlDeleteManyArgs = $DeleteManyArgs<$Schema, "ShortUrl">; -export type ShortUrlCountArgs = $CountArgs<$Schema, "ShortUrl">; -export type ShortUrlAggregateArgs = $AggregateArgs<$Schema, "ShortUrl">; -export type ShortUrlGroupByArgs = $GroupByArgs<$Schema, "ShortUrl">; -export type ShortUrlWhereInput = $WhereInput<$Schema, "ShortUrl">; -export type ShortUrlSelect = $SelectInput<$Schema, "ShortUrl">; -export type ShortUrlInclude = $IncludeInput<$Schema, "ShortUrl">; -export type ShortUrlOmit = $OmitInput<$Schema, "ShortUrl">; -export type ShortUrlGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ShortUrl", Args, Options>; -export type SegmentFindManyArgs = $FindManyArgs<$Schema, "Segment">; -export type SegmentFindUniqueArgs = $FindUniqueArgs<$Schema, "Segment">; -export type SegmentFindFirstArgs = $FindFirstArgs<$Schema, "Segment">; -export type SegmentExistsArgs = $ExistsArgs<$Schema, "Segment">; -export type SegmentCreateArgs = $CreateArgs<$Schema, "Segment">; -export type SegmentCreateManyArgs = $CreateManyArgs<$Schema, "Segment">; -export type SegmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Segment">; -export type SegmentUpdateArgs = $UpdateArgs<$Schema, "Segment">; -export type SegmentUpdateManyArgs = $UpdateManyArgs<$Schema, "Segment">; -export type SegmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Segment">; -export type SegmentUpsertArgs = $UpsertArgs<$Schema, "Segment">; -export type SegmentDeleteArgs = $DeleteArgs<$Schema, "Segment">; -export type SegmentDeleteManyArgs = $DeleteManyArgs<$Schema, "Segment">; -export type SegmentCountArgs = $CountArgs<$Schema, "Segment">; -export type SegmentAggregateArgs = $AggregateArgs<$Schema, "Segment">; -export type SegmentGroupByArgs = $GroupByArgs<$Schema, "Segment">; -export type SegmentWhereInput = $WhereInput<$Schema, "Segment">; -export type SegmentSelect = $SelectInput<$Schema, "Segment">; -export type SegmentInclude = $IncludeInput<$Schema, "Segment">; -export type SegmentOmit = $OmitInput<$Schema, "Segment">; -export type SegmentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Segment", Args, Options>; -export type LanguageFindManyArgs = $FindManyArgs<$Schema, "Language">; -export type LanguageFindUniqueArgs = $FindUniqueArgs<$Schema, "Language">; -export type LanguageFindFirstArgs = $FindFirstArgs<$Schema, "Language">; -export type LanguageExistsArgs = $ExistsArgs<$Schema, "Language">; -export type LanguageCreateArgs = $CreateArgs<$Schema, "Language">; -export type LanguageCreateManyArgs = $CreateManyArgs<$Schema, "Language">; -export type LanguageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Language">; -export type LanguageUpdateArgs = $UpdateArgs<$Schema, "Language">; -export type LanguageUpdateManyArgs = $UpdateManyArgs<$Schema, "Language">; -export type LanguageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Language">; -export type LanguageUpsertArgs = $UpsertArgs<$Schema, "Language">; -export type LanguageDeleteArgs = $DeleteArgs<$Schema, "Language">; -export type LanguageDeleteManyArgs = $DeleteManyArgs<$Schema, "Language">; -export type LanguageCountArgs = $CountArgs<$Schema, "Language">; -export type LanguageAggregateArgs = $AggregateArgs<$Schema, "Language">; -export type LanguageGroupByArgs = $GroupByArgs<$Schema, "Language">; -export type LanguageWhereInput = $WhereInput<$Schema, "Language">; -export type LanguageSelect = $SelectInput<$Schema, "Language">; -export type LanguageInclude = $IncludeInput<$Schema, "Language">; -export type LanguageOmit = $OmitInput<$Schema, "Language">; -export type LanguageGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Language", Args, Options>; -export type SurveyLanguageFindManyArgs = $FindManyArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageFindUniqueArgs = $FindUniqueArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageFindFirstArgs = $FindFirstArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageExistsArgs = $ExistsArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageCreateArgs = $CreateArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageCreateManyArgs = $CreateManyArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageUpdateArgs = $UpdateArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageUpdateManyArgs = $UpdateManyArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageUpsertArgs = $UpsertArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageDeleteArgs = $DeleteArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageDeleteManyArgs = $DeleteManyArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageCountArgs = $CountArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageAggregateArgs = $AggregateArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageGroupByArgs = $GroupByArgs<$Schema, "SurveyLanguage">; -export type SurveyLanguageWhereInput = $WhereInput<$Schema, "SurveyLanguage">; -export type SurveyLanguageSelect = $SelectInput<$Schema, "SurveyLanguage">; -export type SurveyLanguageInclude = $IncludeInput<$Schema, "SurveyLanguage">; -export type SurveyLanguageOmit = $OmitInput<$Schema, "SurveyLanguage">; -export type SurveyLanguageGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SurveyLanguage", Args, Options>; -export type InsightFindManyArgs = $FindManyArgs<$Schema, "Insight">; -export type InsightFindUniqueArgs = $FindUniqueArgs<$Schema, "Insight">; -export type InsightFindFirstArgs = $FindFirstArgs<$Schema, "Insight">; -export type InsightExistsArgs = $ExistsArgs<$Schema, "Insight">; -export type InsightCreateArgs = $CreateArgs<$Schema, "Insight">; -export type InsightCreateManyArgs = $CreateManyArgs<$Schema, "Insight">; -export type InsightCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Insight">; -export type InsightUpdateArgs = $UpdateArgs<$Schema, "Insight">; -export type InsightUpdateManyArgs = $UpdateManyArgs<$Schema, "Insight">; -export type InsightUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Insight">; -export type InsightUpsertArgs = $UpsertArgs<$Schema, "Insight">; -export type InsightDeleteArgs = $DeleteArgs<$Schema, "Insight">; -export type InsightDeleteManyArgs = $DeleteManyArgs<$Schema, "Insight">; -export type InsightCountArgs = $CountArgs<$Schema, "Insight">; -export type InsightAggregateArgs = $AggregateArgs<$Schema, "Insight">; -export type InsightGroupByArgs = $GroupByArgs<$Schema, "Insight">; -export type InsightWhereInput = $WhereInput<$Schema, "Insight">; -export type InsightSelect = $SelectInput<$Schema, "Insight">; -export type InsightInclude = $IncludeInput<$Schema, "Insight">; -export type InsightOmit = $OmitInput<$Schema, "Insight">; -export type InsightGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Insight", Args, Options>; -export type DocumentInsightFindManyArgs = $FindManyArgs<$Schema, "DocumentInsight">; -export type DocumentInsightFindUniqueArgs = $FindUniqueArgs<$Schema, "DocumentInsight">; -export type DocumentInsightFindFirstArgs = $FindFirstArgs<$Schema, "DocumentInsight">; -export type DocumentInsightExistsArgs = $ExistsArgs<$Schema, "DocumentInsight">; -export type DocumentInsightCreateArgs = $CreateArgs<$Schema, "DocumentInsight">; -export type DocumentInsightCreateManyArgs = $CreateManyArgs<$Schema, "DocumentInsight">; -export type DocumentInsightCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DocumentInsight">; -export type DocumentInsightUpdateArgs = $UpdateArgs<$Schema, "DocumentInsight">; -export type DocumentInsightUpdateManyArgs = $UpdateManyArgs<$Schema, "DocumentInsight">; -export type DocumentInsightUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DocumentInsight">; -export type DocumentInsightUpsertArgs = $UpsertArgs<$Schema, "DocumentInsight">; -export type DocumentInsightDeleteArgs = $DeleteArgs<$Schema, "DocumentInsight">; -export type DocumentInsightDeleteManyArgs = $DeleteManyArgs<$Schema, "DocumentInsight">; -export type DocumentInsightCountArgs = $CountArgs<$Schema, "DocumentInsight">; -export type DocumentInsightAggregateArgs = $AggregateArgs<$Schema, "DocumentInsight">; -export type DocumentInsightGroupByArgs = $GroupByArgs<$Schema, "DocumentInsight">; -export type DocumentInsightWhereInput = $WhereInput<$Schema, "DocumentInsight">; -export type DocumentInsightSelect = $SelectInput<$Schema, "DocumentInsight">; -export type DocumentInsightInclude = $IncludeInput<$Schema, "DocumentInsight">; -export type DocumentInsightOmit = $OmitInput<$Schema, "DocumentInsight">; -export type DocumentInsightGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DocumentInsight", Args, Options>; -export type DocumentFindManyArgs = $FindManyArgs<$Schema, "Document">; -export type DocumentFindUniqueArgs = $FindUniqueArgs<$Schema, "Document">; -export type DocumentFindFirstArgs = $FindFirstArgs<$Schema, "Document">; -export type DocumentExistsArgs = $ExistsArgs<$Schema, "Document">; -export type DocumentCreateArgs = $CreateArgs<$Schema, "Document">; -export type DocumentCreateManyArgs = $CreateManyArgs<$Schema, "Document">; -export type DocumentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Document">; -export type DocumentUpdateArgs = $UpdateArgs<$Schema, "Document">; -export type DocumentUpdateManyArgs = $UpdateManyArgs<$Schema, "Document">; -export type DocumentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Document">; -export type DocumentUpsertArgs = $UpsertArgs<$Schema, "Document">; -export type DocumentDeleteArgs = $DeleteArgs<$Schema, "Document">; -export type DocumentDeleteManyArgs = $DeleteManyArgs<$Schema, "Document">; -export type DocumentCountArgs = $CountArgs<$Schema, "Document">; -export type DocumentAggregateArgs = $AggregateArgs<$Schema, "Document">; -export type DocumentGroupByArgs = $GroupByArgs<$Schema, "Document">; -export type DocumentWhereInput = $WhereInput<$Schema, "Document">; -export type DocumentSelect = $SelectInput<$Schema, "Document">; -export type DocumentInclude = $IncludeInput<$Schema, "Document">; -export type DocumentOmit = $OmitInput<$Schema, "Document">; -export type DocumentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Document", Args, Options>; -export type TeamFindManyArgs = $FindManyArgs<$Schema, "Team">; -export type TeamFindUniqueArgs = $FindUniqueArgs<$Schema, "Team">; -export type TeamFindFirstArgs = $FindFirstArgs<$Schema, "Team">; -export type TeamExistsArgs = $ExistsArgs<$Schema, "Team">; -export type TeamCreateArgs = $CreateArgs<$Schema, "Team">; -export type TeamCreateManyArgs = $CreateManyArgs<$Schema, "Team">; -export type TeamCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Team">; -export type TeamUpdateArgs = $UpdateArgs<$Schema, "Team">; -export type TeamUpdateManyArgs = $UpdateManyArgs<$Schema, "Team">; -export type TeamUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Team">; -export type TeamUpsertArgs = $UpsertArgs<$Schema, "Team">; -export type TeamDeleteArgs = $DeleteArgs<$Schema, "Team">; -export type TeamDeleteManyArgs = $DeleteManyArgs<$Schema, "Team">; -export type TeamCountArgs = $CountArgs<$Schema, "Team">; -export type TeamAggregateArgs = $AggregateArgs<$Schema, "Team">; -export type TeamGroupByArgs = $GroupByArgs<$Schema, "Team">; -export type TeamWhereInput = $WhereInput<$Schema, "Team">; -export type TeamSelect = $SelectInput<$Schema, "Team">; -export type TeamInclude = $IncludeInput<$Schema, "Team">; -export type TeamOmit = $OmitInput<$Schema, "Team">; -export type TeamGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Team", Args, Options>; -export type TeamUserFindManyArgs = $FindManyArgs<$Schema, "TeamUser">; -export type TeamUserFindUniqueArgs = $FindUniqueArgs<$Schema, "TeamUser">; -export type TeamUserFindFirstArgs = $FindFirstArgs<$Schema, "TeamUser">; -export type TeamUserExistsArgs = $ExistsArgs<$Schema, "TeamUser">; -export type TeamUserCreateArgs = $CreateArgs<$Schema, "TeamUser">; -export type TeamUserCreateManyArgs = $CreateManyArgs<$Schema, "TeamUser">; -export type TeamUserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TeamUser">; -export type TeamUserUpdateArgs = $UpdateArgs<$Schema, "TeamUser">; -export type TeamUserUpdateManyArgs = $UpdateManyArgs<$Schema, "TeamUser">; -export type TeamUserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TeamUser">; -export type TeamUserUpsertArgs = $UpsertArgs<$Schema, "TeamUser">; -export type TeamUserDeleteArgs = $DeleteArgs<$Schema, "TeamUser">; -export type TeamUserDeleteManyArgs = $DeleteManyArgs<$Schema, "TeamUser">; -export type TeamUserCountArgs = $CountArgs<$Schema, "TeamUser">; -export type TeamUserAggregateArgs = $AggregateArgs<$Schema, "TeamUser">; -export type TeamUserGroupByArgs = $GroupByArgs<$Schema, "TeamUser">; -export type TeamUserWhereInput = $WhereInput<$Schema, "TeamUser">; -export type TeamUserSelect = $SelectInput<$Schema, "TeamUser">; -export type TeamUserInclude = $IncludeInput<$Schema, "TeamUser">; -export type TeamUserOmit = $OmitInput<$Schema, "TeamUser">; -export type TeamUserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TeamUser", Args, Options>; -export type ProjectTeamFindManyArgs = $FindManyArgs<$Schema, "ProjectTeam">; -export type ProjectTeamFindUniqueArgs = $FindUniqueArgs<$Schema, "ProjectTeam">; -export type ProjectTeamFindFirstArgs = $FindFirstArgs<$Schema, "ProjectTeam">; -export type ProjectTeamExistsArgs = $ExistsArgs<$Schema, "ProjectTeam">; -export type ProjectTeamCreateArgs = $CreateArgs<$Schema, "ProjectTeam">; -export type ProjectTeamCreateManyArgs = $CreateManyArgs<$Schema, "ProjectTeam">; -export type ProjectTeamCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ProjectTeam">; -export type ProjectTeamUpdateArgs = $UpdateArgs<$Schema, "ProjectTeam">; -export type ProjectTeamUpdateManyArgs = $UpdateManyArgs<$Schema, "ProjectTeam">; -export type ProjectTeamUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ProjectTeam">; -export type ProjectTeamUpsertArgs = $UpsertArgs<$Schema, "ProjectTeam">; -export type ProjectTeamDeleteArgs = $DeleteArgs<$Schema, "ProjectTeam">; -export type ProjectTeamDeleteManyArgs = $DeleteManyArgs<$Schema, "ProjectTeam">; -export type ProjectTeamCountArgs = $CountArgs<$Schema, "ProjectTeam">; -export type ProjectTeamAggregateArgs = $AggregateArgs<$Schema, "ProjectTeam">; -export type ProjectTeamGroupByArgs = $GroupByArgs<$Schema, "ProjectTeam">; -export type ProjectTeamWhereInput = $WhereInput<$Schema, "ProjectTeam">; -export type ProjectTeamSelect = $SelectInput<$Schema, "ProjectTeam">; -export type ProjectTeamInclude = $IncludeInput<$Schema, "ProjectTeam">; -export type ProjectTeamOmit = $OmitInput<$Schema, "ProjectTeam">; -export type ProjectTeamGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ProjectTeam", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type WebhookFindManyArgs = $FindManyArgs<$Schema, 'Webhook'>; +export type WebhookFindUniqueArgs = $FindUniqueArgs<$Schema, 'Webhook'>; +export type WebhookFindFirstArgs = $FindFirstArgs<$Schema, 'Webhook'>; +export type WebhookExistsArgs = $ExistsArgs<$Schema, 'Webhook'>; +export type WebhookCreateArgs = $CreateArgs<$Schema, 'Webhook'>; +export type WebhookCreateManyArgs = $CreateManyArgs<$Schema, 'Webhook'>; +export type WebhookCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Webhook'>; +export type WebhookUpdateArgs = $UpdateArgs<$Schema, 'Webhook'>; +export type WebhookUpdateManyArgs = $UpdateManyArgs<$Schema, 'Webhook'>; +export type WebhookUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Webhook'>; +export type WebhookUpsertArgs = $UpsertArgs<$Schema, 'Webhook'>; +export type WebhookDeleteArgs = $DeleteArgs<$Schema, 'Webhook'>; +export type WebhookDeleteManyArgs = $DeleteManyArgs<$Schema, 'Webhook'>; +export type WebhookCountArgs = $CountArgs<$Schema, 'Webhook'>; +export type WebhookAggregateArgs = $AggregateArgs<$Schema, 'Webhook'>; +export type WebhookGroupByArgs = $GroupByArgs<$Schema, 'Webhook'>; +export type WebhookWhereInput = $WhereInput<$Schema, 'Webhook'>; +export type WebhookSelect = $SelectInput<$Schema, 'Webhook'>; +export type WebhookInclude = $IncludeInput<$Schema, 'Webhook'>; +export type WebhookOmit = $OmitInput<$Schema, 'Webhook'>; +export type WebhookGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Webhook', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Webhook', Args, Options>; +export type ContactAttributeFindManyArgs = $FindManyArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeFindUniqueArgs = $FindUniqueArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeFindFirstArgs = $FindFirstArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeExistsArgs = $ExistsArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeCreateArgs = $CreateArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeCreateManyArgs = $CreateManyArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeUpdateArgs = $UpdateArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeUpdateManyArgs = $UpdateManyArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeUpsertArgs = $UpsertArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeDeleteArgs = $DeleteArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeDeleteManyArgs = $DeleteManyArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeCountArgs = $CountArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeAggregateArgs = $AggregateArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeGroupByArgs = $GroupByArgs<$Schema, 'ContactAttribute'>; +export type ContactAttributeWhereInput = $WhereInput<$Schema, 'ContactAttribute'>; +export type ContactAttributeSelect = $SelectInput<$Schema, 'ContactAttribute'>; +export type ContactAttributeInclude = $IncludeInput<$Schema, 'ContactAttribute'>; +export type ContactAttributeOmit = $OmitInput<$Schema, 'ContactAttribute'>; +export type ContactAttributeGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ContactAttribute', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ContactAttribute', Args, Options>; +export type ContactAttributeKeyFindManyArgs = $FindManyArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyFindUniqueArgs = $FindUniqueArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyFindFirstArgs = $FindFirstArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyExistsArgs = $ExistsArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyCreateArgs = $CreateArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyCreateManyArgs = $CreateManyArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyUpdateArgs = $UpdateArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyUpdateManyArgs = $UpdateManyArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyUpsertArgs = $UpsertArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyDeleteArgs = $DeleteArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyDeleteManyArgs = $DeleteManyArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyCountArgs = $CountArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyAggregateArgs = $AggregateArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyGroupByArgs = $GroupByArgs<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyWhereInput = $WhereInput<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeySelect = $SelectInput<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyInclude = $IncludeInput<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyOmit = $OmitInput<$Schema, 'ContactAttributeKey'>; +export type ContactAttributeKeyGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ContactAttributeKey', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ContactAttributeKey', Args, Options>; +export type ContactFindManyArgs = $FindManyArgs<$Schema, 'Contact'>; +export type ContactFindUniqueArgs = $FindUniqueArgs<$Schema, 'Contact'>; +export type ContactFindFirstArgs = $FindFirstArgs<$Schema, 'Contact'>; +export type ContactExistsArgs = $ExistsArgs<$Schema, 'Contact'>; +export type ContactCreateArgs = $CreateArgs<$Schema, 'Contact'>; +export type ContactCreateManyArgs = $CreateManyArgs<$Schema, 'Contact'>; +export type ContactCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Contact'>; +export type ContactUpdateArgs = $UpdateArgs<$Schema, 'Contact'>; +export type ContactUpdateManyArgs = $UpdateManyArgs<$Schema, 'Contact'>; +export type ContactUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Contact'>; +export type ContactUpsertArgs = $UpsertArgs<$Schema, 'Contact'>; +export type ContactDeleteArgs = $DeleteArgs<$Schema, 'Contact'>; +export type ContactDeleteManyArgs = $DeleteManyArgs<$Schema, 'Contact'>; +export type ContactCountArgs = $CountArgs<$Schema, 'Contact'>; +export type ContactAggregateArgs = $AggregateArgs<$Schema, 'Contact'>; +export type ContactGroupByArgs = $GroupByArgs<$Schema, 'Contact'>; +export type ContactWhereInput = $WhereInput<$Schema, 'Contact'>; +export type ContactSelect = $SelectInput<$Schema, 'Contact'>; +export type ContactInclude = $IncludeInput<$Schema, 'Contact'>; +export type ContactOmit = $OmitInput<$Schema, 'Contact'>; +export type ContactGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Contact', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Contact', Args, Options>; +export type ResponseFindManyArgs = $FindManyArgs<$Schema, 'Response'>; +export type ResponseFindUniqueArgs = $FindUniqueArgs<$Schema, 'Response'>; +export type ResponseFindFirstArgs = $FindFirstArgs<$Schema, 'Response'>; +export type ResponseExistsArgs = $ExistsArgs<$Schema, 'Response'>; +export type ResponseCreateArgs = $CreateArgs<$Schema, 'Response'>; +export type ResponseCreateManyArgs = $CreateManyArgs<$Schema, 'Response'>; +export type ResponseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Response'>; +export type ResponseUpdateArgs = $UpdateArgs<$Schema, 'Response'>; +export type ResponseUpdateManyArgs = $UpdateManyArgs<$Schema, 'Response'>; +export type ResponseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Response'>; +export type ResponseUpsertArgs = $UpsertArgs<$Schema, 'Response'>; +export type ResponseDeleteArgs = $DeleteArgs<$Schema, 'Response'>; +export type ResponseDeleteManyArgs = $DeleteManyArgs<$Schema, 'Response'>; +export type ResponseCountArgs = $CountArgs<$Schema, 'Response'>; +export type ResponseAggregateArgs = $AggregateArgs<$Schema, 'Response'>; +export type ResponseGroupByArgs = $GroupByArgs<$Schema, 'Response'>; +export type ResponseWhereInput = $WhereInput<$Schema, 'Response'>; +export type ResponseSelect = $SelectInput<$Schema, 'Response'>; +export type ResponseInclude = $IncludeInput<$Schema, 'Response'>; +export type ResponseOmit = $OmitInput<$Schema, 'Response'>; +export type ResponseGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Response', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Response', Args, Options>; +export type ResponseNoteFindManyArgs = $FindManyArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteFindUniqueArgs = $FindUniqueArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteFindFirstArgs = $FindFirstArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteExistsArgs = $ExistsArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteCreateArgs = $CreateArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteCreateManyArgs = $CreateManyArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteUpdateArgs = $UpdateArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteUpdateManyArgs = $UpdateManyArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteUpsertArgs = $UpsertArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteDeleteArgs = $DeleteArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteDeleteManyArgs = $DeleteManyArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteCountArgs = $CountArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteAggregateArgs = $AggregateArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteGroupByArgs = $GroupByArgs<$Schema, 'ResponseNote'>; +export type ResponseNoteWhereInput = $WhereInput<$Schema, 'ResponseNote'>; +export type ResponseNoteSelect = $SelectInput<$Schema, 'ResponseNote'>; +export type ResponseNoteInclude = $IncludeInput<$Schema, 'ResponseNote'>; +export type ResponseNoteOmit = $OmitInput<$Schema, 'ResponseNote'>; +export type ResponseNoteGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ResponseNote', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ResponseNote', Args, Options>; +export type TagFindManyArgs = $FindManyArgs<$Schema, 'Tag'>; +export type TagFindUniqueArgs = $FindUniqueArgs<$Schema, 'Tag'>; +export type TagFindFirstArgs = $FindFirstArgs<$Schema, 'Tag'>; +export type TagExistsArgs = $ExistsArgs<$Schema, 'Tag'>; +export type TagCreateArgs = $CreateArgs<$Schema, 'Tag'>; +export type TagCreateManyArgs = $CreateManyArgs<$Schema, 'Tag'>; +export type TagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Tag'>; +export type TagUpdateArgs = $UpdateArgs<$Schema, 'Tag'>; +export type TagUpdateManyArgs = $UpdateManyArgs<$Schema, 'Tag'>; +export type TagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Tag'>; +export type TagUpsertArgs = $UpsertArgs<$Schema, 'Tag'>; +export type TagDeleteArgs = $DeleteArgs<$Schema, 'Tag'>; +export type TagDeleteManyArgs = $DeleteManyArgs<$Schema, 'Tag'>; +export type TagCountArgs = $CountArgs<$Schema, 'Tag'>; +export type TagAggregateArgs = $AggregateArgs<$Schema, 'Tag'>; +export type TagGroupByArgs = $GroupByArgs<$Schema, 'Tag'>; +export type TagWhereInput = $WhereInput<$Schema, 'Tag'>; +export type TagSelect = $SelectInput<$Schema, 'Tag'>; +export type TagInclude = $IncludeInput<$Schema, 'Tag'>; +export type TagOmit = $OmitInput<$Schema, 'Tag'>; +export type TagGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Tag', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Tag', Args, Options>; +export type TagsOnResponsesFindManyArgs = $FindManyArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesFindUniqueArgs = $FindUniqueArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesFindFirstArgs = $FindFirstArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesExistsArgs = $ExistsArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesCreateArgs = $CreateArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesCreateManyArgs = $CreateManyArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesUpdateArgs = $UpdateArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesUpdateManyArgs = $UpdateManyArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesUpsertArgs = $UpsertArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesDeleteArgs = $DeleteArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesDeleteManyArgs = $DeleteManyArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesCountArgs = $CountArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesAggregateArgs = $AggregateArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesGroupByArgs = $GroupByArgs<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesWhereInput = $WhereInput<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesSelect = $SelectInput<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesInclude = $IncludeInput<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesOmit = $OmitInput<$Schema, 'TagsOnResponses'>; +export type TagsOnResponsesGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TagsOnResponses', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TagsOnResponses', Args, Options>; +export type DisplayFindManyArgs = $FindManyArgs<$Schema, 'Display'>; +export type DisplayFindUniqueArgs = $FindUniqueArgs<$Schema, 'Display'>; +export type DisplayFindFirstArgs = $FindFirstArgs<$Schema, 'Display'>; +export type DisplayExistsArgs = $ExistsArgs<$Schema, 'Display'>; +export type DisplayCreateArgs = $CreateArgs<$Schema, 'Display'>; +export type DisplayCreateManyArgs = $CreateManyArgs<$Schema, 'Display'>; +export type DisplayCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Display'>; +export type DisplayUpdateArgs = $UpdateArgs<$Schema, 'Display'>; +export type DisplayUpdateManyArgs = $UpdateManyArgs<$Schema, 'Display'>; +export type DisplayUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Display'>; +export type DisplayUpsertArgs = $UpsertArgs<$Schema, 'Display'>; +export type DisplayDeleteArgs = $DeleteArgs<$Schema, 'Display'>; +export type DisplayDeleteManyArgs = $DeleteManyArgs<$Schema, 'Display'>; +export type DisplayCountArgs = $CountArgs<$Schema, 'Display'>; +export type DisplayAggregateArgs = $AggregateArgs<$Schema, 'Display'>; +export type DisplayGroupByArgs = $GroupByArgs<$Schema, 'Display'>; +export type DisplayWhereInput = $WhereInput<$Schema, 'Display'>; +export type DisplaySelect = $SelectInput<$Schema, 'Display'>; +export type DisplayInclude = $IncludeInput<$Schema, 'Display'>; +export type DisplayOmit = $OmitInput<$Schema, 'Display'>; +export type DisplayGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Display', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Display', Args, Options>; +export type SurveyTriggerFindManyArgs = $FindManyArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerFindUniqueArgs = $FindUniqueArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerFindFirstArgs = $FindFirstArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerExistsArgs = $ExistsArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerCreateArgs = $CreateArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerCreateManyArgs = $CreateManyArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerUpdateArgs = $UpdateArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerUpdateManyArgs = $UpdateManyArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerUpsertArgs = $UpsertArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerDeleteArgs = $DeleteArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerDeleteManyArgs = $DeleteManyArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerCountArgs = $CountArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerAggregateArgs = $AggregateArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerGroupByArgs = $GroupByArgs<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerWhereInput = $WhereInput<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerSelect = $SelectInput<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerInclude = $IncludeInput<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerOmit = $OmitInput<$Schema, 'SurveyTrigger'>; +export type SurveyTriggerGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SurveyTrigger', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SurveyTrigger', Args, Options>; +export type SurveyAttributeFilterFindManyArgs = $FindManyArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterFindUniqueArgs = $FindUniqueArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterFindFirstArgs = $FindFirstArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterExistsArgs = $ExistsArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterCreateArgs = $CreateArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterCreateManyArgs = $CreateManyArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterUpdateArgs = $UpdateArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterUpdateManyArgs = $UpdateManyArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterUpsertArgs = $UpsertArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterDeleteArgs = $DeleteArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterDeleteManyArgs = $DeleteManyArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterCountArgs = $CountArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterAggregateArgs = $AggregateArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterGroupByArgs = $GroupByArgs<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterWhereInput = $WhereInput<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterSelect = $SelectInput<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterInclude = $IncludeInput<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterOmit = $OmitInput<$Schema, 'SurveyAttributeFilter'>; +export type SurveyAttributeFilterGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SurveyAttributeFilter', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SurveyAttributeFilter', Args, Options>; +export type SurveyFindManyArgs = $FindManyArgs<$Schema, 'Survey'>; +export type SurveyFindUniqueArgs = $FindUniqueArgs<$Schema, 'Survey'>; +export type SurveyFindFirstArgs = $FindFirstArgs<$Schema, 'Survey'>; +export type SurveyExistsArgs = $ExistsArgs<$Schema, 'Survey'>; +export type SurveyCreateArgs = $CreateArgs<$Schema, 'Survey'>; +export type SurveyCreateManyArgs = $CreateManyArgs<$Schema, 'Survey'>; +export type SurveyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Survey'>; +export type SurveyUpdateArgs = $UpdateArgs<$Schema, 'Survey'>; +export type SurveyUpdateManyArgs = $UpdateManyArgs<$Schema, 'Survey'>; +export type SurveyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Survey'>; +export type SurveyUpsertArgs = $UpsertArgs<$Schema, 'Survey'>; +export type SurveyDeleteArgs = $DeleteArgs<$Schema, 'Survey'>; +export type SurveyDeleteManyArgs = $DeleteManyArgs<$Schema, 'Survey'>; +export type SurveyCountArgs = $CountArgs<$Schema, 'Survey'>; +export type SurveyAggregateArgs = $AggregateArgs<$Schema, 'Survey'>; +export type SurveyGroupByArgs = $GroupByArgs<$Schema, 'Survey'>; +export type SurveyWhereInput = $WhereInput<$Schema, 'Survey'>; +export type SurveySelect = $SelectInput<$Schema, 'Survey'>; +export type SurveyInclude = $IncludeInput<$Schema, 'Survey'>; +export type SurveyOmit = $OmitInput<$Schema, 'Survey'>; +export type SurveyGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Survey', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Survey', Args, Options>; +export type SurveyFollowUpFindManyArgs = $FindManyArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpFindUniqueArgs = $FindUniqueArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpFindFirstArgs = $FindFirstArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpExistsArgs = $ExistsArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpCreateArgs = $CreateArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpCreateManyArgs = $CreateManyArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpUpdateArgs = $UpdateArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpUpdateManyArgs = $UpdateManyArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpUpsertArgs = $UpsertArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpDeleteArgs = $DeleteArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpDeleteManyArgs = $DeleteManyArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpCountArgs = $CountArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpAggregateArgs = $AggregateArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpGroupByArgs = $GroupByArgs<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpWhereInput = $WhereInput<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpSelect = $SelectInput<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpInclude = $IncludeInput<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpOmit = $OmitInput<$Schema, 'SurveyFollowUp'>; +export type SurveyFollowUpGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SurveyFollowUp', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SurveyFollowUp', Args, Options>; +export type ActionClassFindManyArgs = $FindManyArgs<$Schema, 'ActionClass'>; +export type ActionClassFindUniqueArgs = $FindUniqueArgs<$Schema, 'ActionClass'>; +export type ActionClassFindFirstArgs = $FindFirstArgs<$Schema, 'ActionClass'>; +export type ActionClassExistsArgs = $ExistsArgs<$Schema, 'ActionClass'>; +export type ActionClassCreateArgs = $CreateArgs<$Schema, 'ActionClass'>; +export type ActionClassCreateManyArgs = $CreateManyArgs<$Schema, 'ActionClass'>; +export type ActionClassCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ActionClass'>; +export type ActionClassUpdateArgs = $UpdateArgs<$Schema, 'ActionClass'>; +export type ActionClassUpdateManyArgs = $UpdateManyArgs<$Schema, 'ActionClass'>; +export type ActionClassUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ActionClass'>; +export type ActionClassUpsertArgs = $UpsertArgs<$Schema, 'ActionClass'>; +export type ActionClassDeleteArgs = $DeleteArgs<$Schema, 'ActionClass'>; +export type ActionClassDeleteManyArgs = $DeleteManyArgs<$Schema, 'ActionClass'>; +export type ActionClassCountArgs = $CountArgs<$Schema, 'ActionClass'>; +export type ActionClassAggregateArgs = $AggregateArgs<$Schema, 'ActionClass'>; +export type ActionClassGroupByArgs = $GroupByArgs<$Schema, 'ActionClass'>; +export type ActionClassWhereInput = $WhereInput<$Schema, 'ActionClass'>; +export type ActionClassSelect = $SelectInput<$Schema, 'ActionClass'>; +export type ActionClassInclude = $IncludeInput<$Schema, 'ActionClass'>; +export type ActionClassOmit = $OmitInput<$Schema, 'ActionClass'>; +export type ActionClassGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ActionClass', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ActionClass', Args, Options>; +export type IntegrationFindManyArgs = $FindManyArgs<$Schema, 'Integration'>; +export type IntegrationFindUniqueArgs = $FindUniqueArgs<$Schema, 'Integration'>; +export type IntegrationFindFirstArgs = $FindFirstArgs<$Schema, 'Integration'>; +export type IntegrationExistsArgs = $ExistsArgs<$Schema, 'Integration'>; +export type IntegrationCreateArgs = $CreateArgs<$Schema, 'Integration'>; +export type IntegrationCreateManyArgs = $CreateManyArgs<$Schema, 'Integration'>; +export type IntegrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Integration'>; +export type IntegrationUpdateArgs = $UpdateArgs<$Schema, 'Integration'>; +export type IntegrationUpdateManyArgs = $UpdateManyArgs<$Schema, 'Integration'>; +export type IntegrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Integration'>; +export type IntegrationUpsertArgs = $UpsertArgs<$Schema, 'Integration'>; +export type IntegrationDeleteArgs = $DeleteArgs<$Schema, 'Integration'>; +export type IntegrationDeleteManyArgs = $DeleteManyArgs<$Schema, 'Integration'>; +export type IntegrationCountArgs = $CountArgs<$Schema, 'Integration'>; +export type IntegrationAggregateArgs = $AggregateArgs<$Schema, 'Integration'>; +export type IntegrationGroupByArgs = $GroupByArgs<$Schema, 'Integration'>; +export type IntegrationWhereInput = $WhereInput<$Schema, 'Integration'>; +export type IntegrationSelect = $SelectInput<$Schema, 'Integration'>; +export type IntegrationInclude = $IncludeInput<$Schema, 'Integration'>; +export type IntegrationOmit = $OmitInput<$Schema, 'Integration'>; +export type IntegrationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Integration', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Integration', Args, Options>; +export type DataMigrationFindManyArgs = $FindManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationFindUniqueArgs = $FindUniqueArgs<$Schema, 'DataMigration'>; +export type DataMigrationFindFirstArgs = $FindFirstArgs<$Schema, 'DataMigration'>; +export type DataMigrationExistsArgs = $ExistsArgs<$Schema, 'DataMigration'>; +export type DataMigrationCreateArgs = $CreateArgs<$Schema, 'DataMigration'>; +export type DataMigrationCreateManyArgs = $CreateManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpdateArgs = $UpdateArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpdateManyArgs = $UpdateManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpsertArgs = $UpsertArgs<$Schema, 'DataMigration'>; +export type DataMigrationDeleteArgs = $DeleteArgs<$Schema, 'DataMigration'>; +export type DataMigrationDeleteManyArgs = $DeleteManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationCountArgs = $CountArgs<$Schema, 'DataMigration'>; +export type DataMigrationAggregateArgs = $AggregateArgs<$Schema, 'DataMigration'>; +export type DataMigrationGroupByArgs = $GroupByArgs<$Schema, 'DataMigration'>; +export type DataMigrationWhereInput = $WhereInput<$Schema, 'DataMigration'>; +export type DataMigrationSelect = $SelectInput<$Schema, 'DataMigration'>; +export type DataMigrationInclude = $IncludeInput<$Schema, 'DataMigration'>; +export type DataMigrationOmit = $OmitInput<$Schema, 'DataMigration'>; +export type DataMigrationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DataMigration', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DataMigration', Args, Options>; +export type EnvironmentFindManyArgs = $FindManyArgs<$Schema, 'Environment'>; +export type EnvironmentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Environment'>; +export type EnvironmentFindFirstArgs = $FindFirstArgs<$Schema, 'Environment'>; +export type EnvironmentExistsArgs = $ExistsArgs<$Schema, 'Environment'>; +export type EnvironmentCreateArgs = $CreateArgs<$Schema, 'Environment'>; +export type EnvironmentCreateManyArgs = $CreateManyArgs<$Schema, 'Environment'>; +export type EnvironmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Environment'>; +export type EnvironmentUpdateArgs = $UpdateArgs<$Schema, 'Environment'>; +export type EnvironmentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Environment'>; +export type EnvironmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Environment'>; +export type EnvironmentUpsertArgs = $UpsertArgs<$Schema, 'Environment'>; +export type EnvironmentDeleteArgs = $DeleteArgs<$Schema, 'Environment'>; +export type EnvironmentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Environment'>; +export type EnvironmentCountArgs = $CountArgs<$Schema, 'Environment'>; +export type EnvironmentAggregateArgs = $AggregateArgs<$Schema, 'Environment'>; +export type EnvironmentGroupByArgs = $GroupByArgs<$Schema, 'Environment'>; +export type EnvironmentWhereInput = $WhereInput<$Schema, 'Environment'>; +export type EnvironmentSelect = $SelectInput<$Schema, 'Environment'>; +export type EnvironmentInclude = $IncludeInput<$Schema, 'Environment'>; +export type EnvironmentOmit = $OmitInput<$Schema, 'Environment'>; +export type EnvironmentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Environment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Environment', Args, Options>; +export type ProjectFindManyArgs = $FindManyArgs<$Schema, 'Project'>; +export type ProjectFindUniqueArgs = $FindUniqueArgs<$Schema, 'Project'>; +export type ProjectFindFirstArgs = $FindFirstArgs<$Schema, 'Project'>; +export type ProjectExistsArgs = $ExistsArgs<$Schema, 'Project'>; +export type ProjectCreateArgs = $CreateArgs<$Schema, 'Project'>; +export type ProjectCreateManyArgs = $CreateManyArgs<$Schema, 'Project'>; +export type ProjectCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Project'>; +export type ProjectUpdateArgs = $UpdateArgs<$Schema, 'Project'>; +export type ProjectUpdateManyArgs = $UpdateManyArgs<$Schema, 'Project'>; +export type ProjectUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Project'>; +export type ProjectUpsertArgs = $UpsertArgs<$Schema, 'Project'>; +export type ProjectDeleteArgs = $DeleteArgs<$Schema, 'Project'>; +export type ProjectDeleteManyArgs = $DeleteManyArgs<$Schema, 'Project'>; +export type ProjectCountArgs = $CountArgs<$Schema, 'Project'>; +export type ProjectAggregateArgs = $AggregateArgs<$Schema, 'Project'>; +export type ProjectGroupByArgs = $GroupByArgs<$Schema, 'Project'>; +export type ProjectWhereInput = $WhereInput<$Schema, 'Project'>; +export type ProjectSelect = $SelectInput<$Schema, 'Project'>; +export type ProjectInclude = $IncludeInput<$Schema, 'Project'>; +export type ProjectOmit = $OmitInput<$Schema, 'Project'>; +export type ProjectGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Project', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Project', Args, Options>; +export type OrganizationFindManyArgs = $FindManyArgs<$Schema, 'Organization'>; +export type OrganizationFindUniqueArgs = $FindUniqueArgs<$Schema, 'Organization'>; +export type OrganizationFindFirstArgs = $FindFirstArgs<$Schema, 'Organization'>; +export type OrganizationExistsArgs = $ExistsArgs<$Schema, 'Organization'>; +export type OrganizationCreateArgs = $CreateArgs<$Schema, 'Organization'>; +export type OrganizationCreateManyArgs = $CreateManyArgs<$Schema, 'Organization'>; +export type OrganizationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Organization'>; +export type OrganizationUpdateArgs = $UpdateArgs<$Schema, 'Organization'>; +export type OrganizationUpdateManyArgs = $UpdateManyArgs<$Schema, 'Organization'>; +export type OrganizationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Organization'>; +export type OrganizationUpsertArgs = $UpsertArgs<$Schema, 'Organization'>; +export type OrganizationDeleteArgs = $DeleteArgs<$Schema, 'Organization'>; +export type OrganizationDeleteManyArgs = $DeleteManyArgs<$Schema, 'Organization'>; +export type OrganizationCountArgs = $CountArgs<$Schema, 'Organization'>; +export type OrganizationAggregateArgs = $AggregateArgs<$Schema, 'Organization'>; +export type OrganizationGroupByArgs = $GroupByArgs<$Schema, 'Organization'>; +export type OrganizationWhereInput = $WhereInput<$Schema, 'Organization'>; +export type OrganizationSelect = $SelectInput<$Schema, 'Organization'>; +export type OrganizationInclude = $IncludeInput<$Schema, 'Organization'>; +export type OrganizationOmit = $OmitInput<$Schema, 'Organization'>; +export type OrganizationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Organization', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Organization', Args, Options>; +export type MembershipFindManyArgs = $FindManyArgs<$Schema, 'Membership'>; +export type MembershipFindUniqueArgs = $FindUniqueArgs<$Schema, 'Membership'>; +export type MembershipFindFirstArgs = $FindFirstArgs<$Schema, 'Membership'>; +export type MembershipExistsArgs = $ExistsArgs<$Schema, 'Membership'>; +export type MembershipCreateArgs = $CreateArgs<$Schema, 'Membership'>; +export type MembershipCreateManyArgs = $CreateManyArgs<$Schema, 'Membership'>; +export type MembershipCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Membership'>; +export type MembershipUpdateArgs = $UpdateArgs<$Schema, 'Membership'>; +export type MembershipUpdateManyArgs = $UpdateManyArgs<$Schema, 'Membership'>; +export type MembershipUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Membership'>; +export type MembershipUpsertArgs = $UpsertArgs<$Schema, 'Membership'>; +export type MembershipDeleteArgs = $DeleteArgs<$Schema, 'Membership'>; +export type MembershipDeleteManyArgs = $DeleteManyArgs<$Schema, 'Membership'>; +export type MembershipCountArgs = $CountArgs<$Schema, 'Membership'>; +export type MembershipAggregateArgs = $AggregateArgs<$Schema, 'Membership'>; +export type MembershipGroupByArgs = $GroupByArgs<$Schema, 'Membership'>; +export type MembershipWhereInput = $WhereInput<$Schema, 'Membership'>; +export type MembershipSelect = $SelectInput<$Schema, 'Membership'>; +export type MembershipInclude = $IncludeInput<$Schema, 'Membership'>; +export type MembershipOmit = $OmitInput<$Schema, 'Membership'>; +export type MembershipGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Membership', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Membership', Args, Options>; +export type InviteFindManyArgs = $FindManyArgs<$Schema, 'Invite'>; +export type InviteFindUniqueArgs = $FindUniqueArgs<$Schema, 'Invite'>; +export type InviteFindFirstArgs = $FindFirstArgs<$Schema, 'Invite'>; +export type InviteExistsArgs = $ExistsArgs<$Schema, 'Invite'>; +export type InviteCreateArgs = $CreateArgs<$Schema, 'Invite'>; +export type InviteCreateManyArgs = $CreateManyArgs<$Schema, 'Invite'>; +export type InviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Invite'>; +export type InviteUpdateArgs = $UpdateArgs<$Schema, 'Invite'>; +export type InviteUpdateManyArgs = $UpdateManyArgs<$Schema, 'Invite'>; +export type InviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Invite'>; +export type InviteUpsertArgs = $UpsertArgs<$Schema, 'Invite'>; +export type InviteDeleteArgs = $DeleteArgs<$Schema, 'Invite'>; +export type InviteDeleteManyArgs = $DeleteManyArgs<$Schema, 'Invite'>; +export type InviteCountArgs = $CountArgs<$Schema, 'Invite'>; +export type InviteAggregateArgs = $AggregateArgs<$Schema, 'Invite'>; +export type InviteGroupByArgs = $GroupByArgs<$Schema, 'Invite'>; +export type InviteWhereInput = $WhereInput<$Schema, 'Invite'>; +export type InviteSelect = $SelectInput<$Schema, 'Invite'>; +export type InviteInclude = $IncludeInput<$Schema, 'Invite'>; +export type InviteOmit = $OmitInput<$Schema, 'Invite'>; +export type InviteGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Invite', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Invite', Args, Options>; +export type ApiKeyFindManyArgs = $FindManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyFindUniqueArgs = $FindUniqueArgs<$Schema, 'ApiKey'>; +export type ApiKeyFindFirstArgs = $FindFirstArgs<$Schema, 'ApiKey'>; +export type ApiKeyExistsArgs = $ExistsArgs<$Schema, 'ApiKey'>; +export type ApiKeyCreateArgs = $CreateArgs<$Schema, 'ApiKey'>; +export type ApiKeyCreateManyArgs = $CreateManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpdateArgs = $UpdateArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpdateManyArgs = $UpdateManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ApiKey'>; +export type ApiKeyUpsertArgs = $UpsertArgs<$Schema, 'ApiKey'>; +export type ApiKeyDeleteArgs = $DeleteArgs<$Schema, 'ApiKey'>; +export type ApiKeyDeleteManyArgs = $DeleteManyArgs<$Schema, 'ApiKey'>; +export type ApiKeyCountArgs = $CountArgs<$Schema, 'ApiKey'>; +export type ApiKeyAggregateArgs = $AggregateArgs<$Schema, 'ApiKey'>; +export type ApiKeyGroupByArgs = $GroupByArgs<$Schema, 'ApiKey'>; +export type ApiKeyWhereInput = $WhereInput<$Schema, 'ApiKey'>; +export type ApiKeySelect = $SelectInput<$Schema, 'ApiKey'>; +export type ApiKeyInclude = $IncludeInput<$Schema, 'ApiKey'>; +export type ApiKeyOmit = $OmitInput<$Schema, 'ApiKey'>; +export type ApiKeyGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ApiKey', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ApiKey', Args, Options>; +export type ApiKeyEnvironmentFindManyArgs = $FindManyArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentFindUniqueArgs = $FindUniqueArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentFindFirstArgs = $FindFirstArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentExistsArgs = $ExistsArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentCreateArgs = $CreateArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentCreateManyArgs = $CreateManyArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentUpdateArgs = $UpdateArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentUpdateManyArgs = $UpdateManyArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentUpsertArgs = $UpsertArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentDeleteArgs = $DeleteArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentDeleteManyArgs = $DeleteManyArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentCountArgs = $CountArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentAggregateArgs = $AggregateArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentGroupByArgs = $GroupByArgs<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentWhereInput = $WhereInput<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentSelect = $SelectInput<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentInclude = $IncludeInput<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentOmit = $OmitInput<$Schema, 'ApiKeyEnvironment'>; +export type ApiKeyEnvironmentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ApiKeyEnvironment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ApiKeyEnvironment', Args, Options>; +export type AccountFindManyArgs = $FindManyArgs<$Schema, 'Account'>; +export type AccountFindUniqueArgs = $FindUniqueArgs<$Schema, 'Account'>; +export type AccountFindFirstArgs = $FindFirstArgs<$Schema, 'Account'>; +export type AccountExistsArgs = $ExistsArgs<$Schema, 'Account'>; +export type AccountCreateArgs = $CreateArgs<$Schema, 'Account'>; +export type AccountCreateManyArgs = $CreateManyArgs<$Schema, 'Account'>; +export type AccountCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Account'>; +export type AccountUpdateArgs = $UpdateArgs<$Schema, 'Account'>; +export type AccountUpdateManyArgs = $UpdateManyArgs<$Schema, 'Account'>; +export type AccountUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Account'>; +export type AccountUpsertArgs = $UpsertArgs<$Schema, 'Account'>; +export type AccountDeleteArgs = $DeleteArgs<$Schema, 'Account'>; +export type AccountDeleteManyArgs = $DeleteManyArgs<$Schema, 'Account'>; +export type AccountCountArgs = $CountArgs<$Schema, 'Account'>; +export type AccountAggregateArgs = $AggregateArgs<$Schema, 'Account'>; +export type AccountGroupByArgs = $GroupByArgs<$Schema, 'Account'>; +export type AccountWhereInput = $WhereInput<$Schema, 'Account'>; +export type AccountSelect = $SelectInput<$Schema, 'Account'>; +export type AccountInclude = $IncludeInput<$Schema, 'Account'>; +export type AccountOmit = $OmitInput<$Schema, 'Account'>; +export type AccountGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Account', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Account', Args, Options>; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type ShortUrlFindManyArgs = $FindManyArgs<$Schema, 'ShortUrl'>; +export type ShortUrlFindUniqueArgs = $FindUniqueArgs<$Schema, 'ShortUrl'>; +export type ShortUrlFindFirstArgs = $FindFirstArgs<$Schema, 'ShortUrl'>; +export type ShortUrlExistsArgs = $ExistsArgs<$Schema, 'ShortUrl'>; +export type ShortUrlCreateArgs = $CreateArgs<$Schema, 'ShortUrl'>; +export type ShortUrlCreateManyArgs = $CreateManyArgs<$Schema, 'ShortUrl'>; +export type ShortUrlCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ShortUrl'>; +export type ShortUrlUpdateArgs = $UpdateArgs<$Schema, 'ShortUrl'>; +export type ShortUrlUpdateManyArgs = $UpdateManyArgs<$Schema, 'ShortUrl'>; +export type ShortUrlUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ShortUrl'>; +export type ShortUrlUpsertArgs = $UpsertArgs<$Schema, 'ShortUrl'>; +export type ShortUrlDeleteArgs = $DeleteArgs<$Schema, 'ShortUrl'>; +export type ShortUrlDeleteManyArgs = $DeleteManyArgs<$Schema, 'ShortUrl'>; +export type ShortUrlCountArgs = $CountArgs<$Schema, 'ShortUrl'>; +export type ShortUrlAggregateArgs = $AggregateArgs<$Schema, 'ShortUrl'>; +export type ShortUrlGroupByArgs = $GroupByArgs<$Schema, 'ShortUrl'>; +export type ShortUrlWhereInput = $WhereInput<$Schema, 'ShortUrl'>; +export type ShortUrlSelect = $SelectInput<$Schema, 'ShortUrl'>; +export type ShortUrlInclude = $IncludeInput<$Schema, 'ShortUrl'>; +export type ShortUrlOmit = $OmitInput<$Schema, 'ShortUrl'>; +export type ShortUrlGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ShortUrl', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ShortUrl', Args, Options>; +export type SegmentFindManyArgs = $FindManyArgs<$Schema, 'Segment'>; +export type SegmentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Segment'>; +export type SegmentFindFirstArgs = $FindFirstArgs<$Schema, 'Segment'>; +export type SegmentExistsArgs = $ExistsArgs<$Schema, 'Segment'>; +export type SegmentCreateArgs = $CreateArgs<$Schema, 'Segment'>; +export type SegmentCreateManyArgs = $CreateManyArgs<$Schema, 'Segment'>; +export type SegmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Segment'>; +export type SegmentUpdateArgs = $UpdateArgs<$Schema, 'Segment'>; +export type SegmentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Segment'>; +export type SegmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Segment'>; +export type SegmentUpsertArgs = $UpsertArgs<$Schema, 'Segment'>; +export type SegmentDeleteArgs = $DeleteArgs<$Schema, 'Segment'>; +export type SegmentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Segment'>; +export type SegmentCountArgs = $CountArgs<$Schema, 'Segment'>; +export type SegmentAggregateArgs = $AggregateArgs<$Schema, 'Segment'>; +export type SegmentGroupByArgs = $GroupByArgs<$Schema, 'Segment'>; +export type SegmentWhereInput = $WhereInput<$Schema, 'Segment'>; +export type SegmentSelect = $SelectInput<$Schema, 'Segment'>; +export type SegmentInclude = $IncludeInput<$Schema, 'Segment'>; +export type SegmentOmit = $OmitInput<$Schema, 'Segment'>; +export type SegmentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Segment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Segment', Args, Options>; +export type LanguageFindManyArgs = $FindManyArgs<$Schema, 'Language'>; +export type LanguageFindUniqueArgs = $FindUniqueArgs<$Schema, 'Language'>; +export type LanguageFindFirstArgs = $FindFirstArgs<$Schema, 'Language'>; +export type LanguageExistsArgs = $ExistsArgs<$Schema, 'Language'>; +export type LanguageCreateArgs = $CreateArgs<$Schema, 'Language'>; +export type LanguageCreateManyArgs = $CreateManyArgs<$Schema, 'Language'>; +export type LanguageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Language'>; +export type LanguageUpdateArgs = $UpdateArgs<$Schema, 'Language'>; +export type LanguageUpdateManyArgs = $UpdateManyArgs<$Schema, 'Language'>; +export type LanguageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Language'>; +export type LanguageUpsertArgs = $UpsertArgs<$Schema, 'Language'>; +export type LanguageDeleteArgs = $DeleteArgs<$Schema, 'Language'>; +export type LanguageDeleteManyArgs = $DeleteManyArgs<$Schema, 'Language'>; +export type LanguageCountArgs = $CountArgs<$Schema, 'Language'>; +export type LanguageAggregateArgs = $AggregateArgs<$Schema, 'Language'>; +export type LanguageGroupByArgs = $GroupByArgs<$Schema, 'Language'>; +export type LanguageWhereInput = $WhereInput<$Schema, 'Language'>; +export type LanguageSelect = $SelectInput<$Schema, 'Language'>; +export type LanguageInclude = $IncludeInput<$Schema, 'Language'>; +export type LanguageOmit = $OmitInput<$Schema, 'Language'>; +export type LanguageGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Language', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Language', Args, Options>; +export type SurveyLanguageFindManyArgs = $FindManyArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageFindUniqueArgs = $FindUniqueArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageFindFirstArgs = $FindFirstArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageExistsArgs = $ExistsArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageCreateArgs = $CreateArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageCreateManyArgs = $CreateManyArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageUpdateArgs = $UpdateArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageUpdateManyArgs = $UpdateManyArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageUpsertArgs = $UpsertArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageDeleteArgs = $DeleteArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageDeleteManyArgs = $DeleteManyArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageCountArgs = $CountArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageAggregateArgs = $AggregateArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageGroupByArgs = $GroupByArgs<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageWhereInput = $WhereInput<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageSelect = $SelectInput<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageInclude = $IncludeInput<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageOmit = $OmitInput<$Schema, 'SurveyLanguage'>; +export type SurveyLanguageGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SurveyLanguage', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SurveyLanguage', Args, Options>; +export type InsightFindManyArgs = $FindManyArgs<$Schema, 'Insight'>; +export type InsightFindUniqueArgs = $FindUniqueArgs<$Schema, 'Insight'>; +export type InsightFindFirstArgs = $FindFirstArgs<$Schema, 'Insight'>; +export type InsightExistsArgs = $ExistsArgs<$Schema, 'Insight'>; +export type InsightCreateArgs = $CreateArgs<$Schema, 'Insight'>; +export type InsightCreateManyArgs = $CreateManyArgs<$Schema, 'Insight'>; +export type InsightCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Insight'>; +export type InsightUpdateArgs = $UpdateArgs<$Schema, 'Insight'>; +export type InsightUpdateManyArgs = $UpdateManyArgs<$Schema, 'Insight'>; +export type InsightUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Insight'>; +export type InsightUpsertArgs = $UpsertArgs<$Schema, 'Insight'>; +export type InsightDeleteArgs = $DeleteArgs<$Schema, 'Insight'>; +export type InsightDeleteManyArgs = $DeleteManyArgs<$Schema, 'Insight'>; +export type InsightCountArgs = $CountArgs<$Schema, 'Insight'>; +export type InsightAggregateArgs = $AggregateArgs<$Schema, 'Insight'>; +export type InsightGroupByArgs = $GroupByArgs<$Schema, 'Insight'>; +export type InsightWhereInput = $WhereInput<$Schema, 'Insight'>; +export type InsightSelect = $SelectInput<$Schema, 'Insight'>; +export type InsightInclude = $IncludeInput<$Schema, 'Insight'>; +export type InsightOmit = $OmitInput<$Schema, 'Insight'>; +export type InsightGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Insight', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Insight', Args, Options>; +export type DocumentInsightFindManyArgs = $FindManyArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightFindUniqueArgs = $FindUniqueArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightFindFirstArgs = $FindFirstArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightExistsArgs = $ExistsArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightCreateArgs = $CreateArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightCreateManyArgs = $CreateManyArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightUpdateArgs = $UpdateArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightUpdateManyArgs = $UpdateManyArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightUpsertArgs = $UpsertArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightDeleteArgs = $DeleteArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightDeleteManyArgs = $DeleteManyArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightCountArgs = $CountArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightAggregateArgs = $AggregateArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightGroupByArgs = $GroupByArgs<$Schema, 'DocumentInsight'>; +export type DocumentInsightWhereInput = $WhereInput<$Schema, 'DocumentInsight'>; +export type DocumentInsightSelect = $SelectInput<$Schema, 'DocumentInsight'>; +export type DocumentInsightInclude = $IncludeInput<$Schema, 'DocumentInsight'>; +export type DocumentInsightOmit = $OmitInput<$Schema, 'DocumentInsight'>; +export type DocumentInsightGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DocumentInsight', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DocumentInsight', Args, Options>; +export type DocumentFindManyArgs = $FindManyArgs<$Schema, 'Document'>; +export type DocumentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Document'>; +export type DocumentFindFirstArgs = $FindFirstArgs<$Schema, 'Document'>; +export type DocumentExistsArgs = $ExistsArgs<$Schema, 'Document'>; +export type DocumentCreateArgs = $CreateArgs<$Schema, 'Document'>; +export type DocumentCreateManyArgs = $CreateManyArgs<$Schema, 'Document'>; +export type DocumentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Document'>; +export type DocumentUpdateArgs = $UpdateArgs<$Schema, 'Document'>; +export type DocumentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Document'>; +export type DocumentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Document'>; +export type DocumentUpsertArgs = $UpsertArgs<$Schema, 'Document'>; +export type DocumentDeleteArgs = $DeleteArgs<$Schema, 'Document'>; +export type DocumentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Document'>; +export type DocumentCountArgs = $CountArgs<$Schema, 'Document'>; +export type DocumentAggregateArgs = $AggregateArgs<$Schema, 'Document'>; +export type DocumentGroupByArgs = $GroupByArgs<$Schema, 'Document'>; +export type DocumentWhereInput = $WhereInput<$Schema, 'Document'>; +export type DocumentSelect = $SelectInput<$Schema, 'Document'>; +export type DocumentInclude = $IncludeInput<$Schema, 'Document'>; +export type DocumentOmit = $OmitInput<$Schema, 'Document'>; +export type DocumentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Document', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Document', Args, Options>; +export type TeamFindManyArgs = $FindManyArgs<$Schema, 'Team'>; +export type TeamFindUniqueArgs = $FindUniqueArgs<$Schema, 'Team'>; +export type TeamFindFirstArgs = $FindFirstArgs<$Schema, 'Team'>; +export type TeamExistsArgs = $ExistsArgs<$Schema, 'Team'>; +export type TeamCreateArgs = $CreateArgs<$Schema, 'Team'>; +export type TeamCreateManyArgs = $CreateManyArgs<$Schema, 'Team'>; +export type TeamCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Team'>; +export type TeamUpdateArgs = $UpdateArgs<$Schema, 'Team'>; +export type TeamUpdateManyArgs = $UpdateManyArgs<$Schema, 'Team'>; +export type TeamUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Team'>; +export type TeamUpsertArgs = $UpsertArgs<$Schema, 'Team'>; +export type TeamDeleteArgs = $DeleteArgs<$Schema, 'Team'>; +export type TeamDeleteManyArgs = $DeleteManyArgs<$Schema, 'Team'>; +export type TeamCountArgs = $CountArgs<$Schema, 'Team'>; +export type TeamAggregateArgs = $AggregateArgs<$Schema, 'Team'>; +export type TeamGroupByArgs = $GroupByArgs<$Schema, 'Team'>; +export type TeamWhereInput = $WhereInput<$Schema, 'Team'>; +export type TeamSelect = $SelectInput<$Schema, 'Team'>; +export type TeamInclude = $IncludeInput<$Schema, 'Team'>; +export type TeamOmit = $OmitInput<$Schema, 'Team'>; +export type TeamGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Team', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Team', Args, Options>; +export type TeamUserFindManyArgs = $FindManyArgs<$Schema, 'TeamUser'>; +export type TeamUserFindUniqueArgs = $FindUniqueArgs<$Schema, 'TeamUser'>; +export type TeamUserFindFirstArgs = $FindFirstArgs<$Schema, 'TeamUser'>; +export type TeamUserExistsArgs = $ExistsArgs<$Schema, 'TeamUser'>; +export type TeamUserCreateArgs = $CreateArgs<$Schema, 'TeamUser'>; +export type TeamUserCreateManyArgs = $CreateManyArgs<$Schema, 'TeamUser'>; +export type TeamUserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TeamUser'>; +export type TeamUserUpdateArgs = $UpdateArgs<$Schema, 'TeamUser'>; +export type TeamUserUpdateManyArgs = $UpdateManyArgs<$Schema, 'TeamUser'>; +export type TeamUserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TeamUser'>; +export type TeamUserUpsertArgs = $UpsertArgs<$Schema, 'TeamUser'>; +export type TeamUserDeleteArgs = $DeleteArgs<$Schema, 'TeamUser'>; +export type TeamUserDeleteManyArgs = $DeleteManyArgs<$Schema, 'TeamUser'>; +export type TeamUserCountArgs = $CountArgs<$Schema, 'TeamUser'>; +export type TeamUserAggregateArgs = $AggregateArgs<$Schema, 'TeamUser'>; +export type TeamUserGroupByArgs = $GroupByArgs<$Schema, 'TeamUser'>; +export type TeamUserWhereInput = $WhereInput<$Schema, 'TeamUser'>; +export type TeamUserSelect = $SelectInput<$Schema, 'TeamUser'>; +export type TeamUserInclude = $IncludeInput<$Schema, 'TeamUser'>; +export type TeamUserOmit = $OmitInput<$Schema, 'TeamUser'>; +export type TeamUserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TeamUser', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TeamUser', Args, Options>; +export type ProjectTeamFindManyArgs = $FindManyArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamFindUniqueArgs = $FindUniqueArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamFindFirstArgs = $FindFirstArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamExistsArgs = $ExistsArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamCreateArgs = $CreateArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamCreateManyArgs = $CreateManyArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamUpdateArgs = $UpdateArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamUpdateManyArgs = $UpdateManyArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamUpsertArgs = $UpsertArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamDeleteArgs = $DeleteArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamDeleteManyArgs = $DeleteManyArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamCountArgs = $CountArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamAggregateArgs = $AggregateArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamGroupByArgs = $GroupByArgs<$Schema, 'ProjectTeam'>; +export type ProjectTeamWhereInput = $WhereInput<$Schema, 'ProjectTeam'>; +export type ProjectTeamSelect = $SelectInput<$Schema, 'ProjectTeam'>; +export type ProjectTeamInclude = $IncludeInput<$Schema, 'ProjectTeam'>; +export type ProjectTeamOmit = $OmitInput<$Schema, 'ProjectTeam'>; +export type ProjectTeamGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ProjectTeam', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ProjectTeam', Args, Options>; diff --git a/tests/e2e/github-repos/formbricks/models.ts b/tests/e2e/github-repos/formbricks/models.ts index 740a0e041..6291a1a80 100644 --- a/tests/e2e/github-repos/formbricks/models.ts +++ b/tests/e2e/github-repos/formbricks/models.ts @@ -5,8 +5,8 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; /** * Represents a webhook endpoint for receiving survey-related events. * Webhooks can be configured to receive notifications about response creation, updates, and completion. @@ -19,7 +19,7 @@ import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; * @property triggers - Types of events that trigger this webhook * @property surveyIds - List of surveys this webhook is monitoring */ -export type Webhook = $ModelResult<$Schema, "Webhook">; +export type Webhook = $ModelResult<$Schema, 'Webhook'>; /** * Represents an attribute value associated with a contact. * Used to store custom properties and characteristics of contacts. @@ -29,7 +29,7 @@ export type Webhook = $ModelResult<$Schema, "Webhook">; * @property contact - The contact this attribute belongs to * @property value - The actual value of the attribute */ -export type ContactAttribute = $ModelResult<$Schema, "ContactAttribute">; +export type ContactAttribute = $ModelResult<$Schema, 'ContactAttribute'>; /** * Defines the possible attributes that can be assigned to contacts. * Acts as a schema for contact attributes within an environment. @@ -41,7 +41,7 @@ export type ContactAttribute = $ModelResult<$Schema, "ContactAttribute">; * @property type - Whether this is a default or custom attribute * @property environment - The environment this attribute belongs to */ -export type ContactAttributeKey = $ModelResult<$Schema, "ContactAttributeKey">; +export type ContactAttributeKey = $ModelResult<$Schema, 'ContactAttributeKey'>; /** * Represents a person or user who can receive and respond to surveys. * Contacts are environment-specific and can have multiple attributes and responses. @@ -53,7 +53,7 @@ export type ContactAttributeKey = $ModelResult<$Schema, "ContactAttributeKey">; * @property attributes - Custom attributes associated with this contact * @property displays - Record of surveys shown to this contact */ -export type Contact = $ModelResult<$Schema, "Contact">; +export type Contact = $ModelResult<$Schema, 'Contact'>; /** * Stores a user's response to a survey, including their answers and metadata. * Each response is linked to a specific survey and optionally to a contact. @@ -67,7 +67,7 @@ export type Contact = $ModelResult<$Schema, "Contact">; * @property ttc - Time to completion metrics * @property meta - Additional metadata about the response */ -export type Response = $ModelResult<$Schema, "Response">; +export type Response = $ModelResult<$Schema, 'Response'>; /** * Represents notes or comments added to survey responses by team members. * Used for internal communication and response analysis. @@ -79,7 +79,7 @@ export type Response = $ModelResult<$Schema, "Response">; * @property isResolved - Whether the note has been marked as resolved * @property isEdited - Whether the note has been modified */ -export type ResponseNote = $ModelResult<$Schema, "ResponseNote">; +export type ResponseNote = $ModelResult<$Schema, 'ResponseNote'>; /** * Represents a label that can be applied to survey responses. * Used for categorizing and organizing responses within an environment. @@ -89,7 +89,7 @@ export type ResponseNote = $ModelResult<$Schema, "ResponseNote">; * @property responses - Survey responses tagged with this label * @property environment - The environment this tag belongs to */ -export type Tag = $ModelResult<$Schema, "Tag">; +export type Tag = $ModelResult<$Schema, 'Tag'>; /** * Junction table linking tags to responses. * Enables many-to-many relationship between tags and responses. @@ -97,7 +97,7 @@ export type Tag = $ModelResult<$Schema, "Tag">; * @property response - The tagged response * @property tag - The tag applied to the response */ -export type TagsOnResponses = $ModelResult<$Schema, "TagsOnResponses">; +export type TagsOnResponses = $ModelResult<$Schema, 'TagsOnResponses'>; /** * Records when a survey is shown to a user. * Tracks survey display history and response status. @@ -108,7 +108,7 @@ export type TagsOnResponses = $ModelResult<$Schema, "TagsOnResponses">; * @property status - Whether the survey was just seen or responded to * @property response - The associated response if one exists */ -export type Display = $ModelResult<$Schema, "Display">; +export type Display = $ModelResult<$Schema, 'Display'>; /** * Links surveys to specific trigger actions. * Defines which user actions should cause a survey to be displayed. @@ -121,7 +121,7 @@ export type Display = $ModelResult<$Schema, "Display">; * @property createdAt - When the trigger was created * @property updatedAt - When the trigger was last modified */ -export type SurveyTrigger = $ModelResult<$Schema, "SurveyTrigger">; +export type SurveyTrigger = $ModelResult<$Schema, 'SurveyTrigger'>; /** * Defines targeting rules for surveys based on contact attributes. * Used to show surveys only to contacts matching specific criteria. @@ -132,7 +132,7 @@ export type SurveyTrigger = $ModelResult<$Schema, "SurveyTrigger">; * @property condition - The comparison operator to use * @property value - The value to compare against */ -export type SurveyAttributeFilter = $ModelResult<$Schema, "SurveyAttributeFilter">; +export type SurveyAttributeFilter = $ModelResult<$Schema, 'SurveyAttributeFilter'>; /** * Represents a complete survey configuration including questions, styling, and display rules. * Core model for the survey functionality in Formbricks. @@ -147,7 +147,7 @@ export type SurveyAttributeFilter = $ModelResult<$Schema, "SurveyAttributeFilter * @property triggers - Actions that can trigger this survey * @property attributeFilters - Rules for targeting specific contacts */ -export type Survey = $ModelResult<$Schema, "Survey">; +export type Survey = $ModelResult<$Schema, 'Survey'>; /** * Defines follow-up actions for survey responses. * Enables automated actions based on specific survey response conditions. @@ -158,7 +158,7 @@ export type Survey = $ModelResult<$Schema, "Survey">; * @property trigger - Conditions that activate the follow-up * @property action - Actions to take when triggered */ -export type SurveyFollowUp = $ModelResult<$Schema, "SurveyFollowUp">; +export type SurveyFollowUp = $ModelResult<$Schema, 'SurveyFollowUp'>; /** * Represents a user action that can trigger surveys. * Used to define points in the user journey where surveys can be shown. @@ -170,7 +170,7 @@ export type SurveyFollowUp = $ModelResult<$Schema, "SurveyFollowUp">; * @property noCodeConfig - Configuration for no-code setup * @property environment - The environment this action belongs to */ -export type ActionClass = $ModelResult<$Schema, "ActionClass">; +export type ActionClass = $ModelResult<$Schema, 'ActionClass'>; /** * Represents third-party service integrations. * Enables data flow between Formbricks and external services. @@ -180,7 +180,7 @@ export type ActionClass = $ModelResult<$Schema, "ActionClass">; * @property environment - The environment this integration belongs to * @property config - Service-specific configuration details */ -export type Integration = $ModelResult<$Schema, "Integration">; +export type Integration = $ModelResult<$Schema, 'Integration'>; /** * Tracks database schema migrations. * Used to manage and track the state of data structure changes. @@ -191,7 +191,7 @@ export type Integration = $ModelResult<$Schema, "Integration">; * @property startedAt - When the migration began * @property finishedAt - When the migration completed */ -export type DataMigration = $ModelResult<$Schema, "DataMigration">; +export type DataMigration = $ModelResult<$Schema, 'DataMigration'>; /** * Represents either a production or development environment within a project. * Each project has exactly two environments, serving as the main reference point @@ -206,7 +206,7 @@ export type DataMigration = $ModelResult<$Schema, "DataMigration">; * @property actionClasses - Defined actions that can trigger surveys * @property attributeKeys - Custom attributes configuration */ -export type Environment = $ModelResult<$Schema, "Environment">; +export type Environment = $ModelResult<$Schema, 'Environment'>; /** * Main grouping mechanism for resources in Formbricks. * Each organization can have multiple projects to separate different applications or products. @@ -220,7 +220,7 @@ export type Environment = $ModelResult<$Schema, "Environment">; * @property recontactDays - Default recontact delay for surveys * @property placement - Default widget placement for in-app surveys */ -export type Project = $ModelResult<$Schema, "Project">; +export type Project = $ModelResult<$Schema, 'Project'>; /** * Represents the top-level organizational hierarchy in Formbricks. * Self-hosting instances typically have a single organization, while Formbricks Cloud @@ -234,7 +234,7 @@ export type Project = $ModelResult<$Schema, "Project">; * @property whitelabel - Whitelabel configuration for the organization * @property isAIEnabled - Controls access to AI-powered features */ -export type Organization = $ModelResult<$Schema, "Organization">; +export type Organization = $ModelResult<$Schema, 'Organization'>; /** * Links users to organizations with specific roles. * Manages organization membership and permissions. @@ -245,7 +245,7 @@ export type Organization = $ModelResult<$Schema, "Organization">; * @property accepted - Whether the user has accepted the membership * @property role - User's role within the organization (owner, manager, member, billing) */ -export type Membership = $ModelResult<$Schema, "Membership">; +export type Membership = $ModelResult<$Schema, 'Membership'>; /** * Represents pending invitations to join an organization. * Used to manage the process of adding new users to an organization. @@ -261,7 +261,7 @@ export type Membership = $ModelResult<$Schema, "Membership">; * @property role - Intended role for the invited user * @property teamIds - Teams the user will be added to upon acceptance */ -export type Invite = $ModelResult<$Schema, "Invite">; +export type Invite = $ModelResult<$Schema, 'Invite'>; /** * Represents enhanced API authentication keys with organization-level ownership. * Used for authenticating API requests to Formbricks with more granular permissions. @@ -274,7 +274,7 @@ export type Invite = $ModelResult<$Schema, "Invite">; * @property lastUsedAt - Timestamp of last usage * @property apiKeyEnvironments - Environments this key has access to */ -export type ApiKey = $ModelResult<$Schema, "ApiKey">; +export type ApiKey = $ModelResult<$Schema, 'ApiKey'>; /** * Links API keys to environments with specific permissions. * Enables granular access control for API keys across environments. @@ -284,7 +284,7 @@ export type ApiKey = $ModelResult<$Schema, "ApiKey">; * @property environment - The environment being accessed * @property permission - Level of access granted */ -export type ApiKeyEnvironment = $ModelResult<$Schema, "ApiKeyEnvironment">; +export type ApiKeyEnvironment = $ModelResult<$Schema, 'ApiKeyEnvironment'>; /** * Stores third-party authentication account information. * Enables OAuth and other external authentication methods. @@ -296,7 +296,7 @@ export type ApiKeyEnvironment = $ModelResult<$Schema, "ApiKeyEnvironment">; * @property access_token - OAuth access token * @property refresh_token - OAuth refresh token */ -export type Account = $ModelResult<$Schema, "Account">; +export type Account = $ModelResult<$Schema, 'Account'>; /** * Represents a user in the Formbricks system. * Central model for user authentication and profile management. @@ -310,7 +310,7 @@ export type Account = $ModelResult<$Schema, "Account">; * @property memberships - Organizations the user belongs to * @property notificationSettings - User's notification preferences */ -export type User = $ModelResult<$Schema, "User">; +export type User = $ModelResult<$Schema, 'User'>; /** * Maps a short URL to its full destination. * Used for creating memorable, shortened URLs for surveys. @@ -318,7 +318,7 @@ export type User = $ModelResult<$Schema, "User">; * @property id - Short identifier/slug for the URL * @property url - The full destination URL */ -export type ShortUrl = $ModelResult<$Schema, "ShortUrl">; +export type ShortUrl = $ModelResult<$Schema, 'ShortUrl'>; /** * Defines a segment of contacts based on attributes. * Used for targeting surveys to specific user groups. @@ -329,7 +329,7 @@ export type ShortUrl = $ModelResult<$Schema, "ShortUrl">; * @property isPrivate - Whether the segment is private * @property environment - The environment this segment belongs to */ -export type Segment = $ModelResult<$Schema, "Segment">; +export type Segment = $ModelResult<$Schema, 'Segment'>; /** * Represents a supported language in the system. * Used for multilingual survey support. @@ -339,7 +339,7 @@ export type Segment = $ModelResult<$Schema, "Segment">; * @property alias - Optional friendly name * @property project - The project this language is enabled for */ -export type Language = $ModelResult<$Schema, "Language">; +export type Language = $ModelResult<$Schema, 'Language'>; /** * Links surveys to their supported languages. * Manages which languages are available for each survey. @@ -349,7 +349,7 @@ export type Language = $ModelResult<$Schema, "Language">; * @property default - Whether this is the default language * @property enabled - Whether this language is currently active */ -export type SurveyLanguage = $ModelResult<$Schema, "SurveyLanguage">; +export type SurveyLanguage = $ModelResult<$Schema, 'SurveyLanguage'>; /** * Stores analyzed insights from survey responses. * Used for tracking patterns and extracting meaningful information. @@ -360,7 +360,7 @@ export type SurveyLanguage = $ModelResult<$Schema, "SurveyLanguage">; * @property description - Detailed explanation * @property vector - Embedding vector for similarity search */ -export type Insight = $ModelResult<$Schema, "Insight">; +export type Insight = $ModelResult<$Schema, 'Insight'>; /** * Links insights to source documents. * Enables tracing insights back to original responses. @@ -368,7 +368,7 @@ export type Insight = $ModelResult<$Schema, "Insight">; * @property document - The source document * @property insight - The derived insight */ -export type DocumentInsight = $ModelResult<$Schema, "DocumentInsight">; +export type DocumentInsight = $ModelResult<$Schema, 'DocumentInsight'>; /** * Represents a processed text document from survey responses. * Used for analysis and insight generation. @@ -380,7 +380,7 @@ export type DocumentInsight = $ModelResult<$Schema, "DocumentInsight">; * @property text - The document content * @property vector - Embedding vector for similarity search */ -export type Document = $ModelResult<$Schema, "Document">; +export type Document = $ModelResult<$Schema, 'Document'>; /** * Represents a team within an organization. * Enables group-based access control and collaboration. @@ -391,7 +391,7 @@ export type Document = $ModelResult<$Schema, "Document">; * @property teamUsers - Users who are part of this team * @property projectTeams - Projects this team has access to */ -export type Team = $ModelResult<$Schema, "Team">; +export type Team = $ModelResult<$Schema, 'Team'>; /** * Links users to teams with specific roles. * Manages team membership and permissions. @@ -400,7 +400,7 @@ export type Team = $ModelResult<$Schema, "Team">; * @property user - The team member * @property role - User's role within the team */ -export type TeamUser = $ModelResult<$Schema, "TeamUser">; +export type TeamUser = $ModelResult<$Schema, 'TeamUser'>; /** * Defines team access to specific projects. * Manages project-level permissions for teams. @@ -409,7 +409,7 @@ export type TeamUser = $ModelResult<$Schema, "TeamUser">; * @property team - The team receiving access * @property permission - Level of access granted */ -export type ProjectTeam = $ModelResult<$Schema, "ProjectTeam">; +export type ProjectTeam = $ModelResult<$Schema, 'ProjectTeam'>; export const PipelineTriggers = $schema.enums.PipelineTriggers.values; export type PipelineTriggers = (typeof PipelineTriggers)[keyof typeof PipelineTriggers]; export const WebhookSource = $schema.enums.WebhookSource.values; @@ -421,7 +421,8 @@ export type SurveyStatus = (typeof SurveyStatus)[keyof typeof SurveyStatus]; export const DisplayStatus = $schema.enums.DisplayStatus.values; export type DisplayStatus = (typeof DisplayStatus)[keyof typeof DisplayStatus]; export const SurveyAttributeFilterCondition = $schema.enums.SurveyAttributeFilterCondition.values; -export type SurveyAttributeFilterCondition = (typeof SurveyAttributeFilterCondition)[keyof typeof SurveyAttributeFilterCondition]; +export type SurveyAttributeFilterCondition = + (typeof SurveyAttributeFilterCondition)[keyof typeof SurveyAttributeFilterCondition]; export const SurveyType = $schema.enums.SurveyType.values; export type SurveyType = (typeof SurveyType)[keyof typeof SurveyType]; export const displayOptions = $schema.enums.displayOptions.values; diff --git a/tests/e2e/github-repos/formbricks/schema.ts b/tests/e2e/github-repos/formbricks/schema.ts index 265fad364..a08a3d401 100644 --- a/tests/e2e/github-repos/formbricks/schema.ts +++ b/tests/e2e/github-repos/formbricks/schema.ts @@ -5,3045 +5,4781 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { Webhook: { - name: "Webhook", + name: 'Webhook', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, url: { - name: "url", - type: "String" + name: 'url', + type: 'String', }, source: { - name: "source", - type: "WebhookSource", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("user") }] }] as readonly AttributeApplication[], - default: "user" as FieldDefault + name: 'source', + type: 'WebhookSource', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('user') }] }, + ] as readonly AttributeApplication[], + default: 'user' as FieldDefault, }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "webhooks", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'webhooks', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, triggers: { - name: "triggers", - type: "PipelineTriggers", - array: true + name: 'triggers', + type: 'PipelineTriggers', + array: true, }, surveyIds: { - name: "surveyIds", - type: "String", - array: true - } + name: 'surveyIds', + type: 'String', + array: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ContactAttribute: { - name: "ContactAttribute", + name: 'ContactAttribute', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, attributeKey: { - name: "attributeKey", - type: "ContactAttributeKey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attributes", fields: ["attributeKeyId"], references: ["id"], onDelete: "Cascade" } + name: 'attributeKey', + type: 'ContactAttributeKey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeKeyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attributes', + fields: ['attributeKeyId'], + references: ['id'], + onDelete: 'Cascade', + }, }, attributeKeyId: { - name: "attributeKeyId", - type: "String", - foreignKeyFor: [ - "attributeKey" - ] as readonly string[] + name: 'attributeKeyId', + type: 'String', + foreignKeyFor: ['attributeKey'] as readonly string[], }, contact: { - name: "contact", - type: "Contact", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attributes", fields: ["contactId"], references: ["id"], onDelete: "Cascade" } + name: 'contact', + type: 'Contact', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('contactId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attributes', + fields: ['contactId'], + references: ['id'], + onDelete: 'Cascade', + }, }, contactId: { - name: "contactId", - type: "String", - foreignKeyFor: [ - "contact" - ] as readonly string[] + name: 'contactId', + type: 'String', + foreignKeyFor: ['contact'] as readonly string[], }, value: { - name: "value", - type: "String" - } + name: 'value', + type: 'String', + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId"), ExpressionUtils.field("attributeKeyId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId"), ExpressionUtils.field("value")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('contactId'), + ExpressionUtils.field('attributeKeyId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('attributeKeyId'), + ExpressionUtils.field('value'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - contactId_attributeKeyId: { contactId: { type: "String" }, attributeKeyId: { type: "String" } } - } + id: { type: 'String' }, + contactId_attributeKeyId: { contactId: { type: 'String' }, attributeKeyId: { type: 'String' } }, + }, }, ContactAttributeKey: { - name: "ContactAttributeKey", + name: 'ContactAttributeKey', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, isUnique: { - name: "isUnique", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isUnique', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, key: { - name: "key", - type: "String" + name: 'key', + type: 'String', }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, type: { - name: "type", - type: "ContactAttributeType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("custom") }] }] as readonly AttributeApplication[], - default: "custom" as FieldDefault + name: 'type', + type: 'ContactAttributeType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('custom') }] }, + ] as readonly AttributeApplication[], + default: 'custom' as FieldDefault, }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attributeKeys", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attributeKeys', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, attributes: { - name: "attributes", - type: "ContactAttribute", + name: 'attributes', + type: 'ContactAttribute', array: true, - relation: { opposite: "attributeKey" } + relation: { opposite: 'attributeKey' }, }, attributeFilters: { - name: "attributeFilters", - type: "SurveyAttributeFilter", + name: 'attributeFilters', + type: 'SurveyAttributeFilter', array: true, - relation: { opposite: "attributeKey" } - } + relation: { opposite: 'attributeKey' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("key"), ExpressionUtils.field("environmentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("createdAt")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('key'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - key_environmentId: { key: { type: "String" }, environmentId: { type: "String" } } - } + id: { type: 'String' }, + key_environmentId: { key: { type: 'String' }, environmentId: { type: 'String' } }, + }, }, Contact: { - name: "Contact", + name: 'Contact', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userId: { - name: "userId", - type: "String", - optional: true + name: 'userId', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "contacts", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'contacts', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, responses: { - name: "responses", - type: "Response", + name: 'responses', + type: 'Response', array: true, - relation: { opposite: "contact" } + relation: { opposite: 'contact' }, }, attributes: { - name: "attributes", - type: "ContactAttribute", + name: 'attributes', + type: 'ContactAttribute', array: true, - relation: { opposite: "contact" } + relation: { opposite: 'contact' }, }, displays: { - name: "displays", - type: "Display", + name: 'displays', + type: 'Display', array: true, - relation: { opposite: "contact" } - } + relation: { opposite: 'contact' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Response: { - name: "Response", + name: 'Response', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, finished: { - name: "finished", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'finished', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, survey: { - name: "survey", - type: "Survey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "responses", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } + name: 'survey', + type: 'Survey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'responses', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, }, surveyId: { - name: "surveyId", - type: "String", - foreignKeyFor: [ - "survey" - ] as readonly string[] + name: 'surveyId', + type: 'String', + foreignKeyFor: ['survey'] as readonly string[], }, contact: { - name: "contact", - type: "Contact", + name: 'contact', + type: 'Contact', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "responses", fields: ["contactId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('contactId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'responses', fields: ['contactId'], references: ['id'], onDelete: 'Cascade' }, }, contactId: { - name: "contactId", - type: "String", + name: 'contactId', + type: 'String', optional: true, - foreignKeyFor: [ - "contact" - ] as readonly string[] + foreignKeyFor: ['contact'] as readonly string[], }, endingId: { - name: "endingId", - type: "String", - optional: true + name: 'endingId', + type: 'String', + optional: true, }, notes: { - name: "notes", - type: "ResponseNote", + name: 'notes', + type: 'ResponseNote', array: true, - relation: { opposite: "response" } + relation: { opposite: 'response' }, }, data: { - name: "data", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault + name: 'data', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, }, variables: { - name: "variables", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault + name: 'variables', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, }, ttc: { - name: "ttc", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault + name: 'ttc', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, }, meta: { - name: "meta", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault + name: 'meta', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, }, tags: { - name: "tags", - type: "TagsOnResponses", + name: 'tags', + type: 'TagsOnResponses', array: true, - relation: { opposite: "response" } + relation: { opposite: 'response' }, }, contactAttributes: { - name: "contactAttributes", - type: "Json", - optional: true + name: 'contactAttributes', + type: 'Json', + optional: true, }, singleUseId: { - name: "singleUseId", - type: "String", - optional: true + name: 'singleUseId', + type: 'String', + optional: true, }, language: { - name: "language", - type: "String", - optional: true + name: 'language', + type: 'String', + optional: true, }, documents: { - name: "documents", - type: "Document", + name: 'documents', + type: 'Document', array: true, - relation: { opposite: "response" } + relation: { opposite: 'response' }, }, displayId: { - name: "displayId", - type: "String", + name: 'displayId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "display" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['display'] as readonly string[], }, display: { - name: "display", - type: "Display", + name: 'display', + type: 'Display', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("displayId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "response", fields: ["displayId"], references: ["id"] } - } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('displayId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'response', fields: ['displayId'], references: ['id'] }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("singleUseId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId"), ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('surveyId'), + ExpressionUtils.field('singleUseId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('surveyId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('contactId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - displayId: { type: "String" }, - surveyId_singleUseId: { surveyId: { type: "String" }, singleUseId: { type: "String" } } - } + id: { type: 'String' }, + displayId: { type: 'String' }, + surveyId_singleUseId: { surveyId: { type: 'String' }, singleUseId: { type: 'String' } }, + }, }, ResponseNote: { - name: "ResponseNote", + name: 'ResponseNote', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, response: { - name: "response", - type: "Response", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "notes", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } + name: 'response', + type: 'Response', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notes', fields: ['responseId'], references: ['id'], onDelete: 'Cascade' }, }, responseId: { - name: "responseId", - type: "String", - foreignKeyFor: [ - "response" - ] as readonly string[] + name: 'responseId', + type: 'String', + foreignKeyFor: ['response'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "responseNotes", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'responseNotes', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "String", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + foreignKeyFor: ['user'] as readonly string[], }, text: { - name: "text", - type: "String" + name: 'text', + type: 'String', }, isResolved: { - name: "isResolved", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isResolved', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isEdited: { - name: "isEdited", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'isEdited', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Tag: { - name: "Tag", + name: 'Tag', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, responses: { - name: "responses", - type: "TagsOnResponses", + name: 'responses', + type: 'TagsOnResponses', array: true, - relation: { opposite: "tag" } + relation: { opposite: 'tag' }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "tags", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } - } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'tags', fields: ['environmentId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("name")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - environmentId_name: { environmentId: { type: "String" }, name: { type: "String" } } - } + id: { type: 'String' }, + environmentId_name: { environmentId: { type: 'String' }, name: { type: 'String' } }, + }, }, TagsOnResponses: { - name: "TagsOnResponses", + name: 'TagsOnResponses', fields: { responseId: { - name: "responseId", - type: "String", + name: 'responseId', + type: 'String', id: true, - foreignKeyFor: [ - "response" - ] as readonly string[] + foreignKeyFor: ['response'] as readonly string[], }, response: { - name: "response", - type: "Response", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "tags", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } + name: 'response', + type: 'Response', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'tags', fields: ['responseId'], references: ['id'], onDelete: 'Cascade' }, }, tagId: { - name: "tagId", - type: "String", + name: 'tagId', + type: 'String', id: true, - foreignKeyFor: [ - "tag" - ] as readonly string[] + foreignKeyFor: ['tag'] as readonly string[], }, tag: { - name: "tag", - type: "Tag", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("tagId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "responses", fields: ["tagId"], references: ["id"], onDelete: "Cascade" } - } + name: 'tag', + type: 'Tag', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('tagId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'responses', fields: ['tagId'], references: ['id'], onDelete: 'Cascade' }, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId"), ExpressionUtils.field("tagId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('responseId'), + ExpressionUtils.field('tagId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["responseId", "tagId"], + idFields: ['responseId', 'tagId'], uniqueFields: { - responseId_tagId: { responseId: { type: "String" }, tagId: { type: "String" } } - } + responseId_tagId: { responseId: { type: 'String' }, tagId: { type: 'String' } }, + }, }, Display: { - name: "Display", + name: 'Display', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, survey: { - name: "survey", - type: "Survey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "displays", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } + name: 'survey', + type: 'Survey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'displays', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, }, surveyId: { - name: "surveyId", - type: "String", - foreignKeyFor: [ - "survey" - ] as readonly string[] + name: 'surveyId', + type: 'String', + foreignKeyFor: ['survey'] as readonly string[], }, contact: { - name: "contact", - type: "Contact", + name: 'contact', + type: 'Contact', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "displays", fields: ["contactId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('contactId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'displays', fields: ['contactId'], references: ['id'], onDelete: 'Cascade' }, }, contactId: { - name: "contactId", - type: "String", + name: 'contactId', + type: 'String', optional: true, - foreignKeyFor: [ - "contact" - ] as readonly string[] + foreignKeyFor: ['contact'] as readonly string[], }, responseId: { - name: "responseId", - type: "String", + name: 'responseId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, status: { - name: "status", - type: "DisplayStatus", - optional: true + name: 'status', + type: 'DisplayStatus', + optional: true, }, response: { - name: "response", - type: "Response", + name: 'response', + type: 'Response', optional: true, - relation: { opposite: "display" } - } + relation: { opposite: 'display' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId"), ExpressionUtils.field("createdAt")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('contactId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - responseId: { type: "String" } - } + id: { type: 'String' }, + responseId: { type: 'String' }, + }, }, SurveyTrigger: { - name: "SurveyTrigger", + name: 'SurveyTrigger', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, survey: { - name: "survey", - type: "Survey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "triggers", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } + name: 'survey', + type: 'Survey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'triggers', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, }, surveyId: { - name: "surveyId", - type: "String", - foreignKeyFor: [ - "survey" - ] as readonly string[] + name: 'surveyId', + type: 'String', + foreignKeyFor: ['survey'] as readonly string[], }, actionClass: { - name: "actionClass", - type: "ActionClass", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("actionClassId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "surveyTriggers", fields: ["actionClassId"], references: ["id"], onDelete: "Cascade" } + name: 'actionClass', + type: 'ActionClass', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('actionClassId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'surveyTriggers', + fields: ['actionClassId'], + references: ['id'], + onDelete: 'Cascade', + }, }, actionClassId: { - name: "actionClassId", - type: "String", - foreignKeyFor: [ - "actionClass" - ] as readonly string[] - } + name: 'actionClassId', + type: 'String', + foreignKeyFor: ['actionClass'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("actionClassId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('surveyId'), + ExpressionUtils.field('actionClassId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - surveyId_actionClassId: { surveyId: { type: "String" }, actionClassId: { type: "String" } } - } + id: { type: 'String' }, + surveyId_actionClassId: { surveyId: { type: 'String' }, actionClassId: { type: 'String' } }, + }, }, SurveyAttributeFilter: { - name: "SurveyAttributeFilter", + name: 'SurveyAttributeFilter', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, attributeKey: { - name: "attributeKey", - type: "ContactAttributeKey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attributeFilters", fields: ["attributeKeyId"], references: ["id"], onDelete: "Cascade" } + name: 'attributeKey', + type: 'ContactAttributeKey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeKeyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attributeFilters', + fields: ['attributeKeyId'], + references: ['id'], + onDelete: 'Cascade', + }, }, attributeKeyId: { - name: "attributeKeyId", - type: "String", - foreignKeyFor: [ - "attributeKey" - ] as readonly string[] + name: 'attributeKeyId', + type: 'String', + foreignKeyFor: ['attributeKey'] as readonly string[], }, survey: { - name: "survey", - type: "Survey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attributeFilters", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } + name: 'survey', + type: 'Survey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attributeFilters', + fields: ['surveyId'], + references: ['id'], + onDelete: 'Cascade', + }, }, surveyId: { - name: "surveyId", - type: "String", - foreignKeyFor: [ - "survey" - ] as readonly string[] + name: 'surveyId', + type: 'String', + foreignKeyFor: ['survey'] as readonly string[], }, condition: { - name: "condition", - type: "SurveyAttributeFilterCondition" + name: 'condition', + type: 'SurveyAttributeFilterCondition', }, value: { - name: "value", - type: "String" - } + name: 'value', + type: 'String', + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("attributeKeyId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('surveyId'), + ExpressionUtils.field('attributeKeyId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeKeyId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - surveyId_attributeKeyId: { surveyId: { type: "String" }, attributeKeyId: { type: "String" } } - } + id: { type: 'String' }, + surveyId_attributeKeyId: { surveyId: { type: 'String' }, attributeKeyId: { type: 'String' } }, + }, }, Survey: { - name: "Survey", + name: 'Survey', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, redirectUrl: { - name: "redirectUrl", - type: "String", - optional: true + name: 'redirectUrl', + type: 'String', + optional: true, }, type: { - name: "type", - type: "SurveyType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("web") }] }] as readonly AttributeApplication[], - default: "web" as FieldDefault + name: 'type', + type: 'SurveyType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('web') }] }, + ] as readonly AttributeApplication[], + default: 'web' as FieldDefault, }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "surveys", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'surveys', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, creator: { - name: "creator", - type: "User", + name: 'creator', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("createdBy")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "surveys", fields: ["createdBy"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('createdBy')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'surveys', fields: ['createdBy'], references: ['id'] }, }, createdBy: { - name: "createdBy", - type: "String", + name: 'createdBy', + type: 'String', optional: true, - foreignKeyFor: [ - "creator" - ] as readonly string[] + foreignKeyFor: ['creator'] as readonly string[], }, status: { - name: "status", - type: "SurveyStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("draft") }] }] as readonly AttributeApplication[], - default: "draft" as FieldDefault + name: 'status', + type: 'SurveyStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('draft') }] }, + ] as readonly AttributeApplication[], + default: 'draft' as FieldDefault, }, welcomeCard: { - name: "welcomeCard", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false}") }] }] as readonly AttributeApplication[], - default: "{\"enabled\": false}" as FieldDefault + name: 'welcomeCard', + type: 'Json', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('{"enabled": false}') }], + }, + ] as readonly AttributeApplication[], + default: '{"enabled": false}' as FieldDefault, }, questions: { - name: "questions", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], - default: "[]" as FieldDefault + name: 'questions', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, + ] as readonly AttributeApplication[], + default: '[]' as FieldDefault, }, endings: { - name: "endings", - type: "Json", + name: 'endings', + type: 'Json', array: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("Any", []) }] }] as readonly AttributeApplication[], - default: [] as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.array('Any', []) }] }, + ] as readonly AttributeApplication[], + default: [] as FieldDefault, }, thankYouCard: { - name: "thankYouCard", - type: "Json", - optional: true + name: 'thankYouCard', + type: 'Json', + optional: true, }, hiddenFields: { - name: "hiddenFields", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false}") }] }] as readonly AttributeApplication[], - default: "{\"enabled\": false}" as FieldDefault + name: 'hiddenFields', + type: 'Json', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('{"enabled": false}') }], + }, + ] as readonly AttributeApplication[], + default: '{"enabled": false}' as FieldDefault, }, variables: { - name: "variables", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], - default: "[]" as FieldDefault + name: 'variables', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, + ] as readonly AttributeApplication[], + default: '[]' as FieldDefault, }, responses: { - name: "responses", - type: "Response", + name: 'responses', + type: 'Response', array: true, - relation: { opposite: "survey" } + relation: { opposite: 'survey' }, }, displayOption: { - name: "displayOption", - type: "displayOptions", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("displayOnce") }] }] as readonly AttributeApplication[], - default: "displayOnce" as FieldDefault + name: 'displayOption', + type: 'displayOptions', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('displayOnce') }] }, + ] as readonly AttributeApplication[], + default: 'displayOnce' as FieldDefault, }, recontactDays: { - name: "recontactDays", - type: "Int", - optional: true + name: 'recontactDays', + type: 'Int', + optional: true, }, displayLimit: { - name: "displayLimit", - type: "Int", - optional: true + name: 'displayLimit', + type: 'Int', + optional: true, }, triggers: { - name: "triggers", - type: "SurveyTrigger", + name: 'triggers', + type: 'SurveyTrigger', array: true, - relation: { opposite: "survey" } + relation: { opposite: 'survey' }, }, inlineTriggers: { - name: "inlineTriggers", - type: "Json", - optional: true + name: 'inlineTriggers', + type: 'Json', + optional: true, }, attributeFilters: { - name: "attributeFilters", - type: "SurveyAttributeFilter", + name: 'attributeFilters', + type: 'SurveyAttributeFilter', array: true, - relation: { opposite: "survey" } + relation: { opposite: 'survey' }, }, displays: { - name: "displays", - type: "Display", + name: 'displays', + type: 'Display', array: true, - relation: { opposite: "survey" } + relation: { opposite: 'survey' }, }, autoClose: { - name: "autoClose", - type: "Int", - optional: true + name: 'autoClose', + type: 'Int', + optional: true, }, autoComplete: { - name: "autoComplete", - type: "Int", - optional: true + name: 'autoComplete', + type: 'Int', + optional: true, }, delay: { - name: "delay", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'delay', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, runOnDate: { - name: "runOnDate", - type: "DateTime", - optional: true + name: 'runOnDate', + type: 'DateTime', + optional: true, }, closeOnDate: { - name: "closeOnDate", - type: "DateTime", - optional: true + name: 'closeOnDate', + type: 'DateTime', + optional: true, }, surveyClosedMessage: { - name: "surveyClosedMessage", - type: "Json", - optional: true + name: 'surveyClosedMessage', + type: 'Json', + optional: true, }, segmentId: { - name: "segmentId", - type: "String", + name: 'segmentId', + type: 'String', optional: true, - foreignKeyFor: [ - "segment" - ] as readonly string[] + foreignKeyFor: ['segment'] as readonly string[], }, segment: { - name: "segment", - type: "Segment", + name: 'segment', + type: 'Segment', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("segmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "surveys", fields: ["segmentId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('segmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'surveys', fields: ['segmentId'], references: ['id'] }, }, projectOverwrites: { - name: "projectOverwrites", - type: "Json", - optional: true + name: 'projectOverwrites', + type: 'Json', + optional: true, }, styling: { - name: "styling", - type: "Json", - optional: true + name: 'styling', + type: 'Json', + optional: true, }, singleUse: { - name: "singleUse", - type: "Json", + name: 'singleUse', + type: 'Json', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false, \"isEncrypted\": true}") }] }] as readonly AttributeApplication[], - default: "{\"enabled\": false, \"isEncrypted\": true}" as FieldDefault + attributes: [ + { + name: '@default', + args: [ + { + name: 'value', + value: ExpressionUtils.literal('{"enabled": false, "isEncrypted": true}'), + }, + ], + }, + ] as readonly AttributeApplication[], + default: '{"enabled": false, "isEncrypted": true}' as FieldDefault, }, verifyEmail: { - name: "verifyEmail", - type: "Json", - optional: true + name: 'verifyEmail', + type: 'Json', + optional: true, }, isVerifyEmailEnabled: { - name: "isVerifyEmailEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isVerifyEmailEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isSingleResponsePerEmailEnabled: { - name: "isSingleResponsePerEmailEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isSingleResponsePerEmailEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isBackButtonHidden: { - name: "isBackButtonHidden", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isBackButtonHidden', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, pin: { - name: "pin", - type: "String", - optional: true + name: 'pin', + type: 'String', + optional: true, }, resultShareKey: { - name: "resultShareKey", - type: "String", + name: 'resultShareKey', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, displayPercentage: { - name: "displayPercentage", - type: "Decimal", - optional: true + name: 'displayPercentage', + type: 'Decimal', + optional: true, }, languages: { - name: "languages", - type: "SurveyLanguage", + name: 'languages', + type: 'SurveyLanguage', array: true, - relation: { opposite: "survey" } + relation: { opposite: 'survey' }, }, showLanguageSwitch: { - name: "showLanguageSwitch", - type: "Boolean", - optional: true + name: 'showLanguageSwitch', + type: 'Boolean', + optional: true, }, documents: { - name: "documents", - type: "Document", + name: 'documents', + type: 'Document', array: true, - relation: { opposite: "survey" } + relation: { opposite: 'survey' }, }, followUps: { - name: "followUps", - type: "SurveyFollowUp", + name: 'followUps', + type: 'SurveyFollowUp', array: true, - relation: { opposite: "survey" } + relation: { opposite: 'survey' }, }, recaptcha: { - name: "recaptcha", - type: "Json", + name: 'recaptcha', + type: 'Json', optional: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false, \"threshold\":0.1}") }] }] as readonly AttributeApplication[], - default: "{\"enabled\": false, \"threshold\":0.1}" as FieldDefault - } + attributes: [ + { + name: '@default', + args: [ + { + name: 'value', + value: ExpressionUtils.literal('{"enabled": false, "threshold":0.1}'), + }, + ], + }, + ] as readonly AttributeApplication[], + default: '{"enabled": false, "threshold":0.1}' as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("updatedAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("segmentId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('updatedAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('segmentId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - resultShareKey: { type: "String" } - } + id: { type: 'String' }, + resultShareKey: { type: 'String' }, + }, }, SurveyFollowUp: { - name: "SurveyFollowUp", + name: 'SurveyFollowUp', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, survey: { - name: "survey", - type: "Survey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "followUps", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } + name: 'survey', + type: 'Survey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'followUps', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, }, surveyId: { - name: "surveyId", - type: "String", - foreignKeyFor: [ - "survey" - ] as readonly string[] + name: 'surveyId', + type: 'String', + foreignKeyFor: ['survey'] as readonly string[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, trigger: { - name: "trigger", - type: "Json" + name: 'trigger', + type: 'Json', }, action: { - name: "action", - type: "Json" - } + name: 'action', + type: 'Json', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ActionClass: { - name: "ActionClass", + name: 'ActionClass', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, type: { - name: "type", - type: "ActionType" + name: 'type', + type: 'ActionType', }, key: { - name: "key", - type: "String", - optional: true + name: 'key', + type: 'String', + optional: true, }, noCodeConfig: { - name: "noCodeConfig", - type: "Json", - optional: true + name: 'noCodeConfig', + type: 'Json', + optional: true, }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "actionClasses", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'actionClasses', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, surveyTriggers: { - name: "surveyTriggers", - type: "SurveyTrigger", + name: 'surveyTriggers', + type: 'SurveyTrigger', array: true, - relation: { opposite: "actionClass" } - } + relation: { opposite: 'actionClass' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("key"), ExpressionUtils.field("environmentId")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("name"), ExpressionUtils.field("environmentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("createdAt")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('key'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('name'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - key_environmentId: { key: { type: "String" }, environmentId: { type: "String" } }, - name_environmentId: { name: { type: "String" }, environmentId: { type: "String" } } - } + id: { type: 'String' }, + key_environmentId: { key: { type: 'String' }, environmentId: { type: 'String' } }, + name_environmentId: { name: { type: 'String' }, environmentId: { type: 'String' } }, + }, }, Integration: { - name: "Integration", + name: 'Integration', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, type: { - name: "type", - type: "IntegrationType" + name: 'type', + type: 'IntegrationType', }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, config: { - name: "config", - type: "Json" + name: 'config', + type: 'Json', }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "integration", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } - } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'integration', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("IntegrationType", [ExpressionUtils.field("type"), ExpressionUtils.field("environmentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('IntegrationType', [ + ExpressionUtils.field('type'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - type_environmentId: { type: { type: "IntegrationType" }, environmentId: { type: "String" } } - } + id: { type: 'String' }, + type_environmentId: { type: { type: 'IntegrationType' }, environmentId: { type: 'String' } }, + }, }, DataMigration: { - name: "DataMigration", + name: 'DataMigration', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, startedAt: { - name: "startedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("started_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'startedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('started_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, finishedAt: { - name: "finishedAt", - type: "DateTime", + name: 'finishedAt', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("finished_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('finished_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String", + name: 'name', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, status: { - name: "status", - type: "DataMigrationStatus" - } + name: 'status', + type: 'DataMigrationStatus', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - name: { type: "String" } - } + id: { type: 'String' }, + name: { type: 'String' }, + }, }, Environment: { - name: "Environment", + name: 'Environment', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, type: { - name: "type", - type: "EnvironmentType" + name: 'type', + type: 'EnvironmentType', }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "environments", fields: ["projectId"], references: ["id"], onDelete: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'environments', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, widgetSetupCompleted: { - name: "widgetSetupCompleted", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'widgetSetupCompleted', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, appSetupCompleted: { - name: "appSetupCompleted", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'appSetupCompleted', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, surveys: { - name: "surveys", - type: "Survey", + name: 'surveys', + type: 'Survey', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, contacts: { - name: "contacts", - type: "Contact", + name: 'contacts', + type: 'Contact', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, actionClasses: { - name: "actionClasses", - type: "ActionClass", + name: 'actionClasses', + type: 'ActionClass', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, attributeKeys: { - name: "attributeKeys", - type: "ContactAttributeKey", + name: 'attributeKeys', + type: 'ContactAttributeKey', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, webhooks: { - name: "webhooks", - type: "Webhook", + name: 'webhooks', + type: 'Webhook', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, tags: { - name: "tags", - type: "Tag", + name: 'tags', + type: 'Tag', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, segments: { - name: "segments", - type: "Segment", + name: 'segments', + type: 'Segment', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, integration: { - name: "integration", - type: "Integration", + name: 'integration', + type: 'Integration', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, documents: { - name: "documents", - type: "Document", + name: 'documents', + type: 'Document', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, insights: { - name: "insights", - type: "Insight", + name: 'insights', + type: 'Insight', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, ApiKeyEnvironment: { - name: "ApiKeyEnvironment", - type: "ApiKeyEnvironment", + name: 'ApiKeyEnvironment', + type: 'ApiKeyEnvironment', array: true, - relation: { opposite: "environment" } - } + relation: { opposite: 'environment' }, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Project: { - name: "Project", + name: 'Project', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "projects", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'projects', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, environments: { - name: "environments", - type: "Environment", + name: 'environments', + type: 'Environment', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, brandColor: { - name: "brandColor", - type: "String", - optional: true + name: 'brandColor', + type: 'String', + optional: true, }, highlightBorderColor: { - name: "highlightBorderColor", - type: "String", - optional: true + name: 'highlightBorderColor', + type: 'String', + optional: true, }, styling: { - name: "styling", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"allowStyleOverwrite\":true}") }] }] as readonly AttributeApplication[], - default: "{\"allowStyleOverwrite\":true}" as FieldDefault + name: 'styling', + type: 'Json', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('{"allowStyleOverwrite":true}') }], + }, + ] as readonly AttributeApplication[], + default: '{"allowStyleOverwrite":true}' as FieldDefault, }, config: { - name: "config", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault + name: 'config', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, }, recontactDays: { - name: "recontactDays", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(7) }] }] as readonly AttributeApplication[], - default: 7 as FieldDefault + name: 'recontactDays', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(7) }] }, + ] as readonly AttributeApplication[], + default: 7 as FieldDefault, }, linkSurveyBranding: { - name: "linkSurveyBranding", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'linkSurveyBranding', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, inAppSurveyBranding: { - name: "inAppSurveyBranding", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'inAppSurveyBranding', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, placement: { - name: "placement", - type: "WidgetPlacement", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("bottomRight") }] }] as readonly AttributeApplication[], - default: "bottomRight" as FieldDefault + name: 'placement', + type: 'WidgetPlacement', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('bottomRight') }] }, + ] as readonly AttributeApplication[], + default: 'bottomRight' as FieldDefault, }, clickOutsideClose: { - name: "clickOutsideClose", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'clickOutsideClose', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, darkOverlay: { - name: "darkOverlay", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'darkOverlay', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, languages: { - name: "languages", - type: "Language", + name: 'languages', + type: 'Language', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, logo: { - name: "logo", - type: "Json", - optional: true + name: 'logo', + type: 'Json', + optional: true, }, projectTeams: { - name: "projectTeams", - type: "ProjectTeam", + name: 'projectTeams', + type: 'ProjectTeam', array: true, - relation: { opposite: "project" } - } + relation: { opposite: 'project' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("name")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - organizationId_name: { organizationId: { type: "String" }, name: { type: "String" } } - } + id: { type: 'String' }, + organizationId_name: { organizationId: { type: 'String' }, name: { type: 'String' } }, + }, }, Organization: { - name: "Organization", + name: 'Organization', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, memberships: { - name: "memberships", - type: "Membership", + name: 'memberships', + type: 'Membership', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, projects: { - name: "projects", - type: "Project", + name: 'projects', + type: 'Project', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, billing: { - name: "billing", - type: "Json" + name: 'billing', + type: 'Json', }, whitelabel: { - name: "whitelabel", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault + name: 'whitelabel', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, }, invites: { - name: "invites", - type: "Invite", + name: 'invites', + type: 'Invite', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, isAIEnabled: { - name: "isAIEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isAIEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, teams: { - name: "teams", - type: "Team", + name: 'teams', + type: 'Team', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, apiKeys: { - name: "apiKeys", - type: "ApiKey", + name: 'apiKeys', + type: 'ApiKey', array: true, - relation: { opposite: "organization" } - } + relation: { opposite: 'organization' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Membership: { - name: "Membership", + name: 'Membership', fields: { organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "memberships", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'memberships', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", + name: 'organizationId', + type: 'String', id: true, - foreignKeyFor: [ - "organization" - ] as readonly string[] + foreignKeyFor: ['organization'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "memberships", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'memberships', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "String", + name: 'userId', + type: 'String', id: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, accepted: { - name: "accepted", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'accepted', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, deprecatedRole: { - name: "deprecatedRole", - type: "MembershipRole", - optional: true + name: 'deprecatedRole', + type: 'MembershipRole', + optional: true, }, role: { - name: "role", - type: "OrganizationRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("member") }] }] as readonly AttributeApplication[], - default: "member" as FieldDefault - } + name: 'role', + type: 'OrganizationRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('member') }] }, + ] as readonly AttributeApplication[], + default: 'member' as FieldDefault, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("organizationId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('organizationId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["organizationId", "userId"], + idFields: ['organizationId', 'userId'], uniqueFields: { - userId_organizationId: { userId: { type: "String" }, organizationId: { type: "String" } } - } + userId_organizationId: { userId: { type: 'String' }, organizationId: { type: 'String' } }, + }, }, Invite: { - name: "Invite", + name: 'Invite', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "invites", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'invites', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, creator: { - name: "creator", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteCreatedBy") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("creatorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "invitesCreated", name: "inviteCreatedBy", fields: ["creatorId"], references: ["id"] } + name: 'creator', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('inviteCreatedBy') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('creatorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'invitesCreated', + name: 'inviteCreatedBy', + fields: ['creatorId'], + references: ['id'], + }, }, creatorId: { - name: "creatorId", - type: "String", - foreignKeyFor: [ - "creator" - ] as readonly string[] + name: 'creatorId', + type: 'String', + foreignKeyFor: ['creator'] as readonly string[], }, acceptor: { - name: "acceptor", - type: "User", + name: 'acceptor', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteAcceptedBy") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("acceptorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "invitesAccepted", name: "inviteAcceptedBy", fields: ["acceptorId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('inviteAcceptedBy') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('acceptorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'invitesAccepted', + name: 'inviteAcceptedBy', + fields: ['acceptorId'], + references: ['id'], + onDelete: 'Cascade', + }, }, acceptorId: { - name: "acceptorId", - type: "String", + name: 'acceptorId', + type: 'String', optional: true, - foreignKeyFor: [ - "acceptor" - ] as readonly string[] + foreignKeyFor: ['acceptor'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, expiresAt: { - name: "expiresAt", - type: "DateTime" + name: 'expiresAt', + type: 'DateTime', }, deprecatedRole: { - name: "deprecatedRole", - type: "MembershipRole", - optional: true + name: 'deprecatedRole', + type: 'MembershipRole', + optional: true, }, role: { - name: "role", - type: "OrganizationRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("member") }] }] as readonly AttributeApplication[], - default: "member" as FieldDefault + name: 'role', + type: 'OrganizationRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('member') }] }, + ] as readonly AttributeApplication[], + default: 'member' as FieldDefault, }, teamIds: { - name: "teamIds", - type: "String", + name: 'teamIds', + type: 'String', array: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("Any", []) }] }] as readonly AttributeApplication[], - default: [] as FieldDefault - } + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.array('Any', []) }] }, + ] as readonly AttributeApplication[], + default: [] as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email"), ExpressionUtils.field("organizationId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('email'), + ExpressionUtils.field('organizationId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ApiKey: { - name: "ApiKey", + name: 'ApiKey', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, createdBy: { - name: "createdBy", - type: "String", - optional: true + name: 'createdBy', + type: 'String', + optional: true, }, lastUsedAt: { - name: "lastUsedAt", - type: "DateTime", - optional: true + name: 'lastUsedAt', + type: 'DateTime', + optional: true, }, label: { - name: "label", - type: "String" + name: 'label', + type: 'String', }, hashedKey: { - name: "hashedKey", - type: "String", + name: 'hashedKey', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "apiKeys", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'apiKeys', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, apiKeyEnvironments: { - name: "apiKeyEnvironments", - type: "ApiKeyEnvironment", + name: 'apiKeyEnvironments', + type: 'ApiKeyEnvironment', array: true, - relation: { opposite: "apiKey" } + relation: { opposite: 'apiKey' }, }, organizationAccess: { - name: "organizationAccess", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault - } + name: 'organizationAccess', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - hashedKey: { type: "String" } - } + id: { type: 'String' }, + hashedKey: { type: 'String' }, + }, }, ApiKeyEnvironment: { - name: "ApiKeyEnvironment", + name: 'ApiKeyEnvironment', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, apiKeyId: { - name: "apiKeyId", - type: "String", - foreignKeyFor: [ - "apiKey" - ] as readonly string[] + name: 'apiKeyId', + type: 'String', + foreignKeyFor: ['apiKey'] as readonly string[], }, apiKey: { - name: "apiKey", - type: "ApiKey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "apiKeyEnvironments", fields: ["apiKeyId"], references: ["id"], onDelete: "Cascade" } + name: 'apiKey', + type: 'ApiKey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('apiKeyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'apiKeyEnvironments', + fields: ['apiKeyId'], + references: ['id'], + onDelete: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "ApiKeyEnvironment", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'ApiKeyEnvironment', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, permission: { - name: "permission", - type: "ApiKeyPermission" - } + name: 'permission', + type: 'ApiKeyPermission', + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId"), ExpressionUtils.field("environmentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('apiKeyId'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - apiKeyId_environmentId: { apiKeyId: { type: "String" }, environmentId: { type: "String" } } - } + id: { type: 'String' }, + apiKeyId_environmentId: { apiKeyId: { type: 'String' }, environmentId: { type: 'String' } }, + }, }, Account: { - name: "Account", + name: 'Account', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "accounts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'accounts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "String", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + foreignKeyFor: ['user'] as readonly string[], }, type: { - name: "type", - type: "String" + name: 'type', + type: 'String', }, provider: { - name: "provider", - type: "String" + name: 'provider', + type: 'String', }, providerAccountId: { - name: "providerAccountId", - type: "String" + name: 'providerAccountId', + type: 'String', }, access_token: { - name: "access_token", - type: "String", + name: 'access_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, refresh_token: { - name: "refresh_token", - type: "String", + name: 'refresh_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, expires_at: { - name: "expires_at", - type: "Int", - optional: true + name: 'expires_at', + type: 'Int', + optional: true, }, ext_expires_in: { - name: "ext_expires_in", - type: "Int", - optional: true + name: 'ext_expires_in', + type: 'Int', + optional: true, }, token_type: { - name: "token_type", - type: "String", - optional: true + name: 'token_type', + type: 'String', + optional: true, }, scope: { - name: "scope", - type: "String", - optional: true + name: 'scope', + type: 'String', + optional: true, }, id_token: { - name: "id_token", - type: "String", + name: 'id_token', + type: 'String', optional: true, - attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] + attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], }, session_state: { - name: "session_state", - type: "String", - optional: true - } + name: 'session_state', + type: 'String', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('provider'), + ExpressionUtils.field('providerAccountId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - provider_providerAccountId: { provider: { type: "String" }, providerAccountId: { type: "String" } } - } + id: { type: 'String' }, + provider_providerAccountId: { provider: { type: 'String' }, providerAccountId: { type: 'String' } }, + }, }, User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, emailVerified: { - name: "emailVerified", - type: "DateTime", + name: 'emailVerified', + type: 'DateTime', optional: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("email_verified") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('email_verified') }] }, + ] as readonly AttributeApplication[], }, imageUrl: { - name: "imageUrl", - type: "String", - optional: true + name: 'imageUrl', + type: 'String', + optional: true, }, twoFactorSecret: { - name: "twoFactorSecret", - type: "String", - optional: true + name: 'twoFactorSecret', + type: 'String', + optional: true, }, twoFactorEnabled: { - name: "twoFactorEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'twoFactorEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, backupCodes: { - name: "backupCodes", - type: "String", - optional: true + name: 'backupCodes', + type: 'String', + optional: true, }, password: { - name: "password", - type: "String", - optional: true + name: 'password', + type: 'String', + optional: true, }, identityProvider: { - name: "identityProvider", - type: "IdentityProvider", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("email") }] }] as readonly AttributeApplication[], - default: "email" as FieldDefault + name: 'identityProvider', + type: 'IdentityProvider', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('email') }] }, + ] as readonly AttributeApplication[], + default: 'email' as FieldDefault, }, identityProviderAccountId: { - name: "identityProviderAccountId", - type: "String", - optional: true + name: 'identityProviderAccountId', + type: 'String', + optional: true, }, memberships: { - name: "memberships", - type: "Membership", + name: 'memberships', + type: 'Membership', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, accounts: { - name: "accounts", - type: "Account", + name: 'accounts', + type: 'Account', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, responseNotes: { - name: "responseNotes", - type: "ResponseNote", + name: 'responseNotes', + type: 'ResponseNote', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, groupId: { - name: "groupId", - type: "String", - optional: true + name: 'groupId', + type: 'String', + optional: true, }, invitesCreated: { - name: "invitesCreated", - type: "Invite", + name: 'invitesCreated', + type: 'Invite', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteCreatedBy") }] }] as readonly AttributeApplication[], - relation: { opposite: "creator", name: "inviteCreatedBy" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('inviteCreatedBy') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'creator', name: 'inviteCreatedBy' }, }, invitesAccepted: { - name: "invitesAccepted", - type: "Invite", + name: 'invitesAccepted', + type: 'Invite', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteAcceptedBy") }] }] as readonly AttributeApplication[], - relation: { opposite: "acceptor", name: "inviteAcceptedBy" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('inviteAcceptedBy') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'acceptor', name: 'inviteAcceptedBy' }, }, role: { - name: "role", - type: "Role", - optional: true + name: 'role', + type: 'Role', + optional: true, }, objective: { - name: "objective", - type: "Objective", - optional: true + name: 'objective', + type: 'Objective', + optional: true, }, notificationSettings: { - name: "notificationSettings", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], - default: "{}" as FieldDefault + name: 'notificationSettings', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, + ] as readonly AttributeApplication[], + default: '{}' as FieldDefault, }, locale: { - name: "locale", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("en-US") }] }] as readonly AttributeApplication[], - default: "en-US" as FieldDefault + name: 'locale', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('en-US') }] }, + ] as readonly AttributeApplication[], + default: 'en-US' as FieldDefault, }, surveys: { - name: "surveys", - type: "Survey", + name: 'surveys', + type: 'Survey', array: true, - relation: { opposite: "creator" } + relation: { opposite: 'creator' }, }, teamUsers: { - name: "teamUsers", - type: "TeamUser", + name: 'teamUsers', + type: 'TeamUser', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, lastLoginAt: { - name: "lastLoginAt", - type: "DateTime", - optional: true + name: 'lastLoginAt', + type: 'DateTime', + optional: true, }, isActive: { - name: "isActive", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault - } + name: 'isActive', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, ShortUrl: { - name: "ShortUrl", + name: 'ShortUrl', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, url: { - name: "url", - type: "String", + name: 'url', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - url: { type: "String" } - } + id: { type: 'String' }, + url: { type: 'String' }, + }, }, Segment: { - name: "Segment", + name: 'Segment', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, isPrivate: { - name: "isPrivate", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'isPrivate', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, filters: { - name: "filters", - type: "Json", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], - default: "[]" as FieldDefault + name: 'filters', + type: 'Json', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, + ] as readonly AttributeApplication[], + default: '[]' as FieldDefault, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "segments", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'segments', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, surveys: { - name: "surveys", - type: "Survey", + name: 'surveys', + type: 'Survey', array: true, - relation: { opposite: "segment" } - } + relation: { opposite: 'segment' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("title")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('title'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - environmentId_title: { environmentId: { type: "String" }, title: { type: "String" } } - } + id: { type: 'String' }, + environmentId_title: { environmentId: { type: 'String' }, title: { type: 'String' } }, + }, }, Language: { - name: "Language", + name: 'Language', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, code: { - name: "code", - type: "String" + name: 'code', + type: 'String', }, alias: { - name: "alias", - type: "String", - optional: true + name: 'alias', + type: 'String', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "languages", fields: ["projectId"], references: ["id"], onDelete: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'languages', fields: ['projectId'], references: ['id'], onDelete: 'Cascade' }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, surveyLanguages: { - name: "surveyLanguages", - type: "SurveyLanguage", + name: 'surveyLanguages', + type: 'SurveyLanguage', array: true, - relation: { opposite: "language" } - } + relation: { opposite: 'language' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("code")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('code'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - projectId_code: { projectId: { type: "String" }, code: { type: "String" } } - } + id: { type: 'String' }, + projectId_code: { projectId: { type: 'String' }, code: { type: 'String' } }, + }, }, SurveyLanguage: { - name: "SurveyLanguage", + name: 'SurveyLanguage', fields: { language: { - name: "language", - type: "Language", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("languageId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "surveyLanguages", fields: ["languageId"], references: ["id"], onDelete: "Cascade" } + name: 'language', + type: 'Language', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('languageId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'surveyLanguages', + fields: ['languageId'], + references: ['id'], + onDelete: 'Cascade', + }, }, languageId: { - name: "languageId", - type: "String", + name: 'languageId', + type: 'String', id: true, - foreignKeyFor: [ - "language" - ] as readonly string[] + foreignKeyFor: ['language'] as readonly string[], }, surveyId: { - name: "surveyId", - type: "String", + name: 'surveyId', + type: 'String', id: true, - foreignKeyFor: [ - "survey" - ] as readonly string[] + foreignKeyFor: ['survey'] as readonly string[], }, survey: { - name: "survey", - type: "Survey", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "languages", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } + name: 'survey', + type: 'Survey', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'languages', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, }, default: { - name: "default", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'default', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault - } + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("languageId"), ExpressionUtils.field("surveyId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("languageId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('languageId'), + ExpressionUtils.field('surveyId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('languageId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["languageId", "surveyId"], + idFields: ['languageId', 'surveyId'], uniqueFields: { - languageId_surveyId: { languageId: { type: "String" }, surveyId: { type: "String" } } - } + languageId_surveyId: { languageId: { type: 'String' }, surveyId: { type: 'String' } }, + }, }, Insight: { - name: "Insight", + name: 'Insight', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "insights", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'insights', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, category: { - name: "category", - type: "InsightCategory" + name: 'category', + type: 'InsightCategory', }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String" + name: 'description', + type: 'String', }, vector: { - name: "vector", - type: "Unsupported", - optional: true + name: 'vector', + type: 'Unsupported', + optional: true, }, documentInsights: { - name: "documentInsights", - type: "DocumentInsight", + name: 'documentInsights', + type: 'DocumentInsight', array: true, - relation: { opposite: "insight" } - } + relation: { opposite: 'insight' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, DocumentInsight: { - name: "DocumentInsight", + name: 'DocumentInsight', fields: { documentId: { - name: "documentId", - type: "String", + name: 'documentId', + type: 'String', id: true, - foreignKeyFor: [ - "document" - ] as readonly string[] + foreignKeyFor: ['document'] as readonly string[], }, document: { - name: "document", - type: "Document", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("documentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "documentInsights", fields: ["documentId"], references: ["id"], onDelete: "Cascade" } + name: 'document', + type: 'Document', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('documentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'documentInsights', + fields: ['documentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, insightId: { - name: "insightId", - type: "String", + name: 'insightId', + type: 'String', id: true, - foreignKeyFor: [ - "insight" - ] as readonly string[] + foreignKeyFor: ['insight'] as readonly string[], }, insight: { - name: "insight", - type: "Insight", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("insightId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "documentInsights", fields: ["insightId"], references: ["id"], onDelete: "Cascade" } - } + name: 'insight', + type: 'Insight', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('insightId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'documentInsights', + fields: ['insightId'], + references: ['id'], + onDelete: 'Cascade', + }, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("documentId"), ExpressionUtils.field("insightId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("insightId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('documentId'), + ExpressionUtils.field('insightId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('insightId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["documentId", "insightId"], + idFields: ['documentId', 'insightId'], uniqueFields: { - documentId_insightId: { documentId: { type: "String" }, insightId: { type: "String" } } - } + documentId_insightId: { documentId: { type: 'String' }, insightId: { type: 'String' } }, + }, }, Document: { - name: "Document", + name: 'Document', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, environment: { - name: "environment", - type: "Environment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "documents", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + name: 'environment', + type: 'Environment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'documents', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + }, }, surveyId: { - name: "surveyId", - type: "String", + name: 'surveyId', + type: 'String', optional: true, - foreignKeyFor: [ - "survey" - ] as readonly string[] + foreignKeyFor: ['survey'] as readonly string[], }, survey: { - name: "survey", - type: "Survey", + name: 'survey', + type: 'Survey', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "documents", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'documents', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, }, responseId: { - name: "responseId", - type: "String", + name: 'responseId', + type: 'String', optional: true, - foreignKeyFor: [ - "response" - ] as readonly string[] + foreignKeyFor: ['response'] as readonly string[], }, response: { - name: "response", - type: "Response", + name: 'response', + type: 'Response', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "documents", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'documents', + fields: ['responseId'], + references: ['id'], + onDelete: 'Cascade', + }, }, questionId: { - name: "questionId", - type: "String", - optional: true + name: 'questionId', + type: 'String', + optional: true, }, sentiment: { - name: "sentiment", - type: "Sentiment" + name: 'sentiment', + type: 'Sentiment', }, isSpam: { - name: "isSpam", - type: "Boolean" + name: 'isSpam', + type: 'Boolean', }, text: { - name: "text", - type: "String" + name: 'text', + type: 'String', }, vector: { - name: "vector", - type: "Unsupported", - optional: true + name: 'vector', + type: 'Unsupported', + optional: true, }, documentInsights: { - name: "documentInsights", - type: "DocumentInsight", + name: 'documentInsights', + type: 'DocumentInsight', array: true, - relation: { opposite: "document" } - } + relation: { opposite: 'document' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId"), ExpressionUtils.field("questionId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('responseId'), + ExpressionUtils.field('questionId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - responseId_questionId: { responseId: { type: "String" }, questionId: { type: "String" } } - } + id: { type: 'String' }, + responseId_questionId: { responseId: { type: 'String' }, questionId: { type: 'String' } }, + }, }, Team: { - name: "Team", + name: 'Team', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "teams", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'teams', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teamUsers: { - name: "teamUsers", - type: "TeamUser", + name: 'teamUsers', + type: 'TeamUser', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, projectTeams: { - name: "projectTeams", - type: "ProjectTeam", + name: 'projectTeams', + type: 'ProjectTeam', array: true, - relation: { opposite: "team" } - } + relation: { opposite: 'team' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("name")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - organizationId_name: { organizationId: { type: "String" }, name: { type: "String" } } - } + id: { type: 'String' }, + organizationId_name: { organizationId: { type: 'String' }, name: { type: 'String' } }, + }, }, TeamUser: { - name: "TeamUser", + name: 'TeamUser', fields: { createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, teamId: { - name: "teamId", - type: "String", + name: 'teamId', + type: 'String', id: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "teamUsers", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'teamUsers', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "String", + name: 'userId', + type: 'String', id: true, - foreignKeyFor: [ - "user" - ] as readonly string[] + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "teamUsers", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'teamUsers', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, role: { - name: "role", - type: "TeamUserRole" - } + name: 'role', + type: 'TeamUserRole', + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId"), ExpressionUtils.field("userId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('userId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["teamId", "userId"], + idFields: ['teamId', 'userId'], uniqueFields: { - teamId_userId: { teamId: { type: "String" }, userId: { type: "String" } } - } + teamId_userId: { teamId: { type: 'String' }, userId: { type: 'String' } }, + }, }, ProjectTeam: { - name: "ProjectTeam", + name: 'ProjectTeam', fields: { createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@updatedAt' }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, + ] as readonly AttributeApplication[], }, projectId: { - name: "projectId", - type: "String", + name: 'projectId', + type: 'String', id: true, - foreignKeyFor: [ - "project" - ] as readonly string[] + foreignKeyFor: ['project'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "projectTeams", fields: ["projectId"], references: ["id"], onDelete: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'projectTeams', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + }, }, teamId: { - name: "teamId", - type: "String", + name: 'teamId', + type: 'String', id: true, - foreignKeyFor: [ - "team" - ] as readonly string[] + foreignKeyFor: ['team'] as readonly string[], }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "projectTeams", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'projectTeams', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, }, permission: { - name: "permission", - type: "ProjectTeamPermission", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("read") }] }] as readonly AttributeApplication[], - default: "read" as FieldDefault - } + name: 'permission', + type: 'ProjectTeamPermission', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('read') }] }, + ] as readonly AttributeApplication[], + default: 'read' as FieldDefault, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("teamId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('teamId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('teamId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["projectId", "teamId"], + idFields: ['projectId', 'teamId'], uniqueFields: { - projectId_teamId: { projectId: { type: "String" }, teamId: { type: "String" } } - } - } + projectId_teamId: { projectId: { type: 'String' }, teamId: { type: 'String' } }, + }, + }, } as const; enums = { PipelineTriggers: { - name: "PipelineTriggers", + name: 'PipelineTriggers', values: { - responseCreated: "responseCreated", - responseUpdated: "responseUpdated", - responseFinished: "responseFinished" - } + responseCreated: 'responseCreated', + responseUpdated: 'responseUpdated', + responseFinished: 'responseFinished', + }, }, WebhookSource: { - name: "WebhookSource", + name: 'WebhookSource', values: { - user: "user", - zapier: "zapier", - make: "make", - n8n: "n8n", - activepieces: "activepieces" - } + user: 'user', + zapier: 'zapier', + make: 'make', + n8n: 'n8n', + activepieces: 'activepieces', + }, }, ContactAttributeType: { - name: "ContactAttributeType", + name: 'ContactAttributeType', values: { - default: "default", - custom: "custom" - } + default: 'default', + custom: 'custom', + }, }, SurveyStatus: { - name: "SurveyStatus", + name: 'SurveyStatus', values: { - draft: "draft", - scheduled: "scheduled", - inProgress: "inProgress", - paused: "paused", - completed: "completed" - } + draft: 'draft', + scheduled: 'scheduled', + inProgress: 'inProgress', + paused: 'paused', + completed: 'completed', + }, }, DisplayStatus: { - name: "DisplayStatus", + name: 'DisplayStatus', values: { - seen: "seen", - responded: "responded" - } + seen: 'seen', + responded: 'responded', + }, }, SurveyAttributeFilterCondition: { - name: "SurveyAttributeFilterCondition", + name: 'SurveyAttributeFilterCondition', values: { - equals: "equals", - notEquals: "notEquals" - } + equals: 'equals', + notEquals: 'notEquals', + }, }, SurveyType: { - name: "SurveyType", + name: 'SurveyType', values: { - link: "link", - web: "web", - website: "website", - app: "app" - } + link: 'link', + web: 'web', + website: 'website', + app: 'app', + }, }, displayOptions: { - name: "displayOptions", + name: 'displayOptions', values: { - displayOnce: "displayOnce", - displayMultiple: "displayMultiple", - displaySome: "displaySome", - respondMultiple: "respondMultiple" - } + displayOnce: 'displayOnce', + displayMultiple: 'displayMultiple', + displaySome: 'displaySome', + respondMultiple: 'respondMultiple', + }, }, ActionType: { - name: "ActionType", + name: 'ActionType', values: { - code: "code", - noCode: "noCode" - } + code: 'code', + noCode: 'noCode', + }, }, EnvironmentType: { - name: "EnvironmentType", + name: 'EnvironmentType', values: { - production: "production", - development: "development" - } + production: 'production', + development: 'development', + }, }, IntegrationType: { - name: "IntegrationType", + name: 'IntegrationType', values: { - googleSheets: "googleSheets", - notion: "notion", - airtable: "airtable", - slack: "slack" - } + googleSheets: 'googleSheets', + notion: 'notion', + airtable: 'airtable', + slack: 'slack', + }, }, DataMigrationStatus: { - name: "DataMigrationStatus", + name: 'DataMigrationStatus', values: { - pending: "pending", - applied: "applied", - failed: "failed" - } + pending: 'pending', + applied: 'applied', + failed: 'failed', + }, }, WidgetPlacement: { - name: "WidgetPlacement", + name: 'WidgetPlacement', values: { - bottomLeft: "bottomLeft", - bottomRight: "bottomRight", - topLeft: "topLeft", - topRight: "topRight", - center: "center" - } + bottomLeft: 'bottomLeft', + bottomRight: 'bottomRight', + topLeft: 'topLeft', + topRight: 'topRight', + center: 'center', + }, }, OrganizationRole: { - name: "OrganizationRole", + name: 'OrganizationRole', values: { - owner: "owner", - manager: "manager", - member: "member", - billing: "billing" - } + owner: 'owner', + manager: 'manager', + member: 'member', + billing: 'billing', + }, }, MembershipRole: { - name: "MembershipRole", + name: 'MembershipRole', values: { - owner: "owner", - admin: "admin", - editor: "editor", - developer: "developer", - viewer: "viewer" - } + owner: 'owner', + admin: 'admin', + editor: 'editor', + developer: 'developer', + viewer: 'viewer', + }, }, ApiKeyPermission: { - name: "ApiKeyPermission", + name: 'ApiKeyPermission', values: { - read: "read", - write: "write", - manage: "manage" - } + read: 'read', + write: 'write', + manage: 'manage', + }, }, IdentityProvider: { - name: "IdentityProvider", + name: 'IdentityProvider', values: { - email: "email", - github: "github", - google: "google", - azuread: "azuread", - openid: "openid", - saml: "saml" - } + email: 'email', + github: 'github', + google: 'google', + azuread: 'azuread', + openid: 'openid', + saml: 'saml', + }, }, Role: { - name: "Role", + name: 'Role', values: { - project_manager: "project_manager", - engineer: "engineer", - founder: "founder", - marketing_specialist: "marketing_specialist", - other: "other" - } + project_manager: 'project_manager', + engineer: 'engineer', + founder: 'founder', + marketing_specialist: 'marketing_specialist', + other: 'other', + }, }, Objective: { - name: "Objective", + name: 'Objective', values: { - increase_conversion: "increase_conversion", - improve_user_retention: "improve_user_retention", - increase_user_adoption: "increase_user_adoption", - sharpen_marketing_messaging: "sharpen_marketing_messaging", - support_sales: "support_sales", - other: "other" - } + increase_conversion: 'increase_conversion', + improve_user_retention: 'improve_user_retention', + increase_user_adoption: 'increase_user_adoption', + sharpen_marketing_messaging: 'sharpen_marketing_messaging', + support_sales: 'support_sales', + other: 'other', + }, }, Intention: { - name: "Intention", + name: 'Intention', values: { - survey_user_segments: "survey_user_segments", - survey_at_specific_point_in_user_journey: "survey_at_specific_point_in_user_journey", - enrich_customer_profiles: "enrich_customer_profiles", - collect_all_user_feedback_on_one_platform: "collect_all_user_feedback_on_one_platform", - other: "other" - } + survey_user_segments: 'survey_user_segments', + survey_at_specific_point_in_user_journey: 'survey_at_specific_point_in_user_journey', + enrich_customer_profiles: 'enrich_customer_profiles', + collect_all_user_feedback_on_one_platform: 'collect_all_user_feedback_on_one_platform', + other: 'other', + }, }, InsightCategory: { - name: "InsightCategory", + name: 'InsightCategory', values: { - featureRequest: "featureRequest", - complaint: "complaint", - praise: "praise", - other: "other" - } + featureRequest: 'featureRequest', + complaint: 'complaint', + praise: 'praise', + other: 'other', + }, }, Sentiment: { - name: "Sentiment", + name: 'Sentiment', values: { - positive: "positive", - negative: "negative", - neutral: "neutral" - } + positive: 'positive', + negative: 'negative', + neutral: 'neutral', + }, }, TeamUserRole: { - name: "TeamUserRole", + name: 'TeamUserRole', values: { - admin: "admin", - contributor: "contributor" - } + admin: 'admin', + contributor: 'contributor', + }, }, ProjectTeamPermission: { - name: "ProjectTeamPermission", + name: 'ProjectTeamPermission', values: { - read: "read", - readWrite: "readWrite", - manage: "manage" - } - } + read: 'read', + readWrite: 'readWrite', + manage: 'manage', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/github-repos/trigger.dev/input.ts b/tests/e2e/github-repos/trigger.dev/input.ts index 394583e39..bbf2eaf79 100644 --- a/tests/e2e/github-repos/trigger.dev/input.ts +++ b/tests/e2e/github-repos/trigger.dev/input.ts @@ -5,1077 +5,1282 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type InvitationCodeFindManyArgs = $FindManyArgs<$Schema, "InvitationCode">; -export type InvitationCodeFindUniqueArgs = $FindUniqueArgs<$Schema, "InvitationCode">; -export type InvitationCodeFindFirstArgs = $FindFirstArgs<$Schema, "InvitationCode">; -export type InvitationCodeExistsArgs = $ExistsArgs<$Schema, "InvitationCode">; -export type InvitationCodeCreateArgs = $CreateArgs<$Schema, "InvitationCode">; -export type InvitationCodeCreateManyArgs = $CreateManyArgs<$Schema, "InvitationCode">; -export type InvitationCodeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "InvitationCode">; -export type InvitationCodeUpdateArgs = $UpdateArgs<$Schema, "InvitationCode">; -export type InvitationCodeUpdateManyArgs = $UpdateManyArgs<$Schema, "InvitationCode">; -export type InvitationCodeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "InvitationCode">; -export type InvitationCodeUpsertArgs = $UpsertArgs<$Schema, "InvitationCode">; -export type InvitationCodeDeleteArgs = $DeleteArgs<$Schema, "InvitationCode">; -export type InvitationCodeDeleteManyArgs = $DeleteManyArgs<$Schema, "InvitationCode">; -export type InvitationCodeCountArgs = $CountArgs<$Schema, "InvitationCode">; -export type InvitationCodeAggregateArgs = $AggregateArgs<$Schema, "InvitationCode">; -export type InvitationCodeGroupByArgs = $GroupByArgs<$Schema, "InvitationCode">; -export type InvitationCodeWhereInput = $WhereInput<$Schema, "InvitationCode">; -export type InvitationCodeSelect = $SelectInput<$Schema, "InvitationCode">; -export type InvitationCodeInclude = $IncludeInput<$Schema, "InvitationCode">; -export type InvitationCodeOmit = $OmitInput<$Schema, "InvitationCode">; -export type InvitationCodeGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "InvitationCode", Args, Options>; -export type AuthorizationCodeFindManyArgs = $FindManyArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeFindUniqueArgs = $FindUniqueArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeFindFirstArgs = $FindFirstArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeExistsArgs = $ExistsArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeCreateArgs = $CreateArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeCreateManyArgs = $CreateManyArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeUpdateArgs = $UpdateArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeUpdateManyArgs = $UpdateManyArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeUpsertArgs = $UpsertArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeDeleteArgs = $DeleteArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeDeleteManyArgs = $DeleteManyArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeCountArgs = $CountArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeAggregateArgs = $AggregateArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeGroupByArgs = $GroupByArgs<$Schema, "AuthorizationCode">; -export type AuthorizationCodeWhereInput = $WhereInput<$Schema, "AuthorizationCode">; -export type AuthorizationCodeSelect = $SelectInput<$Schema, "AuthorizationCode">; -export type AuthorizationCodeInclude = $IncludeInput<$Schema, "AuthorizationCode">; -export type AuthorizationCodeOmit = $OmitInput<$Schema, "AuthorizationCode">; -export type AuthorizationCodeGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "AuthorizationCode", Args, Options>; -export type PersonalAccessTokenFindManyArgs = $FindManyArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenFindFirstArgs = $FindFirstArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenExistsArgs = $ExistsArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenCreateArgs = $CreateArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenCreateManyArgs = $CreateManyArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenUpdateArgs = $UpdateArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenUpsertArgs = $UpsertArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenDeleteArgs = $DeleteArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenCountArgs = $CountArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenAggregateArgs = $AggregateArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenGroupByArgs = $GroupByArgs<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenWhereInput = $WhereInput<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenSelect = $SelectInput<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenInclude = $IncludeInput<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenOmit = $OmitInput<$Schema, "PersonalAccessToken">; -export type PersonalAccessTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "PersonalAccessToken", Args, Options>; -export type OrganizationFindManyArgs = $FindManyArgs<$Schema, "Organization">; -export type OrganizationFindUniqueArgs = $FindUniqueArgs<$Schema, "Organization">; -export type OrganizationFindFirstArgs = $FindFirstArgs<$Schema, "Organization">; -export type OrganizationExistsArgs = $ExistsArgs<$Schema, "Organization">; -export type OrganizationCreateArgs = $CreateArgs<$Schema, "Organization">; -export type OrganizationCreateManyArgs = $CreateManyArgs<$Schema, "Organization">; -export type OrganizationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Organization">; -export type OrganizationUpdateArgs = $UpdateArgs<$Schema, "Organization">; -export type OrganizationUpdateManyArgs = $UpdateManyArgs<$Schema, "Organization">; -export type OrganizationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Organization">; -export type OrganizationUpsertArgs = $UpsertArgs<$Schema, "Organization">; -export type OrganizationDeleteArgs = $DeleteArgs<$Schema, "Organization">; -export type OrganizationDeleteManyArgs = $DeleteManyArgs<$Schema, "Organization">; -export type OrganizationCountArgs = $CountArgs<$Schema, "Organization">; -export type OrganizationAggregateArgs = $AggregateArgs<$Schema, "Organization">; -export type OrganizationGroupByArgs = $GroupByArgs<$Schema, "Organization">; -export type OrganizationWhereInput = $WhereInput<$Schema, "Organization">; -export type OrganizationSelect = $SelectInput<$Schema, "Organization">; -export type OrganizationInclude = $IncludeInput<$Schema, "Organization">; -export type OrganizationOmit = $OmitInput<$Schema, "Organization">; -export type OrganizationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Organization", Args, Options>; -export type OrgMemberFindManyArgs = $FindManyArgs<$Schema, "OrgMember">; -export type OrgMemberFindUniqueArgs = $FindUniqueArgs<$Schema, "OrgMember">; -export type OrgMemberFindFirstArgs = $FindFirstArgs<$Schema, "OrgMember">; -export type OrgMemberExistsArgs = $ExistsArgs<$Schema, "OrgMember">; -export type OrgMemberCreateArgs = $CreateArgs<$Schema, "OrgMember">; -export type OrgMemberCreateManyArgs = $CreateManyArgs<$Schema, "OrgMember">; -export type OrgMemberCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OrgMember">; -export type OrgMemberUpdateArgs = $UpdateArgs<$Schema, "OrgMember">; -export type OrgMemberUpdateManyArgs = $UpdateManyArgs<$Schema, "OrgMember">; -export type OrgMemberUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OrgMember">; -export type OrgMemberUpsertArgs = $UpsertArgs<$Schema, "OrgMember">; -export type OrgMemberDeleteArgs = $DeleteArgs<$Schema, "OrgMember">; -export type OrgMemberDeleteManyArgs = $DeleteManyArgs<$Schema, "OrgMember">; -export type OrgMemberCountArgs = $CountArgs<$Schema, "OrgMember">; -export type OrgMemberAggregateArgs = $AggregateArgs<$Schema, "OrgMember">; -export type OrgMemberGroupByArgs = $GroupByArgs<$Schema, "OrgMember">; -export type OrgMemberWhereInput = $WhereInput<$Schema, "OrgMember">; -export type OrgMemberSelect = $SelectInput<$Schema, "OrgMember">; -export type OrgMemberInclude = $IncludeInput<$Schema, "OrgMember">; -export type OrgMemberOmit = $OmitInput<$Schema, "OrgMember">; -export type OrgMemberGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OrgMember", Args, Options>; -export type OrgMemberInviteFindManyArgs = $FindManyArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteFindUniqueArgs = $FindUniqueArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteFindFirstArgs = $FindFirstArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteExistsArgs = $ExistsArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteCreateArgs = $CreateArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteCreateManyArgs = $CreateManyArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteUpdateArgs = $UpdateArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteUpdateManyArgs = $UpdateManyArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteUpsertArgs = $UpsertArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteDeleteArgs = $DeleteArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteDeleteManyArgs = $DeleteManyArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteCountArgs = $CountArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteAggregateArgs = $AggregateArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteGroupByArgs = $GroupByArgs<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteWhereInput = $WhereInput<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteSelect = $SelectInput<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteInclude = $IncludeInput<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteOmit = $OmitInput<$Schema, "OrgMemberInvite">; -export type OrgMemberInviteGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OrgMemberInvite", Args, Options>; -export type RuntimeEnvironmentFindManyArgs = $FindManyArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentFindUniqueArgs = $FindUniqueArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentFindFirstArgs = $FindFirstArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentExistsArgs = $ExistsArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentCreateArgs = $CreateArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentCreateManyArgs = $CreateManyArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentUpdateArgs = $UpdateArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentUpdateManyArgs = $UpdateManyArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentUpsertArgs = $UpsertArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentDeleteArgs = $DeleteArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentDeleteManyArgs = $DeleteManyArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentCountArgs = $CountArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentAggregateArgs = $AggregateArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentGroupByArgs = $GroupByArgs<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentWhereInput = $WhereInput<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentSelect = $SelectInput<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentInclude = $IncludeInput<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentOmit = $OmitInput<$Schema, "RuntimeEnvironment">; -export type RuntimeEnvironmentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RuntimeEnvironment", Args, Options>; -export type ProjectFindManyArgs = $FindManyArgs<$Schema, "Project">; -export type ProjectFindUniqueArgs = $FindUniqueArgs<$Schema, "Project">; -export type ProjectFindFirstArgs = $FindFirstArgs<$Schema, "Project">; -export type ProjectExistsArgs = $ExistsArgs<$Schema, "Project">; -export type ProjectCreateArgs = $CreateArgs<$Schema, "Project">; -export type ProjectCreateManyArgs = $CreateManyArgs<$Schema, "Project">; -export type ProjectCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Project">; -export type ProjectUpdateArgs = $UpdateArgs<$Schema, "Project">; -export type ProjectUpdateManyArgs = $UpdateManyArgs<$Schema, "Project">; -export type ProjectUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Project">; -export type ProjectUpsertArgs = $UpsertArgs<$Schema, "Project">; -export type ProjectDeleteArgs = $DeleteArgs<$Schema, "Project">; -export type ProjectDeleteManyArgs = $DeleteManyArgs<$Schema, "Project">; -export type ProjectCountArgs = $CountArgs<$Schema, "Project">; -export type ProjectAggregateArgs = $AggregateArgs<$Schema, "Project">; -export type ProjectGroupByArgs = $GroupByArgs<$Schema, "Project">; -export type ProjectWhereInput = $WhereInput<$Schema, "Project">; -export type ProjectSelect = $SelectInput<$Schema, "Project">; -export type ProjectInclude = $IncludeInput<$Schema, "Project">; -export type ProjectOmit = $OmitInput<$Schema, "Project">; -export type ProjectGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Project", Args, Options>; -export type SecretReferenceFindManyArgs = $FindManyArgs<$Schema, "SecretReference">; -export type SecretReferenceFindUniqueArgs = $FindUniqueArgs<$Schema, "SecretReference">; -export type SecretReferenceFindFirstArgs = $FindFirstArgs<$Schema, "SecretReference">; -export type SecretReferenceExistsArgs = $ExistsArgs<$Schema, "SecretReference">; -export type SecretReferenceCreateArgs = $CreateArgs<$Schema, "SecretReference">; -export type SecretReferenceCreateManyArgs = $CreateManyArgs<$Schema, "SecretReference">; -export type SecretReferenceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SecretReference">; -export type SecretReferenceUpdateArgs = $UpdateArgs<$Schema, "SecretReference">; -export type SecretReferenceUpdateManyArgs = $UpdateManyArgs<$Schema, "SecretReference">; -export type SecretReferenceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SecretReference">; -export type SecretReferenceUpsertArgs = $UpsertArgs<$Schema, "SecretReference">; -export type SecretReferenceDeleteArgs = $DeleteArgs<$Schema, "SecretReference">; -export type SecretReferenceDeleteManyArgs = $DeleteManyArgs<$Schema, "SecretReference">; -export type SecretReferenceCountArgs = $CountArgs<$Schema, "SecretReference">; -export type SecretReferenceAggregateArgs = $AggregateArgs<$Schema, "SecretReference">; -export type SecretReferenceGroupByArgs = $GroupByArgs<$Schema, "SecretReference">; -export type SecretReferenceWhereInput = $WhereInput<$Schema, "SecretReference">; -export type SecretReferenceSelect = $SelectInput<$Schema, "SecretReference">; -export type SecretReferenceInclude = $IncludeInput<$Schema, "SecretReference">; -export type SecretReferenceOmit = $OmitInput<$Schema, "SecretReference">; -export type SecretReferenceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SecretReference", Args, Options>; -export type SecretStoreFindManyArgs = $FindManyArgs<$Schema, "SecretStore">; -export type SecretStoreFindUniqueArgs = $FindUniqueArgs<$Schema, "SecretStore">; -export type SecretStoreFindFirstArgs = $FindFirstArgs<$Schema, "SecretStore">; -export type SecretStoreExistsArgs = $ExistsArgs<$Schema, "SecretStore">; -export type SecretStoreCreateArgs = $CreateArgs<$Schema, "SecretStore">; -export type SecretStoreCreateManyArgs = $CreateManyArgs<$Schema, "SecretStore">; -export type SecretStoreCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SecretStore">; -export type SecretStoreUpdateArgs = $UpdateArgs<$Schema, "SecretStore">; -export type SecretStoreUpdateManyArgs = $UpdateManyArgs<$Schema, "SecretStore">; -export type SecretStoreUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SecretStore">; -export type SecretStoreUpsertArgs = $UpsertArgs<$Schema, "SecretStore">; -export type SecretStoreDeleteArgs = $DeleteArgs<$Schema, "SecretStore">; -export type SecretStoreDeleteManyArgs = $DeleteManyArgs<$Schema, "SecretStore">; -export type SecretStoreCountArgs = $CountArgs<$Schema, "SecretStore">; -export type SecretStoreAggregateArgs = $AggregateArgs<$Schema, "SecretStore">; -export type SecretStoreGroupByArgs = $GroupByArgs<$Schema, "SecretStore">; -export type SecretStoreWhereInput = $WhereInput<$Schema, "SecretStore">; -export type SecretStoreSelect = $SelectInput<$Schema, "SecretStore">; -export type SecretStoreInclude = $IncludeInput<$Schema, "SecretStore">; -export type SecretStoreOmit = $OmitInput<$Schema, "SecretStore">; -export type SecretStoreGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SecretStore", Args, Options>; -export type DataMigrationFindManyArgs = $FindManyArgs<$Schema, "DataMigration">; -export type DataMigrationFindUniqueArgs = $FindUniqueArgs<$Schema, "DataMigration">; -export type DataMigrationFindFirstArgs = $FindFirstArgs<$Schema, "DataMigration">; -export type DataMigrationExistsArgs = $ExistsArgs<$Schema, "DataMigration">; -export type DataMigrationCreateArgs = $CreateArgs<$Schema, "DataMigration">; -export type DataMigrationCreateManyArgs = $CreateManyArgs<$Schema, "DataMigration">; -export type DataMigrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "DataMigration">; -export type DataMigrationUpdateArgs = $UpdateArgs<$Schema, "DataMigration">; -export type DataMigrationUpdateManyArgs = $UpdateManyArgs<$Schema, "DataMigration">; -export type DataMigrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "DataMigration">; -export type DataMigrationUpsertArgs = $UpsertArgs<$Schema, "DataMigration">; -export type DataMigrationDeleteArgs = $DeleteArgs<$Schema, "DataMigration">; -export type DataMigrationDeleteManyArgs = $DeleteManyArgs<$Schema, "DataMigration">; -export type DataMigrationCountArgs = $CountArgs<$Schema, "DataMigration">; -export type DataMigrationAggregateArgs = $AggregateArgs<$Schema, "DataMigration">; -export type DataMigrationGroupByArgs = $GroupByArgs<$Schema, "DataMigration">; -export type DataMigrationWhereInput = $WhereInput<$Schema, "DataMigration">; -export type DataMigrationSelect = $SelectInput<$Schema, "DataMigration">; -export type DataMigrationInclude = $IncludeInput<$Schema, "DataMigration">; -export type DataMigrationOmit = $OmitInput<$Schema, "DataMigration">; -export type DataMigrationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "DataMigration", Args, Options>; -export type BackgroundWorkerFindManyArgs = $FindManyArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerFindUniqueArgs = $FindUniqueArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerFindFirstArgs = $FindFirstArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerExistsArgs = $ExistsArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerCreateArgs = $CreateArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerCreateManyArgs = $CreateManyArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerUpdateArgs = $UpdateArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerUpdateManyArgs = $UpdateManyArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerUpsertArgs = $UpsertArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerDeleteArgs = $DeleteArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerDeleteManyArgs = $DeleteManyArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerCountArgs = $CountArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerAggregateArgs = $AggregateArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerGroupByArgs = $GroupByArgs<$Schema, "BackgroundWorker">; -export type BackgroundWorkerWhereInput = $WhereInput<$Schema, "BackgroundWorker">; -export type BackgroundWorkerSelect = $SelectInput<$Schema, "BackgroundWorker">; -export type BackgroundWorkerInclude = $IncludeInput<$Schema, "BackgroundWorker">; -export type BackgroundWorkerOmit = $OmitInput<$Schema, "BackgroundWorker">; -export type BackgroundWorkerGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BackgroundWorker", Args, Options>; -export type BackgroundWorkerFileFindManyArgs = $FindManyArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileFindUniqueArgs = $FindUniqueArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileFindFirstArgs = $FindFirstArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileExistsArgs = $ExistsArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileCreateArgs = $CreateArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileCreateManyArgs = $CreateManyArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileUpdateArgs = $UpdateArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileUpdateManyArgs = $UpdateManyArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileUpsertArgs = $UpsertArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileDeleteArgs = $DeleteArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileDeleteManyArgs = $DeleteManyArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileCountArgs = $CountArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileAggregateArgs = $AggregateArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileGroupByArgs = $GroupByArgs<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileWhereInput = $WhereInput<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileSelect = $SelectInput<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileInclude = $IncludeInput<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileOmit = $OmitInput<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerFileGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BackgroundWorkerFile", Args, Options>; -export type BackgroundWorkerTaskFindManyArgs = $FindManyArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskFindUniqueArgs = $FindUniqueArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskFindFirstArgs = $FindFirstArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskExistsArgs = $ExistsArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskCreateArgs = $CreateArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskCreateManyArgs = $CreateManyArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskUpdateArgs = $UpdateArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskUpdateManyArgs = $UpdateManyArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskUpsertArgs = $UpsertArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskDeleteArgs = $DeleteArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskDeleteManyArgs = $DeleteManyArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskCountArgs = $CountArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskAggregateArgs = $AggregateArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskGroupByArgs = $GroupByArgs<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskWhereInput = $WhereInput<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskSelect = $SelectInput<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskInclude = $IncludeInput<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskOmit = $OmitInput<$Schema, "BackgroundWorkerTask">; -export type BackgroundWorkerTaskGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BackgroundWorkerTask", Args, Options>; -export type TaskRunFindManyArgs = $FindManyArgs<$Schema, "TaskRun">; -export type TaskRunFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRun">; -export type TaskRunFindFirstArgs = $FindFirstArgs<$Schema, "TaskRun">; -export type TaskRunExistsArgs = $ExistsArgs<$Schema, "TaskRun">; -export type TaskRunCreateArgs = $CreateArgs<$Schema, "TaskRun">; -export type TaskRunCreateManyArgs = $CreateManyArgs<$Schema, "TaskRun">; -export type TaskRunCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRun">; -export type TaskRunUpdateArgs = $UpdateArgs<$Schema, "TaskRun">; -export type TaskRunUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRun">; -export type TaskRunUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRun">; -export type TaskRunUpsertArgs = $UpsertArgs<$Schema, "TaskRun">; -export type TaskRunDeleteArgs = $DeleteArgs<$Schema, "TaskRun">; -export type TaskRunDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRun">; -export type TaskRunCountArgs = $CountArgs<$Schema, "TaskRun">; -export type TaskRunAggregateArgs = $AggregateArgs<$Schema, "TaskRun">; -export type TaskRunGroupByArgs = $GroupByArgs<$Schema, "TaskRun">; -export type TaskRunWhereInput = $WhereInput<$Schema, "TaskRun">; -export type TaskRunSelect = $SelectInput<$Schema, "TaskRun">; -export type TaskRunInclude = $IncludeInput<$Schema, "TaskRun">; -export type TaskRunOmit = $OmitInput<$Schema, "TaskRun">; -export type TaskRunGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRun", Args, Options>; -export type TaskRunExecutionSnapshotFindManyArgs = $FindManyArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotExistsArgs = $ExistsArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotCreateArgs = $CreateArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotUpdateArgs = $UpdateArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotUpsertArgs = $UpsertArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotDeleteArgs = $DeleteArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotCountArgs = $CountArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotAggregateArgs = $AggregateArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotGroupByArgs = $GroupByArgs<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotWhereInput = $WhereInput<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotSelect = $SelectInput<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotInclude = $IncludeInput<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotOmit = $OmitInput<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunExecutionSnapshotGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunExecutionSnapshot", Args, Options>; -export type TaskRunCheckpointFindManyArgs = $FindManyArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointExistsArgs = $ExistsArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointCreateArgs = $CreateArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointUpdateArgs = $UpdateArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointUpsertArgs = $UpsertArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointDeleteArgs = $DeleteArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointCountArgs = $CountArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointAggregateArgs = $AggregateArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointGroupByArgs = $GroupByArgs<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointWhereInput = $WhereInput<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointSelect = $SelectInput<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointInclude = $IncludeInput<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointOmit = $OmitInput<$Schema, "TaskRunCheckpoint">; -export type TaskRunCheckpointGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunCheckpoint", Args, Options>; -export type WaitpointFindManyArgs = $FindManyArgs<$Schema, "Waitpoint">; -export type WaitpointFindUniqueArgs = $FindUniqueArgs<$Schema, "Waitpoint">; -export type WaitpointFindFirstArgs = $FindFirstArgs<$Schema, "Waitpoint">; -export type WaitpointExistsArgs = $ExistsArgs<$Schema, "Waitpoint">; -export type WaitpointCreateArgs = $CreateArgs<$Schema, "Waitpoint">; -export type WaitpointCreateManyArgs = $CreateManyArgs<$Schema, "Waitpoint">; -export type WaitpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Waitpoint">; -export type WaitpointUpdateArgs = $UpdateArgs<$Schema, "Waitpoint">; -export type WaitpointUpdateManyArgs = $UpdateManyArgs<$Schema, "Waitpoint">; -export type WaitpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Waitpoint">; -export type WaitpointUpsertArgs = $UpsertArgs<$Schema, "Waitpoint">; -export type WaitpointDeleteArgs = $DeleteArgs<$Schema, "Waitpoint">; -export type WaitpointDeleteManyArgs = $DeleteManyArgs<$Schema, "Waitpoint">; -export type WaitpointCountArgs = $CountArgs<$Schema, "Waitpoint">; -export type WaitpointAggregateArgs = $AggregateArgs<$Schema, "Waitpoint">; -export type WaitpointGroupByArgs = $GroupByArgs<$Schema, "Waitpoint">; -export type WaitpointWhereInput = $WhereInput<$Schema, "Waitpoint">; -export type WaitpointSelect = $SelectInput<$Schema, "Waitpoint">; -export type WaitpointInclude = $IncludeInput<$Schema, "Waitpoint">; -export type WaitpointOmit = $OmitInput<$Schema, "Waitpoint">; -export type WaitpointGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Waitpoint", Args, Options>; -export type TaskRunWaitpointFindManyArgs = $FindManyArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointExistsArgs = $ExistsArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointCreateArgs = $CreateArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointUpdateArgs = $UpdateArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointUpsertArgs = $UpsertArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointDeleteArgs = $DeleteArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointCountArgs = $CountArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointAggregateArgs = $AggregateArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointGroupByArgs = $GroupByArgs<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointWhereInput = $WhereInput<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointSelect = $SelectInput<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointInclude = $IncludeInput<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointOmit = $OmitInput<$Schema, "TaskRunWaitpoint">; -export type TaskRunWaitpointGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunWaitpoint", Args, Options>; -export type WaitpointTagFindManyArgs = $FindManyArgs<$Schema, "WaitpointTag">; -export type WaitpointTagFindUniqueArgs = $FindUniqueArgs<$Schema, "WaitpointTag">; -export type WaitpointTagFindFirstArgs = $FindFirstArgs<$Schema, "WaitpointTag">; -export type WaitpointTagExistsArgs = $ExistsArgs<$Schema, "WaitpointTag">; -export type WaitpointTagCreateArgs = $CreateArgs<$Schema, "WaitpointTag">; -export type WaitpointTagCreateManyArgs = $CreateManyArgs<$Schema, "WaitpointTag">; -export type WaitpointTagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WaitpointTag">; -export type WaitpointTagUpdateArgs = $UpdateArgs<$Schema, "WaitpointTag">; -export type WaitpointTagUpdateManyArgs = $UpdateManyArgs<$Schema, "WaitpointTag">; -export type WaitpointTagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WaitpointTag">; -export type WaitpointTagUpsertArgs = $UpsertArgs<$Schema, "WaitpointTag">; -export type WaitpointTagDeleteArgs = $DeleteArgs<$Schema, "WaitpointTag">; -export type WaitpointTagDeleteManyArgs = $DeleteManyArgs<$Schema, "WaitpointTag">; -export type WaitpointTagCountArgs = $CountArgs<$Schema, "WaitpointTag">; -export type WaitpointTagAggregateArgs = $AggregateArgs<$Schema, "WaitpointTag">; -export type WaitpointTagGroupByArgs = $GroupByArgs<$Schema, "WaitpointTag">; -export type WaitpointTagWhereInput = $WhereInput<$Schema, "WaitpointTag">; -export type WaitpointTagSelect = $SelectInput<$Schema, "WaitpointTag">; -export type WaitpointTagInclude = $IncludeInput<$Schema, "WaitpointTag">; -export type WaitpointTagOmit = $OmitInput<$Schema, "WaitpointTag">; -export type WaitpointTagGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WaitpointTag", Args, Options>; -export type FeatureFlagFindManyArgs = $FindManyArgs<$Schema, "FeatureFlag">; -export type FeatureFlagFindUniqueArgs = $FindUniqueArgs<$Schema, "FeatureFlag">; -export type FeatureFlagFindFirstArgs = $FindFirstArgs<$Schema, "FeatureFlag">; -export type FeatureFlagExistsArgs = $ExistsArgs<$Schema, "FeatureFlag">; -export type FeatureFlagCreateArgs = $CreateArgs<$Schema, "FeatureFlag">; -export type FeatureFlagCreateManyArgs = $CreateManyArgs<$Schema, "FeatureFlag">; -export type FeatureFlagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "FeatureFlag">; -export type FeatureFlagUpdateArgs = $UpdateArgs<$Schema, "FeatureFlag">; -export type FeatureFlagUpdateManyArgs = $UpdateManyArgs<$Schema, "FeatureFlag">; -export type FeatureFlagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "FeatureFlag">; -export type FeatureFlagUpsertArgs = $UpsertArgs<$Schema, "FeatureFlag">; -export type FeatureFlagDeleteArgs = $DeleteArgs<$Schema, "FeatureFlag">; -export type FeatureFlagDeleteManyArgs = $DeleteManyArgs<$Schema, "FeatureFlag">; -export type FeatureFlagCountArgs = $CountArgs<$Schema, "FeatureFlag">; -export type FeatureFlagAggregateArgs = $AggregateArgs<$Schema, "FeatureFlag">; -export type FeatureFlagGroupByArgs = $GroupByArgs<$Schema, "FeatureFlag">; -export type FeatureFlagWhereInput = $WhereInput<$Schema, "FeatureFlag">; -export type FeatureFlagSelect = $SelectInput<$Schema, "FeatureFlag">; -export type FeatureFlagInclude = $IncludeInput<$Schema, "FeatureFlag">; -export type FeatureFlagOmit = $OmitInput<$Schema, "FeatureFlag">; -export type FeatureFlagGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "FeatureFlag", Args, Options>; -export type WorkerInstanceFindManyArgs = $FindManyArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceFindFirstArgs = $FindFirstArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceExistsArgs = $ExistsArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceCreateArgs = $CreateArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceCreateManyArgs = $CreateManyArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceUpdateArgs = $UpdateArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceUpsertArgs = $UpsertArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceDeleteArgs = $DeleteArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceCountArgs = $CountArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceAggregateArgs = $AggregateArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceGroupByArgs = $GroupByArgs<$Schema, "WorkerInstance">; -export type WorkerInstanceWhereInput = $WhereInput<$Schema, "WorkerInstance">; -export type WorkerInstanceSelect = $SelectInput<$Schema, "WorkerInstance">; -export type WorkerInstanceInclude = $IncludeInput<$Schema, "WorkerInstance">; -export type WorkerInstanceOmit = $OmitInput<$Schema, "WorkerInstance">; -export type WorkerInstanceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkerInstance", Args, Options>; -export type WorkerInstanceGroupFindManyArgs = $FindManyArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupFindFirstArgs = $FindFirstArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupExistsArgs = $ExistsArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupCreateArgs = $CreateArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupCreateManyArgs = $CreateManyArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupUpdateArgs = $UpdateArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupUpsertArgs = $UpsertArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupDeleteArgs = $DeleteArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupCountArgs = $CountArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupAggregateArgs = $AggregateArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupGroupByArgs = $GroupByArgs<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupWhereInput = $WhereInput<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupSelect = $SelectInput<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupInclude = $IncludeInput<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupOmit = $OmitInput<$Schema, "WorkerInstanceGroup">; -export type WorkerInstanceGroupGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkerInstanceGroup", Args, Options>; -export type WorkerGroupTokenFindManyArgs = $FindManyArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenFindFirstArgs = $FindFirstArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenExistsArgs = $ExistsArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenCreateArgs = $CreateArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenCreateManyArgs = $CreateManyArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenUpdateArgs = $UpdateArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenUpsertArgs = $UpsertArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenDeleteArgs = $DeleteArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenCountArgs = $CountArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenAggregateArgs = $AggregateArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenGroupByArgs = $GroupByArgs<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenWhereInput = $WhereInput<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenSelect = $SelectInput<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenInclude = $IncludeInput<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenOmit = $OmitInput<$Schema, "WorkerGroupToken">; -export type WorkerGroupTokenGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkerGroupToken", Args, Options>; -export type TaskRunTagFindManyArgs = $FindManyArgs<$Schema, "TaskRunTag">; -export type TaskRunTagFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunTag">; -export type TaskRunTagFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunTag">; -export type TaskRunTagExistsArgs = $ExistsArgs<$Schema, "TaskRunTag">; -export type TaskRunTagCreateArgs = $CreateArgs<$Schema, "TaskRunTag">; -export type TaskRunTagCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunTag">; -export type TaskRunTagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunTag">; -export type TaskRunTagUpdateArgs = $UpdateArgs<$Schema, "TaskRunTag">; -export type TaskRunTagUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunTag">; -export type TaskRunTagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunTag">; -export type TaskRunTagUpsertArgs = $UpsertArgs<$Schema, "TaskRunTag">; -export type TaskRunTagDeleteArgs = $DeleteArgs<$Schema, "TaskRunTag">; -export type TaskRunTagDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunTag">; -export type TaskRunTagCountArgs = $CountArgs<$Schema, "TaskRunTag">; -export type TaskRunTagAggregateArgs = $AggregateArgs<$Schema, "TaskRunTag">; -export type TaskRunTagGroupByArgs = $GroupByArgs<$Schema, "TaskRunTag">; -export type TaskRunTagWhereInput = $WhereInput<$Schema, "TaskRunTag">; -export type TaskRunTagSelect = $SelectInput<$Schema, "TaskRunTag">; -export type TaskRunTagInclude = $IncludeInput<$Schema, "TaskRunTag">; -export type TaskRunTagOmit = $OmitInput<$Schema, "TaskRunTag">; -export type TaskRunTagGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunTag", Args, Options>; -export type TaskRunDependencyFindManyArgs = $FindManyArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyExistsArgs = $ExistsArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyCreateArgs = $CreateArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyUpdateArgs = $UpdateArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyUpsertArgs = $UpsertArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyDeleteArgs = $DeleteArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyCountArgs = $CountArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyAggregateArgs = $AggregateArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyGroupByArgs = $GroupByArgs<$Schema, "TaskRunDependency">; -export type TaskRunDependencyWhereInput = $WhereInput<$Schema, "TaskRunDependency">; -export type TaskRunDependencySelect = $SelectInput<$Schema, "TaskRunDependency">; -export type TaskRunDependencyInclude = $IncludeInput<$Schema, "TaskRunDependency">; -export type TaskRunDependencyOmit = $OmitInput<$Schema, "TaskRunDependency">; -export type TaskRunDependencyGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunDependency", Args, Options>; -export type TaskRunCounterFindManyArgs = $FindManyArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterExistsArgs = $ExistsArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterCreateArgs = $CreateArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterUpdateArgs = $UpdateArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterUpsertArgs = $UpsertArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterDeleteArgs = $DeleteArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterCountArgs = $CountArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterAggregateArgs = $AggregateArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterGroupByArgs = $GroupByArgs<$Schema, "TaskRunCounter">; -export type TaskRunCounterWhereInput = $WhereInput<$Schema, "TaskRunCounter">; -export type TaskRunCounterSelect = $SelectInput<$Schema, "TaskRunCounter">; -export type TaskRunCounterInclude = $IncludeInput<$Schema, "TaskRunCounter">; -export type TaskRunCounterOmit = $OmitInput<$Schema, "TaskRunCounter">; -export type TaskRunCounterGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunCounter", Args, Options>; -export type TaskRunNumberCounterFindManyArgs = $FindManyArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterExistsArgs = $ExistsArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterCreateArgs = $CreateArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterUpdateArgs = $UpdateArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterUpsertArgs = $UpsertArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterDeleteArgs = $DeleteArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterCountArgs = $CountArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterAggregateArgs = $AggregateArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterGroupByArgs = $GroupByArgs<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterWhereInput = $WhereInput<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterSelect = $SelectInput<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterInclude = $IncludeInput<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterOmit = $OmitInput<$Schema, "TaskRunNumberCounter">; -export type TaskRunNumberCounterGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunNumberCounter", Args, Options>; -export type TaskRunAttemptFindManyArgs = $FindManyArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptFindFirstArgs = $FindFirstArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptExistsArgs = $ExistsArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptCreateArgs = $CreateArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptCreateManyArgs = $CreateManyArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptUpdateArgs = $UpdateArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptUpsertArgs = $UpsertArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptDeleteArgs = $DeleteArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptCountArgs = $CountArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptAggregateArgs = $AggregateArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptGroupByArgs = $GroupByArgs<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptWhereInput = $WhereInput<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptSelect = $SelectInput<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptInclude = $IncludeInput<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptOmit = $OmitInput<$Schema, "TaskRunAttempt">; -export type TaskRunAttemptGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskRunAttempt", Args, Options>; -export type TaskEventFindManyArgs = $FindManyArgs<$Schema, "TaskEvent">; -export type TaskEventFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskEvent">; -export type TaskEventFindFirstArgs = $FindFirstArgs<$Schema, "TaskEvent">; -export type TaskEventExistsArgs = $ExistsArgs<$Schema, "TaskEvent">; -export type TaskEventCreateArgs = $CreateArgs<$Schema, "TaskEvent">; -export type TaskEventCreateManyArgs = $CreateManyArgs<$Schema, "TaskEvent">; -export type TaskEventCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskEvent">; -export type TaskEventUpdateArgs = $UpdateArgs<$Schema, "TaskEvent">; -export type TaskEventUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskEvent">; -export type TaskEventUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskEvent">; -export type TaskEventUpsertArgs = $UpsertArgs<$Schema, "TaskEvent">; -export type TaskEventDeleteArgs = $DeleteArgs<$Schema, "TaskEvent">; -export type TaskEventDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskEvent">; -export type TaskEventCountArgs = $CountArgs<$Schema, "TaskEvent">; -export type TaskEventAggregateArgs = $AggregateArgs<$Schema, "TaskEvent">; -export type TaskEventGroupByArgs = $GroupByArgs<$Schema, "TaskEvent">; -export type TaskEventWhereInput = $WhereInput<$Schema, "TaskEvent">; -export type TaskEventSelect = $SelectInput<$Schema, "TaskEvent">; -export type TaskEventInclude = $IncludeInput<$Schema, "TaskEvent">; -export type TaskEventOmit = $OmitInput<$Schema, "TaskEvent">; -export type TaskEventGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskEvent", Args, Options>; -export type TaskQueueFindManyArgs = $FindManyArgs<$Schema, "TaskQueue">; -export type TaskQueueFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskQueue">; -export type TaskQueueFindFirstArgs = $FindFirstArgs<$Schema, "TaskQueue">; -export type TaskQueueExistsArgs = $ExistsArgs<$Schema, "TaskQueue">; -export type TaskQueueCreateArgs = $CreateArgs<$Schema, "TaskQueue">; -export type TaskQueueCreateManyArgs = $CreateManyArgs<$Schema, "TaskQueue">; -export type TaskQueueCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskQueue">; -export type TaskQueueUpdateArgs = $UpdateArgs<$Schema, "TaskQueue">; -export type TaskQueueUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskQueue">; -export type TaskQueueUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskQueue">; -export type TaskQueueUpsertArgs = $UpsertArgs<$Schema, "TaskQueue">; -export type TaskQueueDeleteArgs = $DeleteArgs<$Schema, "TaskQueue">; -export type TaskQueueDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskQueue">; -export type TaskQueueCountArgs = $CountArgs<$Schema, "TaskQueue">; -export type TaskQueueAggregateArgs = $AggregateArgs<$Schema, "TaskQueue">; -export type TaskQueueGroupByArgs = $GroupByArgs<$Schema, "TaskQueue">; -export type TaskQueueWhereInput = $WhereInput<$Schema, "TaskQueue">; -export type TaskQueueSelect = $SelectInput<$Schema, "TaskQueue">; -export type TaskQueueInclude = $IncludeInput<$Schema, "TaskQueue">; -export type TaskQueueOmit = $OmitInput<$Schema, "TaskQueue">; -export type TaskQueueGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskQueue", Args, Options>; -export type BatchTaskRunFindManyArgs = $FindManyArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunFindUniqueArgs = $FindUniqueArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunFindFirstArgs = $FindFirstArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunExistsArgs = $ExistsArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunCreateArgs = $CreateArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunCreateManyArgs = $CreateManyArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunUpdateArgs = $UpdateArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunUpdateManyArgs = $UpdateManyArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunUpsertArgs = $UpsertArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunDeleteArgs = $DeleteArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunDeleteManyArgs = $DeleteManyArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunCountArgs = $CountArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunAggregateArgs = $AggregateArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunGroupByArgs = $GroupByArgs<$Schema, "BatchTaskRun">; -export type BatchTaskRunWhereInput = $WhereInput<$Schema, "BatchTaskRun">; -export type BatchTaskRunSelect = $SelectInput<$Schema, "BatchTaskRun">; -export type BatchTaskRunInclude = $IncludeInput<$Schema, "BatchTaskRun">; -export type BatchTaskRunOmit = $OmitInput<$Schema, "BatchTaskRun">; -export type BatchTaskRunGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BatchTaskRun", Args, Options>; -export type BatchTaskRunItemFindManyArgs = $FindManyArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemFindUniqueArgs = $FindUniqueArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemFindFirstArgs = $FindFirstArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemExistsArgs = $ExistsArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemCreateArgs = $CreateArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemCreateManyArgs = $CreateManyArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemUpdateArgs = $UpdateArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemUpdateManyArgs = $UpdateManyArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemUpsertArgs = $UpsertArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemDeleteArgs = $DeleteArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemDeleteManyArgs = $DeleteManyArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemCountArgs = $CountArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemAggregateArgs = $AggregateArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemGroupByArgs = $GroupByArgs<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemWhereInput = $WhereInput<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemSelect = $SelectInput<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemInclude = $IncludeInput<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemOmit = $OmitInput<$Schema, "BatchTaskRunItem">; -export type BatchTaskRunItemGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BatchTaskRunItem", Args, Options>; -export type EnvironmentVariableFindManyArgs = $FindManyArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableFindUniqueArgs = $FindUniqueArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableFindFirstArgs = $FindFirstArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableExistsArgs = $ExistsArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableCreateArgs = $CreateArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableCreateManyArgs = $CreateManyArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableUpdateArgs = $UpdateArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableUpdateManyArgs = $UpdateManyArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableUpsertArgs = $UpsertArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableDeleteArgs = $DeleteArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableDeleteManyArgs = $DeleteManyArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableCountArgs = $CountArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableAggregateArgs = $AggregateArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableGroupByArgs = $GroupByArgs<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableWhereInput = $WhereInput<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableSelect = $SelectInput<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableInclude = $IncludeInput<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableOmit = $OmitInput<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "EnvironmentVariable", Args, Options>; -export type EnvironmentVariableValueFindManyArgs = $FindManyArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueFindUniqueArgs = $FindUniqueArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueFindFirstArgs = $FindFirstArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueExistsArgs = $ExistsArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueCreateArgs = $CreateArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueCreateManyArgs = $CreateManyArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueUpdateArgs = $UpdateArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueUpdateManyArgs = $UpdateManyArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueUpsertArgs = $UpsertArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueDeleteArgs = $DeleteArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueDeleteManyArgs = $DeleteManyArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueCountArgs = $CountArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueAggregateArgs = $AggregateArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueGroupByArgs = $GroupByArgs<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueWhereInput = $WhereInput<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueSelect = $SelectInput<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueInclude = $IncludeInput<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueOmit = $OmitInput<$Schema, "EnvironmentVariableValue">; -export type EnvironmentVariableValueGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "EnvironmentVariableValue", Args, Options>; -export type CheckpointFindManyArgs = $FindManyArgs<$Schema, "Checkpoint">; -export type CheckpointFindUniqueArgs = $FindUniqueArgs<$Schema, "Checkpoint">; -export type CheckpointFindFirstArgs = $FindFirstArgs<$Schema, "Checkpoint">; -export type CheckpointExistsArgs = $ExistsArgs<$Schema, "Checkpoint">; -export type CheckpointCreateArgs = $CreateArgs<$Schema, "Checkpoint">; -export type CheckpointCreateManyArgs = $CreateManyArgs<$Schema, "Checkpoint">; -export type CheckpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Checkpoint">; -export type CheckpointUpdateArgs = $UpdateArgs<$Schema, "Checkpoint">; -export type CheckpointUpdateManyArgs = $UpdateManyArgs<$Schema, "Checkpoint">; -export type CheckpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Checkpoint">; -export type CheckpointUpsertArgs = $UpsertArgs<$Schema, "Checkpoint">; -export type CheckpointDeleteArgs = $DeleteArgs<$Schema, "Checkpoint">; -export type CheckpointDeleteManyArgs = $DeleteManyArgs<$Schema, "Checkpoint">; -export type CheckpointCountArgs = $CountArgs<$Schema, "Checkpoint">; -export type CheckpointAggregateArgs = $AggregateArgs<$Schema, "Checkpoint">; -export type CheckpointGroupByArgs = $GroupByArgs<$Schema, "Checkpoint">; -export type CheckpointWhereInput = $WhereInput<$Schema, "Checkpoint">; -export type CheckpointSelect = $SelectInput<$Schema, "Checkpoint">; -export type CheckpointInclude = $IncludeInput<$Schema, "Checkpoint">; -export type CheckpointOmit = $OmitInput<$Schema, "Checkpoint">; -export type CheckpointGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Checkpoint", Args, Options>; -export type CheckpointRestoreEventFindManyArgs = $FindManyArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventFindUniqueArgs = $FindUniqueArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventFindFirstArgs = $FindFirstArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventExistsArgs = $ExistsArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventCreateArgs = $CreateArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventCreateManyArgs = $CreateManyArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventUpdateArgs = $UpdateArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventUpdateManyArgs = $UpdateManyArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventUpsertArgs = $UpsertArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventDeleteArgs = $DeleteArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventDeleteManyArgs = $DeleteManyArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventCountArgs = $CountArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventAggregateArgs = $AggregateArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventGroupByArgs = $GroupByArgs<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventWhereInput = $WhereInput<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventSelect = $SelectInput<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventInclude = $IncludeInput<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventOmit = $OmitInput<$Schema, "CheckpointRestoreEvent">; -export type CheckpointRestoreEventGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "CheckpointRestoreEvent", Args, Options>; -export type WorkerDeploymentFindManyArgs = $FindManyArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentFindFirstArgs = $FindFirstArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentExistsArgs = $ExistsArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentCreateArgs = $CreateArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentCreateManyArgs = $CreateManyArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentUpdateArgs = $UpdateArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentUpsertArgs = $UpsertArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentDeleteArgs = $DeleteArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentCountArgs = $CountArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentAggregateArgs = $AggregateArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentGroupByArgs = $GroupByArgs<$Schema, "WorkerDeployment">; -export type WorkerDeploymentWhereInput = $WhereInput<$Schema, "WorkerDeployment">; -export type WorkerDeploymentSelect = $SelectInput<$Schema, "WorkerDeployment">; -export type WorkerDeploymentInclude = $IncludeInput<$Schema, "WorkerDeployment">; -export type WorkerDeploymentOmit = $OmitInput<$Schema, "WorkerDeployment">; -export type WorkerDeploymentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkerDeployment", Args, Options>; -export type WorkerDeploymentPromotionFindManyArgs = $FindManyArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionFindUniqueArgs = $FindUniqueArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionFindFirstArgs = $FindFirstArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionExistsArgs = $ExistsArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionCreateArgs = $CreateArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionCreateManyArgs = $CreateManyArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionUpdateArgs = $UpdateArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionUpdateManyArgs = $UpdateManyArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionUpsertArgs = $UpsertArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionDeleteArgs = $DeleteArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionDeleteManyArgs = $DeleteManyArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionCountArgs = $CountArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionAggregateArgs = $AggregateArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionGroupByArgs = $GroupByArgs<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionWhereInput = $WhereInput<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionSelect = $SelectInput<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionInclude = $IncludeInput<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionOmit = $OmitInput<$Schema, "WorkerDeploymentPromotion">; -export type WorkerDeploymentPromotionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "WorkerDeploymentPromotion", Args, Options>; -export type TaskScheduleFindManyArgs = $FindManyArgs<$Schema, "TaskSchedule">; -export type TaskScheduleFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskSchedule">; -export type TaskScheduleFindFirstArgs = $FindFirstArgs<$Schema, "TaskSchedule">; -export type TaskScheduleExistsArgs = $ExistsArgs<$Schema, "TaskSchedule">; -export type TaskScheduleCreateArgs = $CreateArgs<$Schema, "TaskSchedule">; -export type TaskScheduleCreateManyArgs = $CreateManyArgs<$Schema, "TaskSchedule">; -export type TaskScheduleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskSchedule">; -export type TaskScheduleUpdateArgs = $UpdateArgs<$Schema, "TaskSchedule">; -export type TaskScheduleUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskSchedule">; -export type TaskScheduleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskSchedule">; -export type TaskScheduleUpsertArgs = $UpsertArgs<$Schema, "TaskSchedule">; -export type TaskScheduleDeleteArgs = $DeleteArgs<$Schema, "TaskSchedule">; -export type TaskScheduleDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskSchedule">; -export type TaskScheduleCountArgs = $CountArgs<$Schema, "TaskSchedule">; -export type TaskScheduleAggregateArgs = $AggregateArgs<$Schema, "TaskSchedule">; -export type TaskScheduleGroupByArgs = $GroupByArgs<$Schema, "TaskSchedule">; -export type TaskScheduleWhereInput = $WhereInput<$Schema, "TaskSchedule">; -export type TaskScheduleSelect = $SelectInput<$Schema, "TaskSchedule">; -export type TaskScheduleInclude = $IncludeInput<$Schema, "TaskSchedule">; -export type TaskScheduleOmit = $OmitInput<$Schema, "TaskSchedule">; -export type TaskScheduleGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskSchedule", Args, Options>; -export type TaskScheduleInstanceFindManyArgs = $FindManyArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceFindFirstArgs = $FindFirstArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceExistsArgs = $ExistsArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceCreateArgs = $CreateArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceCreateManyArgs = $CreateManyArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceUpdateArgs = $UpdateArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceUpsertArgs = $UpsertArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceDeleteArgs = $DeleteArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceCountArgs = $CountArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceAggregateArgs = $AggregateArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceGroupByArgs = $GroupByArgs<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceWhereInput = $WhereInput<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceSelect = $SelectInput<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceInclude = $IncludeInput<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceOmit = $OmitInput<$Schema, "TaskScheduleInstance">; -export type TaskScheduleInstanceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskScheduleInstance", Args, Options>; -export type RuntimeEnvironmentSessionFindManyArgs = $FindManyArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionFindUniqueArgs = $FindUniqueArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionFindFirstArgs = $FindFirstArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionExistsArgs = $ExistsArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionCreateArgs = $CreateArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionCreateManyArgs = $CreateManyArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionUpdateArgs = $UpdateArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionUpdateManyArgs = $UpdateManyArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionUpsertArgs = $UpsertArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionDeleteArgs = $DeleteArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionDeleteManyArgs = $DeleteManyArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionCountArgs = $CountArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionAggregateArgs = $AggregateArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionGroupByArgs = $GroupByArgs<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionWhereInput = $WhereInput<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionSelect = $SelectInput<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionInclude = $IncludeInput<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionOmit = $OmitInput<$Schema, "RuntimeEnvironmentSession">; -export type RuntimeEnvironmentSessionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RuntimeEnvironmentSession", Args, Options>; -export type ProjectAlertChannelFindManyArgs = $FindManyArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelFindUniqueArgs = $FindUniqueArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelFindFirstArgs = $FindFirstArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelExistsArgs = $ExistsArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelCreateArgs = $CreateArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelCreateManyArgs = $CreateManyArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelUpdateArgs = $UpdateArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelUpdateManyArgs = $UpdateManyArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelUpsertArgs = $UpsertArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelDeleteArgs = $DeleteArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelDeleteManyArgs = $DeleteManyArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelCountArgs = $CountArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelAggregateArgs = $AggregateArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelGroupByArgs = $GroupByArgs<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelWhereInput = $WhereInput<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelSelect = $SelectInput<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelInclude = $IncludeInput<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelOmit = $OmitInput<$Schema, "ProjectAlertChannel">; -export type ProjectAlertChannelGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ProjectAlertChannel", Args, Options>; -export type ProjectAlertFindManyArgs = $FindManyArgs<$Schema, "ProjectAlert">; -export type ProjectAlertFindUniqueArgs = $FindUniqueArgs<$Schema, "ProjectAlert">; -export type ProjectAlertFindFirstArgs = $FindFirstArgs<$Schema, "ProjectAlert">; -export type ProjectAlertExistsArgs = $ExistsArgs<$Schema, "ProjectAlert">; -export type ProjectAlertCreateArgs = $CreateArgs<$Schema, "ProjectAlert">; -export type ProjectAlertCreateManyArgs = $CreateManyArgs<$Schema, "ProjectAlert">; -export type ProjectAlertCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ProjectAlert">; -export type ProjectAlertUpdateArgs = $UpdateArgs<$Schema, "ProjectAlert">; -export type ProjectAlertUpdateManyArgs = $UpdateManyArgs<$Schema, "ProjectAlert">; -export type ProjectAlertUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ProjectAlert">; -export type ProjectAlertUpsertArgs = $UpsertArgs<$Schema, "ProjectAlert">; -export type ProjectAlertDeleteArgs = $DeleteArgs<$Schema, "ProjectAlert">; -export type ProjectAlertDeleteManyArgs = $DeleteManyArgs<$Schema, "ProjectAlert">; -export type ProjectAlertCountArgs = $CountArgs<$Schema, "ProjectAlert">; -export type ProjectAlertAggregateArgs = $AggregateArgs<$Schema, "ProjectAlert">; -export type ProjectAlertGroupByArgs = $GroupByArgs<$Schema, "ProjectAlert">; -export type ProjectAlertWhereInput = $WhereInput<$Schema, "ProjectAlert">; -export type ProjectAlertSelect = $SelectInput<$Schema, "ProjectAlert">; -export type ProjectAlertInclude = $IncludeInput<$Schema, "ProjectAlert">; -export type ProjectAlertOmit = $OmitInput<$Schema, "ProjectAlert">; -export type ProjectAlertGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ProjectAlert", Args, Options>; -export type ProjectAlertStorageFindManyArgs = $FindManyArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageFindUniqueArgs = $FindUniqueArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageFindFirstArgs = $FindFirstArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageExistsArgs = $ExistsArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageCreateArgs = $CreateArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageCreateManyArgs = $CreateManyArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageUpdateArgs = $UpdateArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageUpdateManyArgs = $UpdateManyArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageUpsertArgs = $UpsertArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageDeleteArgs = $DeleteArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageDeleteManyArgs = $DeleteManyArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageCountArgs = $CountArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageAggregateArgs = $AggregateArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageGroupByArgs = $GroupByArgs<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageWhereInput = $WhereInput<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageSelect = $SelectInput<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageInclude = $IncludeInput<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageOmit = $OmitInput<$Schema, "ProjectAlertStorage">; -export type ProjectAlertStorageGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "ProjectAlertStorage", Args, Options>; -export type OrganizationIntegrationFindManyArgs = $FindManyArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationFindUniqueArgs = $FindUniqueArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationFindFirstArgs = $FindFirstArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationExistsArgs = $ExistsArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationCreateArgs = $CreateArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationCreateManyArgs = $CreateManyArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationUpdateArgs = $UpdateArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationUpdateManyArgs = $UpdateManyArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationUpsertArgs = $UpsertArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationDeleteArgs = $DeleteArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationDeleteManyArgs = $DeleteManyArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationCountArgs = $CountArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationAggregateArgs = $AggregateArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationGroupByArgs = $GroupByArgs<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationWhereInput = $WhereInput<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationSelect = $SelectInput<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationInclude = $IncludeInput<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationOmit = $OmitInput<$Schema, "OrganizationIntegration">; -export type OrganizationIntegrationGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "OrganizationIntegration", Args, Options>; -export type BulkActionGroupFindManyArgs = $FindManyArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupFindUniqueArgs = $FindUniqueArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupFindFirstArgs = $FindFirstArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupExistsArgs = $ExistsArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupCreateArgs = $CreateArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupCreateManyArgs = $CreateManyArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupUpdateArgs = $UpdateArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupUpdateManyArgs = $UpdateManyArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupUpsertArgs = $UpsertArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupDeleteArgs = $DeleteArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupDeleteManyArgs = $DeleteManyArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupCountArgs = $CountArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupAggregateArgs = $AggregateArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupGroupByArgs = $GroupByArgs<$Schema, "BulkActionGroup">; -export type BulkActionGroupWhereInput = $WhereInput<$Schema, "BulkActionGroup">; -export type BulkActionGroupSelect = $SelectInput<$Schema, "BulkActionGroup">; -export type BulkActionGroupInclude = $IncludeInput<$Schema, "BulkActionGroup">; -export type BulkActionGroupOmit = $OmitInput<$Schema, "BulkActionGroup">; -export type BulkActionGroupGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BulkActionGroup", Args, Options>; -export type BulkActionItemFindManyArgs = $FindManyArgs<$Schema, "BulkActionItem">; -export type BulkActionItemFindUniqueArgs = $FindUniqueArgs<$Schema, "BulkActionItem">; -export type BulkActionItemFindFirstArgs = $FindFirstArgs<$Schema, "BulkActionItem">; -export type BulkActionItemExistsArgs = $ExistsArgs<$Schema, "BulkActionItem">; -export type BulkActionItemCreateArgs = $CreateArgs<$Schema, "BulkActionItem">; -export type BulkActionItemCreateManyArgs = $CreateManyArgs<$Schema, "BulkActionItem">; -export type BulkActionItemCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "BulkActionItem">; -export type BulkActionItemUpdateArgs = $UpdateArgs<$Schema, "BulkActionItem">; -export type BulkActionItemUpdateManyArgs = $UpdateManyArgs<$Schema, "BulkActionItem">; -export type BulkActionItemUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "BulkActionItem">; -export type BulkActionItemUpsertArgs = $UpsertArgs<$Schema, "BulkActionItem">; -export type BulkActionItemDeleteArgs = $DeleteArgs<$Schema, "BulkActionItem">; -export type BulkActionItemDeleteManyArgs = $DeleteManyArgs<$Schema, "BulkActionItem">; -export type BulkActionItemCountArgs = $CountArgs<$Schema, "BulkActionItem">; -export type BulkActionItemAggregateArgs = $AggregateArgs<$Schema, "BulkActionItem">; -export type BulkActionItemGroupByArgs = $GroupByArgs<$Schema, "BulkActionItem">; -export type BulkActionItemWhereInput = $WhereInput<$Schema, "BulkActionItem">; -export type BulkActionItemSelect = $SelectInput<$Schema, "BulkActionItem">; -export type BulkActionItemInclude = $IncludeInput<$Schema, "BulkActionItem">; -export type BulkActionItemOmit = $OmitInput<$Schema, "BulkActionItem">; -export type BulkActionItemGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "BulkActionItem", Args, Options>; -export type RealtimeStreamChunkFindManyArgs = $FindManyArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkFindUniqueArgs = $FindUniqueArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkFindFirstArgs = $FindFirstArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkExistsArgs = $ExistsArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkCreateArgs = $CreateArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkCreateManyArgs = $CreateManyArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkUpdateArgs = $UpdateArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkUpdateManyArgs = $UpdateManyArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkUpsertArgs = $UpsertArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkDeleteArgs = $DeleteArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkDeleteManyArgs = $DeleteManyArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkCountArgs = $CountArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkAggregateArgs = $AggregateArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkGroupByArgs = $GroupByArgs<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkWhereInput = $WhereInput<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkSelect = $SelectInput<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkInclude = $IncludeInput<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkOmit = $OmitInput<$Schema, "RealtimeStreamChunk">; -export type RealtimeStreamChunkGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RealtimeStreamChunk", Args, Options>; -export type TaskEventPartitionedFindManyArgs = $FindManyArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedFindUniqueArgs = $FindUniqueArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedFindFirstArgs = $FindFirstArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedExistsArgs = $ExistsArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedCreateArgs = $CreateArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedCreateManyArgs = $CreateManyArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedUpdateArgs = $UpdateArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedUpdateManyArgs = $UpdateManyArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedUpsertArgs = $UpsertArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedDeleteArgs = $DeleteArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedDeleteManyArgs = $DeleteManyArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedCountArgs = $CountArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedAggregateArgs = $AggregateArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedGroupByArgs = $GroupByArgs<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedWhereInput = $WhereInput<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedSelect = $SelectInput<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedInclude = $IncludeInput<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedOmit = $OmitInput<$Schema, "TaskEventPartitioned">; -export type TaskEventPartitionedGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "TaskEventPartitioned", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type InvitationCodeFindManyArgs = $FindManyArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeFindUniqueArgs = $FindUniqueArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeFindFirstArgs = $FindFirstArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeExistsArgs = $ExistsArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeCreateArgs = $CreateArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeCreateManyArgs = $CreateManyArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeUpdateArgs = $UpdateArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeUpdateManyArgs = $UpdateManyArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeUpsertArgs = $UpsertArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeDeleteArgs = $DeleteArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeDeleteManyArgs = $DeleteManyArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeCountArgs = $CountArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeAggregateArgs = $AggregateArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeGroupByArgs = $GroupByArgs<$Schema, 'InvitationCode'>; +export type InvitationCodeWhereInput = $WhereInput<$Schema, 'InvitationCode'>; +export type InvitationCodeSelect = $SelectInput<$Schema, 'InvitationCode'>; +export type InvitationCodeInclude = $IncludeInput<$Schema, 'InvitationCode'>; +export type InvitationCodeOmit = $OmitInput<$Schema, 'InvitationCode'>; +export type InvitationCodeGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'InvitationCode', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'InvitationCode', Args, Options>; +export type AuthorizationCodeFindManyArgs = $FindManyArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeFindUniqueArgs = $FindUniqueArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeFindFirstArgs = $FindFirstArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeExistsArgs = $ExistsArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeCreateArgs = $CreateArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeCreateManyArgs = $CreateManyArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeUpdateArgs = $UpdateArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeUpdateManyArgs = $UpdateManyArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeUpsertArgs = $UpsertArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeDeleteArgs = $DeleteArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeDeleteManyArgs = $DeleteManyArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeCountArgs = $CountArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeAggregateArgs = $AggregateArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeGroupByArgs = $GroupByArgs<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeWhereInput = $WhereInput<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeSelect = $SelectInput<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeInclude = $IncludeInput<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeOmit = $OmitInput<$Schema, 'AuthorizationCode'>; +export type AuthorizationCodeGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'AuthorizationCode', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'AuthorizationCode', Args, Options>; +export type PersonalAccessTokenFindManyArgs = $FindManyArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenFindFirstArgs = $FindFirstArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenExistsArgs = $ExistsArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenCreateArgs = $CreateArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenCreateManyArgs = $CreateManyArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenUpdateArgs = $UpdateArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenUpsertArgs = $UpsertArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenDeleteArgs = $DeleteArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenCountArgs = $CountArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenAggregateArgs = $AggregateArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenGroupByArgs = $GroupByArgs<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenWhereInput = $WhereInput<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenSelect = $SelectInput<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenInclude = $IncludeInput<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenOmit = $OmitInput<$Schema, 'PersonalAccessToken'>; +export type PersonalAccessTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'PersonalAccessToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'PersonalAccessToken', Args, Options>; +export type OrganizationFindManyArgs = $FindManyArgs<$Schema, 'Organization'>; +export type OrganizationFindUniqueArgs = $FindUniqueArgs<$Schema, 'Organization'>; +export type OrganizationFindFirstArgs = $FindFirstArgs<$Schema, 'Organization'>; +export type OrganizationExistsArgs = $ExistsArgs<$Schema, 'Organization'>; +export type OrganizationCreateArgs = $CreateArgs<$Schema, 'Organization'>; +export type OrganizationCreateManyArgs = $CreateManyArgs<$Schema, 'Organization'>; +export type OrganizationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Organization'>; +export type OrganizationUpdateArgs = $UpdateArgs<$Schema, 'Organization'>; +export type OrganizationUpdateManyArgs = $UpdateManyArgs<$Schema, 'Organization'>; +export type OrganizationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Organization'>; +export type OrganizationUpsertArgs = $UpsertArgs<$Schema, 'Organization'>; +export type OrganizationDeleteArgs = $DeleteArgs<$Schema, 'Organization'>; +export type OrganizationDeleteManyArgs = $DeleteManyArgs<$Schema, 'Organization'>; +export type OrganizationCountArgs = $CountArgs<$Schema, 'Organization'>; +export type OrganizationAggregateArgs = $AggregateArgs<$Schema, 'Organization'>; +export type OrganizationGroupByArgs = $GroupByArgs<$Schema, 'Organization'>; +export type OrganizationWhereInput = $WhereInput<$Schema, 'Organization'>; +export type OrganizationSelect = $SelectInput<$Schema, 'Organization'>; +export type OrganizationInclude = $IncludeInput<$Schema, 'Organization'>; +export type OrganizationOmit = $OmitInput<$Schema, 'Organization'>; +export type OrganizationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Organization', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Organization', Args, Options>; +export type OrgMemberFindManyArgs = $FindManyArgs<$Schema, 'OrgMember'>; +export type OrgMemberFindUniqueArgs = $FindUniqueArgs<$Schema, 'OrgMember'>; +export type OrgMemberFindFirstArgs = $FindFirstArgs<$Schema, 'OrgMember'>; +export type OrgMemberExistsArgs = $ExistsArgs<$Schema, 'OrgMember'>; +export type OrgMemberCreateArgs = $CreateArgs<$Schema, 'OrgMember'>; +export type OrgMemberCreateManyArgs = $CreateManyArgs<$Schema, 'OrgMember'>; +export type OrgMemberCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'OrgMember'>; +export type OrgMemberUpdateArgs = $UpdateArgs<$Schema, 'OrgMember'>; +export type OrgMemberUpdateManyArgs = $UpdateManyArgs<$Schema, 'OrgMember'>; +export type OrgMemberUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'OrgMember'>; +export type OrgMemberUpsertArgs = $UpsertArgs<$Schema, 'OrgMember'>; +export type OrgMemberDeleteArgs = $DeleteArgs<$Schema, 'OrgMember'>; +export type OrgMemberDeleteManyArgs = $DeleteManyArgs<$Schema, 'OrgMember'>; +export type OrgMemberCountArgs = $CountArgs<$Schema, 'OrgMember'>; +export type OrgMemberAggregateArgs = $AggregateArgs<$Schema, 'OrgMember'>; +export type OrgMemberGroupByArgs = $GroupByArgs<$Schema, 'OrgMember'>; +export type OrgMemberWhereInput = $WhereInput<$Schema, 'OrgMember'>; +export type OrgMemberSelect = $SelectInput<$Schema, 'OrgMember'>; +export type OrgMemberInclude = $IncludeInput<$Schema, 'OrgMember'>; +export type OrgMemberOmit = $OmitInput<$Schema, 'OrgMember'>; +export type OrgMemberGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OrgMember', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OrgMember', Args, Options>; +export type OrgMemberInviteFindManyArgs = $FindManyArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteFindUniqueArgs = $FindUniqueArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteFindFirstArgs = $FindFirstArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteExistsArgs = $ExistsArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteCreateArgs = $CreateArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteCreateManyArgs = $CreateManyArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteUpdateArgs = $UpdateArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteUpdateManyArgs = $UpdateManyArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteUpsertArgs = $UpsertArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteDeleteArgs = $DeleteArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteDeleteManyArgs = $DeleteManyArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteCountArgs = $CountArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteAggregateArgs = $AggregateArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteGroupByArgs = $GroupByArgs<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteWhereInput = $WhereInput<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteSelect = $SelectInput<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteInclude = $IncludeInput<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteOmit = $OmitInput<$Schema, 'OrgMemberInvite'>; +export type OrgMemberInviteGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OrgMemberInvite', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OrgMemberInvite', Args, Options>; +export type RuntimeEnvironmentFindManyArgs = $FindManyArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentFindUniqueArgs = $FindUniqueArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentFindFirstArgs = $FindFirstArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentExistsArgs = $ExistsArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentCreateArgs = $CreateArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentCreateManyArgs = $CreateManyArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentUpdateArgs = $UpdateArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentUpdateManyArgs = $UpdateManyArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentUpsertArgs = $UpsertArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentDeleteArgs = $DeleteArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentDeleteManyArgs = $DeleteManyArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentCountArgs = $CountArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentAggregateArgs = $AggregateArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentGroupByArgs = $GroupByArgs<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentWhereInput = $WhereInput<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentSelect = $SelectInput<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentInclude = $IncludeInput<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentOmit = $OmitInput<$Schema, 'RuntimeEnvironment'>; +export type RuntimeEnvironmentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RuntimeEnvironment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RuntimeEnvironment', Args, Options>; +export type ProjectFindManyArgs = $FindManyArgs<$Schema, 'Project'>; +export type ProjectFindUniqueArgs = $FindUniqueArgs<$Schema, 'Project'>; +export type ProjectFindFirstArgs = $FindFirstArgs<$Schema, 'Project'>; +export type ProjectExistsArgs = $ExistsArgs<$Schema, 'Project'>; +export type ProjectCreateArgs = $CreateArgs<$Schema, 'Project'>; +export type ProjectCreateManyArgs = $CreateManyArgs<$Schema, 'Project'>; +export type ProjectCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Project'>; +export type ProjectUpdateArgs = $UpdateArgs<$Schema, 'Project'>; +export type ProjectUpdateManyArgs = $UpdateManyArgs<$Schema, 'Project'>; +export type ProjectUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Project'>; +export type ProjectUpsertArgs = $UpsertArgs<$Schema, 'Project'>; +export type ProjectDeleteArgs = $DeleteArgs<$Schema, 'Project'>; +export type ProjectDeleteManyArgs = $DeleteManyArgs<$Schema, 'Project'>; +export type ProjectCountArgs = $CountArgs<$Schema, 'Project'>; +export type ProjectAggregateArgs = $AggregateArgs<$Schema, 'Project'>; +export type ProjectGroupByArgs = $GroupByArgs<$Schema, 'Project'>; +export type ProjectWhereInput = $WhereInput<$Schema, 'Project'>; +export type ProjectSelect = $SelectInput<$Schema, 'Project'>; +export type ProjectInclude = $IncludeInput<$Schema, 'Project'>; +export type ProjectOmit = $OmitInput<$Schema, 'Project'>; +export type ProjectGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Project', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Project', Args, Options>; +export type SecretReferenceFindManyArgs = $FindManyArgs<$Schema, 'SecretReference'>; +export type SecretReferenceFindUniqueArgs = $FindUniqueArgs<$Schema, 'SecretReference'>; +export type SecretReferenceFindFirstArgs = $FindFirstArgs<$Schema, 'SecretReference'>; +export type SecretReferenceExistsArgs = $ExistsArgs<$Schema, 'SecretReference'>; +export type SecretReferenceCreateArgs = $CreateArgs<$Schema, 'SecretReference'>; +export type SecretReferenceCreateManyArgs = $CreateManyArgs<$Schema, 'SecretReference'>; +export type SecretReferenceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SecretReference'>; +export type SecretReferenceUpdateArgs = $UpdateArgs<$Schema, 'SecretReference'>; +export type SecretReferenceUpdateManyArgs = $UpdateManyArgs<$Schema, 'SecretReference'>; +export type SecretReferenceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SecretReference'>; +export type SecretReferenceUpsertArgs = $UpsertArgs<$Schema, 'SecretReference'>; +export type SecretReferenceDeleteArgs = $DeleteArgs<$Schema, 'SecretReference'>; +export type SecretReferenceDeleteManyArgs = $DeleteManyArgs<$Schema, 'SecretReference'>; +export type SecretReferenceCountArgs = $CountArgs<$Schema, 'SecretReference'>; +export type SecretReferenceAggregateArgs = $AggregateArgs<$Schema, 'SecretReference'>; +export type SecretReferenceGroupByArgs = $GroupByArgs<$Schema, 'SecretReference'>; +export type SecretReferenceWhereInput = $WhereInput<$Schema, 'SecretReference'>; +export type SecretReferenceSelect = $SelectInput<$Schema, 'SecretReference'>; +export type SecretReferenceInclude = $IncludeInput<$Schema, 'SecretReference'>; +export type SecretReferenceOmit = $OmitInput<$Schema, 'SecretReference'>; +export type SecretReferenceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SecretReference', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SecretReference', Args, Options>; +export type SecretStoreFindManyArgs = $FindManyArgs<$Schema, 'SecretStore'>; +export type SecretStoreFindUniqueArgs = $FindUniqueArgs<$Schema, 'SecretStore'>; +export type SecretStoreFindFirstArgs = $FindFirstArgs<$Schema, 'SecretStore'>; +export type SecretStoreExistsArgs = $ExistsArgs<$Schema, 'SecretStore'>; +export type SecretStoreCreateArgs = $CreateArgs<$Schema, 'SecretStore'>; +export type SecretStoreCreateManyArgs = $CreateManyArgs<$Schema, 'SecretStore'>; +export type SecretStoreCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SecretStore'>; +export type SecretStoreUpdateArgs = $UpdateArgs<$Schema, 'SecretStore'>; +export type SecretStoreUpdateManyArgs = $UpdateManyArgs<$Schema, 'SecretStore'>; +export type SecretStoreUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SecretStore'>; +export type SecretStoreUpsertArgs = $UpsertArgs<$Schema, 'SecretStore'>; +export type SecretStoreDeleteArgs = $DeleteArgs<$Schema, 'SecretStore'>; +export type SecretStoreDeleteManyArgs = $DeleteManyArgs<$Schema, 'SecretStore'>; +export type SecretStoreCountArgs = $CountArgs<$Schema, 'SecretStore'>; +export type SecretStoreAggregateArgs = $AggregateArgs<$Schema, 'SecretStore'>; +export type SecretStoreGroupByArgs = $GroupByArgs<$Schema, 'SecretStore'>; +export type SecretStoreWhereInput = $WhereInput<$Schema, 'SecretStore'>; +export type SecretStoreSelect = $SelectInput<$Schema, 'SecretStore'>; +export type SecretStoreInclude = $IncludeInput<$Schema, 'SecretStore'>; +export type SecretStoreOmit = $OmitInput<$Schema, 'SecretStore'>; +export type SecretStoreGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SecretStore', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SecretStore', Args, Options>; +export type DataMigrationFindManyArgs = $FindManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationFindUniqueArgs = $FindUniqueArgs<$Schema, 'DataMigration'>; +export type DataMigrationFindFirstArgs = $FindFirstArgs<$Schema, 'DataMigration'>; +export type DataMigrationExistsArgs = $ExistsArgs<$Schema, 'DataMigration'>; +export type DataMigrationCreateArgs = $CreateArgs<$Schema, 'DataMigration'>; +export type DataMigrationCreateManyArgs = $CreateManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpdateArgs = $UpdateArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpdateManyArgs = $UpdateManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'DataMigration'>; +export type DataMigrationUpsertArgs = $UpsertArgs<$Schema, 'DataMigration'>; +export type DataMigrationDeleteArgs = $DeleteArgs<$Schema, 'DataMigration'>; +export type DataMigrationDeleteManyArgs = $DeleteManyArgs<$Schema, 'DataMigration'>; +export type DataMigrationCountArgs = $CountArgs<$Schema, 'DataMigration'>; +export type DataMigrationAggregateArgs = $AggregateArgs<$Schema, 'DataMigration'>; +export type DataMigrationGroupByArgs = $GroupByArgs<$Schema, 'DataMigration'>; +export type DataMigrationWhereInput = $WhereInput<$Schema, 'DataMigration'>; +export type DataMigrationSelect = $SelectInput<$Schema, 'DataMigration'>; +export type DataMigrationInclude = $IncludeInput<$Schema, 'DataMigration'>; +export type DataMigrationOmit = $OmitInput<$Schema, 'DataMigration'>; +export type DataMigrationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'DataMigration', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'DataMigration', Args, Options>; +export type BackgroundWorkerFindManyArgs = $FindManyArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerFindUniqueArgs = $FindUniqueArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerFindFirstArgs = $FindFirstArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerExistsArgs = $ExistsArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerCreateArgs = $CreateArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerCreateManyArgs = $CreateManyArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerUpdateArgs = $UpdateArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerUpdateManyArgs = $UpdateManyArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerUpsertArgs = $UpsertArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerDeleteArgs = $DeleteArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerDeleteManyArgs = $DeleteManyArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerCountArgs = $CountArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerAggregateArgs = $AggregateArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerGroupByArgs = $GroupByArgs<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerWhereInput = $WhereInput<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerSelect = $SelectInput<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerInclude = $IncludeInput<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerOmit = $OmitInput<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BackgroundWorker', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BackgroundWorker', Args, Options>; +export type BackgroundWorkerFileFindManyArgs = $FindManyArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileFindUniqueArgs = $FindUniqueArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileFindFirstArgs = $FindFirstArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileExistsArgs = $ExistsArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileCreateArgs = $CreateArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileCreateManyArgs = $CreateManyArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileUpdateArgs = $UpdateArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileUpdateManyArgs = $UpdateManyArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileUpsertArgs = $UpsertArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileDeleteArgs = $DeleteArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileDeleteManyArgs = $DeleteManyArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileCountArgs = $CountArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileAggregateArgs = $AggregateArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileGroupByArgs = $GroupByArgs<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileWhereInput = $WhereInput<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileSelect = $SelectInput<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileInclude = $IncludeInput<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileOmit = $OmitInput<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerFileGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BackgroundWorkerFile', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BackgroundWorkerFile', Args, Options>; +export type BackgroundWorkerTaskFindManyArgs = $FindManyArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskFindUniqueArgs = $FindUniqueArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskFindFirstArgs = $FindFirstArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskExistsArgs = $ExistsArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskCreateArgs = $CreateArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskCreateManyArgs = $CreateManyArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskUpdateArgs = $UpdateArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskUpdateManyArgs = $UpdateManyArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskUpsertArgs = $UpsertArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskDeleteArgs = $DeleteArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskDeleteManyArgs = $DeleteManyArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskCountArgs = $CountArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskAggregateArgs = $AggregateArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskGroupByArgs = $GroupByArgs<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskWhereInput = $WhereInput<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskSelect = $SelectInput<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskInclude = $IncludeInput<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskOmit = $OmitInput<$Schema, 'BackgroundWorkerTask'>; +export type BackgroundWorkerTaskGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BackgroundWorkerTask', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BackgroundWorkerTask', Args, Options>; +export type TaskRunFindManyArgs = $FindManyArgs<$Schema, 'TaskRun'>; +export type TaskRunFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRun'>; +export type TaskRunFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRun'>; +export type TaskRunExistsArgs = $ExistsArgs<$Schema, 'TaskRun'>; +export type TaskRunCreateArgs = $CreateArgs<$Schema, 'TaskRun'>; +export type TaskRunCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRun'>; +export type TaskRunCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRun'>; +export type TaskRunUpdateArgs = $UpdateArgs<$Schema, 'TaskRun'>; +export type TaskRunUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRun'>; +export type TaskRunUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRun'>; +export type TaskRunUpsertArgs = $UpsertArgs<$Schema, 'TaskRun'>; +export type TaskRunDeleteArgs = $DeleteArgs<$Schema, 'TaskRun'>; +export type TaskRunDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRun'>; +export type TaskRunCountArgs = $CountArgs<$Schema, 'TaskRun'>; +export type TaskRunAggregateArgs = $AggregateArgs<$Schema, 'TaskRun'>; +export type TaskRunGroupByArgs = $GroupByArgs<$Schema, 'TaskRun'>; +export type TaskRunWhereInput = $WhereInput<$Schema, 'TaskRun'>; +export type TaskRunSelect = $SelectInput<$Schema, 'TaskRun'>; +export type TaskRunInclude = $IncludeInput<$Schema, 'TaskRun'>; +export type TaskRunOmit = $OmitInput<$Schema, 'TaskRun'>; +export type TaskRunGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRun', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRun', Args, Options>; +export type TaskRunExecutionSnapshotFindManyArgs = $FindManyArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotExistsArgs = $ExistsArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotCreateArgs = $CreateArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'TaskRunExecutionSnapshot' +>; +export type TaskRunExecutionSnapshotUpdateArgs = $UpdateArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'TaskRunExecutionSnapshot' +>; +export type TaskRunExecutionSnapshotUpsertArgs = $UpsertArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotDeleteArgs = $DeleteArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotCountArgs = $CountArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotAggregateArgs = $AggregateArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotGroupByArgs = $GroupByArgs<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotWhereInput = $WhereInput<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotSelect = $SelectInput<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotInclude = $IncludeInput<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotOmit = $OmitInput<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunExecutionSnapshotGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunExecutionSnapshot', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunExecutionSnapshot', Args, Options>; +export type TaskRunCheckpointFindManyArgs = $FindManyArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointExistsArgs = $ExistsArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointCreateArgs = $CreateArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointUpdateArgs = $UpdateArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointUpsertArgs = $UpsertArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointDeleteArgs = $DeleteArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointCountArgs = $CountArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointAggregateArgs = $AggregateArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointGroupByArgs = $GroupByArgs<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointWhereInput = $WhereInput<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointSelect = $SelectInput<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointInclude = $IncludeInput<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointOmit = $OmitInput<$Schema, 'TaskRunCheckpoint'>; +export type TaskRunCheckpointGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunCheckpoint', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunCheckpoint', Args, Options>; +export type WaitpointFindManyArgs = $FindManyArgs<$Schema, 'Waitpoint'>; +export type WaitpointFindUniqueArgs = $FindUniqueArgs<$Schema, 'Waitpoint'>; +export type WaitpointFindFirstArgs = $FindFirstArgs<$Schema, 'Waitpoint'>; +export type WaitpointExistsArgs = $ExistsArgs<$Schema, 'Waitpoint'>; +export type WaitpointCreateArgs = $CreateArgs<$Schema, 'Waitpoint'>; +export type WaitpointCreateManyArgs = $CreateManyArgs<$Schema, 'Waitpoint'>; +export type WaitpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Waitpoint'>; +export type WaitpointUpdateArgs = $UpdateArgs<$Schema, 'Waitpoint'>; +export type WaitpointUpdateManyArgs = $UpdateManyArgs<$Schema, 'Waitpoint'>; +export type WaitpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Waitpoint'>; +export type WaitpointUpsertArgs = $UpsertArgs<$Schema, 'Waitpoint'>; +export type WaitpointDeleteArgs = $DeleteArgs<$Schema, 'Waitpoint'>; +export type WaitpointDeleteManyArgs = $DeleteManyArgs<$Schema, 'Waitpoint'>; +export type WaitpointCountArgs = $CountArgs<$Schema, 'Waitpoint'>; +export type WaitpointAggregateArgs = $AggregateArgs<$Schema, 'Waitpoint'>; +export type WaitpointGroupByArgs = $GroupByArgs<$Schema, 'Waitpoint'>; +export type WaitpointWhereInput = $WhereInput<$Schema, 'Waitpoint'>; +export type WaitpointSelect = $SelectInput<$Schema, 'Waitpoint'>; +export type WaitpointInclude = $IncludeInput<$Schema, 'Waitpoint'>; +export type WaitpointOmit = $OmitInput<$Schema, 'Waitpoint'>; +export type WaitpointGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Waitpoint', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Waitpoint', Args, Options>; +export type TaskRunWaitpointFindManyArgs = $FindManyArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointExistsArgs = $ExistsArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointCreateArgs = $CreateArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointUpdateArgs = $UpdateArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointUpsertArgs = $UpsertArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointDeleteArgs = $DeleteArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointCountArgs = $CountArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointAggregateArgs = $AggregateArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointGroupByArgs = $GroupByArgs<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointWhereInput = $WhereInput<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointSelect = $SelectInput<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointInclude = $IncludeInput<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointOmit = $OmitInput<$Schema, 'TaskRunWaitpoint'>; +export type TaskRunWaitpointGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunWaitpoint', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunWaitpoint', Args, Options>; +export type WaitpointTagFindManyArgs = $FindManyArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagFindUniqueArgs = $FindUniqueArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagFindFirstArgs = $FindFirstArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagExistsArgs = $ExistsArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagCreateArgs = $CreateArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagCreateManyArgs = $CreateManyArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagUpdateArgs = $UpdateArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagUpdateManyArgs = $UpdateManyArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagUpsertArgs = $UpsertArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagDeleteArgs = $DeleteArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagDeleteManyArgs = $DeleteManyArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagCountArgs = $CountArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagAggregateArgs = $AggregateArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagGroupByArgs = $GroupByArgs<$Schema, 'WaitpointTag'>; +export type WaitpointTagWhereInput = $WhereInput<$Schema, 'WaitpointTag'>; +export type WaitpointTagSelect = $SelectInput<$Schema, 'WaitpointTag'>; +export type WaitpointTagInclude = $IncludeInput<$Schema, 'WaitpointTag'>; +export type WaitpointTagOmit = $OmitInput<$Schema, 'WaitpointTag'>; +export type WaitpointTagGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WaitpointTag', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WaitpointTag', Args, Options>; +export type FeatureFlagFindManyArgs = $FindManyArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagFindUniqueArgs = $FindUniqueArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagFindFirstArgs = $FindFirstArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagExistsArgs = $ExistsArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagCreateArgs = $CreateArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagCreateManyArgs = $CreateManyArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagUpdateArgs = $UpdateArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagUpdateManyArgs = $UpdateManyArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagUpsertArgs = $UpsertArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagDeleteArgs = $DeleteArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagDeleteManyArgs = $DeleteManyArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagCountArgs = $CountArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagAggregateArgs = $AggregateArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagGroupByArgs = $GroupByArgs<$Schema, 'FeatureFlag'>; +export type FeatureFlagWhereInput = $WhereInput<$Schema, 'FeatureFlag'>; +export type FeatureFlagSelect = $SelectInput<$Schema, 'FeatureFlag'>; +export type FeatureFlagInclude = $IncludeInput<$Schema, 'FeatureFlag'>; +export type FeatureFlagOmit = $OmitInput<$Schema, 'FeatureFlag'>; +export type FeatureFlagGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'FeatureFlag', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'FeatureFlag', Args, Options>; +export type WorkerInstanceFindManyArgs = $FindManyArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceFindFirstArgs = $FindFirstArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceExistsArgs = $ExistsArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceCreateArgs = $CreateArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceCreateManyArgs = $CreateManyArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceUpdateArgs = $UpdateArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceUpsertArgs = $UpsertArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceDeleteArgs = $DeleteArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceCountArgs = $CountArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceAggregateArgs = $AggregateArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceGroupByArgs = $GroupByArgs<$Schema, 'WorkerInstance'>; +export type WorkerInstanceWhereInput = $WhereInput<$Schema, 'WorkerInstance'>; +export type WorkerInstanceSelect = $SelectInput<$Schema, 'WorkerInstance'>; +export type WorkerInstanceInclude = $IncludeInput<$Schema, 'WorkerInstance'>; +export type WorkerInstanceOmit = $OmitInput<$Schema, 'WorkerInstance'>; +export type WorkerInstanceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkerInstance', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkerInstance', Args, Options>; +export type WorkerInstanceGroupFindManyArgs = $FindManyArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupFindFirstArgs = $FindFirstArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupExistsArgs = $ExistsArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupCreateArgs = $CreateArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupCreateManyArgs = $CreateManyArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupUpdateArgs = $UpdateArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupUpsertArgs = $UpsertArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupDeleteArgs = $DeleteArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupCountArgs = $CountArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupAggregateArgs = $AggregateArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupGroupByArgs = $GroupByArgs<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupWhereInput = $WhereInput<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupSelect = $SelectInput<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupInclude = $IncludeInput<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupOmit = $OmitInput<$Schema, 'WorkerInstanceGroup'>; +export type WorkerInstanceGroupGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkerInstanceGroup', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkerInstanceGroup', Args, Options>; +export type WorkerGroupTokenFindManyArgs = $FindManyArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenFindFirstArgs = $FindFirstArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenExistsArgs = $ExistsArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenCreateArgs = $CreateArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenCreateManyArgs = $CreateManyArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenUpdateArgs = $UpdateArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenUpsertArgs = $UpsertArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenDeleteArgs = $DeleteArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenCountArgs = $CountArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenAggregateArgs = $AggregateArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenGroupByArgs = $GroupByArgs<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenWhereInput = $WhereInput<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenSelect = $SelectInput<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenInclude = $IncludeInput<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenOmit = $OmitInput<$Schema, 'WorkerGroupToken'>; +export type WorkerGroupTokenGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkerGroupToken', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkerGroupToken', Args, Options>; +export type TaskRunTagFindManyArgs = $FindManyArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagExistsArgs = $ExistsArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagCreateArgs = $CreateArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagUpdateArgs = $UpdateArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagUpsertArgs = $UpsertArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagDeleteArgs = $DeleteArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagCountArgs = $CountArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagAggregateArgs = $AggregateArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagGroupByArgs = $GroupByArgs<$Schema, 'TaskRunTag'>; +export type TaskRunTagWhereInput = $WhereInput<$Schema, 'TaskRunTag'>; +export type TaskRunTagSelect = $SelectInput<$Schema, 'TaskRunTag'>; +export type TaskRunTagInclude = $IncludeInput<$Schema, 'TaskRunTag'>; +export type TaskRunTagOmit = $OmitInput<$Schema, 'TaskRunTag'>; +export type TaskRunTagGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunTag', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunTag', Args, Options>; +export type TaskRunDependencyFindManyArgs = $FindManyArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyExistsArgs = $ExistsArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyCreateArgs = $CreateArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyUpdateArgs = $UpdateArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyUpsertArgs = $UpsertArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyDeleteArgs = $DeleteArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyCountArgs = $CountArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyAggregateArgs = $AggregateArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyGroupByArgs = $GroupByArgs<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyWhereInput = $WhereInput<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencySelect = $SelectInput<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyInclude = $IncludeInput<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyOmit = $OmitInput<$Schema, 'TaskRunDependency'>; +export type TaskRunDependencyGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunDependency', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunDependency', Args, Options>; +export type TaskRunCounterFindManyArgs = $FindManyArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterExistsArgs = $ExistsArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterCreateArgs = $CreateArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterUpdateArgs = $UpdateArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterUpsertArgs = $UpsertArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterDeleteArgs = $DeleteArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterCountArgs = $CountArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterAggregateArgs = $AggregateArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterGroupByArgs = $GroupByArgs<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterWhereInput = $WhereInput<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterSelect = $SelectInput<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterInclude = $IncludeInput<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterOmit = $OmitInput<$Schema, 'TaskRunCounter'>; +export type TaskRunCounterGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunCounter', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunCounter', Args, Options>; +export type TaskRunNumberCounterFindManyArgs = $FindManyArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterExistsArgs = $ExistsArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterCreateArgs = $CreateArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterUpdateArgs = $UpdateArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterUpsertArgs = $UpsertArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterDeleteArgs = $DeleteArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterCountArgs = $CountArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterAggregateArgs = $AggregateArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterGroupByArgs = $GroupByArgs<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterWhereInput = $WhereInput<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterSelect = $SelectInput<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterInclude = $IncludeInput<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterOmit = $OmitInput<$Schema, 'TaskRunNumberCounter'>; +export type TaskRunNumberCounterGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunNumberCounter', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunNumberCounter', Args, Options>; +export type TaskRunAttemptFindManyArgs = $FindManyArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptFindFirstArgs = $FindFirstArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptExistsArgs = $ExistsArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptCreateArgs = $CreateArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptCreateManyArgs = $CreateManyArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptUpdateArgs = $UpdateArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptUpsertArgs = $UpsertArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptDeleteArgs = $DeleteArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptCountArgs = $CountArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptAggregateArgs = $AggregateArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptGroupByArgs = $GroupByArgs<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptWhereInput = $WhereInput<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptSelect = $SelectInput<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptInclude = $IncludeInput<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptOmit = $OmitInput<$Schema, 'TaskRunAttempt'>; +export type TaskRunAttemptGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskRunAttempt', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskRunAttempt', Args, Options>; +export type TaskEventFindManyArgs = $FindManyArgs<$Schema, 'TaskEvent'>; +export type TaskEventFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskEvent'>; +export type TaskEventFindFirstArgs = $FindFirstArgs<$Schema, 'TaskEvent'>; +export type TaskEventExistsArgs = $ExistsArgs<$Schema, 'TaskEvent'>; +export type TaskEventCreateArgs = $CreateArgs<$Schema, 'TaskEvent'>; +export type TaskEventCreateManyArgs = $CreateManyArgs<$Schema, 'TaskEvent'>; +export type TaskEventCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskEvent'>; +export type TaskEventUpdateArgs = $UpdateArgs<$Schema, 'TaskEvent'>; +export type TaskEventUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskEvent'>; +export type TaskEventUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskEvent'>; +export type TaskEventUpsertArgs = $UpsertArgs<$Schema, 'TaskEvent'>; +export type TaskEventDeleteArgs = $DeleteArgs<$Schema, 'TaskEvent'>; +export type TaskEventDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskEvent'>; +export type TaskEventCountArgs = $CountArgs<$Schema, 'TaskEvent'>; +export type TaskEventAggregateArgs = $AggregateArgs<$Schema, 'TaskEvent'>; +export type TaskEventGroupByArgs = $GroupByArgs<$Schema, 'TaskEvent'>; +export type TaskEventWhereInput = $WhereInput<$Schema, 'TaskEvent'>; +export type TaskEventSelect = $SelectInput<$Schema, 'TaskEvent'>; +export type TaskEventInclude = $IncludeInput<$Schema, 'TaskEvent'>; +export type TaskEventOmit = $OmitInput<$Schema, 'TaskEvent'>; +export type TaskEventGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskEvent', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskEvent', Args, Options>; +export type TaskQueueFindManyArgs = $FindManyArgs<$Schema, 'TaskQueue'>; +export type TaskQueueFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskQueue'>; +export type TaskQueueFindFirstArgs = $FindFirstArgs<$Schema, 'TaskQueue'>; +export type TaskQueueExistsArgs = $ExistsArgs<$Schema, 'TaskQueue'>; +export type TaskQueueCreateArgs = $CreateArgs<$Schema, 'TaskQueue'>; +export type TaskQueueCreateManyArgs = $CreateManyArgs<$Schema, 'TaskQueue'>; +export type TaskQueueCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskQueue'>; +export type TaskQueueUpdateArgs = $UpdateArgs<$Schema, 'TaskQueue'>; +export type TaskQueueUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskQueue'>; +export type TaskQueueUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskQueue'>; +export type TaskQueueUpsertArgs = $UpsertArgs<$Schema, 'TaskQueue'>; +export type TaskQueueDeleteArgs = $DeleteArgs<$Schema, 'TaskQueue'>; +export type TaskQueueDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskQueue'>; +export type TaskQueueCountArgs = $CountArgs<$Schema, 'TaskQueue'>; +export type TaskQueueAggregateArgs = $AggregateArgs<$Schema, 'TaskQueue'>; +export type TaskQueueGroupByArgs = $GroupByArgs<$Schema, 'TaskQueue'>; +export type TaskQueueWhereInput = $WhereInput<$Schema, 'TaskQueue'>; +export type TaskQueueSelect = $SelectInput<$Schema, 'TaskQueue'>; +export type TaskQueueInclude = $IncludeInput<$Schema, 'TaskQueue'>; +export type TaskQueueOmit = $OmitInput<$Schema, 'TaskQueue'>; +export type TaskQueueGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskQueue', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskQueue', Args, Options>; +export type BatchTaskRunFindManyArgs = $FindManyArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunFindUniqueArgs = $FindUniqueArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunFindFirstArgs = $FindFirstArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunExistsArgs = $ExistsArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunCreateArgs = $CreateArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunCreateManyArgs = $CreateManyArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunUpdateArgs = $UpdateArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunUpdateManyArgs = $UpdateManyArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunUpsertArgs = $UpsertArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunDeleteArgs = $DeleteArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunDeleteManyArgs = $DeleteManyArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunCountArgs = $CountArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunAggregateArgs = $AggregateArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunGroupByArgs = $GroupByArgs<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunWhereInput = $WhereInput<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunSelect = $SelectInput<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunInclude = $IncludeInput<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunOmit = $OmitInput<$Schema, 'BatchTaskRun'>; +export type BatchTaskRunGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BatchTaskRun', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BatchTaskRun', Args, Options>; +export type BatchTaskRunItemFindManyArgs = $FindManyArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemFindUniqueArgs = $FindUniqueArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemFindFirstArgs = $FindFirstArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemExistsArgs = $ExistsArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemCreateArgs = $CreateArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemCreateManyArgs = $CreateManyArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemUpdateArgs = $UpdateArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemUpdateManyArgs = $UpdateManyArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemUpsertArgs = $UpsertArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemDeleteArgs = $DeleteArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemDeleteManyArgs = $DeleteManyArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemCountArgs = $CountArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemAggregateArgs = $AggregateArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemGroupByArgs = $GroupByArgs<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemWhereInput = $WhereInput<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemSelect = $SelectInput<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemInclude = $IncludeInput<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemOmit = $OmitInput<$Schema, 'BatchTaskRunItem'>; +export type BatchTaskRunItemGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BatchTaskRunItem', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BatchTaskRunItem', Args, Options>; +export type EnvironmentVariableFindManyArgs = $FindManyArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableFindUniqueArgs = $FindUniqueArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableFindFirstArgs = $FindFirstArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableExistsArgs = $ExistsArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableCreateArgs = $CreateArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableCreateManyArgs = $CreateManyArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableUpdateArgs = $UpdateArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableUpdateManyArgs = $UpdateManyArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableUpsertArgs = $UpsertArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableDeleteArgs = $DeleteArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableDeleteManyArgs = $DeleteManyArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableCountArgs = $CountArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableAggregateArgs = $AggregateArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableGroupByArgs = $GroupByArgs<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableWhereInput = $WhereInput<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableSelect = $SelectInput<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableInclude = $IncludeInput<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableOmit = $OmitInput<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'EnvironmentVariable', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'EnvironmentVariable', Args, Options>; +export type EnvironmentVariableValueFindManyArgs = $FindManyArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueFindUniqueArgs = $FindUniqueArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueFindFirstArgs = $FindFirstArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueExistsArgs = $ExistsArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueCreateArgs = $CreateArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueCreateManyArgs = $CreateManyArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'EnvironmentVariableValue' +>; +export type EnvironmentVariableValueUpdateArgs = $UpdateArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueUpdateManyArgs = $UpdateManyArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'EnvironmentVariableValue' +>; +export type EnvironmentVariableValueUpsertArgs = $UpsertArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueDeleteArgs = $DeleteArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueDeleteManyArgs = $DeleteManyArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueCountArgs = $CountArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueAggregateArgs = $AggregateArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueGroupByArgs = $GroupByArgs<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueWhereInput = $WhereInput<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueSelect = $SelectInput<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueInclude = $IncludeInput<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueOmit = $OmitInput<$Schema, 'EnvironmentVariableValue'>; +export type EnvironmentVariableValueGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'EnvironmentVariableValue', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'EnvironmentVariableValue', Args, Options>; +export type CheckpointFindManyArgs = $FindManyArgs<$Schema, 'Checkpoint'>; +export type CheckpointFindUniqueArgs = $FindUniqueArgs<$Schema, 'Checkpoint'>; +export type CheckpointFindFirstArgs = $FindFirstArgs<$Schema, 'Checkpoint'>; +export type CheckpointExistsArgs = $ExistsArgs<$Schema, 'Checkpoint'>; +export type CheckpointCreateArgs = $CreateArgs<$Schema, 'Checkpoint'>; +export type CheckpointCreateManyArgs = $CreateManyArgs<$Schema, 'Checkpoint'>; +export type CheckpointCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Checkpoint'>; +export type CheckpointUpdateArgs = $UpdateArgs<$Schema, 'Checkpoint'>; +export type CheckpointUpdateManyArgs = $UpdateManyArgs<$Schema, 'Checkpoint'>; +export type CheckpointUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Checkpoint'>; +export type CheckpointUpsertArgs = $UpsertArgs<$Schema, 'Checkpoint'>; +export type CheckpointDeleteArgs = $DeleteArgs<$Schema, 'Checkpoint'>; +export type CheckpointDeleteManyArgs = $DeleteManyArgs<$Schema, 'Checkpoint'>; +export type CheckpointCountArgs = $CountArgs<$Schema, 'Checkpoint'>; +export type CheckpointAggregateArgs = $AggregateArgs<$Schema, 'Checkpoint'>; +export type CheckpointGroupByArgs = $GroupByArgs<$Schema, 'Checkpoint'>; +export type CheckpointWhereInput = $WhereInput<$Schema, 'Checkpoint'>; +export type CheckpointSelect = $SelectInput<$Schema, 'Checkpoint'>; +export type CheckpointInclude = $IncludeInput<$Schema, 'Checkpoint'>; +export type CheckpointOmit = $OmitInput<$Schema, 'Checkpoint'>; +export type CheckpointGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Checkpoint', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Checkpoint', Args, Options>; +export type CheckpointRestoreEventFindManyArgs = $FindManyArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventFindUniqueArgs = $FindUniqueArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventFindFirstArgs = $FindFirstArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventExistsArgs = $ExistsArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventCreateArgs = $CreateArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventCreateManyArgs = $CreateManyArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventUpdateArgs = $UpdateArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventUpdateManyArgs = $UpdateManyArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventUpsertArgs = $UpsertArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventDeleteArgs = $DeleteArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventDeleteManyArgs = $DeleteManyArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventCountArgs = $CountArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventAggregateArgs = $AggregateArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventGroupByArgs = $GroupByArgs<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventWhereInput = $WhereInput<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventSelect = $SelectInput<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventInclude = $IncludeInput<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventOmit = $OmitInput<$Schema, 'CheckpointRestoreEvent'>; +export type CheckpointRestoreEventGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'CheckpointRestoreEvent', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'CheckpointRestoreEvent', Args, Options>; +export type WorkerDeploymentFindManyArgs = $FindManyArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentFindFirstArgs = $FindFirstArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentExistsArgs = $ExistsArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentCreateArgs = $CreateArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentCreateManyArgs = $CreateManyArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentUpdateArgs = $UpdateArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentUpsertArgs = $UpsertArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentDeleteArgs = $DeleteArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentCountArgs = $CountArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentAggregateArgs = $AggregateArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentGroupByArgs = $GroupByArgs<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentWhereInput = $WhereInput<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentSelect = $SelectInput<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentInclude = $IncludeInput<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentOmit = $OmitInput<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkerDeployment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkerDeployment', Args, Options>; +export type WorkerDeploymentPromotionFindManyArgs = $FindManyArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionFindUniqueArgs = $FindUniqueArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionFindFirstArgs = $FindFirstArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionExistsArgs = $ExistsArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionCreateArgs = $CreateArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionCreateManyArgs = $CreateManyArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'WorkerDeploymentPromotion' +>; +export type WorkerDeploymentPromotionUpdateArgs = $UpdateArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionUpdateManyArgs = $UpdateManyArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'WorkerDeploymentPromotion' +>; +export type WorkerDeploymentPromotionUpsertArgs = $UpsertArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionDeleteArgs = $DeleteArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionDeleteManyArgs = $DeleteManyArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionCountArgs = $CountArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionAggregateArgs = $AggregateArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionGroupByArgs = $GroupByArgs<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionWhereInput = $WhereInput<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionSelect = $SelectInput<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionInclude = $IncludeInput<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionOmit = $OmitInput<$Schema, 'WorkerDeploymentPromotion'>; +export type WorkerDeploymentPromotionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'WorkerDeploymentPromotion', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'WorkerDeploymentPromotion', Args, Options>; +export type TaskScheduleFindManyArgs = $FindManyArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleFindFirstArgs = $FindFirstArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleExistsArgs = $ExistsArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleCreateArgs = $CreateArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleCreateManyArgs = $CreateManyArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleUpdateArgs = $UpdateArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleUpsertArgs = $UpsertArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleDeleteArgs = $DeleteArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleCountArgs = $CountArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleAggregateArgs = $AggregateArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleGroupByArgs = $GroupByArgs<$Schema, 'TaskSchedule'>; +export type TaskScheduleWhereInput = $WhereInput<$Schema, 'TaskSchedule'>; +export type TaskScheduleSelect = $SelectInput<$Schema, 'TaskSchedule'>; +export type TaskScheduleInclude = $IncludeInput<$Schema, 'TaskSchedule'>; +export type TaskScheduleOmit = $OmitInput<$Schema, 'TaskSchedule'>; +export type TaskScheduleGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskSchedule', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskSchedule', Args, Options>; +export type TaskScheduleInstanceFindManyArgs = $FindManyArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceFindFirstArgs = $FindFirstArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceExistsArgs = $ExistsArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceCreateArgs = $CreateArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceCreateManyArgs = $CreateManyArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceUpdateArgs = $UpdateArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceUpsertArgs = $UpsertArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceDeleteArgs = $DeleteArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceCountArgs = $CountArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceAggregateArgs = $AggregateArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceGroupByArgs = $GroupByArgs<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceWhereInput = $WhereInput<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceSelect = $SelectInput<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceInclude = $IncludeInput<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceOmit = $OmitInput<$Schema, 'TaskScheduleInstance'>; +export type TaskScheduleInstanceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskScheduleInstance', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskScheduleInstance', Args, Options>; +export type RuntimeEnvironmentSessionFindManyArgs = $FindManyArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionFindUniqueArgs = $FindUniqueArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionFindFirstArgs = $FindFirstArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionExistsArgs = $ExistsArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionCreateArgs = $CreateArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionCreateManyArgs = $CreateManyArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'RuntimeEnvironmentSession' +>; +export type RuntimeEnvironmentSessionUpdateArgs = $UpdateArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionUpdateManyArgs = $UpdateManyArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'RuntimeEnvironmentSession' +>; +export type RuntimeEnvironmentSessionUpsertArgs = $UpsertArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionDeleteArgs = $DeleteArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionDeleteManyArgs = $DeleteManyArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionCountArgs = $CountArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionAggregateArgs = $AggregateArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionGroupByArgs = $GroupByArgs<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionWhereInput = $WhereInput<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionSelect = $SelectInput<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionInclude = $IncludeInput<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionOmit = $OmitInput<$Schema, 'RuntimeEnvironmentSession'>; +export type RuntimeEnvironmentSessionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RuntimeEnvironmentSession', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RuntimeEnvironmentSession', Args, Options>; +export type ProjectAlertChannelFindManyArgs = $FindManyArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelFindUniqueArgs = $FindUniqueArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelFindFirstArgs = $FindFirstArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelExistsArgs = $ExistsArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelCreateArgs = $CreateArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelCreateManyArgs = $CreateManyArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelUpdateArgs = $UpdateArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelUpdateManyArgs = $UpdateManyArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelUpsertArgs = $UpsertArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelDeleteArgs = $DeleteArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelDeleteManyArgs = $DeleteManyArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelCountArgs = $CountArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelAggregateArgs = $AggregateArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelGroupByArgs = $GroupByArgs<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelWhereInput = $WhereInput<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelSelect = $SelectInput<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelInclude = $IncludeInput<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelOmit = $OmitInput<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlertChannelGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ProjectAlertChannel', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ProjectAlertChannel', Args, Options>; +export type ProjectAlertFindManyArgs = $FindManyArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertFindUniqueArgs = $FindUniqueArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertFindFirstArgs = $FindFirstArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertExistsArgs = $ExistsArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertCreateArgs = $CreateArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertCreateManyArgs = $CreateManyArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertUpdateArgs = $UpdateArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertUpdateManyArgs = $UpdateManyArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertUpsertArgs = $UpsertArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertDeleteArgs = $DeleteArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertDeleteManyArgs = $DeleteManyArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertCountArgs = $CountArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertAggregateArgs = $AggregateArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertGroupByArgs = $GroupByArgs<$Schema, 'ProjectAlert'>; +export type ProjectAlertWhereInput = $WhereInput<$Schema, 'ProjectAlert'>; +export type ProjectAlertSelect = $SelectInput<$Schema, 'ProjectAlert'>; +export type ProjectAlertInclude = $IncludeInput<$Schema, 'ProjectAlert'>; +export type ProjectAlertOmit = $OmitInput<$Schema, 'ProjectAlert'>; +export type ProjectAlertGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ProjectAlert', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ProjectAlert', Args, Options>; +export type ProjectAlertStorageFindManyArgs = $FindManyArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageFindUniqueArgs = $FindUniqueArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageFindFirstArgs = $FindFirstArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageExistsArgs = $ExistsArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageCreateArgs = $CreateArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageCreateManyArgs = $CreateManyArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageUpdateArgs = $UpdateArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageUpdateManyArgs = $UpdateManyArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageUpsertArgs = $UpsertArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageDeleteArgs = $DeleteArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageDeleteManyArgs = $DeleteManyArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageCountArgs = $CountArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageAggregateArgs = $AggregateArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageGroupByArgs = $GroupByArgs<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageWhereInput = $WhereInput<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageSelect = $SelectInput<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageInclude = $IncludeInput<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageOmit = $OmitInput<$Schema, 'ProjectAlertStorage'>; +export type ProjectAlertStorageGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'ProjectAlertStorage', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'ProjectAlertStorage', Args, Options>; +export type OrganizationIntegrationFindManyArgs = $FindManyArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationFindUniqueArgs = $FindUniqueArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationFindFirstArgs = $FindFirstArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationExistsArgs = $ExistsArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationCreateArgs = $CreateArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationCreateManyArgs = $CreateManyArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationCreateManyAndReturnArgs = $CreateManyAndReturnArgs< + $Schema, + 'OrganizationIntegration' +>; +export type OrganizationIntegrationUpdateArgs = $UpdateArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationUpdateManyArgs = $UpdateManyArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs< + $Schema, + 'OrganizationIntegration' +>; +export type OrganizationIntegrationUpsertArgs = $UpsertArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationDeleteArgs = $DeleteArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationDeleteManyArgs = $DeleteManyArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationCountArgs = $CountArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationAggregateArgs = $AggregateArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationGroupByArgs = $GroupByArgs<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationWhereInput = $WhereInput<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationSelect = $SelectInput<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationInclude = $IncludeInput<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationOmit = $OmitInput<$Schema, 'OrganizationIntegration'>; +export type OrganizationIntegrationGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'OrganizationIntegration', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'OrganizationIntegration', Args, Options>; +export type BulkActionGroupFindManyArgs = $FindManyArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupFindUniqueArgs = $FindUniqueArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupFindFirstArgs = $FindFirstArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupExistsArgs = $ExistsArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupCreateArgs = $CreateArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupCreateManyArgs = $CreateManyArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupUpdateArgs = $UpdateArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupUpdateManyArgs = $UpdateManyArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupUpsertArgs = $UpsertArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupDeleteArgs = $DeleteArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupDeleteManyArgs = $DeleteManyArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupCountArgs = $CountArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupAggregateArgs = $AggregateArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupGroupByArgs = $GroupByArgs<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupWhereInput = $WhereInput<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupSelect = $SelectInput<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupInclude = $IncludeInput<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupOmit = $OmitInput<$Schema, 'BulkActionGroup'>; +export type BulkActionGroupGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BulkActionGroup', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BulkActionGroup', Args, Options>; +export type BulkActionItemFindManyArgs = $FindManyArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemFindUniqueArgs = $FindUniqueArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemFindFirstArgs = $FindFirstArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemExistsArgs = $ExistsArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemCreateArgs = $CreateArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemCreateManyArgs = $CreateManyArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemUpdateArgs = $UpdateArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemUpdateManyArgs = $UpdateManyArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemUpsertArgs = $UpsertArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemDeleteArgs = $DeleteArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemDeleteManyArgs = $DeleteManyArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemCountArgs = $CountArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemAggregateArgs = $AggregateArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemGroupByArgs = $GroupByArgs<$Schema, 'BulkActionItem'>; +export type BulkActionItemWhereInput = $WhereInput<$Schema, 'BulkActionItem'>; +export type BulkActionItemSelect = $SelectInput<$Schema, 'BulkActionItem'>; +export type BulkActionItemInclude = $IncludeInput<$Schema, 'BulkActionItem'>; +export type BulkActionItemOmit = $OmitInput<$Schema, 'BulkActionItem'>; +export type BulkActionItemGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'BulkActionItem', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'BulkActionItem', Args, Options>; +export type RealtimeStreamChunkFindManyArgs = $FindManyArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkFindUniqueArgs = $FindUniqueArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkFindFirstArgs = $FindFirstArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkExistsArgs = $ExistsArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkCreateArgs = $CreateArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkCreateManyArgs = $CreateManyArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkUpdateArgs = $UpdateArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkUpdateManyArgs = $UpdateManyArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkUpsertArgs = $UpsertArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkDeleteArgs = $DeleteArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkDeleteManyArgs = $DeleteManyArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkCountArgs = $CountArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkAggregateArgs = $AggregateArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkGroupByArgs = $GroupByArgs<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkWhereInput = $WhereInput<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkSelect = $SelectInput<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkInclude = $IncludeInput<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkOmit = $OmitInput<$Schema, 'RealtimeStreamChunk'>; +export type RealtimeStreamChunkGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RealtimeStreamChunk', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RealtimeStreamChunk', Args, Options>; +export type TaskEventPartitionedFindManyArgs = $FindManyArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedFindUniqueArgs = $FindUniqueArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedFindFirstArgs = $FindFirstArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedExistsArgs = $ExistsArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedCreateArgs = $CreateArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedCreateManyArgs = $CreateManyArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedUpdateArgs = $UpdateArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedUpdateManyArgs = $UpdateManyArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedUpsertArgs = $UpsertArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedDeleteArgs = $DeleteArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedDeleteManyArgs = $DeleteManyArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedCountArgs = $CountArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedAggregateArgs = $AggregateArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedGroupByArgs = $GroupByArgs<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedWhereInput = $WhereInput<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedSelect = $SelectInput<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedInclude = $IncludeInput<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedOmit = $OmitInput<$Schema, 'TaskEventPartitioned'>; +export type TaskEventPartitionedGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'TaskEventPartitioned', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'TaskEventPartitioned', Args, Options>; diff --git a/tests/e2e/github-repos/trigger.dev/models.ts b/tests/e2e/github-repos/trigger.dev/models.ts index 70ee88aae..303c60a9c 100644 --- a/tests/e2e/github-repos/trigger.dev/models.ts +++ b/tests/e2e/github-repos/trigger.dev/models.ts @@ -5,27 +5,27 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type InvitationCode = $ModelResult<$Schema, "InvitationCode">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type InvitationCode = $ModelResult<$Schema, 'InvitationCode'>; /** * Used to generate PersonalAccessTokens, they're one-time use */ -export type AuthorizationCode = $ModelResult<$Schema, "AuthorizationCode">; -export type PersonalAccessToken = $ModelResult<$Schema, "PersonalAccessToken">; -export type Organization = $ModelResult<$Schema, "Organization">; -export type OrgMember = $ModelResult<$Schema, "OrgMember">; -export type OrgMemberInvite = $ModelResult<$Schema, "OrgMemberInvite">; -export type RuntimeEnvironment = $ModelResult<$Schema, "RuntimeEnvironment">; -export type Project = $ModelResult<$Schema, "Project">; -export type SecretReference = $ModelResult<$Schema, "SecretReference">; -export type SecretStore = $ModelResult<$Schema, "SecretStore">; -export type DataMigration = $ModelResult<$Schema, "DataMigration">; -export type BackgroundWorker = $ModelResult<$Schema, "BackgroundWorker">; -export type BackgroundWorkerFile = $ModelResult<$Schema, "BackgroundWorkerFile">; -export type BackgroundWorkerTask = $ModelResult<$Schema, "BackgroundWorkerTask">; -export type TaskRun = $ModelResult<$Schema, "TaskRun">; +export type AuthorizationCode = $ModelResult<$Schema, 'AuthorizationCode'>; +export type PersonalAccessToken = $ModelResult<$Schema, 'PersonalAccessToken'>; +export type Organization = $ModelResult<$Schema, 'Organization'>; +export type OrgMember = $ModelResult<$Schema, 'OrgMember'>; +export type OrgMemberInvite = $ModelResult<$Schema, 'OrgMemberInvite'>; +export type RuntimeEnvironment = $ModelResult<$Schema, 'RuntimeEnvironment'>; +export type Project = $ModelResult<$Schema, 'Project'>; +export type SecretReference = $ModelResult<$Schema, 'SecretReference'>; +export type SecretStore = $ModelResult<$Schema, 'SecretStore'>; +export type DataMigration = $ModelResult<$Schema, 'DataMigration'>; +export type BackgroundWorker = $ModelResult<$Schema, 'BackgroundWorker'>; +export type BackgroundWorkerFile = $ModelResult<$Schema, 'BackgroundWorkerFile'>; +export type BackgroundWorkerTask = $ModelResult<$Schema, 'BackgroundWorkerTask'>; +export type TaskRun = $ModelResult<$Schema, 'TaskRun'>; /** * Used by the RunEngine during TaskRun execution * It has the required information to transactionally progress a run through states, @@ -33,75 +33,75 @@ export type TaskRun = $ModelResult<$Schema, "TaskRun">; * It is optimised for performance and is designed to be cleared at some point, * so there are no cascading relationships to other models. */ -export type TaskRunExecutionSnapshot = $ModelResult<$Schema, "TaskRunExecutionSnapshot">; -export type TaskRunCheckpoint = $ModelResult<$Schema, "TaskRunCheckpoint">; +export type TaskRunExecutionSnapshot = $ModelResult<$Schema, 'TaskRunExecutionSnapshot'>; +export type TaskRunCheckpoint = $ModelResult<$Schema, 'TaskRunCheckpoint'>; /** * A Waitpoint blocks a run from continuing until it's completed * If there's a waitpoint blocking a run, it shouldn't be in the queue */ -export type Waitpoint = $ModelResult<$Schema, "Waitpoint">; -export type TaskRunWaitpoint = $ModelResult<$Schema, "TaskRunWaitpoint">; -export type WaitpointTag = $ModelResult<$Schema, "WaitpointTag">; -export type FeatureFlag = $ModelResult<$Schema, "FeatureFlag">; -export type WorkerInstance = $ModelResult<$Schema, "WorkerInstance">; -export type WorkerInstanceGroup = $ModelResult<$Schema, "WorkerInstanceGroup">; -export type WorkerGroupToken = $ModelResult<$Schema, "WorkerGroupToken">; -export type TaskRunTag = $ModelResult<$Schema, "TaskRunTag">; +export type Waitpoint = $ModelResult<$Schema, 'Waitpoint'>; +export type TaskRunWaitpoint = $ModelResult<$Schema, 'TaskRunWaitpoint'>; +export type WaitpointTag = $ModelResult<$Schema, 'WaitpointTag'>; +export type FeatureFlag = $ModelResult<$Schema, 'FeatureFlag'>; +export type WorkerInstance = $ModelResult<$Schema, 'WorkerInstance'>; +export type WorkerInstanceGroup = $ModelResult<$Schema, 'WorkerInstanceGroup'>; +export type WorkerGroupToken = $ModelResult<$Schema, 'WorkerGroupToken'>; +export type TaskRunTag = $ModelResult<$Schema, 'TaskRunTag'>; /** * This is used for triggerAndWait and batchTriggerAndWait. The taskRun is the child task, it points at a parent attempt or a batch */ -export type TaskRunDependency = $ModelResult<$Schema, "TaskRunDependency">; +export type TaskRunDependency = $ModelResult<$Schema, 'TaskRunDependency'>; /** * deprecated, we hadn't included the project id in the unique constraint */ -export type TaskRunCounter = $ModelResult<$Schema, "TaskRunCounter">; +export type TaskRunCounter = $ModelResult<$Schema, 'TaskRunCounter'>; /** * Used for the TaskRun number (e.g. #1,421) */ -export type TaskRunNumberCounter = $ModelResult<$Schema, "TaskRunNumberCounter">; +export type TaskRunNumberCounter = $ModelResult<$Schema, 'TaskRunNumberCounter'>; /** * This is not used from engine v2+, attempts use the TaskRunExecutionSnapshot and TaskRun */ -export type TaskRunAttempt = $ModelResult<$Schema, "TaskRunAttempt">; +export type TaskRunAttempt = $ModelResult<$Schema, 'TaskRunAttempt'>; /** * This is the unified otel span/log model that will eventually be replaced by clickhouse */ -export type TaskEvent = $ModelResult<$Schema, "TaskEvent">; -export type TaskQueue = $ModelResult<$Schema, "TaskQueue">; -export type BatchTaskRun = $ModelResult<$Schema, "BatchTaskRun">; +export type TaskEvent = $ModelResult<$Schema, 'TaskEvent'>; +export type TaskQueue = $ModelResult<$Schema, 'TaskQueue'>; +export type BatchTaskRun = $ModelResult<$Schema, 'BatchTaskRun'>; /** * Used in engine V1 only */ -export type BatchTaskRunItem = $ModelResult<$Schema, "BatchTaskRunItem">; -export type EnvironmentVariable = $ModelResult<$Schema, "EnvironmentVariable">; -export type EnvironmentVariableValue = $ModelResult<$Schema, "EnvironmentVariableValue">; -export type Checkpoint = $ModelResult<$Schema, "Checkpoint">; -export type CheckpointRestoreEvent = $ModelResult<$Schema, "CheckpointRestoreEvent">; -export type WorkerDeployment = $ModelResult<$Schema, "WorkerDeployment">; -export type WorkerDeploymentPromotion = $ModelResult<$Schema, "WorkerDeploymentPromotion">; +export type BatchTaskRunItem = $ModelResult<$Schema, 'BatchTaskRunItem'>; +export type EnvironmentVariable = $ModelResult<$Schema, 'EnvironmentVariable'>; +export type EnvironmentVariableValue = $ModelResult<$Schema, 'EnvironmentVariableValue'>; +export type Checkpoint = $ModelResult<$Schema, 'Checkpoint'>; +export type CheckpointRestoreEvent = $ModelResult<$Schema, 'CheckpointRestoreEvent'>; +export type WorkerDeployment = $ModelResult<$Schema, 'WorkerDeployment'>; +export type WorkerDeploymentPromotion = $ModelResult<$Schema, 'WorkerDeploymentPromotion'>; /** * Schedules can be attached to tasks to trigger them on a schedule */ -export type TaskSchedule = $ModelResult<$Schema, "TaskSchedule">; +export type TaskSchedule = $ModelResult<$Schema, 'TaskSchedule'>; /** * An instance links a schedule with an environment */ -export type TaskScheduleInstance = $ModelResult<$Schema, "TaskScheduleInstance">; -export type RuntimeEnvironmentSession = $ModelResult<$Schema, "RuntimeEnvironmentSession">; -export type ProjectAlertChannel = $ModelResult<$Schema, "ProjectAlertChannel">; -export type ProjectAlert = $ModelResult<$Schema, "ProjectAlert">; -export type ProjectAlertStorage = $ModelResult<$Schema, "ProjectAlertStorage">; -export type OrganizationIntegration = $ModelResult<$Schema, "OrganizationIntegration">; +export type TaskScheduleInstance = $ModelResult<$Schema, 'TaskScheduleInstance'>; +export type RuntimeEnvironmentSession = $ModelResult<$Schema, 'RuntimeEnvironmentSession'>; +export type ProjectAlertChannel = $ModelResult<$Schema, 'ProjectAlertChannel'>; +export type ProjectAlert = $ModelResult<$Schema, 'ProjectAlert'>; +export type ProjectAlertStorage = $ModelResult<$Schema, 'ProjectAlertStorage'>; +export type OrganizationIntegration = $ModelResult<$Schema, 'OrganizationIntegration'>; /** * Bulk actions, like canceling and replaying runs */ -export type BulkActionGroup = $ModelResult<$Schema, "BulkActionGroup">; -export type BulkActionItem = $ModelResult<$Schema, "BulkActionItem">; -export type RealtimeStreamChunk = $ModelResult<$Schema, "RealtimeStreamChunk">; +export type BulkActionGroup = $ModelResult<$Schema, 'BulkActionGroup'>; +export type BulkActionItem = $ModelResult<$Schema, 'BulkActionItem'>; +export type RealtimeStreamChunk = $ModelResult<$Schema, 'RealtimeStreamChunk'>; /** * This is the unified otel span/log model that will eventually be replaced by clickhouse */ -export type TaskEventPartitioned = $ModelResult<$Schema, "TaskEventPartitioned">; +export type TaskEventPartitioned = $ModelResult<$Schema, 'TaskEventPartitioned'>; export const AuthenticationMethod = $schema.enums.AuthenticationMethod.values; export type AuthenticationMethod = (typeof AuthenticationMethod)[keyof typeof AuthenticationMethod]; export const OrgMemberRole = $schema.enums.OrgMemberRole.values; diff --git a/tests/e2e/github-repos/trigger.dev/schema.ts b/tests/e2e/github-repos/trigger.dev/schema.ts index 35ae95145..556484fa1 100644 --- a/tests/e2e/github-repos/trigger.dev/schema.ts +++ b/tests/e2e/github-repos/trigger.dev/schema.ts @@ -5,6374 +5,9917 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, authenticationMethod: { - name: "authenticationMethod", - type: "AuthenticationMethod" + name: 'authenticationMethod', + type: 'AuthenticationMethod', }, authenticationProfile: { - name: "authenticationProfile", - type: "Json", - optional: true + name: 'authenticationProfile', + type: 'Json', + optional: true, }, authenticationExtraParams: { - name: "authenticationExtraParams", - type: "Json", - optional: true + name: 'authenticationExtraParams', + type: 'Json', + optional: true, }, authIdentifier: { - name: "authIdentifier", - type: "String", + name: 'authIdentifier', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, displayName: { - name: "displayName", - type: "String", - optional: true + name: 'displayName', + type: 'String', + optional: true, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, avatarUrl: { - name: "avatarUrl", - type: "String", - optional: true + name: 'avatarUrl', + type: 'String', + optional: true, }, admin: { - name: "admin", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'admin', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, dashboardPreferences: { - name: "dashboardPreferences", - type: "Json", - optional: true + name: 'dashboardPreferences', + type: 'Json', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, isOnCloudWaitlist: { - name: "isOnCloudWaitlist", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isOnCloudWaitlist', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, featureCloud: { - name: "featureCloud", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'featureCloud', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isOnHostedRepoWaitlist: { - name: "isOnHostedRepoWaitlist", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isOnHostedRepoWaitlist', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, marketingEmails: { - name: "marketingEmails", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'marketingEmails', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, confirmedBasicDetails: { - name: "confirmedBasicDetails", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'confirmedBasicDetails', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, referralSource: { - name: "referralSource", - type: "String", - optional: true + name: 'referralSource', + type: 'String', + optional: true, }, orgMemberships: { - name: "orgMemberships", - type: "OrgMember", + name: 'orgMemberships', + type: 'OrgMember', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, sentInvites: { - name: "sentInvites", - type: "OrgMemberInvite", + name: 'sentInvites', + type: 'OrgMemberInvite', array: true, - relation: { opposite: "inviter" } + relation: { opposite: 'inviter' }, }, invitationCode: { - name: "invitationCode", - type: "InvitationCode", + name: 'invitationCode', + type: 'InvitationCode', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("invitationCodeId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "users", fields: ["invitationCodeId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('invitationCodeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'users', fields: ['invitationCodeId'], references: ['id'] }, }, invitationCodeId: { - name: "invitationCodeId", - type: "String", + name: 'invitationCodeId', + type: 'String', optional: true, - foreignKeyFor: [ - "invitationCode" - ] as readonly string[] + foreignKeyFor: ['invitationCode'] as readonly string[], }, personalAccessTokens: { - name: "personalAccessTokens", - type: "PersonalAccessToken", + name: 'personalAccessTokens', + type: 'PersonalAccessToken', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, deployments: { - name: "deployments", - type: "WorkerDeployment", + name: 'deployments', + type: 'WorkerDeployment', array: true, - relation: { opposite: "triggeredBy" } - } + relation: { opposite: 'triggeredBy' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" }, - authIdentifier: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + authIdentifier: { type: 'String' }, + }, }, InvitationCode: { - name: "InvitationCode", + name: 'InvitationCode', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, code: { - name: "code", - type: "String", + name: 'code', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, users: { - name: "users", - type: "User", + name: 'users', + type: 'User', array: true, - relation: { opposite: "invitationCode" } + relation: { opposite: 'invitationCode' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - code: { type: "String" } - } + id: { type: 'String' }, + code: { type: 'String' }, + }, }, AuthorizationCode: { - name: "AuthorizationCode", + name: 'AuthorizationCode', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, code: { - name: "code", - type: "String", + name: 'code', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, personalAccessToken: { - name: "personalAccessToken", - type: "PersonalAccessToken", + name: 'personalAccessToken', + type: 'PersonalAccessToken', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("personalAccessTokenId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "authorizationCodes", fields: ["personalAccessTokenId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('personalAccessTokenId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'authorizationCodes', + fields: ['personalAccessTokenId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, personalAccessTokenId: { - name: "personalAccessTokenId", - type: "String", + name: 'personalAccessTokenId', + type: 'String', optional: true, - foreignKeyFor: [ - "personalAccessToken" - ] as readonly string[] + foreignKeyFor: ['personalAccessToken'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - code: { type: "String" } - } + id: { type: 'String' }, + code: { type: 'String' }, + }, }, PersonalAccessToken: { - name: "PersonalAccessToken", + name: 'PersonalAccessToken', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, encryptedToken: { - name: "encryptedToken", - type: "Json" + name: 'encryptedToken', + type: 'Json', }, obfuscatedToken: { - name: "obfuscatedToken", - type: "String" + name: 'obfuscatedToken', + type: 'String', }, hashedToken: { - name: "hashedToken", - type: "String", + name: 'hashedToken', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "personalAccessTokens", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'personalAccessTokens', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "String", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + foreignKeyFor: ['user'] as readonly string[], }, revokedAt: { - name: "revokedAt", - type: "DateTime", - optional: true + name: 'revokedAt', + type: 'DateTime', + optional: true, }, lastAccessedAt: { - name: "lastAccessedAt", - type: "DateTime", - optional: true + name: 'lastAccessedAt', + type: 'DateTime', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, authorizationCodes: { - name: "authorizationCodes", - type: "AuthorizationCode", + name: 'authorizationCodes', + type: 'AuthorizationCode', array: true, - relation: { opposite: "personalAccessToken" } - } + relation: { opposite: 'personalAccessToken' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - hashedToken: { type: "String" } - } + id: { type: 'String' }, + hashedToken: { type: 'String' }, + }, }, Organization: { - name: "Organization", + name: 'Organization', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, slug: { - name: "slug", - type: "String", + name: 'slug', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, maximumExecutionTimePerRunInMs: { - name: "maximumExecutionTimePerRunInMs", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(900000) }] }] as readonly AttributeApplication[], - default: 900000 as FieldDefault + name: 'maximumExecutionTimePerRunInMs', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(900000) }] }, + ] as readonly AttributeApplication[], + default: 900000 as FieldDefault, }, maximumConcurrencyLimit: { - name: "maximumConcurrencyLimit", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(10) }] }] as readonly AttributeApplication[], - default: 10 as FieldDefault + name: 'maximumConcurrencyLimit', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(10) }] }, + ] as readonly AttributeApplication[], + default: 10 as FieldDefault, }, maximumSchedulesLimit: { - name: "maximumSchedulesLimit", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(5) }] }] as readonly AttributeApplication[], - default: 5 as FieldDefault + name: 'maximumSchedulesLimit', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(5) }] }, + ] as readonly AttributeApplication[], + default: 5 as FieldDefault, }, maximumDevQueueSize: { - name: "maximumDevQueueSize", - type: "Int", - optional: true + name: 'maximumDevQueueSize', + type: 'Int', + optional: true, }, maximumDeployedQueueSize: { - name: "maximumDeployedQueueSize", - type: "Int", - optional: true + name: 'maximumDeployedQueueSize', + type: 'Int', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, deletedAt: { - name: "deletedAt", - type: "DateTime", - optional: true + name: 'deletedAt', + type: 'DateTime', + optional: true, }, companySize: { - name: "companySize", - type: "String", - optional: true + name: 'companySize', + type: 'String', + optional: true, }, avatar: { - name: "avatar", - type: "Json", - optional: true + name: 'avatar', + type: 'Json', + optional: true, }, runsEnabled: { - name: "runsEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'runsEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, v3Enabled: { - name: "v3Enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'v3Enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, v2Enabled: { - name: "v2Enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'v2Enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, v2MarqsEnabled: { - name: "v2MarqsEnabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'v2MarqsEnabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, hasRequestedV3: { - name: "hasRequestedV3", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hasRequestedV3', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, environments: { - name: "environments", - type: "RuntimeEnvironment", + name: 'environments', + type: 'RuntimeEnvironment', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, apiRateLimiterConfig: { - name: "apiRateLimiterConfig", - type: "Json", - optional: true + name: 'apiRateLimiterConfig', + type: 'Json', + optional: true, }, realtimeRateLimiterConfig: { - name: "realtimeRateLimiterConfig", - type: "Json", - optional: true + name: 'realtimeRateLimiterConfig', + type: 'Json', + optional: true, }, projects: { - name: "projects", - type: "Project", + name: 'projects', + type: 'Project', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, members: { - name: "members", - type: "OrgMember", + name: 'members', + type: 'OrgMember', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, invites: { - name: "invites", - type: "OrgMemberInvite", + name: 'invites', + type: 'OrgMemberInvite', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, organizationIntegrations: { - name: "organizationIntegrations", - type: "OrganizationIntegration", + name: 'organizationIntegrations', + type: 'OrganizationIntegration', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, workerGroups: { - name: "workerGroups", - type: "WorkerInstanceGroup", + name: 'workerGroups', + type: 'WorkerInstanceGroup', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, workerInstances: { - name: "workerInstances", - type: "WorkerInstance", + name: 'workerInstances', + type: 'WorkerInstance', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, executionSnapshots: { - name: "executionSnapshots", - type: "TaskRunExecutionSnapshot", + name: 'executionSnapshots', + type: 'TaskRunExecutionSnapshot', array: true, - relation: { opposite: "organization" } - } + relation: { opposite: 'organization' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - slug: { type: "String" } - } + id: { type: 'String' }, + slug: { type: 'String' }, + }, }, OrgMember: { - name: "OrgMember", + name: 'OrgMember', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "members", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'members', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "orgMemberships", fields: ["userId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'orgMemberships', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, userId: { - name: "userId", - type: "String", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + foreignKeyFor: ['user'] as readonly string[], }, role: { - name: "role", - type: "OrgMemberRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], - default: "MEMBER" as FieldDefault + name: 'role', + type: 'OrgMemberRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, + ] as readonly AttributeApplication[], + default: 'MEMBER' as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, environments: { - name: "environments", - type: "RuntimeEnvironment", + name: 'environments', + type: 'RuntimeEnvironment', array: true, - relation: { opposite: "orgMember" } - } + relation: { opposite: 'orgMember' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("userId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('userId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - organizationId_userId: { organizationId: { type: "String" }, userId: { type: "String" } } - } + id: { type: 'String' }, + organizationId_userId: { organizationId: { type: 'String' }, userId: { type: 'String' } }, + }, }, OrgMemberInvite: { - name: "OrgMemberInvite", + name: 'OrgMemberInvite', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, token: { - name: "token", - type: "String", + name: 'token', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@unique' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, email: { - name: "email", - type: "String" + name: 'email', + type: 'String', }, role: { - name: "role", - type: "OrgMemberRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], - default: "MEMBER" as FieldDefault + name: 'role', + type: 'OrgMemberRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, + ] as readonly AttributeApplication[], + default: 'MEMBER' as FieldDefault, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "invites", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'invites', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, inviter: { - name: "inviter", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviterId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "sentInvites", fields: ["inviterId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'inviter', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('inviterId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'sentInvites', + fields: ['inviterId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, inviterId: { - name: "inviterId", - type: "String", - foreignKeyFor: [ - "inviter" - ] as readonly string[] + name: 'inviterId', + type: 'String', + foreignKeyFor: ['inviter'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("email")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('email'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - token: { type: "String" }, - organizationId_email: { organizationId: { type: "String" }, email: { type: "String" } } - } + id: { type: 'String' }, + token: { type: 'String' }, + organizationId_email: { organizationId: { type: 'String' }, email: { type: 'String' } }, + }, }, RuntimeEnvironment: { - name: "RuntimeEnvironment", + name: 'RuntimeEnvironment', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, slug: { - name: "slug", - type: "String" + name: 'slug', + type: 'String', }, apiKey: { - name: "apiKey", - type: "String", + name: 'apiKey', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, pkApiKey: { - name: "pkApiKey", - type: "String", + name: 'pkApiKey', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, type: { - name: "type", - type: "RuntimeEnvironmentType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("DEVELOPMENT") }] }] as readonly AttributeApplication[], - default: "DEVELOPMENT" as FieldDefault + name: 'type', + type: 'RuntimeEnvironmentType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('DEVELOPMENT') }] }, + ] as readonly AttributeApplication[], + default: 'DEVELOPMENT' as FieldDefault, }, isBranchableEnvironment: { - name: "isBranchableEnvironment", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isBranchableEnvironment', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, branchName: { - name: "branchName", - type: "String", - optional: true + name: 'branchName', + type: 'String', + optional: true, }, parentEnvironment: { - name: "parentEnvironment", - type: "RuntimeEnvironment", + name: 'parentEnvironment', + type: 'RuntimeEnvironment', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("parentEnvironment") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "childEnvironments", name: "parentEnvironment", fields: ["parentEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('parentEnvironment') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('parentEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'childEnvironments', + name: 'parentEnvironment', + fields: ['parentEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, parentEnvironmentId: { - name: "parentEnvironmentId", - type: "String", + name: 'parentEnvironmentId', + type: 'String', optional: true, - foreignKeyFor: [ - "parentEnvironment" - ] as readonly string[] + foreignKeyFor: ['parentEnvironment'] as readonly string[], }, childEnvironments: { - name: "childEnvironments", - type: "RuntimeEnvironment", + name: 'childEnvironments', + type: 'RuntimeEnvironment', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("parentEnvironment") }] }] as readonly AttributeApplication[], - relation: { opposite: "parentEnvironment", name: "parentEnvironment" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('parentEnvironment') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parentEnvironment', name: 'parentEnvironment' }, }, git: { - name: "git", - type: "Json", - optional: true + name: 'git', + type: 'Json', + optional: true, }, archivedAt: { - name: "archivedAt", - type: "DateTime", - optional: true + name: 'archivedAt', + type: 'DateTime', + optional: true, }, shortcode: { - name: "shortcode", - type: "String" + name: 'shortcode', + type: 'String', }, maximumConcurrencyLimit: { - name: "maximumConcurrencyLimit", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(5) }] }] as readonly AttributeApplication[], - default: 5 as FieldDefault + name: 'maximumConcurrencyLimit', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(5) }] }, + ] as readonly AttributeApplication[], + default: 5 as FieldDefault, }, paused: { - name: "paused", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'paused', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, autoEnableInternalSources: { - name: "autoEnableInternalSources", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'autoEnableInternalSources', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "environments", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'environments', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "environments", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'environments', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, orgMember: { - name: "orgMember", - type: "OrgMember", + name: 'orgMember', + type: 'OrgMember', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("orgMemberId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "environments", fields: ["orgMemberId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('orgMemberId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'environments', + fields: ['orgMemberId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, orgMemberId: { - name: "orgMemberId", - type: "String", + name: 'orgMemberId', + type: 'String', optional: true, - foreignKeyFor: [ - "orgMember" - ] as readonly string[] + foreignKeyFor: ['orgMember'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, tunnelId: { - name: "tunnelId", - type: "String", - optional: true + name: 'tunnelId', + type: 'String', + optional: true, }, backgroundWorkers: { - name: "backgroundWorkers", - type: "BackgroundWorker", + name: 'backgroundWorkers', + type: 'BackgroundWorker', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, backgroundWorkerTasks: { - name: "backgroundWorkerTasks", - type: "BackgroundWorkerTask", + name: 'backgroundWorkerTasks', + type: 'BackgroundWorkerTask', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, taskRuns: { - name: "taskRuns", - type: "TaskRun", + name: 'taskRuns', + type: 'TaskRun', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, taskQueues: { - name: "taskQueues", - type: "TaskQueue", + name: 'taskQueues', + type: 'TaskQueue', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, batchTaskRuns: { - name: "batchTaskRuns", - type: "BatchTaskRun", + name: 'batchTaskRuns', + type: 'BatchTaskRun', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, environmentVariableValues: { - name: "environmentVariableValues", - type: "EnvironmentVariableValue", + name: 'environmentVariableValues', + type: 'EnvironmentVariableValue', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, checkpoints: { - name: "checkpoints", - type: "Checkpoint", + name: 'checkpoints', + type: 'Checkpoint', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, workerDeployments: { - name: "workerDeployments", - type: "WorkerDeployment", + name: 'workerDeployments', + type: 'WorkerDeployment', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, workerDeploymentPromotions: { - name: "workerDeploymentPromotions", - type: "WorkerDeploymentPromotion", + name: 'workerDeploymentPromotions', + type: 'WorkerDeploymentPromotion', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, taskRunAttempts: { - name: "taskRunAttempts", - type: "TaskRunAttempt", + name: 'taskRunAttempts', + type: 'TaskRunAttempt', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, CheckpointRestoreEvent: { - name: "CheckpointRestoreEvent", - type: "CheckpointRestoreEvent", + name: 'CheckpointRestoreEvent', + type: 'CheckpointRestoreEvent', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, taskScheduleInstances: { - name: "taskScheduleInstances", - type: "TaskScheduleInstance", + name: 'taskScheduleInstances', + type: 'TaskScheduleInstance', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, alerts: { - name: "alerts", - type: "ProjectAlert", + name: 'alerts', + type: 'ProjectAlert', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, sessions: { - name: "sessions", - type: "RuntimeEnvironmentSession", + name: 'sessions', + type: 'RuntimeEnvironmentSession', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, currentSession: { - name: "currentSession", - type: "RuntimeEnvironmentSession", + name: 'currentSession', + type: 'RuntimeEnvironmentSession', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("currentSession") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("currentSessionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "currentEnvironments", name: "currentSession", fields: ["currentSessionId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('currentSession') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('currentSessionId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'currentEnvironments', + name: 'currentSession', + fields: ['currentSessionId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, currentSessionId: { - name: "currentSessionId", - type: "String", + name: 'currentSessionId', + type: 'String', optional: true, - foreignKeyFor: [ - "currentSession" - ] as readonly string[] + foreignKeyFor: ['currentSession'] as readonly string[], }, taskRunNumberCounter: { - name: "taskRunNumberCounter", - type: "TaskRunNumberCounter", + name: 'taskRunNumberCounter', + type: 'TaskRunNumberCounter', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, taskRunCheckpoints: { - name: "taskRunCheckpoints", - type: "TaskRunCheckpoint", + name: 'taskRunCheckpoints', + type: 'TaskRunCheckpoint', array: true, - relation: { opposite: "runtimeEnvironment" } + relation: { opposite: 'runtimeEnvironment' }, }, waitpoints: { - name: "waitpoints", - type: "Waitpoint", + name: 'waitpoints', + type: 'Waitpoint', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, workerInstances: { - name: "workerInstances", - type: "WorkerInstance", + name: 'workerInstances', + type: 'WorkerInstance', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, executionSnapshots: { - name: "executionSnapshots", - type: "TaskRunExecutionSnapshot", + name: 'executionSnapshots', + type: 'TaskRunExecutionSnapshot', array: true, - relation: { opposite: "environment" } + relation: { opposite: 'environment' }, }, waitpointTags: { - name: "waitpointTags", - type: "WaitpointTag", + name: 'waitpointTags', + type: 'WaitpointTag', array: true, - relation: { opposite: "environment" } - } + relation: { opposite: 'environment' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("slug"), ExpressionUtils.field("orgMemberId")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("shortcode")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentEnvironmentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('slug'), + ExpressionUtils.field('orgMemberId'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('shortcode'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('parentEnvironmentId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - apiKey: { type: "String" }, - pkApiKey: { type: "String" }, - projectId_slug_orgMemberId: { projectId: { type: "String" }, slug: { type: "String" }, orgMemberId: { type: "String" } }, - projectId_shortcode: { projectId: { type: "String" }, shortcode: { type: "String" } } - } + id: { type: 'String' }, + apiKey: { type: 'String' }, + pkApiKey: { type: 'String' }, + projectId_slug_orgMemberId: { + projectId: { type: 'String' }, + slug: { type: 'String' }, + orgMemberId: { type: 'String' }, + }, + projectId_shortcode: { projectId: { type: 'String' }, shortcode: { type: 'String' } }, + }, }, Project: { - name: "Project", + name: 'Project', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, slug: { - name: "slug", - type: "String", + name: 'slug', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, externalRef: { - name: "externalRef", - type: "String", + name: 'externalRef', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "projects", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'projects', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, deletedAt: { - name: "deletedAt", - type: "DateTime", - optional: true + name: 'deletedAt', + type: 'DateTime', + optional: true, }, version: { - name: "version", - type: "ProjectVersion", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V2") }] }] as readonly AttributeApplication[], - default: "V2" as FieldDefault + name: 'version', + type: 'ProjectVersion', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V2') }] }, + ] as readonly AttributeApplication[], + default: 'V2' as FieldDefault, }, engine: { - name: "engine", - type: "RunEngineVersion", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], - default: "V1" as FieldDefault + name: 'engine', + type: 'RunEngineVersion', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, + ] as readonly AttributeApplication[], + default: 'V1' as FieldDefault, }, builderProjectId: { - name: "builderProjectId", - type: "String", - optional: true + name: 'builderProjectId', + type: 'String', + optional: true, }, workerGroups: { - name: "workerGroups", - type: "WorkerInstanceGroup", + name: 'workerGroups', + type: 'WorkerInstanceGroup', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, workers: { - name: "workers", - type: "WorkerInstance", + name: 'workers', + type: 'WorkerInstance', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, defaultWorkerGroup: { - name: "defaultWorkerGroup", - type: "WorkerInstanceGroup", + name: 'defaultWorkerGroup', + type: 'WorkerInstanceGroup', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectDefaultWorkerGroup") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("defaultWorkerGroupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "defaultForProjects", name: "ProjectDefaultWorkerGroup", fields: ["defaultWorkerGroupId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('ProjectDefaultWorkerGroup') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('defaultWorkerGroupId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'defaultForProjects', + name: 'ProjectDefaultWorkerGroup', + fields: ['defaultWorkerGroupId'], + references: ['id'], + }, }, defaultWorkerGroupId: { - name: "defaultWorkerGroupId", - type: "String", + name: 'defaultWorkerGroupId', + type: 'String', optional: true, - foreignKeyFor: [ - "defaultWorkerGroup" - ] as readonly string[] + foreignKeyFor: ['defaultWorkerGroup'] as readonly string[], }, environments: { - name: "environments", - type: "RuntimeEnvironment", + name: 'environments', + type: 'RuntimeEnvironment', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, backgroundWorkers: { - name: "backgroundWorkers", - type: "BackgroundWorker", + name: 'backgroundWorkers', + type: 'BackgroundWorker', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, backgroundWorkerTasks: { - name: "backgroundWorkerTasks", - type: "BackgroundWorkerTask", + name: 'backgroundWorkerTasks', + type: 'BackgroundWorkerTask', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, taskRuns: { - name: "taskRuns", - type: "TaskRun", + name: 'taskRuns', + type: 'TaskRun', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, runTags: { - name: "runTags", - type: "TaskRunTag", + name: 'runTags', + type: 'TaskRunTag', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, taskQueues: { - name: "taskQueues", - type: "TaskQueue", + name: 'taskQueues', + type: 'TaskQueue', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, environmentVariables: { - name: "environmentVariables", - type: "EnvironmentVariable", + name: 'environmentVariables', + type: 'EnvironmentVariable', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, checkpoints: { - name: "checkpoints", - type: "Checkpoint", + name: 'checkpoints', + type: 'Checkpoint', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, WorkerDeployment: { - name: "WorkerDeployment", - type: "WorkerDeployment", + name: 'WorkerDeployment', + type: 'WorkerDeployment', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, CheckpointRestoreEvent: { - name: "CheckpointRestoreEvent", - type: "CheckpointRestoreEvent", + name: 'CheckpointRestoreEvent', + type: 'CheckpointRestoreEvent', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, taskSchedules: { - name: "taskSchedules", - type: "TaskSchedule", + name: 'taskSchedules', + type: 'TaskSchedule', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, alertChannels: { - name: "alertChannels", - type: "ProjectAlertChannel", + name: 'alertChannels', + type: 'ProjectAlertChannel', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, alerts: { - name: "alerts", - type: "ProjectAlert", + name: 'alerts', + type: 'ProjectAlert', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, alertStorages: { - name: "alertStorages", - type: "ProjectAlertStorage", + name: 'alertStorages', + type: 'ProjectAlertStorage', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, bulkActionGroups: { - name: "bulkActionGroups", - type: "BulkActionGroup", + name: 'bulkActionGroups', + type: 'BulkActionGroup', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, BackgroundWorkerFile: { - name: "BackgroundWorkerFile", - type: "BackgroundWorkerFile", + name: 'BackgroundWorkerFile', + type: 'BackgroundWorkerFile', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, waitpoints: { - name: "waitpoints", - type: "Waitpoint", + name: 'waitpoints', + type: 'Waitpoint', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, taskRunWaitpoints: { - name: "taskRunWaitpoints", - type: "TaskRunWaitpoint", + name: 'taskRunWaitpoints', + type: 'TaskRunWaitpoint', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, taskRunCheckpoints: { - name: "taskRunCheckpoints", - type: "TaskRunCheckpoint", + name: 'taskRunCheckpoints', + type: 'TaskRunCheckpoint', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, executionSnapshots: { - name: "executionSnapshots", - type: "TaskRunExecutionSnapshot", + name: 'executionSnapshots', + type: 'TaskRunExecutionSnapshot', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, waitpointTags: { - name: "waitpointTags", - type: "WaitpointTag", + name: 'waitpointTags', + type: 'WaitpointTag', array: true, - relation: { opposite: "project" } - } + relation: { opposite: 'project' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - slug: { type: "String" }, - externalRef: { type: "String" } - } + id: { type: 'String' }, + slug: { type: 'String' }, + externalRef: { type: 'String' }, + }, }, SecretReference: { - name: "SecretReference", + name: 'SecretReference', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, key: { - name: "key", - type: "String", + name: 'key', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, provider: { - name: "provider", - type: "SecretStoreProvider", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("DATABASE") }] }] as readonly AttributeApplication[], - default: "DATABASE" as FieldDefault + name: 'provider', + type: 'SecretStoreProvider', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('DATABASE') }] }, + ] as readonly AttributeApplication[], + default: 'DATABASE' as FieldDefault, }, environmentVariableValues: { - name: "environmentVariableValues", - type: "EnvironmentVariableValue", + name: 'environmentVariableValues', + type: 'EnvironmentVariableValue', array: true, - relation: { opposite: "valueReference" } + relation: { opposite: 'valueReference' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, OrganizationIntegration: { - name: "OrganizationIntegration", - type: "OrganizationIntegration", + name: 'OrganizationIntegration', + type: 'OrganizationIntegration', array: true, - relation: { opposite: "tokenReference" } - } + relation: { opposite: 'tokenReference' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - key: { type: "String" } - } + id: { type: 'String' }, + key: { type: 'String' }, + }, }, SecretStore: { - name: "SecretStore", + name: 'SecretStore', fields: { key: { - name: "key", - type: "String", + name: 'key', + type: 'String', id: true, unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, value: { - name: "value", - type: "Json" + name: 'value', + type: 'Json', }, version: { - name: "version", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("1") }] }] as readonly AttributeApplication[], - default: "1" as FieldDefault + name: 'version', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('1') }] }, + ] as readonly AttributeApplication[], + default: '1' as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("key")]) }, { name: "type", value: ExpressionUtils.literal("BTree") }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('key')]) }, + { name: 'type', value: ExpressionUtils.literal('BTree') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["key"], + idFields: ['key'], uniqueFields: { - key: { type: "String" } - } + key: { type: 'String' }, + }, }, DataMigration: { - name: "DataMigration", + name: 'DataMigration', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String", + name: 'name', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true - } + name: 'completedAt', + type: 'DateTime', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - name: { type: "String" } - } + id: { type: 'String' }, + name: { type: 'String' }, + }, }, BackgroundWorker: { - name: "BackgroundWorker", + name: 'BackgroundWorker', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, engine: { - name: "engine", - type: "RunEngineVersion", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], - default: "V1" as FieldDefault + name: 'engine', + type: 'RunEngineVersion', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, + ] as readonly AttributeApplication[], + default: 'V1' as FieldDefault, }, contentHash: { - name: "contentHash", - type: "String" + name: 'contentHash', + type: 'String', }, sdkVersion: { - name: "sdkVersion", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("unknown") }] }] as readonly AttributeApplication[], - default: "unknown" as FieldDefault + name: 'sdkVersion', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('unknown') }] }, + ] as readonly AttributeApplication[], + default: 'unknown' as FieldDefault, }, cliVersion: { - name: "cliVersion", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("unknown") }] }] as readonly AttributeApplication[], - default: "unknown" as FieldDefault + name: 'cliVersion', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('unknown') }] }, + ] as readonly AttributeApplication[], + default: 'unknown' as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "backgroundWorkers", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'backgroundWorkers', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "backgroundWorkers", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'backgroundWorkers', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, version: { - name: "version", - type: "String" + name: 'version', + type: 'String', }, metadata: { - name: "metadata", - type: "Json" + name: 'metadata', + type: 'Json', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, tasks: { - name: "tasks", - type: "BackgroundWorkerTask", + name: 'tasks', + type: 'BackgroundWorkerTask', array: true, - relation: { opposite: "worker" } + relation: { opposite: 'worker' }, }, attempts: { - name: "attempts", - type: "TaskRunAttempt", + name: 'attempts', + type: 'TaskRunAttempt', array: true, - relation: { opposite: "backgroundWorker" } + relation: { opposite: 'backgroundWorker' }, }, lockedRuns: { - name: "lockedRuns", - type: "TaskRun", + name: 'lockedRuns', + type: 'TaskRun', array: true, - relation: { opposite: "lockedToVersion" } + relation: { opposite: 'lockedToVersion' }, }, files: { - name: "files", - type: "BackgroundWorkerFile", + name: 'files', + type: 'BackgroundWorkerFile', array: true, - relation: { opposite: "backgroundWorkers" } + relation: { opposite: 'backgroundWorkers' }, }, queues: { - name: "queues", - type: "TaskQueue", + name: 'queues', + type: 'TaskQueue', array: true, - relation: { opposite: "workers" } + relation: { opposite: 'workers' }, }, deployment: { - name: "deployment", - type: "WorkerDeployment", + name: 'deployment', + type: 'WorkerDeployment', optional: true, - relation: { opposite: "worker" } + relation: { opposite: 'worker' }, }, workerGroup: { - name: "workerGroup", - type: "WorkerInstanceGroup", + name: 'workerGroup', + type: 'WorkerInstanceGroup', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerGroupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "backgroundWorkers", fields: ["workerGroupId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('workerGroupId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'backgroundWorkers', + fields: ['workerGroupId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, workerGroupId: { - name: "workerGroupId", - type: "String", + name: 'workerGroupId', + type: 'String', optional: true, - foreignKeyFor: [ - "workerGroup" - ] as readonly string[] + foreignKeyFor: ['workerGroup'] as readonly string[], }, supportsLazyAttempts: { - name: "supportsLazyAttempts", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault - } + name: 'supportsLazyAttempts', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("version")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("createdAt")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('version'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('runtimeEnvironmentId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - projectId_runtimeEnvironmentId_version: { projectId: { type: "String" }, runtimeEnvironmentId: { type: "String" }, version: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + projectId_runtimeEnvironmentId_version: { + projectId: { type: 'String' }, + runtimeEnvironmentId: { type: 'String' }, + version: { type: 'String' }, + }, + }, }, BackgroundWorkerFile: { - name: "BackgroundWorkerFile", + name: 'BackgroundWorkerFile', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, filePath: { - name: "filePath", - type: "String" + name: 'filePath', + type: 'String', }, contentHash: { - name: "contentHash", - type: "String" + name: 'contentHash', + type: 'String', }, contents: { - name: "contents", - type: "Bytes" + name: 'contents', + type: 'Bytes', }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "BackgroundWorkerFile", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'BackgroundWorkerFile', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, backgroundWorkers: { - name: "backgroundWorkers", - type: "BackgroundWorker", + name: 'backgroundWorkers', + type: 'BackgroundWorker', array: true, - relation: { opposite: "files" } + relation: { opposite: 'files' }, }, tasks: { - name: "tasks", - type: "BackgroundWorkerTask", + name: 'tasks', + type: 'BackgroundWorkerTask', array: true, - relation: { opposite: "file" } + relation: { opposite: 'file' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("contentHash")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('contentHash'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - projectId_contentHash: { projectId: { type: "String" }, contentHash: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + projectId_contentHash: { projectId: { type: 'String' }, contentHash: { type: 'String' } }, + }, }, BackgroundWorkerTask: { - name: "BackgroundWorkerTask", + name: 'BackgroundWorkerTask', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, slug: { - name: "slug", - type: "String" + name: 'slug', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, filePath: { - name: "filePath", - type: "String" + name: 'filePath', + type: 'String', }, exportName: { - name: "exportName", - type: "String", - optional: true + name: 'exportName', + type: 'String', + optional: true, }, worker: { - name: "worker", - type: "BackgroundWorker", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "tasks", fields: ["workerId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'worker', + type: 'BackgroundWorker', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('workerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'tasks', + fields: ['workerId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, workerId: { - name: "workerId", - type: "String", - foreignKeyFor: [ - "worker" - ] as readonly string[] + name: 'workerId', + type: 'String', + foreignKeyFor: ['worker'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "backgroundWorkerTasks", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'backgroundWorkerTasks', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, file: { - name: "file", - type: "BackgroundWorkerFile", + name: 'file', + type: 'BackgroundWorkerFile', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("fileId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "tasks", fields: ["fileId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('fileId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'tasks', + fields: ['fileId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, fileId: { - name: "fileId", - type: "String", + name: 'fileId', + type: 'String', optional: true, - foreignKeyFor: [ - "file" - ] as readonly string[] + foreignKeyFor: ['file'] as readonly string[], }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "backgroundWorkerTasks", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'backgroundWorkerTasks', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, attempts: { - name: "attempts", - type: "TaskRunAttempt", + name: 'attempts', + type: 'TaskRunAttempt', array: true, - relation: { opposite: "backgroundWorkerTask" } + relation: { opposite: 'backgroundWorkerTask' }, }, runs: { - name: "runs", - type: "TaskRun", + name: 'runs', + type: 'TaskRun', array: true, - relation: { opposite: "lockedBy" } + relation: { opposite: 'lockedBy' }, }, queueConfig: { - name: "queueConfig", - type: "Json", - optional: true + name: 'queueConfig', + type: 'Json', + optional: true, }, retryConfig: { - name: "retryConfig", - type: "Json", - optional: true + name: 'retryConfig', + type: 'Json', + optional: true, }, machineConfig: { - name: "machineConfig", - type: "Json", - optional: true + name: 'machineConfig', + type: 'Json', + optional: true, }, queueId: { - name: "queueId", - type: "String", + name: 'queueId', + type: 'String', optional: true, - foreignKeyFor: [ - "queue" - ] as readonly string[] + foreignKeyFor: ['queue'] as readonly string[], }, queue: { - name: "queue", - type: "TaskQueue", + name: 'queue', + type: 'TaskQueue', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("queueId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "tasks", fields: ["queueId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('queueId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'tasks', + fields: ['queueId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, maxDurationInSeconds: { - name: "maxDurationInSeconds", - type: "Int", - optional: true + name: 'maxDurationInSeconds', + type: 'Int', + optional: true, }, triggerSource: { - name: "triggerSource", - type: "TaskTriggerSource", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("STANDARD") }] }] as readonly AttributeApplication[], - default: "STANDARD" as FieldDefault - } + name: 'triggerSource', + type: 'TaskTriggerSource', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('STANDARD') }] }, + ] as readonly AttributeApplication[], + default: 'STANDARD' as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId"), ExpressionUtils.field("slug")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("slug")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("projectId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('workerId'), + ExpressionUtils.field('slug'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('slug'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('projectId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - workerId_slug: { workerId: { type: "String" }, slug: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + workerId_slug: { workerId: { type: 'String' }, slug: { type: 'String' } }, + }, }, TaskRun: { - name: "TaskRun", + name: 'TaskRun', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, number: { - name: "number", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'number', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, engine: { - name: "engine", - type: "RunEngineVersion", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], - default: "V1" as FieldDefault + name: 'engine', + type: 'RunEngineVersion', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, + ] as readonly AttributeApplication[], + default: 'V1' as FieldDefault, }, status: { - name: "status", - type: "TaskRunStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'TaskRunStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, statusReason: { - name: "statusReason", - type: "String", - optional: true + name: 'statusReason', + type: 'String', + optional: true, }, idempotencyKey: { - name: "idempotencyKey", - type: "String", - optional: true + name: 'idempotencyKey', + type: 'String', + optional: true, }, idempotencyKeyExpiresAt: { - name: "idempotencyKeyExpiresAt", - type: "DateTime", - optional: true + name: 'idempotencyKeyExpiresAt', + type: 'DateTime', + optional: true, }, taskIdentifier: { - name: "taskIdentifier", - type: "String" + name: 'taskIdentifier', + type: 'String', }, isTest: { - name: "isTest", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isTest', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, payload: { - name: "payload", - type: "String" + name: 'payload', + type: 'String', }, payloadType: { - name: "payloadType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], - default: "application/json" as FieldDefault + name: 'payloadType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], + }, + ] as readonly AttributeApplication[], + default: 'application/json' as FieldDefault, }, context: { - name: "context", - type: "Json", - optional: true + name: 'context', + type: 'Json', + optional: true, }, traceContext: { - name: "traceContext", - type: "Json", - optional: true + name: 'traceContext', + type: 'Json', + optional: true, }, traceId: { - name: "traceId", - type: "String" + name: 'traceId', + type: 'String', }, spanId: { - name: "spanId", - type: "String" + name: 'spanId', + type: 'String', }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRuns", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRuns', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, environmentType: { - name: "environmentType", - type: "RuntimeEnvironmentType", - optional: true + name: 'environmentType', + type: 'RuntimeEnvironmentType', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRuns", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRuns', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, organizationId: { - name: "organizationId", - type: "String", - optional: true + name: 'organizationId', + type: 'String', + optional: true, }, queue: { - name: "queue", - type: "String" + name: 'queue', + type: 'String', }, lockedQueueId: { - name: "lockedQueueId", - type: "String", - optional: true + name: 'lockedQueueId', + type: 'String', + optional: true, }, workerQueue: { - name: "workerQueue", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("main") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("masterQueue") }] }] as readonly AttributeApplication[], - default: "main" as FieldDefault + name: 'workerQueue', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('main') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('masterQueue') }] }, + ] as readonly AttributeApplication[], + default: 'main' as FieldDefault, }, secondaryMasterQueue: { - name: "secondaryMasterQueue", - type: "String", - optional: true + name: 'secondaryMasterQueue', + type: 'String', + optional: true, }, attemptNumber: { - name: "attemptNumber", - type: "Int", - optional: true + name: 'attemptNumber', + type: 'Int', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, attempts: { - name: "attempts", - type: "TaskRunAttempt", + name: 'attempts', + type: 'TaskRunAttempt', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("attempts") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRun", name: "attempts" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('attempts') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'taskRun', name: 'attempts' }, }, tags: { - name: "tags", - type: "TaskRunTag", + name: 'tags', + type: 'TaskRunTag', array: true, - relation: { opposite: "runs" } + relation: { opposite: 'runs' }, }, runTags: { - name: "runTags", - type: "String", - array: true + name: 'runTags', + type: 'String', + array: true, }, taskVersion: { - name: "taskVersion", - type: "String", - optional: true + name: 'taskVersion', + type: 'String', + optional: true, }, sdkVersion: { - name: "sdkVersion", - type: "String", - optional: true + name: 'sdkVersion', + type: 'String', + optional: true, }, cliVersion: { - name: "cliVersion", - type: "String", - optional: true + name: 'cliVersion', + type: 'String', + optional: true, }, checkpoints: { - name: "checkpoints", - type: "Checkpoint", + name: 'checkpoints', + type: 'Checkpoint', array: true, - relation: { opposite: "run" } + relation: { opposite: 'run' }, }, startedAt: { - name: "startedAt", - type: "DateTime", - optional: true + name: 'startedAt', + type: 'DateTime', + optional: true, }, executedAt: { - name: "executedAt", - type: "DateTime", - optional: true + name: 'executedAt', + type: 'DateTime', + optional: true, }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true + name: 'completedAt', + type: 'DateTime', + optional: true, }, machinePreset: { - name: "machinePreset", - type: "String", - optional: true + name: 'machinePreset', + type: 'String', + optional: true, }, usageDurationMs: { - name: "usageDurationMs", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'usageDurationMs', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, costInCents: { - name: "costInCents", - type: "Float", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'costInCents', + type: 'Float', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, baseCostInCents: { - name: "baseCostInCents", - type: "Float", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'baseCostInCents', + type: 'Float', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, lockedAt: { - name: "lockedAt", - type: "DateTime", - optional: true + name: 'lockedAt', + type: 'DateTime', + optional: true, }, lockedBy: { - name: "lockedBy", - type: "BackgroundWorkerTask", + name: 'lockedBy', + type: 'BackgroundWorkerTask', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("lockedById")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "runs", fields: ["lockedById"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('lockedById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'runs', fields: ['lockedById'], references: ['id'] }, }, lockedById: { - name: "lockedById", - type: "String", + name: 'lockedById', + type: 'String', optional: true, - foreignKeyFor: [ - "lockedBy" - ] as readonly string[] + foreignKeyFor: ['lockedBy'] as readonly string[], }, lockedToVersion: { - name: "lockedToVersion", - type: "BackgroundWorker", + name: 'lockedToVersion', + type: 'BackgroundWorker', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("lockedToVersionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "lockedRuns", fields: ["lockedToVersionId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('lockedToVersionId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'lockedRuns', fields: ['lockedToVersionId'], references: ['id'] }, }, lockedToVersionId: { - name: "lockedToVersionId", - type: "String", + name: 'lockedToVersionId', + type: 'String', optional: true, - foreignKeyFor: [ - "lockedToVersion" - ] as readonly string[] + foreignKeyFor: ['lockedToVersion'] as readonly string[], }, priorityMs: { - name: "priorityMs", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'priorityMs', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, concurrencyKey: { - name: "concurrencyKey", - type: "String", - optional: true + name: 'concurrencyKey', + type: 'String', + optional: true, }, delayUntil: { - name: "delayUntil", - type: "DateTime", - optional: true + name: 'delayUntil', + type: 'DateTime', + optional: true, }, queuedAt: { - name: "queuedAt", - type: "DateTime", - optional: true + name: 'queuedAt', + type: 'DateTime', + optional: true, }, ttl: { - name: "ttl", - type: "String", - optional: true + name: 'ttl', + type: 'String', + optional: true, }, expiredAt: { - name: "expiredAt", - type: "DateTime", - optional: true + name: 'expiredAt', + type: 'DateTime', + optional: true, }, maxAttempts: { - name: "maxAttempts", - type: "Int", - optional: true + name: 'maxAttempts', + type: 'Int', + optional: true, }, oneTimeUseToken: { - name: "oneTimeUseToken", - type: "String", - optional: true + name: 'oneTimeUseToken', + type: 'String', + optional: true, }, associatedWaitpoint: { - name: "associatedWaitpoint", - type: "Waitpoint", + name: 'associatedWaitpoint', + type: 'Waitpoint', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CompletingRun") }] }] as readonly AttributeApplication[], - relation: { opposite: "completedByTaskRun", name: "CompletingRun" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CompletingRun') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'completedByTaskRun', name: 'CompletingRun' }, }, blockedByWaitpoints: { - name: "blockedByWaitpoints", - type: "TaskRunWaitpoint", + name: 'blockedByWaitpoints', + type: 'TaskRunWaitpoint', array: true, - relation: { opposite: "taskRun" } + relation: { opposite: 'taskRun' }, }, connectedWaitpoints: { - name: "connectedWaitpoints", - type: "Waitpoint", + name: 'connectedWaitpoints', + type: 'Waitpoint', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("WaitpointRunConnections") }] }] as readonly AttributeApplication[], - relation: { opposite: "connectedRuns", name: "WaitpointRunConnections" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('WaitpointRunConnections') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'connectedRuns', name: 'WaitpointRunConnections' }, }, taskEventStore: { - name: "taskEventStore", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("taskEvent") }] }] as readonly AttributeApplication[], - default: "taskEvent" as FieldDefault + name: 'taskEventStore', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('taskEvent') }] }, + ] as readonly AttributeApplication[], + default: 'taskEvent' as FieldDefault, }, queueTimestamp: { - name: "queueTimestamp", - type: "DateTime", - optional: true + name: 'queueTimestamp', + type: 'DateTime', + optional: true, }, batchItems: { - name: "batchItems", - type: "BatchTaskRunItem", + name: 'batchItems', + type: 'BatchTaskRunItem', array: true, - relation: { opposite: "taskRun" } + relation: { opposite: 'taskRun' }, }, dependency: { - name: "dependency", - type: "TaskRunDependency", + name: 'dependency', + type: 'TaskRunDependency', optional: true, - relation: { opposite: "taskRun" } + relation: { opposite: 'taskRun' }, }, CheckpointRestoreEvent: { - name: "CheckpointRestoreEvent", - type: "CheckpointRestoreEvent", + name: 'CheckpointRestoreEvent', + type: 'CheckpointRestoreEvent', array: true, - relation: { opposite: "run" } + relation: { opposite: 'run' }, }, executionSnapshots: { - name: "executionSnapshots", - type: "TaskRunExecutionSnapshot", + name: 'executionSnapshots', + type: 'TaskRunExecutionSnapshot', array: true, - relation: { opposite: "run" } + relation: { opposite: 'run' }, }, alerts: { - name: "alerts", - type: "ProjectAlert", + name: 'alerts', + type: 'ProjectAlert', array: true, - relation: { opposite: "taskRun" } + relation: { opposite: 'taskRun' }, }, scheduleInstanceId: { - name: "scheduleInstanceId", - type: "String", - optional: true + name: 'scheduleInstanceId', + type: 'String', + optional: true, }, scheduleId: { - name: "scheduleId", - type: "String", - optional: true + name: 'scheduleId', + type: 'String', + optional: true, }, sourceBulkActionItems: { - name: "sourceBulkActionItems", - type: "BulkActionItem", + name: 'sourceBulkActionItems', + type: 'BulkActionItem', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SourceActionItemRun") }] }] as readonly AttributeApplication[], - relation: { opposite: "sourceRun", name: "SourceActionItemRun" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('SourceActionItemRun') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'sourceRun', name: 'SourceActionItemRun' }, }, destinationBulkActionItems: { - name: "destinationBulkActionItems", - type: "BulkActionItem", + name: 'destinationBulkActionItems', + type: 'BulkActionItem', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DestinationActionItemRun") }] }] as readonly AttributeApplication[], - relation: { opposite: "destinationRun", name: "DestinationActionItemRun" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('DestinationActionItemRun') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'destinationRun', name: 'DestinationActionItemRun' }, }, logsDeletedAt: { - name: "logsDeletedAt", - type: "DateTime", - optional: true + name: 'logsDeletedAt', + type: 'DateTime', + optional: true, }, rootTaskRun: { - name: "rootTaskRun", - type: "TaskRun", + name: 'rootTaskRun', + type: 'TaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskRootRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("rootTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], - relation: { opposite: "descendantRuns", name: "TaskRootRun", fields: ["rootTaskRunId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('TaskRootRun') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('rootTaskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'descendantRuns', + name: 'TaskRootRun', + fields: ['rootTaskRunId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'NoAction', + }, }, rootTaskRunId: { - name: "rootTaskRunId", - type: "String", + name: 'rootTaskRunId', + type: 'String', optional: true, - foreignKeyFor: [ - "rootTaskRun" - ] as readonly string[] + foreignKeyFor: ['rootTaskRun'] as readonly string[], }, descendantRuns: { - name: "descendantRuns", - type: "TaskRun", + name: 'descendantRuns', + type: 'TaskRun', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskRootRun") }] }] as readonly AttributeApplication[], - relation: { opposite: "rootTaskRun", name: "TaskRootRun" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskRootRun') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'rootTaskRun', name: 'TaskRootRun' }, }, parentTaskRun: { - name: "parentTaskRun", - type: "TaskRun", + name: 'parentTaskRun', + type: 'TaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], - relation: { opposite: "childRuns", name: "TaskParentRun", fields: ["parentTaskRunId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('TaskParentRun') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('parentTaskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'childRuns', + name: 'TaskParentRun', + fields: ['parentTaskRunId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'NoAction', + }, }, parentTaskRunId: { - name: "parentTaskRunId", - type: "String", + name: 'parentTaskRunId', + type: 'String', optional: true, - foreignKeyFor: [ - "parentTaskRun" - ] as readonly string[] + foreignKeyFor: ['parentTaskRun'] as readonly string[], }, childRuns: { - name: "childRuns", - type: "TaskRun", + name: 'childRuns', + type: 'TaskRun', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRun") }] }] as readonly AttributeApplication[], - relation: { opposite: "parentTaskRun", name: "TaskParentRun" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('TaskParentRun') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parentTaskRun', name: 'TaskParentRun' }, }, parentTaskRunAttempt: { - name: "parentTaskRunAttempt", - type: "TaskRunAttempt", + name: 'parentTaskRunAttempt', + type: 'TaskRunAttempt', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRunAttempt") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentTaskRunAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], - relation: { opposite: "childRuns", name: "TaskParentRunAttempt", fields: ["parentTaskRunAttemptId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('TaskParentRunAttempt') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('parentTaskRunAttemptId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'childRuns', + name: 'TaskParentRunAttempt', + fields: ['parentTaskRunAttemptId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'NoAction', + }, }, parentTaskRunAttemptId: { - name: "parentTaskRunAttemptId", - type: "String", + name: 'parentTaskRunAttemptId', + type: 'String', optional: true, - foreignKeyFor: [ - "parentTaskRunAttempt" - ] as readonly string[] + foreignKeyFor: ['parentTaskRunAttempt'] as readonly string[], }, batch: { - name: "batch", - type: "BatchTaskRun", + name: 'batch', + type: 'BatchTaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], - relation: { opposite: "runs", fields: ["batchId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('batchId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'runs', + fields: ['batchId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'NoAction', + }, }, batchId: { - name: "batchId", - type: "String", + name: 'batchId', + type: 'String', optional: true, - foreignKeyFor: [ - "batch" - ] as readonly string[] + foreignKeyFor: ['batch'] as readonly string[], }, resumeParentOnCompletion: { - name: "resumeParentOnCompletion", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'resumeParentOnCompletion', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, depth: { - name: "depth", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'depth', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, parentSpanId: { - name: "parentSpanId", - type: "String", - optional: true + name: 'parentSpanId', + type: 'String', + optional: true, }, runChainState: { - name: "runChainState", - type: "Json", - optional: true + name: 'runChainState', + type: 'Json', + optional: true, }, seedMetadata: { - name: "seedMetadata", - type: "String", - optional: true + name: 'seedMetadata', + type: 'String', + optional: true, }, seedMetadataType: { - name: "seedMetadataType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], - default: "application/json" as FieldDefault + name: 'seedMetadataType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], + }, + ] as readonly AttributeApplication[], + default: 'application/json' as FieldDefault, }, metadata: { - name: "metadata", - type: "String", - optional: true + name: 'metadata', + type: 'String', + optional: true, }, metadataType: { - name: "metadataType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], - default: "application/json" as FieldDefault + name: 'metadataType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], + }, + ] as readonly AttributeApplication[], + default: 'application/json' as FieldDefault, }, metadataVersion: { - name: "metadataVersion", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], - default: 1 as FieldDefault + name: 'metadataVersion', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, + ] as readonly AttributeApplication[], + default: 1 as FieldDefault, }, output: { - name: "output", - type: "String", - optional: true + name: 'output', + type: 'String', + optional: true, }, outputType: { - name: "outputType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], - default: "application/json" as FieldDefault + name: 'outputType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], + }, + ] as readonly AttributeApplication[], + default: 'application/json' as FieldDefault, }, error: { - name: "error", - type: "Json", - optional: true + name: 'error', + type: 'Json', + optional: true, }, maxDurationInSeconds: { - name: "maxDurationInSeconds", - type: "Int", - optional: true - } + name: 'maxDurationInSeconds', + type: 'Int', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("oneTimeUseToken")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("taskIdentifier"), ExpressionUtils.field("idempotencyKey")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentTaskRunId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("rootTaskRunId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduleId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spanId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentSpanId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduleId"), ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runTags")]) }, { name: "type", value: ExpressionUtils.literal("Gin") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("batchId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("id")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }, { name: "type", value: ExpressionUtils.literal("Brin") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("TaskRunStatus", [ExpressionUtils.field("status"), ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("createdAt"), ExpressionUtils.field("id")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('oneTimeUseToken')]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('taskIdentifier'), + ExpressionUtils.field('idempotencyKey'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('parentTaskRunId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('rootTaskRunId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduleId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spanId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('parentSpanId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('scheduleId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runTags')]) }, + { name: 'type', value: ExpressionUtils.literal('Gin') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('batchId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('id'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), + }, + { name: 'type', value: ExpressionUtils.literal('Brin') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('TaskRunStatus', [ + ExpressionUtils.field('status'), + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('createdAt'), + ExpressionUtils.field('id'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - oneTimeUseToken: { type: "String" }, - runtimeEnvironmentId_taskIdentifier_idempotencyKey: { runtimeEnvironmentId: { type: "String" }, taskIdentifier: { type: "String" }, idempotencyKey: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + oneTimeUseToken: { type: 'String' }, + runtimeEnvironmentId_taskIdentifier_idempotencyKey: { + runtimeEnvironmentId: { type: 'String' }, + taskIdentifier: { type: 'String' }, + idempotencyKey: { type: 'String' }, + }, + }, }, TaskRunExecutionSnapshot: { - name: "TaskRunExecutionSnapshot", + name: 'TaskRunExecutionSnapshot', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, engine: { - name: "engine", - type: "RunEngineVersion", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V2") }] }] as readonly AttributeApplication[], - default: "V2" as FieldDefault + name: 'engine', + type: 'RunEngineVersion', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V2') }] }, + ] as readonly AttributeApplication[], + default: 'V2' as FieldDefault, }, executionStatus: { - name: "executionStatus", - type: "TaskRunExecutionStatus" + name: 'executionStatus', + type: 'TaskRunExecutionStatus', }, description: { - name: "description", - type: "String" + name: 'description', + type: 'String', }, isValid: { - name: "isValid", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'isValid', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, error: { - name: "error", - type: "String", - optional: true + name: 'error', + type: 'String', + optional: true, }, previousSnapshotId: { - name: "previousSnapshotId", - type: "String", - optional: true + name: 'previousSnapshotId', + type: 'String', + optional: true, }, runId: { - name: "runId", - type: "String", - foreignKeyFor: [ - "run" - ] as readonly string[] + name: 'runId', + type: 'String', + foreignKeyFor: ['run'] as readonly string[], }, run: { - name: "run", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "executionSnapshots", fields: ["runId"], references: ["id"] } + name: 'run', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'executionSnapshots', fields: ['runId'], references: ['id'] }, }, runStatus: { - name: "runStatus", - type: "TaskRunStatus" + name: 'runStatus', + type: 'TaskRunStatus', }, batchId: { - name: "batchId", - type: "String", + name: 'batchId', + type: 'String', optional: true, - foreignKeyFor: [ - "batch" - ] as readonly string[] + foreignKeyFor: ['batch'] as readonly string[], }, batch: { - name: "batch", - type: "BatchTaskRun", + name: 'batch', + type: 'BatchTaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "executionSnapshots", fields: ["batchId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('batchId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'executionSnapshots', fields: ['batchId'], references: ['id'] }, }, attemptNumber: { - name: "attemptNumber", - type: "Int", - optional: true + name: 'attemptNumber', + type: 'Int', + optional: true, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "executionSnapshots", fields: ["environmentId"], references: ["id"] } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'executionSnapshots', fields: ['environmentId'], references: ['id'] }, }, environmentType: { - name: "environmentType", - type: "RuntimeEnvironmentType" + name: 'environmentType', + type: 'RuntimeEnvironmentType', }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "executionSnapshots", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'executionSnapshots', fields: ['projectId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "executionSnapshots", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'executionSnapshots', fields: ['organizationId'], references: ['id'] }, }, completedWaitpoints: { - name: "completedWaitpoints", - type: "Waitpoint", + name: 'completedWaitpoints', + type: 'Waitpoint', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("completedWaitpoints") }] }] as readonly AttributeApplication[], - relation: { opposite: "completedExecutionSnapshots", name: "completedWaitpoints" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('completedWaitpoints') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'completedExecutionSnapshots', name: 'completedWaitpoints' }, }, completedWaitpointOrder: { - name: "completedWaitpointOrder", - type: "String", - array: true + name: 'completedWaitpointOrder', + type: 'String', + array: true, }, checkpointId: { - name: "checkpointId", - type: "String", + name: 'checkpointId', + type: 'String', optional: true, - foreignKeyFor: [ - "checkpoint" - ] as readonly string[] + foreignKeyFor: ['checkpoint'] as readonly string[], }, checkpoint: { - name: "checkpoint", - type: "TaskRunCheckpoint", + name: 'checkpoint', + type: 'TaskRunCheckpoint', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "executionSnapshot", fields: ["checkpointId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('checkpointId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'executionSnapshot', fields: ['checkpointId'], references: ['id'] }, }, workerId: { - name: "workerId", - type: "String", + name: 'workerId', + type: 'String', optional: true, - foreignKeyFor: [ - "worker" - ] as readonly string[] + foreignKeyFor: ['worker'] as readonly string[], }, worker: { - name: "worker", - type: "WorkerInstance", + name: 'worker', + type: 'WorkerInstance', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "TaskRunExecutionSnapshot", fields: ["workerId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('workerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'TaskRunExecutionSnapshot', fields: ['workerId'], references: ['id'] }, }, runnerId: { - name: "runnerId", - type: "String", - optional: true + name: 'runnerId', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, lastHeartbeatAt: { - name: "lastHeartbeatAt", - type: "DateTime", - optional: true + name: 'lastHeartbeatAt', + type: 'DateTime', + optional: true, }, metadata: { - name: "metadata", - type: "Json", - optional: true - } + name: 'metadata', + type: 'Json', + optional: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId"), ExpressionUtils.field("isValid"), ExpressionUtils.field("createdAt")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runId'), + ExpressionUtils.field('isValid'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, TaskRunCheckpoint: { - name: "TaskRunCheckpoint", + name: 'TaskRunCheckpoint', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, type: { - name: "type", - type: "TaskRunCheckpointType" + name: 'type', + type: 'TaskRunCheckpointType', }, location: { - name: "location", - type: "String" + name: 'location', + type: 'String', }, imageRef: { - name: "imageRef", - type: "String", - optional: true + name: 'imageRef', + type: 'String', + optional: true, }, reason: { - name: "reason", - type: "String", - optional: true + name: 'reason', + type: 'String', + optional: true, }, metadata: { - name: "metadata", - type: "String", - optional: true + name: 'metadata', + type: 'String', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRunCheckpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRunCheckpoints', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRunCheckpoints", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRunCheckpoints', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, executionSnapshot: { - name: "executionSnapshot", - type: "TaskRunExecutionSnapshot", + name: 'executionSnapshot', + type: 'TaskRunExecutionSnapshot', array: true, - relation: { opposite: "checkpoint" } + relation: { opposite: 'checkpoint' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + }, }, Waitpoint: { - name: "Waitpoint", + name: 'Waitpoint', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, type: { - name: "type", - type: "WaitpointType" + name: 'type', + type: 'WaitpointType', }, status: { - name: "status", - type: "WaitpointStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'WaitpointStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true + name: 'completedAt', + type: 'DateTime', + optional: true, }, idempotencyKey: { - name: "idempotencyKey", - type: "String" + name: 'idempotencyKey', + type: 'String', }, userProvidedIdempotencyKey: { - name: "userProvidedIdempotencyKey", - type: "Boolean" + name: 'userProvidedIdempotencyKey', + type: 'Boolean', }, idempotencyKeyExpiresAt: { - name: "idempotencyKeyExpiresAt", - type: "DateTime", - optional: true + name: 'idempotencyKeyExpiresAt', + type: 'DateTime', + optional: true, }, inactiveIdempotencyKey: { - name: "inactiveIdempotencyKey", - type: "String", - optional: true + name: 'inactiveIdempotencyKey', + type: 'String', + optional: true, }, completedByTaskRunId: { - name: "completedByTaskRunId", - type: "String", + name: 'completedByTaskRunId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "completedByTaskRun" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['completedByTaskRun'] as readonly string[], }, completedByTaskRun: { - name: "completedByTaskRun", - type: "TaskRun", + name: 'completedByTaskRun', + type: 'TaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CompletingRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("completedByTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "associatedWaitpoint", name: "CompletingRun", fields: ["completedByTaskRunId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CompletingRun') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('completedByTaskRunId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'associatedWaitpoint', + name: 'CompletingRun', + fields: ['completedByTaskRunId'], + references: ['id'], + onDelete: 'SetNull', + }, }, completedAfter: { - name: "completedAfter", - type: "DateTime", - optional: true + name: 'completedAfter', + type: 'DateTime', + optional: true, }, completedByBatchId: { - name: "completedByBatchId", - type: "String", + name: 'completedByBatchId', + type: 'String', optional: true, - foreignKeyFor: [ - "completedByBatch" - ] as readonly string[] + foreignKeyFor: ['completedByBatch'] as readonly string[], }, completedByBatch: { - name: "completedByBatch", - type: "BatchTaskRun", + name: 'completedByBatch', + type: 'BatchTaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("completedByBatchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], - relation: { opposite: "waitpoints", fields: ["completedByBatchId"], references: ["id"], onDelete: "SetNull" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('completedByBatchId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'waitpoints', + fields: ['completedByBatchId'], + references: ['id'], + onDelete: 'SetNull', + }, }, blockingTaskRuns: { - name: "blockingTaskRuns", - type: "TaskRunWaitpoint", + name: 'blockingTaskRuns', + type: 'TaskRunWaitpoint', array: true, - relation: { opposite: "waitpoint" } + relation: { opposite: 'waitpoint' }, }, connectedRuns: { - name: "connectedRuns", - type: "TaskRun", + name: 'connectedRuns', + type: 'TaskRun', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("WaitpointRunConnections") }] }] as readonly AttributeApplication[], - relation: { opposite: "connectedWaitpoints", name: "WaitpointRunConnections" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('WaitpointRunConnections') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'connectedWaitpoints', name: 'WaitpointRunConnections' }, }, completedExecutionSnapshots: { - name: "completedExecutionSnapshots", - type: "TaskRunExecutionSnapshot", + name: 'completedExecutionSnapshots', + type: 'TaskRunExecutionSnapshot', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("completedWaitpoints") }] }] as readonly AttributeApplication[], - relation: { opposite: "completedWaitpoints", name: "completedWaitpoints" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('completedWaitpoints') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'completedWaitpoints', name: 'completedWaitpoints' }, }, output: { - name: "output", - type: "String", - optional: true + name: 'output', + type: 'String', + optional: true, }, outputType: { - name: "outputType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], - default: "application/json" as FieldDefault + name: 'outputType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], + }, + ] as readonly AttributeApplication[], + default: 'application/json' as FieldDefault, }, outputIsError: { - name: "outputIsError", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'outputIsError', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "waitpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'waitpoints', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "waitpoints", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'waitpoints', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, tags: { - name: "tags", - type: "String", - array: true - } + name: 'tags', + type: 'String', + array: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("idempotencyKey")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("completedByBatchId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("type"), ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("type"), ExpressionUtils.field("status")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('idempotencyKey'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('completedByBatchId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('type'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('type'), + ExpressionUtils.field('status'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - completedByTaskRunId: { type: "String" }, - environmentId_idempotencyKey: { environmentId: { type: "String" }, idempotencyKey: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + completedByTaskRunId: { type: 'String' }, + environmentId_idempotencyKey: { environmentId: { type: 'String' }, idempotencyKey: { type: 'String' } }, + }, }, TaskRunWaitpoint: { - name: "TaskRunWaitpoint", + name: 'TaskRunWaitpoint', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, taskRun: { - name: "taskRun", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "blockedByWaitpoints", fields: ["taskRunId"], references: ["id"] } + name: 'taskRun', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'blockedByWaitpoints', fields: ['taskRunId'], references: ['id'] }, }, taskRunId: { - name: "taskRunId", - type: "String", - foreignKeyFor: [ - "taskRun" - ] as readonly string[] + name: 'taskRunId', + type: 'String', + foreignKeyFor: ['taskRun'] as readonly string[], }, waitpoint: { - name: "waitpoint", - type: "Waitpoint", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("waitpointId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "blockingTaskRuns", fields: ["waitpointId"], references: ["id"] } + name: 'waitpoint', + type: 'Waitpoint', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('waitpointId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'blockingTaskRuns', fields: ['waitpointId'], references: ['id'] }, }, waitpointId: { - name: "waitpointId", - type: "String", - foreignKeyFor: [ - "waitpoint" - ] as readonly string[] + name: 'waitpointId', + type: 'String', + foreignKeyFor: ['waitpoint'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRunWaitpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRunWaitpoints', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, spanIdToComplete: { - name: "spanIdToComplete", - type: "String", - optional: true + name: 'spanIdToComplete', + type: 'String', + optional: true, }, batchId: { - name: "batchId", - type: "String", + name: 'batchId', + type: 'String', optional: true, - foreignKeyFor: [ - "batch" - ] as readonly string[] + foreignKeyFor: ['batch'] as readonly string[], }, batch: { - name: "batch", - type: "BatchTaskRun", + name: 'batch', + type: 'BatchTaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "runsBlocked", fields: ["batchId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('batchId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'runsBlocked', fields: ['batchId'], references: ['id'] }, }, batchIndex: { - name: "batchIndex", - type: "Int", - optional: true + name: 'batchIndex', + type: 'Int', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId"), ExpressionUtils.field("waitpointId"), ExpressionUtils.field("batchIndex")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("waitpointId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('taskRunId'), + ExpressionUtils.field('waitpointId'), + ExpressionUtils.field('batchIndex'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('waitpointId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - taskRunId_waitpointId_batchIndex: { taskRunId: { type: "String" }, waitpointId: { type: "String" }, batchIndex: { type: "Int" } } - } + id: { type: 'String' }, + taskRunId_waitpointId_batchIndex: { + taskRunId: { type: 'String' }, + waitpointId: { type: 'String' }, + batchIndex: { type: 'Int' }, + }, + }, }, WaitpointTag: { - name: "WaitpointTag", + name: 'WaitpointTag', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "waitpointTags", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'waitpointTags', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "waitpointTags", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'waitpointTags', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("name")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - environmentId_name: { environmentId: { type: "String" }, name: { type: "String" } } - } + id: { type: 'String' }, + environmentId_name: { environmentId: { type: 'String' }, name: { type: 'String' } }, + }, }, FeatureFlag: { - name: "FeatureFlag", + name: 'FeatureFlag', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, key: { - name: "key", - type: "String", + name: 'key', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, value: { - name: "value", - type: "Json", - optional: true - } + name: 'value', + type: 'Json', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - key: { type: "String" } - } + id: { type: 'String' }, + key: { type: 'String' }, + }, }, WorkerInstance: { - name: "WorkerInstance", + name: 'WorkerInstance', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, resourceIdentifier: { - name: "resourceIdentifier", - type: "String" + name: 'resourceIdentifier', + type: 'String', }, metadata: { - name: "metadata", - type: "Json", - optional: true + name: 'metadata', + type: 'Json', + optional: true, }, workerGroup: { - name: "workerGroup", - type: "WorkerInstanceGroup", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerGroupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "workers", fields: ["workerGroupId"], references: ["id"] } + name: 'workerGroup', + type: 'WorkerInstanceGroup', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('workerGroupId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'workers', fields: ['workerGroupId'], references: ['id'] }, }, workerGroupId: { - name: "workerGroupId", - type: "String", - foreignKeyFor: [ - "workerGroup" - ] as readonly string[] + name: 'workerGroupId', + type: 'String', + foreignKeyFor: ['workerGroup'] as readonly string[], }, TaskRunExecutionSnapshot: { - name: "TaskRunExecutionSnapshot", - type: "TaskRunExecutionSnapshot", + name: 'TaskRunExecutionSnapshot', + type: 'TaskRunExecutionSnapshot', array: true, - relation: { opposite: "worker" } + relation: { opposite: 'worker' }, }, organization: { - name: "organization", - type: "Organization", + name: 'organization', + type: 'Organization', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerInstances", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerInstances', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", + name: 'organizationId', + type: 'String', optional: true, - foreignKeyFor: [ - "organization" - ] as readonly string[] + foreignKeyFor: ['organization'] as readonly string[], }, project: { - name: "project", - type: "Project", + name: 'project', + type: 'Project', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workers", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workers', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", + name: 'projectId', + type: 'String', optional: true, - foreignKeyFor: [ - "project" - ] as readonly string[] + foreignKeyFor: ['project'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", + name: 'environment', + type: 'RuntimeEnvironment', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerInstances", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerInstances', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", + name: 'environmentId', + type: 'String', optional: true, - foreignKeyFor: [ - "environment" - ] as readonly string[] + foreignKeyFor: ['environment'] as readonly string[], }, deployment: { - name: "deployment", - type: "WorkerDeployment", + name: 'deployment', + type: 'WorkerDeployment', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("deploymentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerInstance", fields: ["deploymentId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('deploymentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerInstance', + fields: ['deploymentId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, deploymentId: { - name: "deploymentId", - type: "String", + name: 'deploymentId', + type: 'String', optional: true, - foreignKeyFor: [ - "deployment" - ] as readonly string[] + foreignKeyFor: ['deployment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, lastDequeueAt: { - name: "lastDequeueAt", - type: "DateTime", - optional: true + name: 'lastDequeueAt', + type: 'DateTime', + optional: true, }, lastHeartbeatAt: { - name: "lastHeartbeatAt", - type: "DateTime", - optional: true - } + name: 'lastHeartbeatAt', + type: 'DateTime', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerGroupId"), ExpressionUtils.field("resourceIdentifier")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('workerGroupId'), + ExpressionUtils.field('resourceIdentifier'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - workerGroupId_resourceIdentifier: { workerGroupId: { type: "String" }, resourceIdentifier: { type: "String" } } - } + id: { type: 'String' }, + workerGroupId_resourceIdentifier: { + workerGroupId: { type: 'String' }, + resourceIdentifier: { type: 'String' }, + }, + }, }, WorkerInstanceGroup: { - name: "WorkerInstanceGroup", + name: 'WorkerInstanceGroup', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, type: { - name: "type", - type: "WorkerInstanceGroupType" + name: 'type', + type: 'WorkerInstanceGroupType', }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, masterQueue: { - name: "masterQueue", - type: "String", + name: 'masterQueue', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, hidden: { - name: "hidden", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'hidden', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, token: { - name: "token", - type: "WorkerGroupToken", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("tokenId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerGroup", fields: ["tokenId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'token', + type: 'WorkerGroupToken', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('tokenId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerGroup', + fields: ['tokenId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, tokenId: { - name: "tokenId", - type: "String", + name: 'tokenId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "token" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['token'] as readonly string[], }, workers: { - name: "workers", - type: "WorkerInstance", + name: 'workers', + type: 'WorkerInstance', array: true, - relation: { opposite: "workerGroup" } + relation: { opposite: 'workerGroup' }, }, backgroundWorkers: { - name: "backgroundWorkers", - type: "BackgroundWorker", + name: 'backgroundWorkers', + type: 'BackgroundWorker', array: true, - relation: { opposite: "workerGroup" } + relation: { opposite: 'workerGroup' }, }, defaultForProjects: { - name: "defaultForProjects", - type: "Project", + name: 'defaultForProjects', + type: 'Project', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectDefaultWorkerGroup") }] }] as readonly AttributeApplication[], - relation: { opposite: "defaultWorkerGroup", name: "ProjectDefaultWorkerGroup" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('ProjectDefaultWorkerGroup') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'defaultWorkerGroup', name: 'ProjectDefaultWorkerGroup' }, }, organization: { - name: "organization", - type: "Organization", + name: 'organization', + type: 'Organization', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerGroups", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerGroups', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", + name: 'organizationId', + type: 'String', optional: true, - foreignKeyFor: [ - "organization" - ] as readonly string[] + foreignKeyFor: ['organization'] as readonly string[], }, project: { - name: "project", - type: "Project", + name: 'project', + type: 'Project', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerGroups", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerGroups', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", + name: 'projectId', + type: 'String', optional: true, - foreignKeyFor: [ - "project" - ] as readonly string[] + foreignKeyFor: ['project'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - masterQueue: { type: "String" }, - tokenId: { type: "String" } - } + id: { type: 'String' }, + masterQueue: { type: 'String' }, + tokenId: { type: 'String' }, + }, }, WorkerGroupToken: { - name: "WorkerGroupToken", + name: 'WorkerGroupToken', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, tokenHash: { - name: "tokenHash", - type: "String", + name: 'tokenHash', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, workerGroup: { - name: "workerGroup", - type: "WorkerInstanceGroup", + name: 'workerGroup', + type: 'WorkerInstanceGroup', optional: true, - relation: { opposite: "token" } - } + relation: { opposite: 'token' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - tokenHash: { type: "String" } - } + id: { type: 'String' }, + tokenHash: { type: 'String' }, + }, }, TaskRunTag: { - name: "TaskRunTag", + name: 'TaskRunTag', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, runs: { - name: "runs", - type: "TaskRun", + name: 'runs', + type: 'TaskRun', array: true, - relation: { opposite: "tags" } + relation: { opposite: 'tags' }, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "runTags", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'runTags', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("name")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("name"), ExpressionUtils.field("id")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('name'), + ExpressionUtils.field('id'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - projectId_name: { projectId: { type: "String" }, name: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + projectId_name: { projectId: { type: 'String' }, name: { type: 'String' } }, + }, }, TaskRunDependency: { - name: "TaskRunDependency", + name: 'TaskRunDependency', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, taskRun: { - name: "taskRun", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "dependency", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'taskRun', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'dependency', + fields: ['taskRunId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, taskRunId: { - name: "taskRunId", - type: "String", + name: 'taskRunId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "taskRun" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['taskRun'] as readonly string[], }, checkpointEvent: { - name: "checkpointEvent", - type: "CheckpointRestoreEvent", + name: 'checkpointEvent', + type: 'CheckpointRestoreEvent', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRunDependency", fields: ["checkpointEventId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('checkpointEventId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRunDependency', + fields: ['checkpointEventId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, checkpointEventId: { - name: "checkpointEventId", - type: "String", + name: 'checkpointEventId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "checkpointEvent" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['checkpointEvent'] as readonly string[], }, dependentAttempt: { - name: "dependentAttempt", - type: "TaskRunAttempt", + name: 'dependentAttempt', + type: 'TaskRunAttempt', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "dependencies", fields: ["dependentAttemptId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('dependentAttemptId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'dependencies', fields: ['dependentAttemptId'], references: ['id'] }, }, dependentAttemptId: { - name: "dependentAttemptId", - type: "String", + name: 'dependentAttemptId', + type: 'String', optional: true, - foreignKeyFor: [ - "dependentAttempt" - ] as readonly string[] + foreignKeyFor: ['dependentAttempt'] as readonly string[], }, dependentBatchRun: { - name: "dependentBatchRun", - type: "BatchTaskRun", + name: 'dependentBatchRun', + type: 'BatchTaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("dependentBatchRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentBatchRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "runDependencies", name: "dependentBatchRun", fields: ["dependentBatchRunId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('dependentBatchRun') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('dependentBatchRunId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'runDependencies', + name: 'dependentBatchRun', + fields: ['dependentBatchRunId'], + references: ['id'], + }, }, dependentBatchRunId: { - name: "dependentBatchRunId", - type: "String", + name: 'dependentBatchRunId', + type: 'String', optional: true, - foreignKeyFor: [ - "dependentBatchRun" - ] as readonly string[] + foreignKeyFor: ['dependentBatchRun'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, resumedAt: { - name: "resumedAt", - type: "DateTime", - optional: true - } + name: 'resumedAt', + type: 'DateTime', + optional: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentAttemptId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentBatchRunId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('dependentAttemptId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('dependentBatchRunId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - taskRunId: { type: "String" }, - checkpointEventId: { type: "String" } - } + id: { type: 'String' }, + taskRunId: { type: 'String' }, + checkpointEventId: { type: 'String' }, + }, }, TaskRunCounter: { - name: "TaskRunCounter", + name: 'TaskRunCounter', fields: { taskIdentifier: { - name: "taskIdentifier", - type: "String", + name: 'taskIdentifier', + type: 'String', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, lastNumber: { - name: "lastNumber", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault - } + name: 'lastNumber', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, + }, }, - idFields: ["taskIdentifier"], + idFields: ['taskIdentifier'], uniqueFields: { - taskIdentifier: { type: "String" } - } + taskIdentifier: { type: 'String' }, + }, }, TaskRunNumberCounter: { - name: "TaskRunNumberCounter", + name: 'TaskRunNumberCounter', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, taskIdentifier: { - name: "taskIdentifier", - type: "String" + name: 'taskIdentifier', + type: 'String', }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRunNumberCounter", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRunNumberCounter', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, lastNumber: { - name: "lastNumber", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault - } + name: 'lastNumber', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskIdentifier"), ExpressionUtils.field("environmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('taskIdentifier'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - taskIdentifier_environmentId: { taskIdentifier: { type: "String" }, environmentId: { type: "String" } } - } + id: { type: 'String' }, + taskIdentifier_environmentId: { taskIdentifier: { type: 'String' }, environmentId: { type: 'String' } }, + }, }, TaskRunAttempt: { - name: "TaskRunAttempt", + name: 'TaskRunAttempt', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, number: { - name: "number", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'number', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, taskRun: { - name: "taskRun", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("attempts") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attempts", name: "attempts", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'taskRun', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('attempts') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attempts', + name: 'attempts', + fields: ['taskRunId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, taskRunId: { - name: "taskRunId", - type: "String", - foreignKeyFor: [ - "taskRun" - ] as readonly string[] + name: 'taskRunId', + type: 'String', + foreignKeyFor: ['taskRun'] as readonly string[], }, backgroundWorker: { - name: "backgroundWorker", - type: "BackgroundWorker", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("backgroundWorkerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attempts", fields: ["backgroundWorkerId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'backgroundWorker', + type: 'BackgroundWorker', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('backgroundWorkerId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attempts', + fields: ['backgroundWorkerId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, backgroundWorkerId: { - name: "backgroundWorkerId", - type: "String", - foreignKeyFor: [ - "backgroundWorker" - ] as readonly string[] + name: 'backgroundWorkerId', + type: 'String', + foreignKeyFor: ['backgroundWorker'] as readonly string[], }, backgroundWorkerTask: { - name: "backgroundWorkerTask", - type: "BackgroundWorkerTask", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("backgroundWorkerTaskId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attempts", fields: ["backgroundWorkerTaskId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'backgroundWorkerTask', + type: 'BackgroundWorkerTask', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('backgroundWorkerTaskId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attempts', + fields: ['backgroundWorkerTaskId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, backgroundWorkerTaskId: { - name: "backgroundWorkerTaskId", - type: "String", - foreignKeyFor: [ - "backgroundWorkerTask" - ] as readonly string[] + name: 'backgroundWorkerTaskId', + type: 'String', + foreignKeyFor: ['backgroundWorkerTask'] as readonly string[], }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskRunAttempts", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskRunAttempts', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, queue: { - name: "queue", - type: "TaskQueue", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("queueId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "attempts", fields: ["queueId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'queue', + type: 'TaskQueue', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('queueId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'attempts', + fields: ['queueId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, queueId: { - name: "queueId", - type: "String", - foreignKeyFor: [ - "queue" - ] as readonly string[] + name: 'queueId', + type: 'String', + foreignKeyFor: ['queue'] as readonly string[], }, status: { - name: "status", - type: "TaskRunAttemptStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'TaskRunAttemptStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, startedAt: { - name: "startedAt", - type: "DateTime", - optional: true + name: 'startedAt', + type: 'DateTime', + optional: true, }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true + name: 'completedAt', + type: 'DateTime', + optional: true, }, usageDurationMs: { - name: "usageDurationMs", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'usageDurationMs', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, error: { - name: "error", - type: "Json", - optional: true + name: 'error', + type: 'Json', + optional: true, }, output: { - name: "output", - type: "String", - optional: true + name: 'output', + type: 'String', + optional: true, }, outputType: { - name: "outputType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], - default: "application/json" as FieldDefault + name: 'outputType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], + }, + ] as readonly AttributeApplication[], + default: 'application/json' as FieldDefault, }, dependencies: { - name: "dependencies", - type: "TaskRunDependency", + name: 'dependencies', + type: 'TaskRunDependency', array: true, - relation: { opposite: "dependentAttempt" } + relation: { opposite: 'dependentAttempt' }, }, batchDependencies: { - name: "batchDependencies", - type: "BatchTaskRun", + name: 'batchDependencies', + type: 'BatchTaskRun', array: true, - relation: { opposite: "dependentTaskAttempt" } + relation: { opposite: 'dependentTaskAttempt' }, }, checkpoints: { - name: "checkpoints", - type: "Checkpoint", + name: 'checkpoints', + type: 'Checkpoint', array: true, - relation: { opposite: "attempt" } + relation: { opposite: 'attempt' }, }, batchTaskRunItems: { - name: "batchTaskRunItems", - type: "BatchTaskRunItem", + name: 'batchTaskRunItems', + type: 'BatchTaskRunItem', array: true, - relation: { opposite: "taskRunAttempt" } + relation: { opposite: 'taskRunAttempt' }, }, CheckpointRestoreEvent: { - name: "CheckpointRestoreEvent", - type: "CheckpointRestoreEvent", + name: 'CheckpointRestoreEvent', + type: 'CheckpointRestoreEvent', array: true, - relation: { opposite: "attempt" } + relation: { opposite: 'attempt' }, }, alerts: { - name: "alerts", - type: "ProjectAlert", + name: 'alerts', + type: 'ProjectAlert', array: true, - relation: { opposite: "taskRunAttempt" } + relation: { opposite: 'taskRunAttempt' }, }, childRuns: { - name: "childRuns", - type: "TaskRun", + name: 'childRuns', + type: 'TaskRun', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRunAttempt") }] }] as readonly AttributeApplication[], - relation: { opposite: "parentTaskRunAttempt", name: "TaskParentRunAttempt" } - } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('TaskParentRunAttempt') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parentTaskRunAttempt', name: 'TaskParentRunAttempt' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId"), ExpressionUtils.field("number")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('taskRunId'), + ExpressionUtils.field('number'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - taskRunId_number: { taskRunId: { type: "String" }, number: { type: "Int" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + taskRunId_number: { taskRunId: { type: 'String' }, number: { type: 'Int' } }, + }, }, TaskEvent: { - name: "TaskEvent", + name: 'TaskEvent', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, message: { - name: "message", - type: "String" + name: 'message', + type: 'String', }, traceId: { - name: "traceId", - type: "String" + name: 'traceId', + type: 'String', }, spanId: { - name: "spanId", - type: "String" + name: 'spanId', + type: 'String', }, parentId: { - name: "parentId", - type: "String", - optional: true + name: 'parentId', + type: 'String', + optional: true, }, tracestate: { - name: "tracestate", - type: "String", - optional: true + name: 'tracestate', + type: 'String', + optional: true, }, isError: { - name: "isError", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isError', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isPartial: { - name: "isPartial", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isPartial', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isCancelled: { - name: "isCancelled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isCancelled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isDebug: { - name: "isDebug", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isDebug', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, serviceName: { - name: "serviceName", - type: "String" + name: 'serviceName', + type: 'String', }, serviceNamespace: { - name: "serviceNamespace", - type: "String" + name: 'serviceNamespace', + type: 'String', }, level: { - name: "level", - type: "TaskEventLevel", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("TRACE") }] }] as readonly AttributeApplication[], - default: "TRACE" as FieldDefault + name: 'level', + type: 'TaskEventLevel', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('TRACE') }] }, + ] as readonly AttributeApplication[], + default: 'TRACE' as FieldDefault, }, kind: { - name: "kind", - type: "TaskEventKind", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("INTERNAL") }] }] as readonly AttributeApplication[], - default: "INTERNAL" as FieldDefault + name: 'kind', + type: 'TaskEventKind', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('INTERNAL') }] }, + ] as readonly AttributeApplication[], + default: 'INTERNAL' as FieldDefault, }, status: { - name: "status", - type: "TaskEventStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNSET") }] }] as readonly AttributeApplication[], - default: "UNSET" as FieldDefault + name: 'status', + type: 'TaskEventStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNSET') }] }, + ] as readonly AttributeApplication[], + default: 'UNSET' as FieldDefault, }, links: { - name: "links", - type: "Json", - optional: true + name: 'links', + type: 'Json', + optional: true, }, events: { - name: "events", - type: "Json", - optional: true + name: 'events', + type: 'Json', + optional: true, }, startTime: { - name: "startTime", - type: "BigInt" + name: 'startTime', + type: 'BigInt', }, duration: { - name: "duration", - type: "BigInt", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'duration', + type: 'BigInt', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, attemptId: { - name: "attemptId", - type: "String", - optional: true + name: 'attemptId', + type: 'String', + optional: true, }, attemptNumber: { - name: "attemptNumber", - type: "Int", - optional: true + name: 'attemptNumber', + type: 'Int', + optional: true, }, environmentId: { - name: "environmentId", - type: "String" + name: 'environmentId', + type: 'String', }, environmentType: { - name: "environmentType", - type: "RuntimeEnvironmentType" + name: 'environmentType', + type: 'RuntimeEnvironmentType', }, organizationId: { - name: "organizationId", - type: "String" + name: 'organizationId', + type: 'String', }, projectId: { - name: "projectId", - type: "String" + name: 'projectId', + type: 'String', }, projectRef: { - name: "projectRef", - type: "String" + name: 'projectRef', + type: 'String', }, runId: { - name: "runId", - type: "String" + name: 'runId', + type: 'String', }, runIsTest: { - name: "runIsTest", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'runIsTest', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, idempotencyKey: { - name: "idempotencyKey", - type: "String", - optional: true + name: 'idempotencyKey', + type: 'String', + optional: true, }, taskSlug: { - name: "taskSlug", - type: "String" + name: 'taskSlug', + type: 'String', }, taskPath: { - name: "taskPath", - type: "String", - optional: true + name: 'taskPath', + type: 'String', + optional: true, }, taskExportName: { - name: "taskExportName", - type: "String", - optional: true + name: 'taskExportName', + type: 'String', + optional: true, }, workerId: { - name: "workerId", - type: "String", - optional: true + name: 'workerId', + type: 'String', + optional: true, }, workerVersion: { - name: "workerVersion", - type: "String", - optional: true + name: 'workerVersion', + type: 'String', + optional: true, }, queueId: { - name: "queueId", - type: "String", - optional: true + name: 'queueId', + type: 'String', + optional: true, }, queueName: { - name: "queueName", - type: "String", - optional: true + name: 'queueName', + type: 'String', + optional: true, }, batchId: { - name: "batchId", - type: "String", - optional: true + name: 'batchId', + type: 'String', + optional: true, }, properties: { - name: "properties", - type: "Json" + name: 'properties', + type: 'Json', }, metadata: { - name: "metadata", - type: "Json", - optional: true + name: 'metadata', + type: 'Json', + optional: true, }, style: { - name: "style", - type: "Json", - optional: true + name: 'style', + type: 'Json', + optional: true, }, output: { - name: "output", - type: "Json", - optional: true + name: 'output', + type: 'Json', + optional: true, }, outputType: { - name: "outputType", - type: "String", - optional: true + name: 'outputType', + type: 'String', + optional: true, }, payload: { - name: "payload", - type: "Json", - optional: true + name: 'payload', + type: 'Json', + optional: true, }, payloadType: { - name: "payloadType", - type: "String", - optional: true + name: 'payloadType', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, usageDurationMs: { - name: "usageDurationMs", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'usageDurationMs', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, usageCostInCents: { - name: "usageCostInCents", - type: "Float", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'usageCostInCents', + type: 'Float', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, machinePreset: { - name: "machinePreset", - type: "String", - optional: true + name: 'machinePreset', + type: 'String', + optional: true, }, machinePresetCpu: { - name: "machinePresetCpu", - type: "Float", - optional: true + name: 'machinePresetCpu', + type: 'Float', + optional: true, }, machinePresetMemory: { - name: "machinePresetMemory", - type: "Float", - optional: true + name: 'machinePresetMemory', + type: 'Float', + optional: true, }, machinePresetCentsPerMs: { - name: "machinePresetCentsPerMs", - type: "Float", - optional: true - } + name: 'machinePresetCentsPerMs', + type: 'Float', + optional: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("traceId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spanId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('traceId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spanId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, TaskQueue: { - name: "TaskQueue", + name: 'TaskQueue', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, type: { - name: "type", - type: "TaskQueueType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("VIRTUAL") }] }] as readonly AttributeApplication[], - default: "VIRTUAL" as FieldDefault + name: 'type', + type: 'TaskQueueType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('VIRTUAL') }] }, + ] as readonly AttributeApplication[], + default: 'VIRTUAL' as FieldDefault, }, version: { - name: "version", - type: "TaskQueueVersion", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], - default: "V1" as FieldDefault + name: 'version', + type: 'TaskQueueVersion', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, + ] as readonly AttributeApplication[], + default: 'V1' as FieldDefault, }, orderableName: { - name: "orderableName", - type: "String", - optional: true + name: 'orderableName', + type: 'String', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskQueues", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskQueues', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskQueues", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskQueues', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, concurrencyLimit: { - name: "concurrencyLimit", - type: "Int", - optional: true + name: 'concurrencyLimit', + type: 'Int', + optional: true, }, rateLimit: { - name: "rateLimit", - type: "Json", - optional: true + name: 'rateLimit', + type: 'Json', + optional: true, }, paused: { - name: "paused", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'paused', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, releaseConcurrencyOnWaitpoint: { - name: "releaseConcurrencyOnWaitpoint", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'releaseConcurrencyOnWaitpoint', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, attempts: { - name: "attempts", - type: "TaskRunAttempt", + name: 'attempts', + type: 'TaskRunAttempt', array: true, - relation: { opposite: "queue" } + relation: { opposite: 'queue' }, }, tasks: { - name: "tasks", - type: "BackgroundWorkerTask", + name: 'tasks', + type: 'BackgroundWorkerTask', array: true, - relation: { opposite: "queue" } + relation: { opposite: 'queue' }, }, workers: { - name: "workers", - type: "BackgroundWorker", + name: 'workers', + type: 'BackgroundWorker', array: true, - relation: { opposite: "queues" } - } + relation: { opposite: 'queues' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("name")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - runtimeEnvironmentId_name: { runtimeEnvironmentId: { type: "String" }, name: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + runtimeEnvironmentId_name: { runtimeEnvironmentId: { type: 'String' }, name: { type: 'String' } }, + }, }, BatchTaskRun: { - name: "BatchTaskRun", + name: 'BatchTaskRun', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, idempotencyKey: { - name: "idempotencyKey", - type: "String", - optional: true + name: 'idempotencyKey', + type: 'String', + optional: true, }, idempotencyKeyExpiresAt: { - name: "idempotencyKeyExpiresAt", - type: "DateTime", - optional: true + name: 'idempotencyKeyExpiresAt', + type: 'DateTime', + optional: true, }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "batchTaskRuns", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'batchTaskRuns', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, status: { - name: "status", - type: "BatchTaskRunStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'BatchTaskRunStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, runs: { - name: "runs", - type: "TaskRun", + name: 'runs', + type: 'TaskRun', array: true, - relation: { opposite: "batch" } + relation: { opposite: 'batch' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, runIds: { - name: "runIds", - type: "String", + name: 'runIds', + type: 'String', array: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("Any", []) }] }] as readonly AttributeApplication[], - default: [] as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.array('Any', []) }] }, + ] as readonly AttributeApplication[], + default: [] as FieldDefault, }, runCount: { - name: "runCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'runCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, payload: { - name: "payload", - type: "String", - optional: true + name: 'payload', + type: 'String', + optional: true, }, payloadType: { - name: "payloadType", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], - default: "application/json" as FieldDefault + name: 'payloadType', + type: 'String', + attributes: [ + { + name: '@default', + args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], + }, + ] as readonly AttributeApplication[], + default: 'application/json' as FieldDefault, }, options: { - name: "options", - type: "Json", - optional: true + name: 'options', + type: 'Json', + optional: true, }, batchVersion: { - name: "batchVersion", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("v1") }] }] as readonly AttributeApplication[], - default: "v1" as FieldDefault + name: 'batchVersion', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('v1') }] }, + ] as readonly AttributeApplication[], + default: 'v1' as FieldDefault, }, executionSnapshots: { - name: "executionSnapshots", - type: "TaskRunExecutionSnapshot", + name: 'executionSnapshots', + type: 'TaskRunExecutionSnapshot', array: true, - relation: { opposite: "batch" } + relation: { opposite: 'batch' }, }, runsBlocked: { - name: "runsBlocked", - type: "TaskRunWaitpoint", + name: 'runsBlocked', + type: 'TaskRunWaitpoint', array: true, - relation: { opposite: "batch" } + relation: { opposite: 'batch' }, }, waitpoints: { - name: "waitpoints", - type: "Waitpoint", + name: 'waitpoints', + type: 'Waitpoint', array: true, - relation: { opposite: "completedByBatch" } + relation: { opposite: 'completedByBatch' }, }, sealed: { - name: "sealed", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'sealed', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, sealedAt: { - name: "sealedAt", - type: "DateTime", - optional: true + name: 'sealedAt', + type: 'DateTime', + optional: true, }, expectedCount: { - name: "expectedCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'expectedCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, completedCount: { - name: "completedCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'completedCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true + name: 'completedAt', + type: 'DateTime', + optional: true, }, resumedAt: { - name: "resumedAt", - type: "DateTime", - optional: true + name: 'resumedAt', + type: 'DateTime', + optional: true, }, processingJobsCount: { - name: "processingJobsCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'processingJobsCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, processingJobsExpectedCount: { - name: "processingJobsExpectedCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'processingJobsExpectedCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, oneTimeUseToken: { - name: "oneTimeUseToken", - type: "String", - optional: true + name: 'oneTimeUseToken', + type: 'String', + optional: true, }, items: { - name: "items", - type: "BatchTaskRunItem", + name: 'items', + type: 'BatchTaskRunItem', array: true, - relation: { opposite: "batchTaskRun" } + relation: { opposite: 'batchTaskRun' }, }, taskIdentifier: { - name: "taskIdentifier", - type: "String", - optional: true + name: 'taskIdentifier', + type: 'String', + optional: true, }, checkpointEvent: { - name: "checkpointEvent", - type: "CheckpointRestoreEvent", + name: 'checkpointEvent', + type: 'CheckpointRestoreEvent', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "batchTaskRunDependency", fields: ["checkpointEventId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('checkpointEventId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'batchTaskRunDependency', + fields: ['checkpointEventId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, checkpointEventId: { - name: "checkpointEventId", - type: "String", + name: 'checkpointEventId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "checkpointEvent" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['checkpointEvent'] as readonly string[], }, dependentTaskAttempt: { - name: "dependentTaskAttempt", - type: "TaskRunAttempt", + name: 'dependentTaskAttempt', + type: 'TaskRunAttempt', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentTaskAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "batchDependencies", fields: ["dependentTaskAttemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('dependentTaskAttemptId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'batchDependencies', + fields: ['dependentTaskAttemptId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, dependentTaskAttemptId: { - name: "dependentTaskAttemptId", - type: "String", + name: 'dependentTaskAttemptId', + type: 'String', optional: true, - foreignKeyFor: [ - "dependentTaskAttempt" - ] as readonly string[] + foreignKeyFor: ['dependentTaskAttempt'] as readonly string[], }, runDependencies: { - name: "runDependencies", - type: "TaskRunDependency", + name: 'runDependencies', + type: 'TaskRunDependency', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("dependentBatchRun") }] }] as readonly AttributeApplication[], - relation: { opposite: "dependentBatchRun", name: "dependentBatchRun" } - } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('dependentBatchRun') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'dependentBatchRun', name: 'dependentBatchRun' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("oneTimeUseToken")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("idempotencyKey")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentTaskAttemptId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('oneTimeUseToken')]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ExpressionUtils.field('idempotencyKey'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('dependentTaskAttemptId')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - checkpointEventId: { type: "String" }, - oneTimeUseToken: { type: "String" }, - runtimeEnvironmentId_idempotencyKey: { runtimeEnvironmentId: { type: "String" }, idempotencyKey: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + checkpointEventId: { type: 'String' }, + oneTimeUseToken: { type: 'String' }, + runtimeEnvironmentId_idempotencyKey: { + runtimeEnvironmentId: { type: 'String' }, + idempotencyKey: { type: 'String' }, + }, + }, }, BatchTaskRunItem: { - name: "BatchTaskRunItem", + name: 'BatchTaskRunItem', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, status: { - name: "status", - type: "BatchTaskRunItemStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'BatchTaskRunItemStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, batchTaskRun: { - name: "batchTaskRun", - type: "BatchTaskRun", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "items", fields: ["batchTaskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'batchTaskRun', + type: 'BatchTaskRun', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('batchTaskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'items', + fields: ['batchTaskRunId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, batchTaskRunId: { - name: "batchTaskRunId", - type: "String", - foreignKeyFor: [ - "batchTaskRun" - ] as readonly string[] + name: 'batchTaskRunId', + type: 'String', + foreignKeyFor: ['batchTaskRun'] as readonly string[], }, taskRun: { - name: "taskRun", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "batchItems", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'taskRun', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'batchItems', + fields: ['taskRunId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, taskRunId: { - name: "taskRunId", - type: "String", - foreignKeyFor: [ - "taskRun" - ] as readonly string[] + name: 'taskRunId', + type: 'String', + foreignKeyFor: ['taskRun'] as readonly string[], }, taskRunAttempt: { - name: "taskRunAttempt", - type: "TaskRunAttempt", + name: 'taskRunAttempt', + type: 'TaskRunAttempt', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "batchTaskRunItems", fields: ["taskRunAttemptId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunAttemptId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'batchTaskRunItems', + fields: ['taskRunAttemptId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, taskRunAttemptId: { - name: "taskRunAttemptId", - type: "String", + name: 'taskRunAttemptId', + type: 'String', optional: true, - foreignKeyFor: [ - "taskRunAttempt" - ] as readonly string[] + foreignKeyFor: ['taskRunAttempt'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true - } + name: 'completedAt', + type: 'DateTime', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchTaskRunId"), ExpressionUtils.field("taskRunId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunAttemptId")]) }, { name: "map", value: ExpressionUtils.literal("idx_batchtaskrunitem_taskrunattempt") }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "map", value: ExpressionUtils.literal("idx_batchtaskrunitem_taskrun") }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('batchTaskRunId'), + ExpressionUtils.field('taskRunId'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunAttemptId')]), + }, + { name: 'map', value: ExpressionUtils.literal('idx_batchtaskrunitem_taskrunattempt') }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + { name: 'map', value: ExpressionUtils.literal('idx_batchtaskrunitem_taskrun') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - batchTaskRunId_taskRunId: { batchTaskRunId: { type: "String" }, taskRunId: { type: "String" } } - } + id: { type: 'String' }, + batchTaskRunId_taskRunId: { batchTaskRunId: { type: 'String' }, taskRunId: { type: 'String' } }, + }, }, EnvironmentVariable: { - name: "EnvironmentVariable", + name: 'EnvironmentVariable', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, key: { - name: "key", - type: "String" + name: 'key', + type: 'String', }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "environmentVariables", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'environmentVariables', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, values: { - name: "values", - type: "EnvironmentVariableValue", + name: 'values', + type: 'EnvironmentVariableValue', array: true, - relation: { opposite: "variable" } - } + relation: { opposite: 'variable' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("key")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('key'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - projectId_key: { projectId: { type: "String" }, key: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + projectId_key: { projectId: { type: 'String' }, key: { type: 'String' } }, + }, }, EnvironmentVariableValue: { - name: "EnvironmentVariableValue", + name: 'EnvironmentVariableValue', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, valueReference: { - name: "valueReference", - type: "SecretReference", + name: 'valueReference', + type: 'SecretReference', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("valueReferenceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "environmentVariableValues", fields: ["valueReferenceId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('valueReferenceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'environmentVariableValues', + fields: ['valueReferenceId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, valueReferenceId: { - name: "valueReferenceId", - type: "String", + name: 'valueReferenceId', + type: 'String', optional: true, - foreignKeyFor: [ - "valueReference" - ] as readonly string[] + foreignKeyFor: ['valueReference'] as readonly string[], }, variable: { - name: "variable", - type: "EnvironmentVariable", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("variableId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "values", fields: ["variableId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'variable', + type: 'EnvironmentVariable', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('variableId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'values', + fields: ['variableId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, variableId: { - name: "variableId", - type: "String", - foreignKeyFor: [ - "variable" - ] as readonly string[] + name: 'variableId', + type: 'String', + foreignKeyFor: ['variable'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "environmentVariableValues", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'environmentVariableValues', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, isSecret: { - name: "isSecret", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isSecret', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("variableId"), ExpressionUtils.field("environmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('variableId'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - variableId_environmentId: { variableId: { type: "String" }, environmentId: { type: "String" } } - } + id: { type: 'String' }, + variableId_environmentId: { variableId: { type: 'String' }, environmentId: { type: 'String' } }, + }, }, Checkpoint: { - name: "Checkpoint", + name: 'Checkpoint', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, type: { - name: "type", - type: "CheckpointType" + name: 'type', + type: 'CheckpointType', }, location: { - name: "location", - type: "String" + name: 'location', + type: 'String', }, imageRef: { - name: "imageRef", - type: "String" + name: 'imageRef', + type: 'String', }, reason: { - name: "reason", - type: "String", - optional: true + name: 'reason', + type: 'String', + optional: true, }, metadata: { - name: "metadata", - type: "String", - optional: true + name: 'metadata', + type: 'String', + optional: true, }, events: { - name: "events", - type: "CheckpointRestoreEvent", + name: 'events', + type: 'CheckpointRestoreEvent', array: true, - relation: { opposite: "checkpoint" } + relation: { opposite: 'checkpoint' }, }, run: { - name: "run", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "checkpoints", fields: ["runId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'run', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'checkpoints', + fields: ['runId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runId: { - name: "runId", - type: "String", - foreignKeyFor: [ - "run" - ] as readonly string[] + name: 'runId', + type: 'String', + foreignKeyFor: ['run'] as readonly string[], }, attempt: { - name: "attempt", - type: "TaskRunAttempt", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "checkpoints", fields: ["attemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'attempt', + type: 'TaskRunAttempt', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('attemptId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'checkpoints', + fields: ['attemptId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, attemptId: { - name: "attemptId", - type: "String", - foreignKeyFor: [ - "attempt" - ] as readonly string[] + name: 'attemptId', + type: 'String', + foreignKeyFor: ['attempt'] as readonly string[], }, attemptNumber: { - name: "attemptNumber", - type: "Int", - optional: true + name: 'attemptNumber', + type: 'Int', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "checkpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'checkpoints', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "checkpoints", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'checkpoints', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attemptId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('attemptId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + }, }, CheckpointRestoreEvent: { - name: "CheckpointRestoreEvent", + name: 'CheckpointRestoreEvent', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, type: { - name: "type", - type: "CheckpointRestoreEventType" + name: 'type', + type: 'CheckpointRestoreEventType', }, reason: { - name: "reason", - type: "String", - optional: true + name: 'reason', + type: 'String', + optional: true, }, metadata: { - name: "metadata", - type: "String", - optional: true + name: 'metadata', + type: 'String', + optional: true, }, checkpoint: { - name: "checkpoint", - type: "Checkpoint", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "events", fields: ["checkpointId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'checkpoint', + type: 'Checkpoint', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('checkpointId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'events', + fields: ['checkpointId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, checkpointId: { - name: "checkpointId", - type: "String", - foreignKeyFor: [ - "checkpoint" - ] as readonly string[] + name: 'checkpointId', + type: 'String', + foreignKeyFor: ['checkpoint'] as readonly string[], }, run: { - name: "run", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "CheckpointRestoreEvent", fields: ["runId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'run', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'CheckpointRestoreEvent', + fields: ['runId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runId: { - name: "runId", - type: "String", - foreignKeyFor: [ - "run" - ] as readonly string[] + name: 'runId', + type: 'String', + foreignKeyFor: ['run'] as readonly string[], }, attempt: { - name: "attempt", - type: "TaskRunAttempt", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "CheckpointRestoreEvent", fields: ["attemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'attempt', + type: 'TaskRunAttempt', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('attemptId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'CheckpointRestoreEvent', + fields: ['attemptId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, attemptId: { - name: "attemptId", - type: "String", - foreignKeyFor: [ - "attempt" - ] as readonly string[] + name: 'attemptId', + type: 'String', + foreignKeyFor: ['attempt'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "CheckpointRestoreEvent", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'CheckpointRestoreEvent', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, runtimeEnvironment: { - name: "runtimeEnvironment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "CheckpointRestoreEvent", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'runtimeEnvironment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('runtimeEnvironmentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'CheckpointRestoreEvent', + fields: ['runtimeEnvironmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, runtimeEnvironmentId: { - name: "runtimeEnvironmentId", - type: "String", - foreignKeyFor: [ - "runtimeEnvironment" - ] as readonly string[] + name: 'runtimeEnvironmentId', + type: 'String', + foreignKeyFor: ['runtimeEnvironment'] as readonly string[], }, taskRunDependency: { - name: "taskRunDependency", - type: "TaskRunDependency", + name: 'taskRunDependency', + type: 'TaskRunDependency', optional: true, - relation: { opposite: "checkpointEvent" } + relation: { opposite: 'checkpointEvent' }, }, batchTaskRunDependency: { - name: "batchTaskRunDependency", - type: "BatchTaskRun", + name: 'batchTaskRunDependency', + type: 'BatchTaskRun', optional: true, - relation: { opposite: "checkpointEvent" } + relation: { opposite: 'checkpointEvent' }, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('checkpointId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, WorkerDeployment: { - name: "WorkerDeployment", + name: 'WorkerDeployment', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, contentHash: { - name: "contentHash", - type: "String" + name: 'contentHash', + type: 'String', }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, shortCode: { - name: "shortCode", - type: "String" + name: 'shortCode', + type: 'String', }, version: { - name: "version", - type: "String" + name: 'version', + type: 'String', }, imageReference: { - name: "imageReference", - type: "String", - optional: true + name: 'imageReference', + type: 'String', + optional: true, }, imagePlatform: { - name: "imagePlatform", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("linux/amd64") }] }] as readonly AttributeApplication[], - default: "linux/amd64" as FieldDefault + name: 'imagePlatform', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('linux/amd64') }] }, + ] as readonly AttributeApplication[], + default: 'linux/amd64' as FieldDefault, }, externalBuildData: { - name: "externalBuildData", - type: "Json", - optional: true + name: 'externalBuildData', + type: 'Json', + optional: true, }, status: { - name: "status", - type: "WorkerDeploymentStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'WorkerDeploymentStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, type: { - name: "type", - type: "WorkerDeploymentType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], - default: "V1" as FieldDefault + name: 'type', + type: 'WorkerDeploymentType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, + ] as readonly AttributeApplication[], + default: 'V1' as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "WorkerDeployment", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'WorkerDeployment', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerDeployments", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerDeployments', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, worker: { - name: "worker", - type: "BackgroundWorker", + name: 'worker', + type: 'BackgroundWorker', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "deployment", fields: ["workerId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('workerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'deployment', + fields: ['workerId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, workerId: { - name: "workerId", - type: "String", + name: 'workerId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "worker" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['worker'] as readonly string[], }, triggeredBy: { - name: "triggeredBy", - type: "User", + name: 'triggeredBy', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("triggeredById")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "deployments", fields: ["triggeredById"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('triggeredById')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'deployments', + fields: ['triggeredById'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, triggeredById: { - name: "triggeredById", - type: "String", + name: 'triggeredById', + type: 'String', optional: true, - foreignKeyFor: [ - "triggeredBy" - ] as readonly string[] + foreignKeyFor: ['triggeredBy'] as readonly string[], }, builtAt: { - name: "builtAt", - type: "DateTime", - optional: true + name: 'builtAt', + type: 'DateTime', + optional: true, }, deployedAt: { - name: "deployedAt", - type: "DateTime", - optional: true + name: 'deployedAt', + type: 'DateTime', + optional: true, }, failedAt: { - name: "failedAt", - type: "DateTime", - optional: true + name: 'failedAt', + type: 'DateTime', + optional: true, }, errorData: { - name: "errorData", - type: "Json", - optional: true + name: 'errorData', + type: 'Json', + optional: true, }, git: { - name: "git", - type: "Json", - optional: true + name: 'git', + type: 'Json', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, promotions: { - name: "promotions", - type: "WorkerDeploymentPromotion", + name: 'promotions', + type: 'WorkerDeploymentPromotion', array: true, - relation: { opposite: "deployment" } + relation: { opposite: 'deployment' }, }, alerts: { - name: "alerts", - type: "ProjectAlert", + name: 'alerts', + type: 'ProjectAlert', array: true, - relation: { opposite: "workerDeployment" } + relation: { opposite: 'workerDeployment' }, }, workerInstance: { - name: "workerInstance", - type: "WorkerInstance", + name: 'workerInstance', + type: 'WorkerInstance', array: true, - relation: { opposite: "deployment" } - } + relation: { opposite: 'deployment' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("shortCode")]) }] }, - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("version")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('shortCode'), + ]), + }, + ], + }, + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('version'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - workerId: { type: "String" }, - projectId_shortCode: { projectId: { type: "String" }, shortCode: { type: "String" } }, - environmentId_version: { environmentId: { type: "String" }, version: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + workerId: { type: 'String' }, + projectId_shortCode: { projectId: { type: 'String' }, shortCode: { type: 'String' } }, + environmentId_version: { environmentId: { type: 'String' }, version: { type: 'String' } }, + }, }, WorkerDeploymentPromotion: { - name: "WorkerDeploymentPromotion", + name: 'WorkerDeploymentPromotion', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, label: { - name: "label", - type: "String" + name: 'label', + type: 'String', }, deployment: { - name: "deployment", - type: "WorkerDeployment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("deploymentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "promotions", fields: ["deploymentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'deployment', + type: 'WorkerDeployment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('deploymentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'promotions', + fields: ['deploymentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, deploymentId: { - name: "deploymentId", - type: "String", - foreignKeyFor: [ - "deployment" - ] as readonly string[] + name: 'deploymentId', + type: 'String', + foreignKeyFor: ['deployment'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "workerDeploymentPromotions", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'workerDeploymentPromotions', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] - } + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("label")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('environmentId'), + ExpressionUtils.field('label'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - environmentId_label: { environmentId: { type: "String" }, label: { type: "String" } } - } + id: { type: 'String' }, + environmentId_label: { environmentId: { type: 'String' }, label: { type: 'String' } }, + }, }, TaskSchedule: { - name: "TaskSchedule", + name: 'TaskSchedule', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, type: { - name: "type", - type: "ScheduleType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("IMPERATIVE") }] }] as readonly AttributeApplication[], - default: "IMPERATIVE" as FieldDefault + name: 'type', + type: 'ScheduleType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('IMPERATIVE') }] }, + ] as readonly AttributeApplication[], + default: 'IMPERATIVE' as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, taskIdentifier: { - name: "taskIdentifier", - type: "String" + name: 'taskIdentifier', + type: 'String', }, deduplicationKey: { - name: "deduplicationKey", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + name: 'deduplicationKey', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userProvidedDeduplicationKey: { - name: "userProvidedDeduplicationKey", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'userProvidedDeduplicationKey', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, generatorExpression: { - name: "generatorExpression", - type: "String" + name: 'generatorExpression', + type: 'String', }, generatorDescription: { - name: "generatorDescription", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("") }] }] as readonly AttributeApplication[], - default: "" as FieldDefault + name: 'generatorDescription', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('') }] }, + ] as readonly AttributeApplication[], + default: '' as FieldDefault, }, generatorType: { - name: "generatorType", - type: "ScheduleGeneratorType", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CRON") }] }] as readonly AttributeApplication[], - default: "CRON" as FieldDefault + name: 'generatorType', + type: 'ScheduleGeneratorType', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CRON') }] }, + ] as readonly AttributeApplication[], + default: 'CRON' as FieldDefault, }, timezone: { - name: "timezone", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UTC") }] }] as readonly AttributeApplication[], - default: "UTC" as FieldDefault + name: 'timezone', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UTC') }] }, + ] as readonly AttributeApplication[], + default: 'UTC' as FieldDefault, }, externalId: { - name: "externalId", - type: "String", - optional: true + name: 'externalId', + type: 'String', + optional: true, }, instances: { - name: "instances", - type: "TaskScheduleInstance", + name: 'instances', + type: 'TaskScheduleInstance', array: true, - relation: { opposite: "taskSchedule" } + relation: { opposite: 'taskSchedule' }, }, lastRunTriggeredAt: { - name: "lastRunTriggeredAt", - type: "DateTime", - optional: true + name: 'lastRunTriggeredAt', + type: 'DateTime', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskSchedules", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskSchedules', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, active: { - name: "active", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault - } + name: 'active', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("deduplicationKey")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("createdAt")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('deduplicationKey'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - projectId_deduplicationKey: { projectId: { type: "String" }, deduplicationKey: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + projectId_deduplicationKey: { projectId: { type: 'String' }, deduplicationKey: { type: 'String' } }, + }, }, TaskScheduleInstance: { - name: "TaskScheduleInstance", + name: 'TaskScheduleInstance', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, taskSchedule: { - name: "taskSchedule", - type: "TaskSchedule", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskScheduleId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "instances", fields: ["taskScheduleId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'taskSchedule', + type: 'TaskSchedule', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskScheduleId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'instances', + fields: ['taskScheduleId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, taskScheduleId: { - name: "taskScheduleId", - type: "String", - foreignKeyFor: [ - "taskSchedule" - ] as readonly string[] + name: 'taskScheduleId', + type: 'String', + foreignKeyFor: ['taskSchedule'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "taskScheduleInstances", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'taskScheduleInstances', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, active: { - name: "active", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'active', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, lastScheduledTimestamp: { - name: "lastScheduledTimestamp", - type: "DateTime", - optional: true + name: 'lastScheduledTimestamp', + type: 'DateTime', + optional: true, }, nextScheduledTimestamp: { - name: "nextScheduledTimestamp", - type: "DateTime", - optional: true - } + name: 'nextScheduledTimestamp', + type: 'DateTime', + optional: true, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskScheduleId"), ExpressionUtils.field("environmentId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('taskScheduleId'), + ExpressionUtils.field('environmentId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - taskScheduleId_environmentId: { taskScheduleId: { type: "String" }, environmentId: { type: "String" } } - } + id: { type: 'String' }, + taskScheduleId_environmentId: { taskScheduleId: { type: 'String' }, environmentId: { type: 'String' } }, + }, }, RuntimeEnvironmentSession: { - name: "RuntimeEnvironmentSession", + name: 'RuntimeEnvironmentSession', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, ipAddress: { - name: "ipAddress", - type: "String" + name: 'ipAddress', + type: 'String', }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "sessions", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'sessions', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, disconnectedAt: { - name: "disconnectedAt", - type: "DateTime", - optional: true + name: 'disconnectedAt', + type: 'DateTime', + optional: true, }, currentEnvironments: { - name: "currentEnvironments", - type: "RuntimeEnvironment", + name: 'currentEnvironments', + type: 'RuntimeEnvironment', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("currentSession") }] }] as readonly AttributeApplication[], - relation: { opposite: "currentSession", name: "currentSession" } - } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('currentSession') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'currentSession', name: 'currentSession' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, ProjectAlertChannel: { - name: "ProjectAlertChannel", + name: 'ProjectAlertChannel', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, deduplicationKey: { - name: "deduplicationKey", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + name: 'deduplicationKey', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, userProvidedDeduplicationKey: { - name: "userProvidedDeduplicationKey", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'userProvidedDeduplicationKey', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, integration: { - name: "integration", - type: "OrganizationIntegration", + name: 'integration', + type: 'OrganizationIntegration', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("integrationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alertChannels", fields: ["integrationId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('integrationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alertChannels', + fields: ['integrationId'], + references: ['id'], + onDelete: 'SetNull', + onUpdate: 'Cascade', + }, }, integrationId: { - name: "integrationId", - type: "String", + name: 'integrationId', + type: 'String', optional: true, - foreignKeyFor: [ - "integration" - ] as readonly string[] + foreignKeyFor: ['integration'] as readonly string[], }, enabled: { - name: "enabled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'enabled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, type: { - name: "type", - type: "ProjectAlertChannelType" + name: 'type', + type: 'ProjectAlertChannelType', }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, properties: { - name: "properties", - type: "Json" + name: 'properties', + type: 'Json', }, alertTypes: { - name: "alertTypes", - type: "ProjectAlertType", - array: true + name: 'alertTypes', + type: 'ProjectAlertType', + array: true, }, environmentTypes: { - name: "environmentTypes", - type: "RuntimeEnvironmentType", + name: 'environmentTypes', + type: 'RuntimeEnvironmentType', array: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("RuntimeEnvironmentType", [ExpressionUtils.literal("STAGING"), ExpressionUtils.literal("PRODUCTION")]) }] }] as readonly AttributeApplication[], - default: ["STAGING", "PRODUCTION"] as FieldDefault + attributes: [ + { + name: '@default', + args: [ + { + name: 'value', + value: ExpressionUtils.array('RuntimeEnvironmentType', [ + ExpressionUtils.literal('STAGING'), + ExpressionUtils.literal('PRODUCTION'), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], + default: ['STAGING', 'PRODUCTION'] as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alertChannels", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alertChannels', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, alerts: { - name: "alerts", - type: "ProjectAlert", + name: 'alerts', + type: 'ProjectAlert', array: true, - relation: { opposite: "channel" } + relation: { opposite: 'channel' }, }, alertStorages: { - name: "alertStorages", - type: "ProjectAlertStorage", + name: 'alertStorages', + type: 'ProjectAlertStorage', array: true, - relation: { opposite: "alertChannel" } - } + relation: { opposite: 'alertChannel' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("deduplicationKey")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('deduplicationKey'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" }, - projectId_deduplicationKey: { projectId: { type: "String" }, deduplicationKey: { type: "String" } } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + projectId_deduplicationKey: { projectId: { type: 'String' }, deduplicationKey: { type: 'String' } }, + }, }, ProjectAlert: { - name: "ProjectAlert", + name: 'ProjectAlert', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alerts", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alerts', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, environment: { - name: "environment", - type: "RuntimeEnvironment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alerts", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'environment', + type: 'RuntimeEnvironment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alerts', + fields: ['environmentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, environmentId: { - name: "environmentId", - type: "String", - foreignKeyFor: [ - "environment" - ] as readonly string[] + name: 'environmentId', + type: 'String', + foreignKeyFor: ['environment'] as readonly string[], }, channel: { - name: "channel", - type: "ProjectAlertChannel", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("channelId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alerts", fields: ["channelId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'channel', + type: 'ProjectAlertChannel', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('channelId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alerts', + fields: ['channelId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, channelId: { - name: "channelId", - type: "String", - foreignKeyFor: [ - "channel" - ] as readonly string[] + name: 'channelId', + type: 'String', + foreignKeyFor: ['channel'] as readonly string[], }, status: { - name: "status", - type: "ProjectAlertStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'ProjectAlertStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, type: { - name: "type", - type: "ProjectAlertType" + name: 'type', + type: 'ProjectAlertType', }, taskRunAttempt: { - name: "taskRunAttempt", - type: "TaskRunAttempt", + name: 'taskRunAttempt', + type: 'TaskRunAttempt', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alerts", fields: ["taskRunAttemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunAttemptId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alerts', + fields: ['taskRunAttemptId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, taskRunAttemptId: { - name: "taskRunAttemptId", - type: "String", + name: 'taskRunAttemptId', + type: 'String', optional: true, - foreignKeyFor: [ - "taskRunAttempt" - ] as readonly string[] + foreignKeyFor: ['taskRunAttempt'] as readonly string[], }, taskRun: { - name: "taskRun", - type: "TaskRun", + name: 'taskRun', + type: 'TaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alerts", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alerts', + fields: ['taskRunId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, taskRunId: { - name: "taskRunId", - type: "String", + name: 'taskRunId', + type: 'String', optional: true, - foreignKeyFor: [ - "taskRun" - ] as readonly string[] + foreignKeyFor: ['taskRun'] as readonly string[], }, workerDeployment: { - name: "workerDeployment", - type: "WorkerDeployment", + name: 'workerDeployment', + type: 'WorkerDeployment', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerDeploymentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alerts", fields: ["workerDeploymentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('workerDeploymentId'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alerts', + fields: ['workerDeploymentId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, workerDeploymentId: { - name: "workerDeploymentId", - type: "String", + name: 'workerDeploymentId', + type: 'String', optional: true, - foreignKeyFor: [ - "workerDeployment" - ] as readonly string[] + foreignKeyFor: ['workerDeployment'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + }, }, ProjectAlertStorage: { - name: "ProjectAlertStorage", + name: 'ProjectAlertStorage', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alertStorages", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alertStorages', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, alertChannel: { - name: "alertChannel", - type: "ProjectAlertChannel", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("alertChannelId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "alertStorages", fields: ["alertChannelId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'alertChannel', + type: 'ProjectAlertChannel', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('alertChannelId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'alertStorages', + fields: ['alertChannelId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, alertChannelId: { - name: "alertChannelId", - type: "String", - foreignKeyFor: [ - "alertChannel" - ] as readonly string[] + name: 'alertChannelId', + type: 'String', + foreignKeyFor: ['alertChannel'] as readonly string[], }, alertType: { - name: "alertType", - type: "ProjectAlertType" + name: 'alertType', + type: 'ProjectAlertType', }, storageId: { - name: "storageId", - type: "String" + name: 'storageId', + type: 'String', }, storageData: { - name: "storageData", - type: "Json" + name: 'storageData', + type: 'Json', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, OrganizationIntegration: { - name: "OrganizationIntegration", + name: 'OrganizationIntegration', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, service: { - name: "service", - type: "IntegrationService" + name: 'service', + type: 'IntegrationService', }, integrationData: { - name: "integrationData", - type: "Json" + name: 'integrationData', + type: 'Json', }, tokenReference: { - name: "tokenReference", - type: "SecretReference", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("tokenReferenceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "OrganizationIntegration", fields: ["tokenReferenceId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'tokenReference', + type: 'SecretReference', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('tokenReferenceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'OrganizationIntegration', + fields: ['tokenReferenceId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, tokenReferenceId: { - name: "tokenReferenceId", - type: "String", - foreignKeyFor: [ - "tokenReference" - ] as readonly string[] + name: 'tokenReferenceId', + type: 'String', + foreignKeyFor: ['tokenReference'] as readonly string[], }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "organizationIntegrations", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'organizationIntegrations', + fields: ['organizationId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, organizationId: { - name: "organizationId", - type: "String", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'String', + foreignKeyFor: ['organization'] as readonly string[], }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, alertChannels: { - name: "alertChannels", - type: "ProjectAlertChannel", + name: 'alertChannels', + type: 'ProjectAlertChannel', array: true, - relation: { opposite: "integration" } - } + relation: { opposite: 'integration' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + }, }, BulkActionGroup: { - name: "BulkActionGroup", + name: 'BulkActionGroup', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "bulkActionGroups", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'bulkActionGroups', + fields: ['projectId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, projectId: { - name: "projectId", - type: "String", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'String', + foreignKeyFor: ['project'] as readonly string[], }, type: { - name: "type", - type: "BulkActionType" + name: 'type', + type: 'BulkActionType', }, items: { - name: "items", - type: "BulkActionItem", + name: 'items', + type: 'BulkActionItem', array: true, - relation: { opposite: "group" } + relation: { opposite: 'group' }, }, status: { - name: "status", - type: "BulkActionStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'BulkActionStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + }, }, BulkActionItem: { - name: "BulkActionItem", + name: 'BulkActionItem', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, friendlyId: { - name: "friendlyId", - type: "String", + name: 'friendlyId', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, group: { - name: "group", - type: "BulkActionGroup", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("groupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "items", fields: ["groupId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'group', + type: 'BulkActionGroup', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('groupId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'items', + fields: ['groupId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, groupId: { - name: "groupId", - type: "String", - foreignKeyFor: [ - "group" - ] as readonly string[] + name: 'groupId', + type: 'String', + foreignKeyFor: ['group'] as readonly string[], }, type: { - name: "type", - type: "BulkActionType" + name: 'type', + type: 'BulkActionType', }, status: { - name: "status", - type: "BulkActionItemStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'status', + type: 'BulkActionItemStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, sourceRun: { - name: "sourceRun", - type: "TaskRun", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SourceActionItemRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("sourceRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "sourceBulkActionItems", name: "SourceActionItemRun", fields: ["sourceRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + name: 'sourceRun', + type: 'TaskRun', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('SourceActionItemRun') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('sourceRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'sourceBulkActionItems', + name: 'SourceActionItemRun', + fields: ['sourceRunId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, sourceRunId: { - name: "sourceRunId", - type: "String", - foreignKeyFor: [ - "sourceRun" - ] as readonly string[] + name: 'sourceRunId', + type: 'String', + foreignKeyFor: ['sourceRun'] as readonly string[], }, destinationRun: { - name: "destinationRun", - type: "TaskRun", + name: 'destinationRun', + type: 'TaskRun', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DestinationActionItemRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("destinationRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "destinationBulkActionItems", name: "DestinationActionItemRun", fields: ["destinationRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('DestinationActionItemRun') }, + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('destinationRunId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'destinationBulkActionItems', + name: 'DestinationActionItemRun', + fields: ['destinationRunId'], + references: ['id'], + onDelete: 'Cascade', + onUpdate: 'Cascade', + }, }, destinationRunId: { - name: "destinationRunId", - type: "String", + name: 'destinationRunId', + type: 'String', optional: true, - foreignKeyFor: [ - "destinationRun" - ] as readonly string[] + foreignKeyFor: ['destinationRun'] as readonly string[], }, error: { - name: "error", - type: "String", - optional: true + name: 'error', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - friendlyId: { type: "String" } - } + id: { type: 'String' }, + friendlyId: { type: 'String' }, + }, }, RealtimeStreamChunk: { - name: "RealtimeStreamChunk", + name: 'RealtimeStreamChunk', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, key: { - name: "key", - type: "String" + name: 'key', + type: 'String', }, value: { - name: "value", - type: "String" + name: 'value', + type: 'String', }, sequence: { - name: "sequence", - type: "Int" + name: 'sequence', + type: 'Int', }, runId: { - name: "runId", - type: "String" + name: 'runId', + type: 'String', }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault - } + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] } + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, + ], + }, + { + name: '@@index', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, TaskEventPartitioned: { - name: "TaskEventPartitioned", + name: 'TaskEventPartitioned', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, message: { - name: "message", - type: "String" + name: 'message', + type: 'String', }, traceId: { - name: "traceId", - type: "String" + name: 'traceId', + type: 'String', }, spanId: { - name: "spanId", - type: "String" + name: 'spanId', + type: 'String', }, parentId: { - name: "parentId", - type: "String", - optional: true + name: 'parentId', + type: 'String', + optional: true, }, tracestate: { - name: "tracestate", - type: "String", - optional: true + name: 'tracestate', + type: 'String', + optional: true, }, isError: { - name: "isError", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isError', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isPartial: { - name: "isPartial", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isPartial', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, isCancelled: { - name: "isCancelled", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'isCancelled', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, serviceName: { - name: "serviceName", - type: "String" + name: 'serviceName', + type: 'String', }, serviceNamespace: { - name: "serviceNamespace", - type: "String" + name: 'serviceNamespace', + type: 'String', }, level: { - name: "level", - type: "TaskEventLevel", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("TRACE") }] }] as readonly AttributeApplication[], - default: "TRACE" as FieldDefault + name: 'level', + type: 'TaskEventLevel', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('TRACE') }] }, + ] as readonly AttributeApplication[], + default: 'TRACE' as FieldDefault, }, kind: { - name: "kind", - type: "TaskEventKind", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("INTERNAL") }] }] as readonly AttributeApplication[], - default: "INTERNAL" as FieldDefault + name: 'kind', + type: 'TaskEventKind', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('INTERNAL') }] }, + ] as readonly AttributeApplication[], + default: 'INTERNAL' as FieldDefault, }, status: { - name: "status", - type: "TaskEventStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNSET") }] }] as readonly AttributeApplication[], - default: "UNSET" as FieldDefault + name: 'status', + type: 'TaskEventStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNSET') }] }, + ] as readonly AttributeApplication[], + default: 'UNSET' as FieldDefault, }, links: { - name: "links", - type: "Json", - optional: true + name: 'links', + type: 'Json', + optional: true, }, events: { - name: "events", - type: "Json", - optional: true + name: 'events', + type: 'Json', + optional: true, }, startTime: { - name: "startTime", - type: "BigInt" + name: 'startTime', + type: 'BigInt', }, duration: { - name: "duration", - type: "BigInt", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'duration', + type: 'BigInt', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, attemptId: { - name: "attemptId", - type: "String", - optional: true + name: 'attemptId', + type: 'String', + optional: true, }, attemptNumber: { - name: "attemptNumber", - type: "Int", - optional: true + name: 'attemptNumber', + type: 'Int', + optional: true, }, environmentId: { - name: "environmentId", - type: "String" + name: 'environmentId', + type: 'String', }, environmentType: { - name: "environmentType", - type: "RuntimeEnvironmentType" + name: 'environmentType', + type: 'RuntimeEnvironmentType', }, organizationId: { - name: "organizationId", - type: "String" + name: 'organizationId', + type: 'String', }, projectId: { - name: "projectId", - type: "String" + name: 'projectId', + type: 'String', }, projectRef: { - name: "projectRef", - type: "String" + name: 'projectRef', + type: 'String', }, runId: { - name: "runId", - type: "String" + name: 'runId', + type: 'String', }, runIsTest: { - name: "runIsTest", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'runIsTest', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, idempotencyKey: { - name: "idempotencyKey", - type: "String", - optional: true + name: 'idempotencyKey', + type: 'String', + optional: true, }, taskSlug: { - name: "taskSlug", - type: "String" + name: 'taskSlug', + type: 'String', }, taskPath: { - name: "taskPath", - type: "String", - optional: true + name: 'taskPath', + type: 'String', + optional: true, }, taskExportName: { - name: "taskExportName", - type: "String", - optional: true + name: 'taskExportName', + type: 'String', + optional: true, }, workerId: { - name: "workerId", - type: "String", - optional: true + name: 'workerId', + type: 'String', + optional: true, }, workerVersion: { - name: "workerVersion", - type: "String", - optional: true + name: 'workerVersion', + type: 'String', + optional: true, }, queueId: { - name: "queueId", - type: "String", - optional: true + name: 'queueId', + type: 'String', + optional: true, }, queueName: { - name: "queueName", - type: "String", - optional: true + name: 'queueName', + type: 'String', + optional: true, }, batchId: { - name: "batchId", - type: "String", - optional: true + name: 'batchId', + type: 'String', + optional: true, }, properties: { - name: "properties", - type: "Json" + name: 'properties', + type: 'Json', }, metadata: { - name: "metadata", - type: "Json", - optional: true + name: 'metadata', + type: 'Json', + optional: true, }, style: { - name: "style", - type: "Json", - optional: true + name: 'style', + type: 'Json', + optional: true, }, output: { - name: "output", - type: "Json", - optional: true + name: 'output', + type: 'Json', + optional: true, }, outputType: { - name: "outputType", - type: "String", - optional: true + name: 'outputType', + type: 'String', + optional: true, }, payload: { - name: "payload", - type: "Json", - optional: true + name: 'payload', + type: 'Json', + optional: true, }, payloadType: { - name: "payloadType", - type: "String", - optional: true + name: 'payloadType', + type: 'String', + optional: true, }, createdAt: { - name: "createdAt", - type: "DateTime", + name: 'createdAt', + type: 'DateTime', id: true, - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, usageDurationMs: { - name: "usageDurationMs", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'usageDurationMs', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, usageCostInCents: { - name: "usageCostInCents", - type: "Float", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'usageCostInCents', + type: 'Float', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, machinePreset: { - name: "machinePreset", - type: "String", - optional: true + name: 'machinePreset', + type: 'String', + optional: true, }, machinePresetCpu: { - name: "machinePresetCpu", - type: "Float", - optional: true + name: 'machinePresetCpu', + type: 'Float', + optional: true, }, machinePresetMemory: { - name: "machinePresetMemory", - type: "Float", - optional: true + name: 'machinePresetMemory', + type: 'Float', + optional: true, }, machinePresetCentsPerMs: { - name: "machinePresetCentsPerMs", - type: "Float", - optional: true - } + name: 'machinePresetCentsPerMs', + type: 'Float', + optional: true, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("traceId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spanId")]) }] }, - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('id'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('traceId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spanId')]) }, + ], + }, + { + name: '@@index', + args: [ + { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id", "createdAt"], + idFields: ['id', 'createdAt'], uniqueFields: { - id_createdAt: { id: { type: "String" }, createdAt: { type: "DateTime" } } - } - } + id_createdAt: { id: { type: 'String' }, createdAt: { type: 'DateTime' } }, + }, + }, } as const; enums = { AuthenticationMethod: { - name: "AuthenticationMethod", + name: 'AuthenticationMethod', values: { - GITHUB: "GITHUB", - MAGIC_LINK: "MAGIC_LINK" - } + GITHUB: 'GITHUB', + MAGIC_LINK: 'MAGIC_LINK', + }, }, OrgMemberRole: { - name: "OrgMemberRole", + name: 'OrgMemberRole', values: { - ADMIN: "ADMIN", - MEMBER: "MEMBER" - } + ADMIN: 'ADMIN', + MEMBER: 'MEMBER', + }, }, RuntimeEnvironmentType: { - name: "RuntimeEnvironmentType", + name: 'RuntimeEnvironmentType', values: { - PRODUCTION: "PRODUCTION", - STAGING: "STAGING", - DEVELOPMENT: "DEVELOPMENT", - PREVIEW: "PREVIEW" - } + PRODUCTION: 'PRODUCTION', + STAGING: 'STAGING', + DEVELOPMENT: 'DEVELOPMENT', + PREVIEW: 'PREVIEW', + }, }, ProjectVersion: { - name: "ProjectVersion", + name: 'ProjectVersion', values: { - V2: "V2", - V3: "V3" - } + V2: 'V2', + V3: 'V3', + }, }, SecretStoreProvider: { - name: "SecretStoreProvider", + name: 'SecretStoreProvider', values: { - DATABASE: "DATABASE", - AWS_PARAM_STORE: "AWS_PARAM_STORE" - } + DATABASE: 'DATABASE', + AWS_PARAM_STORE: 'AWS_PARAM_STORE', + }, }, TaskTriggerSource: { - name: "TaskTriggerSource", + name: 'TaskTriggerSource', values: { - STANDARD: "STANDARD", - SCHEDULED: "SCHEDULED" - } + STANDARD: 'STANDARD', + SCHEDULED: 'SCHEDULED', + }, }, TaskRunStatus: { - name: "TaskRunStatus", + name: 'TaskRunStatus', values: { - DELAYED: "DELAYED", - PENDING: "PENDING", - PENDING_VERSION: "PENDING_VERSION", - WAITING_FOR_DEPLOY: "WAITING_FOR_DEPLOY", - EXECUTING: "EXECUTING", - WAITING_TO_RESUME: "WAITING_TO_RESUME", - RETRYING_AFTER_FAILURE: "RETRYING_AFTER_FAILURE", - PAUSED: "PAUSED", - CANCELED: "CANCELED", - INTERRUPTED: "INTERRUPTED", - COMPLETED_SUCCESSFULLY: "COMPLETED_SUCCESSFULLY", - COMPLETED_WITH_ERRORS: "COMPLETED_WITH_ERRORS", - SYSTEM_FAILURE: "SYSTEM_FAILURE", - CRASHED: "CRASHED", - EXPIRED: "EXPIRED", - TIMED_OUT: "TIMED_OUT" - } + DELAYED: 'DELAYED', + PENDING: 'PENDING', + PENDING_VERSION: 'PENDING_VERSION', + WAITING_FOR_DEPLOY: 'WAITING_FOR_DEPLOY', + EXECUTING: 'EXECUTING', + WAITING_TO_RESUME: 'WAITING_TO_RESUME', + RETRYING_AFTER_FAILURE: 'RETRYING_AFTER_FAILURE', + PAUSED: 'PAUSED', + CANCELED: 'CANCELED', + INTERRUPTED: 'INTERRUPTED', + COMPLETED_SUCCESSFULLY: 'COMPLETED_SUCCESSFULLY', + COMPLETED_WITH_ERRORS: 'COMPLETED_WITH_ERRORS', + SYSTEM_FAILURE: 'SYSTEM_FAILURE', + CRASHED: 'CRASHED', + EXPIRED: 'EXPIRED', + TIMED_OUT: 'TIMED_OUT', + }, }, RunEngineVersion: { - name: "RunEngineVersion", + name: 'RunEngineVersion', values: { - V1: "V1", - V2: "V2" - } + V1: 'V1', + V2: 'V2', + }, }, TaskRunExecutionStatus: { - name: "TaskRunExecutionStatus", + name: 'TaskRunExecutionStatus', values: { - RUN_CREATED: "RUN_CREATED", - QUEUED: "QUEUED", - QUEUED_EXECUTING: "QUEUED_EXECUTING", - PENDING_EXECUTING: "PENDING_EXECUTING", - EXECUTING: "EXECUTING", - EXECUTING_WITH_WAITPOINTS: "EXECUTING_WITH_WAITPOINTS", - SUSPENDED: "SUSPENDED", - PENDING_CANCEL: "PENDING_CANCEL", - FINISHED: "FINISHED" - } + RUN_CREATED: 'RUN_CREATED', + QUEUED: 'QUEUED', + QUEUED_EXECUTING: 'QUEUED_EXECUTING', + PENDING_EXECUTING: 'PENDING_EXECUTING', + EXECUTING: 'EXECUTING', + EXECUTING_WITH_WAITPOINTS: 'EXECUTING_WITH_WAITPOINTS', + SUSPENDED: 'SUSPENDED', + PENDING_CANCEL: 'PENDING_CANCEL', + FINISHED: 'FINISHED', + }, }, TaskRunCheckpointType: { - name: "TaskRunCheckpointType", + name: 'TaskRunCheckpointType', values: { - DOCKER: "DOCKER", - KUBERNETES: "KUBERNETES" - } + DOCKER: 'DOCKER', + KUBERNETES: 'KUBERNETES', + }, }, WaitpointType: { - name: "WaitpointType", + name: 'WaitpointType', values: { - RUN: "RUN", - DATETIME: "DATETIME", - MANUAL: "MANUAL", - BATCH: "BATCH" - } + RUN: 'RUN', + DATETIME: 'DATETIME', + MANUAL: 'MANUAL', + BATCH: 'BATCH', + }, }, WaitpointStatus: { - name: "WaitpointStatus", + name: 'WaitpointStatus', values: { - PENDING: "PENDING", - COMPLETED: "COMPLETED" - } + PENDING: 'PENDING', + COMPLETED: 'COMPLETED', + }, }, WorkerInstanceGroupType: { - name: "WorkerInstanceGroupType", + name: 'WorkerInstanceGroupType', values: { - MANAGED: "MANAGED", - UNMANAGED: "UNMANAGED" - } + MANAGED: 'MANAGED', + UNMANAGED: 'UNMANAGED', + }, }, TaskRunAttemptStatus: { - name: "TaskRunAttemptStatus", + name: 'TaskRunAttemptStatus', values: { - PENDING: "PENDING", - EXECUTING: "EXECUTING", - PAUSED: "PAUSED", - FAILED: "FAILED", - CANCELED: "CANCELED", - COMPLETED: "COMPLETED" - } + PENDING: 'PENDING', + EXECUTING: 'EXECUTING', + PAUSED: 'PAUSED', + FAILED: 'FAILED', + CANCELED: 'CANCELED', + COMPLETED: 'COMPLETED', + }, }, TaskEventLevel: { - name: "TaskEventLevel", + name: 'TaskEventLevel', values: { - TRACE: "TRACE", - DEBUG: "DEBUG", - LOG: "LOG", - INFO: "INFO", - WARN: "WARN", - ERROR: "ERROR" - } + TRACE: 'TRACE', + DEBUG: 'DEBUG', + LOG: 'LOG', + INFO: 'INFO', + WARN: 'WARN', + ERROR: 'ERROR', + }, }, TaskEventKind: { - name: "TaskEventKind", + name: 'TaskEventKind', values: { - UNSPECIFIED: "UNSPECIFIED", - INTERNAL: "INTERNAL", - SERVER: "SERVER", - CLIENT: "CLIENT", - PRODUCER: "PRODUCER", - CONSUMER: "CONSUMER", - UNRECOGNIZED: "UNRECOGNIZED", - LOG: "LOG" - } + UNSPECIFIED: 'UNSPECIFIED', + INTERNAL: 'INTERNAL', + SERVER: 'SERVER', + CLIENT: 'CLIENT', + PRODUCER: 'PRODUCER', + CONSUMER: 'CONSUMER', + UNRECOGNIZED: 'UNRECOGNIZED', + LOG: 'LOG', + }, }, TaskEventStatus: { - name: "TaskEventStatus", + name: 'TaskEventStatus', values: { - UNSET: "UNSET", - OK: "OK", - ERROR: "ERROR", - UNRECOGNIZED: "UNRECOGNIZED" - } + UNSET: 'UNSET', + OK: 'OK', + ERROR: 'ERROR', + UNRECOGNIZED: 'UNRECOGNIZED', + }, }, TaskQueueType: { - name: "TaskQueueType", + name: 'TaskQueueType', values: { - VIRTUAL: "VIRTUAL", - NAMED: "NAMED" - } + VIRTUAL: 'VIRTUAL', + NAMED: 'NAMED', + }, }, TaskQueueVersion: { - name: "TaskQueueVersion", + name: 'TaskQueueVersion', values: { - V1: "V1", - V2: "V2" - } + V1: 'V1', + V2: 'V2', + }, }, BatchTaskRunStatus: { - name: "BatchTaskRunStatus", + name: 'BatchTaskRunStatus', values: { - PENDING: "PENDING", - COMPLETED: "COMPLETED", - ABORTED: "ABORTED" - } + PENDING: 'PENDING', + COMPLETED: 'COMPLETED', + ABORTED: 'ABORTED', + }, }, BatchTaskRunItemStatus: { - name: "BatchTaskRunItemStatus", + name: 'BatchTaskRunItemStatus', values: { - PENDING: "PENDING", - FAILED: "FAILED", - CANCELED: "CANCELED", - COMPLETED: "COMPLETED" - } + PENDING: 'PENDING', + FAILED: 'FAILED', + CANCELED: 'CANCELED', + COMPLETED: 'COMPLETED', + }, }, CheckpointType: { - name: "CheckpointType", + name: 'CheckpointType', values: { - DOCKER: "DOCKER", - KUBERNETES: "KUBERNETES" - } + DOCKER: 'DOCKER', + KUBERNETES: 'KUBERNETES', + }, }, CheckpointRestoreEventType: { - name: "CheckpointRestoreEventType", + name: 'CheckpointRestoreEventType', values: { - CHECKPOINT: "CHECKPOINT", - RESTORE: "RESTORE" - } + CHECKPOINT: 'CHECKPOINT', + RESTORE: 'RESTORE', + }, }, WorkerDeploymentType: { - name: "WorkerDeploymentType", + name: 'WorkerDeploymentType', values: { - MANAGED: "MANAGED", - UNMANAGED: "UNMANAGED", - V1: "V1" - } + MANAGED: 'MANAGED', + UNMANAGED: 'UNMANAGED', + V1: 'V1', + }, }, WorkerDeploymentStatus: { - name: "WorkerDeploymentStatus", + name: 'WorkerDeploymentStatus', values: { - PENDING: "PENDING", - BUILDING: "BUILDING", - DEPLOYING: "DEPLOYING", - DEPLOYED: "DEPLOYED", - FAILED: "FAILED", - CANCELED: "CANCELED", - TIMED_OUT: "TIMED_OUT" - } + PENDING: 'PENDING', + BUILDING: 'BUILDING', + DEPLOYING: 'DEPLOYING', + DEPLOYED: 'DEPLOYED', + FAILED: 'FAILED', + CANCELED: 'CANCELED', + TIMED_OUT: 'TIMED_OUT', + }, }, ScheduleType: { - name: "ScheduleType", + name: 'ScheduleType', values: { - DECLARATIVE: "DECLARATIVE", - IMPERATIVE: "IMPERATIVE" - } + DECLARATIVE: 'DECLARATIVE', + IMPERATIVE: 'IMPERATIVE', + }, }, ScheduleGeneratorType: { - name: "ScheduleGeneratorType", + name: 'ScheduleGeneratorType', values: { - CRON: "CRON" - } + CRON: 'CRON', + }, }, ProjectAlertChannelType: { - name: "ProjectAlertChannelType", + name: 'ProjectAlertChannelType', values: { - EMAIL: "EMAIL", - SLACK: "SLACK", - WEBHOOK: "WEBHOOK" - } + EMAIL: 'EMAIL', + SLACK: 'SLACK', + WEBHOOK: 'WEBHOOK', + }, }, ProjectAlertType: { - name: "ProjectAlertType", + name: 'ProjectAlertType', values: { - TASK_RUN: "TASK_RUN", - TASK_RUN_ATTEMPT: "TASK_RUN_ATTEMPT", - DEPLOYMENT_FAILURE: "DEPLOYMENT_FAILURE", - DEPLOYMENT_SUCCESS: "DEPLOYMENT_SUCCESS" - } + TASK_RUN: 'TASK_RUN', + TASK_RUN_ATTEMPT: 'TASK_RUN_ATTEMPT', + DEPLOYMENT_FAILURE: 'DEPLOYMENT_FAILURE', + DEPLOYMENT_SUCCESS: 'DEPLOYMENT_SUCCESS', + }, }, ProjectAlertStatus: { - name: "ProjectAlertStatus", + name: 'ProjectAlertStatus', values: { - PENDING: "PENDING", - SENT: "SENT", - FAILED: "FAILED" - } + PENDING: 'PENDING', + SENT: 'SENT', + FAILED: 'FAILED', + }, }, IntegrationService: { - name: "IntegrationService", + name: 'IntegrationService', values: { - SLACK: "SLACK" - } + SLACK: 'SLACK', + }, }, BulkActionType: { - name: "BulkActionType", + name: 'BulkActionType', values: { - CANCEL: "CANCEL", - REPLAY: "REPLAY" - } + CANCEL: 'CANCEL', + REPLAY: 'REPLAY', + }, }, BulkActionStatus: { - name: "BulkActionStatus", + name: 'BulkActionStatus', values: { - PENDING: "PENDING", - COMPLETED: "COMPLETED" - } + PENDING: 'PENDING', + COMPLETED: 'COMPLETED', + }, }, BulkActionItemStatus: { - name: "BulkActionItemStatus", + name: 'BulkActionItemStatus', values: { - PENDING: "PENDING", - COMPLETED: "COMPLETED", - FAILED: "FAILED" - } - } + PENDING: 'PENDING', + COMPLETED: 'COMPLETED', + FAILED: 'FAILED', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/client-api/computed-fields.test.ts b/tests/e2e/orm/client-api/computed-fields.test.ts index 30ff361e7..59cee16fa 100644 --- a/tests/e2e/orm/client-api/computed-fields.test.ts +++ b/tests/e2e/orm/client-api/computed-fields.test.ts @@ -215,10 +215,18 @@ model Post { // Alice: posts [300, 50, 50] → (>=100)=1, (>=250)=1 // Bob: posts [120, 120, 10] → (>=100)=2, (>=250)=0 await db.user.create({ - data: { id: 1, name: 'Alice', posts: { create: [{ viewCount: 300 }, { viewCount: 50 }, { viewCount: 50 }] } }, + data: { + id: 1, + name: 'Alice', + posts: { create: [{ viewCount: 300 }, { viewCount: 50 }, { viewCount: 50 }] }, + }, }); await db.user.create({ - data: { id: 2, name: 'Bob', posts: { create: [{ viewCount: 120 }, { viewCount: 120 }, { viewCount: 10 }] } }, + data: { + id: 2, + name: 'Bob', + posts: { create: [{ viewCount: 120 }, { viewCount: 120 }, { viewCount: 10 }] }, + }, }); // minViews=100: Alice=1, Bob=2 → desc ⇒ [Bob, Alice] @@ -311,14 +319,20 @@ model Post { // since 2024-01-01: Alice=3, Bob=1 → desc ⇒ [Alice, Bob] await expect( db.user.findMany({ - orderBy: [{ recentPostCount: { args: { since: new Date('2024-01-01') }, sort: 'desc' } }, { id: 'asc' }], + orderBy: [ + { recentPostCount: { args: { since: new Date('2024-01-01') }, sort: 'desc' } }, + { id: 'asc' }, + ], }), ).resolves.toMatchObject([{ id: 1 }, { id: 2 }]); // since 2024-07-01: Alice=0, Bob=1 → desc ⇒ [Bob, Alice] (later `since` flips the order) await expect( db.user.findMany({ - orderBy: [{ recentPostCount: { args: { since: new Date('2024-07-01') }, sort: 'desc' } }, { id: 'asc' }], + orderBy: [ + { recentPostCount: { args: { since: new Date('2024-07-01') }, sort: 'desc' } }, + { id: 'asc' }, + ], }), ).resolves.toMatchObject([{ id: 2 }, { id: 1 }]); }); @@ -357,10 +371,18 @@ model Post { // Alice: posts [300, 50, 50] → (>=100)=1, (>=40)=3 // Bob: posts [120, 120, 10] → (>=100)=2, (>=40)=2 await db.user.create({ - data: { id: 1, name: 'Alice', posts: { create: [{ viewCount: 300 }, { viewCount: 50 }, { viewCount: 50 }] } }, + data: { + id: 1, + name: 'Alice', + posts: { create: [{ viewCount: 300 }, { viewCount: 50 }, { viewCount: 50 }] }, + }, }); await db.user.create({ - data: { id: 2, name: 'Bob', posts: { create: [{ viewCount: 120 }, { viewCount: 120 }, { viewCount: 10 }] } }, + data: { + id: 2, + name: 'Bob', + posts: { create: [{ viewCount: 120 }, { viewCount: 120 }, { viewCount: 10 }] }, + }, }); // minViews=100, count >= 2 ⇒ only Bob (Alice=1, Bob=2) @@ -479,10 +501,18 @@ model Post { // Alice: [300, 50, 50] → (>=100)=1, (>=40)=3 ; Bob: [120, 120, 10] → (>=100)=2, (>=40)=2 await db.user.create({ - data: { id: 1, name: 'Alice', posts: { create: [{ viewCount: 300 }, { viewCount: 50 }, { viewCount: 50 }] } }, + data: { + id: 1, + name: 'Alice', + posts: { create: [{ viewCount: 300 }, { viewCount: 50 }, { viewCount: 50 }] }, + }, }); await db.user.create({ - data: { id: 2, name: 'Bob', posts: { create: [{ viewCount: 120 }, { viewCount: 120 }, { viewCount: 10 }] } }, + data: { + id: 2, + name: 'Bob', + posts: { create: [{ viewCount: 120 }, { viewCount: 120 }, { viewCount: 10 }] }, + }, }); // minViews=100 ⇒ Alice=1, Bob=2 ⇒ sum=3, max=2, count(non-null)=2 @@ -504,9 +534,7 @@ model Post { ).resolves.toMatchObject({ _sum: { popularPostCount: 5 } }); // the bare-`true` shorthand is rejected — args must be supplied - await expect( - db.user.aggregate({ _sum: { popularPostCount: true } as any }), - ).toBeRejectedByValidation(); + await expect(db.user.aggregate({ _sum: { popularPostCount: true } as any })).toBeRejectedByValidation(); // the field is materialized once, so aggregating it with conflicting args is rejected await expect( @@ -590,7 +618,12 @@ model Post { data: { id: 1, name: 'Alice', - posts: { create: [{ id: 1, viewCount: 300 }, { id: 2, viewCount: 50 }] }, + posts: { + create: [ + { id: 1, viewCount: 300 }, + { id: 2, viewCount: 50 }, + ], + }, }, }); @@ -611,7 +644,9 @@ model Post { // nested `select` narrows to the computed value const u3 = await db.user.findFirstOrThrow({ where: { id: 1 }, - include: { posts: { select: { id: true, weightedViews: { args: { factor: 2 } } }, orderBy: { id: 'asc' } } }, + include: { + posts: { select: { id: true, weightedViews: { args: { factor: 2 } } }, orderBy: { id: 'asc' } }, + }, }); expect(u3.posts).toEqual([ { id: 1, weightedViews: 600 }, @@ -658,9 +693,7 @@ model Post { await expect(db.user.findMany({ distinct: ['popularPostCount'] as any })).toBeRejectedByValidation(); await expect(db.user.findMany({ omit: { popularPostCount: true } as any })).toBeRejectedByValidation(); // groupBy `by` requires the keyed `{ field, args }` entry — the bare name is rejected - await expect( - db.user.groupBy({ by: ['popularPostCount'], _count: true } as any), - ).toBeRejectedByValidation(); + await expect(db.user.groupBy({ by: ['popularPostCount'], _count: true } as any)).toBeRejectedByValidation(); }); it('is typed correctly for non-optional fields', async () => { diff --git a/tests/e2e/orm/client-api/exists.test.ts b/tests/e2e/orm/client-api/exists.test.ts index 42e4e8c19..98587ae49 100644 --- a/tests/e2e/orm/client-api/exists.test.ts +++ b/tests/e2e/orm/client-api/exists.test.ts @@ -57,17 +57,21 @@ describe('Client exists tests', () => { }, }); - await expect(client.user.exists({ - where: { - email: 'test@email.com', - }, - })).resolves.toBe(true); + await expect( + client.user.exists({ + where: { + email: 'test@email.com', + }, + }), + ).resolves.toBe(true); - await expect(client.user.exists({ - where: { - email: 'wrong@email.com', - }, - })).resolves.toBe(false); + await expect( + client.user.exists({ + where: { + email: 'wrong@email.com', + }, + }), + ).resolves.toBe(false); }); it('works with nested', async () => { @@ -82,37 +86,45 @@ describe('Client exists tests', () => { }, }); - await expect(client.user.exists({ - where: { - posts: { - some: { - title: 'Test title', + await expect( + client.user.exists({ + where: { + posts: { + some: { + title: 'Test title', + }, }, }, - }, - })).resolves.toBe(true); - - await expect(client.user.exists({ - where: { - posts: { - some: { - title: 'Wrong test title', + }), + ).resolves.toBe(true); + + await expect( + client.user.exists({ + where: { + posts: { + some: { + title: 'Wrong test title', + }, }, }, - }, - })).resolves.toBe(false); - - await expect(client.post.exists({ - where: { - title: 'Test title', - } - })).resolves.toBe(true); - - await expect(client.post.exists({ - where: { - title: 'Wrong test title', - } - })).resolves.toBe(false); + }), + ).resolves.toBe(false); + + await expect( + client.post.exists({ + where: { + title: 'Test title', + }, + }), + ).resolves.toBe(true); + + await expect( + client.post.exists({ + where: { + title: 'Wrong test title', + }, + }), + ).resolves.toBe(false); }); it('works with deeply nested', async () => { @@ -132,49 +144,55 @@ describe('Client exists tests', () => { }, }); - await expect(client.user.exists({ - where: { - posts: { - some: { - title: 'Test title', - comments: { - some: { - content: 'Test content', + await expect( + client.user.exists({ + where: { + posts: { + some: { + title: 'Test title', + comments: { + some: { + content: 'Test content', + }, }, }, }, }, - }, - })).resolves.toBe(true); - - await expect(client.user.exists({ - where: { - posts: { - some: { - title: 'Test title', - comments: { - some: { - content: 'Wrong test content', + }), + ).resolves.toBe(true); + + await expect( + client.user.exists({ + where: { + posts: { + some: { + title: 'Test title', + comments: { + some: { + content: 'Wrong test content', + }, }, }, }, }, - }, - })).resolves.toBe(false); - - await expect(client.user.exists({ - where: { - posts: { - some: { - title: 'Wrong test title', - comments: { - some: { - content: 'Test content', + }), + ).resolves.toBe(false); + + await expect( + client.user.exists({ + where: { + posts: { + some: { + title: 'Wrong test title', + comments: { + some: { + content: 'Test content', + }, }, }, }, }, - }, - })).resolves.toBe(false); + }), + ).resolves.toBe(false); }); -}); \ No newline at end of file +}); diff --git a/tests/e2e/orm/client-api/full-text-search.test.ts b/tests/e2e/orm/client-api/full-text-search.test.ts index 734a34156..c49fbd79e 100644 --- a/tests/e2e/orm/client-api/full-text-search.test.ts +++ b/tests/e2e/orm/client-api/full-text-search.test.ts @@ -204,10 +204,7 @@ describe.skipIf(provider !== 'postgresql')('Full-text search tests', () => { const ids = created.map((r) => r.id); const results = await client.article.findMany({ where: { id: { in: ids } }, - orderBy: [ - { _ftsRelevance: { fields: ['subtitle'], search: 'cat', sort: 'desc' } }, - { id: 'asc' }, - ], + orderBy: [{ _ftsRelevance: { fields: ['subtitle'], search: 'cat', sort: 'desc' } }, { id: 'asc' }], }); expect(results.map((r) => r.subtitle)).toEqual(['cat', null]); }); @@ -367,9 +364,7 @@ describe.skipIf(provider !== 'postgresql')('Full-text search tests', () => { _ftsRelevance: { fields: ['notes' as any], search: 'foo', sort: 'desc' }, } as any, }), - ).rejects.toThrow( - /expected one of "title"\|"body"\|"subtitle"\s*at\s*"orderBy\._ftsRelevance\.fields/i, - ); + ).rejects.toThrow(/expected one of "title"\|"body"\|"subtitle"\s*at\s*"orderBy\._ftsRelevance\.fields/i); }); // --------------------------------------------------------------- @@ -380,9 +375,9 @@ describe.skipIf(provider !== 'postgresql')('Full-text search tests', () => { // 'foo &&' is not valid tsquery syntax — Postgres throws // `syntax error in tsquery: "foo &&"` and we let it surface verbatim // (we do not pre-validate the query string). - await expect( - client.article.findMany({ where: { title: { fts: { search: 'foo &&' } } } }), - ).rejects.toThrow(/syntax error in tsquery/i); + await expect(client.article.findMany({ where: { title: { fts: { search: 'foo &&' } } } })).rejects.toThrow( + /syntax error in tsquery/i, + ); }); // --------------------------------------------------------------- diff --git a/tests/e2e/orm/client-api/pg-computed-multischema.test.ts b/tests/e2e/orm/client-api/pg-computed-multischema.test.ts index 98a223c1d..a64dfc2d2 100644 --- a/tests/e2e/orm/client-api/pg-computed-multischema.test.ts +++ b/tests/e2e/orm/client-api/pg-computed-multischema.test.ts @@ -32,14 +32,15 @@ describe('Postgres multi-schema with computed fields', () => { usePrismaPush: true, computedFields: { Book: { - authorName: (eb: any) => eb - .selectFrom('mySchema1.Author') - .select('Author.name') - .whereRef('Author.id', '=', 'authorId') - .limit(1) + authorName: (eb: any) => + eb + .selectFrom('mySchema1.Author') + .select('Author.name') + .whereRef('Author.id', '=', 'authorId') + .limit(1), }, }, - } as any + } as any, ); // Create author and book diff --git a/tests/e2e/orm/client-api/transaction.test.ts b/tests/e2e/orm/client-api/transaction.test.ts index 84e267aad..0611aedb3 100644 --- a/tests/e2e/orm/client-api/transaction.test.ts +++ b/tests/e2e/orm/client-api/transaction.test.ts @@ -134,8 +134,13 @@ describe('Client raw query tests', () => { await (tx as any) .$use({ id: 'noop', - onQuery: async ({ args, proceed }: { args: unknown; proceed: (args: unknown) => Promise }) => - proceed(args), + onQuery: async ({ + args, + proceed, + }: { + args: unknown; + proceed: (args: unknown) => Promise; + }) => proceed(args), }) .user.create({ data: { email: 'u1@test.com' }, diff --git a/tests/e2e/orm/plugin-infra/ext-query-args/input.ts b/tests/e2e/orm/plugin-infra/ext-query-args/input.ts index 22bdbfa73..e03fdce73 100644 --- a/tests/e2e/orm/plugin-infra/ext-query-args/input.ts +++ b/tests/e2e/orm/plugin-infra/ext-query-args/input.ts @@ -5,27 +5,52 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; diff --git a/tests/e2e/orm/plugin-infra/ext-query-args/models.ts b/tests/e2e/orm/plugin-infra/ext-query-args/models.ts index 996d95e2a..f3546d815 100644 --- a/tests/e2e/orm/plugin-infra/ext-query-args/models.ts +++ b/tests/e2e/orm/plugin-infra/ext-query-args/models.ts @@ -5,6 +5,6 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; diff --git a/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts b/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts index df4de3859..36c487200 100644 --- a/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts +++ b/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts @@ -5,34 +5,37 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" - } + name: 'name', + type: 'String', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/plugin-infra/ext-result/input.ts b/tests/e2e/orm/plugin-infra/ext-result/input.ts index c6b620ee6..54da1b3bc 100644 --- a/tests/e2e/orm/plugin-infra/ext-result/input.ts +++ b/tests/e2e/orm/plugin-infra/ext-result/input.ts @@ -5,48 +5,76 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; -export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; -export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; -export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; -export type PostCreateArgs = $CreateArgs<$Schema, "Post">; -export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; -export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; -export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; -export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; -export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; -export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; -export type PostCountArgs = $CountArgs<$Schema, "Post">; -export type PostAggregateArgs = $AggregateArgs<$Schema, "Post">; -export type PostGroupByArgs = $GroupByArgs<$Schema, "Post">; -export type PostWhereInput = $WhereInput<$Schema, "Post">; -export type PostSelect = $SelectInput<$Schema, "Post">; -export type PostInclude = $IncludeInput<$Schema, "Post">; -export type PostOmit = $OmitInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PostFindManyArgs = $FindManyArgs<$Schema, 'Post'>; +export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Post'>; +export type PostFindFirstArgs = $FindFirstArgs<$Schema, 'Post'>; +export type PostExistsArgs = $ExistsArgs<$Schema, 'Post'>; +export type PostCreateArgs = $CreateArgs<$Schema, 'Post'>; +export type PostCreateManyArgs = $CreateManyArgs<$Schema, 'Post'>; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpdateArgs = $UpdateArgs<$Schema, 'Post'>; +export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Post'>; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpsertArgs = $UpsertArgs<$Schema, 'Post'>; +export type PostDeleteArgs = $DeleteArgs<$Schema, 'Post'>; +export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Post'>; +export type PostCountArgs = $CountArgs<$Schema, 'Post'>; +export type PostAggregateArgs = $AggregateArgs<$Schema, 'Post'>; +export type PostGroupByArgs = $GroupByArgs<$Schema, 'Post'>; +export type PostWhereInput = $WhereInput<$Schema, 'Post'>; +export type PostSelect = $SelectInput<$Schema, 'Post'>; +export type PostInclude = $IncludeInput<$Schema, 'Post'>; +export type PostOmit = $OmitInput<$Schema, 'Post'>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Post', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Post', Args, Options>; diff --git a/tests/e2e/orm/plugin-infra/ext-result/models.ts b/tests/e2e/orm/plugin-infra/ext-result/models.ts index 03524da52..ca4b30618 100644 --- a/tests/e2e/orm/plugin-infra/ext-result/models.ts +++ b/tests/e2e/orm/plugin-infra/ext-result/models.ts @@ -5,7 +5,7 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Post = $ModelResult<$Schema, "Post">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Post = $ModelResult<$Schema, 'Post'>; diff --git a/tests/e2e/orm/plugin-infra/ext-result/schema.ts b/tests/e2e/orm/plugin-infra/ext-result/schema.ts index 563532b99..df1530304 100644 --- a/tests/e2e/orm/plugin-infra/ext-result/schema.ts +++ b/tests/e2e/orm/plugin-infra/ext-result/schema.ts @@ -5,78 +5,96 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, content: { - name: "content", - type: "String", - optional: true + name: 'content', + type: 'String', + optional: true, }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"] } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'posts', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "Int", - foreignKeyFor: [ - "author" - ] as readonly string[] - } + name: 'authorId', + type: 'Int', + foreignKeyFor: ['author'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/policy/isempty-function-pg.test.ts b/tests/e2e/orm/policy/isempty-function-pg.test.ts index 9af038d02..ac61137af 100644 --- a/tests/e2e/orm/policy/isempty-function-pg.test.ts +++ b/tests/e2e/orm/policy/isempty-function-pg.test.ts @@ -23,12 +23,14 @@ enum Role { provider: 'postgresql', }); - await expect(client.user.create({ - data: { - id: 1, - roles: ['AUTHOR'], - }, - })).resolves.toMatchObject({ + await expect( + client.user.create({ + data: { + id: 1, + roles: ['AUTHOR'], + }, + }), + ).resolves.toMatchObject({ id: 1, roles: ['AUTHOR'], }); diff --git a/tests/e2e/orm/schemas/auth-type/input.ts b/tests/e2e/orm/schemas/auth-type/input.ts index 74cd690b9..80738584a 100644 --- a/tests/e2e/orm/schemas/auth-type/input.ts +++ b/tests/e2e/orm/schemas/auth-type/input.ts @@ -5,27 +5,52 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type FooFindManyArgs = $FindManyArgs<$Schema, "Foo">; -export type FooFindUniqueArgs = $FindUniqueArgs<$Schema, "Foo">; -export type FooFindFirstArgs = $FindFirstArgs<$Schema, "Foo">; -export type FooExistsArgs = $ExistsArgs<$Schema, "Foo">; -export type FooCreateArgs = $CreateArgs<$Schema, "Foo">; -export type FooCreateManyArgs = $CreateManyArgs<$Schema, "Foo">; -export type FooCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Foo">; -export type FooUpdateArgs = $UpdateArgs<$Schema, "Foo">; -export type FooUpdateManyArgs = $UpdateManyArgs<$Schema, "Foo">; -export type FooUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Foo">; -export type FooUpsertArgs = $UpsertArgs<$Schema, "Foo">; -export type FooDeleteArgs = $DeleteArgs<$Schema, "Foo">; -export type FooDeleteManyArgs = $DeleteManyArgs<$Schema, "Foo">; -export type FooCountArgs = $CountArgs<$Schema, "Foo">; -export type FooAggregateArgs = $AggregateArgs<$Schema, "Foo">; -export type FooGroupByArgs = $GroupByArgs<$Schema, "Foo">; -export type FooWhereInput = $WhereInput<$Schema, "Foo">; -export type FooSelect = $SelectInput<$Schema, "Foo">; -export type FooInclude = $IncludeInput<$Schema, "Foo">; -export type FooOmit = $OmitInput<$Schema, "Foo">; -export type FooGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Foo", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type FooFindManyArgs = $FindManyArgs<$Schema, 'Foo'>; +export type FooFindUniqueArgs = $FindUniqueArgs<$Schema, 'Foo'>; +export type FooFindFirstArgs = $FindFirstArgs<$Schema, 'Foo'>; +export type FooExistsArgs = $ExistsArgs<$Schema, 'Foo'>; +export type FooCreateArgs = $CreateArgs<$Schema, 'Foo'>; +export type FooCreateManyArgs = $CreateManyArgs<$Schema, 'Foo'>; +export type FooCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Foo'>; +export type FooUpdateArgs = $UpdateArgs<$Schema, 'Foo'>; +export type FooUpdateManyArgs = $UpdateManyArgs<$Schema, 'Foo'>; +export type FooUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Foo'>; +export type FooUpsertArgs = $UpsertArgs<$Schema, 'Foo'>; +export type FooDeleteArgs = $DeleteArgs<$Schema, 'Foo'>; +export type FooDeleteManyArgs = $DeleteManyArgs<$Schema, 'Foo'>; +export type FooCountArgs = $CountArgs<$Schema, 'Foo'>; +export type FooAggregateArgs = $AggregateArgs<$Schema, 'Foo'>; +export type FooGroupByArgs = $GroupByArgs<$Schema, 'Foo'>; +export type FooWhereInput = $WhereInput<$Schema, 'Foo'>; +export type FooSelect = $SelectInput<$Schema, 'Foo'>; +export type FooInclude = $IncludeInput<$Schema, 'Foo'>; +export type FooOmit = $OmitInput<$Schema, 'Foo'>; +export type FooGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Foo', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Foo', Args, Options>; diff --git a/tests/e2e/orm/schemas/auth-type/models.ts b/tests/e2e/orm/schemas/auth-type/models.ts index 2d78f9bbd..f4537340e 100644 --- a/tests/e2e/orm/schemas/auth-type/models.ts +++ b/tests/e2e/orm/schemas/auth-type/models.ts @@ -5,8 +5,8 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from "@zenstackhq/orm"; -export type Foo = $ModelResult<$Schema, "Foo">; -export type Permission = $TypeDefResult<$Schema, "Permission">; -export type Auth = $TypeDefResult<$Schema, "Auth">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from '@zenstackhq/orm'; +export type Foo = $ModelResult<$Schema, 'Foo'>; +export type Permission = $TypeDefResult<$Schema, 'Permission'>; +export type Auth = $TypeDefResult<$Schema, 'Auth'>; diff --git a/tests/e2e/orm/schemas/auth-type/schema.ts b/tests/e2e/orm/schemas/auth-type/schema.ts index 2730775ed..dd373697b 100644 --- a/tests/e2e/orm/schemas/auth-type/schema.ts +++ b/tests/e2e/orm/schemas/auth-type/schema.ts @@ -5,66 +5,64 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { Foo: { - name: "Foo", + name: 'Foo', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@id' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; typeDefs = { Permission: { - name: "Permission", + name: 'Permission', fields: { actionCode: { - name: "actionCode", - type: "String" - } - } + name: 'actionCode', + type: 'String', + }, + }, }, Auth: { - name: "Auth", + name: 'Auth', fields: { id: { - name: "id", - type: "Int", - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + name: 'id', + type: 'Int', + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, permissions: { - name: "permissions", - type: "Permission", - array: true + name: 'permissions', + type: 'Permission', + array: true, }, role: { - name: "role", - type: "String" - } + name: 'role', + type: 'String', + }, }, - attributes: [ - { name: "@@auth" } - ] as readonly AttributeApplication[] - } + attributes: [{ name: '@@auth' }] as readonly AttributeApplication[], + }, } as const; - authType = "Auth" as const; + authType = 'Auth' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/basic/input.ts b/tests/e2e/orm/schemas/basic/input.ts index f94cafcf4..ce5be52bb 100644 --- a/tests/e2e/orm/schemas/basic/input.ts +++ b/tests/e2e/orm/schemas/basic/input.ts @@ -5,131 +5,172 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, UncheckedCreateInput as $UncheckedCreateInput, CheckedCreateInput as $CheckedCreateInput, UncheckedUpdateInput as $UncheckedUpdateInput, CheckedUpdateInput as $CheckedUpdateInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserUncheckedCreateInput = $UncheckedCreateInput<$Schema, "User">; -export type UserCheckedCreateInput = $CheckedCreateInput<$Schema, "User">; -export type UserUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, "User">; -export type UserCheckedUpdateInput = $CheckedUpdateInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; -export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; -export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; -export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; -export type PostCreateArgs = $CreateArgs<$Schema, "Post">; -export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; -export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; -export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; -export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; -export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; -export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; -export type PostCountArgs = $CountArgs<$Schema, "Post">; -export type PostAggregateArgs = $AggregateArgs<$Schema, "Post">; -export type PostGroupByArgs = $GroupByArgs<$Schema, "Post">; -export type PostWhereInput = $WhereInput<$Schema, "Post">; -export type PostSelect = $SelectInput<$Schema, "Post">; -export type PostInclude = $IncludeInput<$Schema, "Post">; -export type PostOmit = $OmitInput<$Schema, "Post">; -export type PostUncheckedCreateInput = $UncheckedCreateInput<$Schema, "Post">; -export type PostCheckedCreateInput = $CheckedCreateInput<$Schema, "Post">; -export type PostUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, "Post">; -export type PostCheckedUpdateInput = $CheckedUpdateInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; -export type CommentFindManyArgs = $FindManyArgs<$Schema, "Comment">; -export type CommentFindUniqueArgs = $FindUniqueArgs<$Schema, "Comment">; -export type CommentFindFirstArgs = $FindFirstArgs<$Schema, "Comment">; -export type CommentExistsArgs = $ExistsArgs<$Schema, "Comment">; -export type CommentCreateArgs = $CreateArgs<$Schema, "Comment">; -export type CommentCreateManyArgs = $CreateManyArgs<$Schema, "Comment">; -export type CommentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Comment">; -export type CommentUpdateArgs = $UpdateArgs<$Schema, "Comment">; -export type CommentUpdateManyArgs = $UpdateManyArgs<$Schema, "Comment">; -export type CommentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Comment">; -export type CommentUpsertArgs = $UpsertArgs<$Schema, "Comment">; -export type CommentDeleteArgs = $DeleteArgs<$Schema, "Comment">; -export type CommentDeleteManyArgs = $DeleteManyArgs<$Schema, "Comment">; -export type CommentCountArgs = $CountArgs<$Schema, "Comment">; -export type CommentAggregateArgs = $AggregateArgs<$Schema, "Comment">; -export type CommentGroupByArgs = $GroupByArgs<$Schema, "Comment">; -export type CommentWhereInput = $WhereInput<$Schema, "Comment">; -export type CommentSelect = $SelectInput<$Schema, "Comment">; -export type CommentInclude = $IncludeInput<$Schema, "Comment">; -export type CommentOmit = $OmitInput<$Schema, "Comment">; -export type CommentUncheckedCreateInput = $UncheckedCreateInput<$Schema, "Comment">; -export type CommentCheckedCreateInput = $CheckedCreateInput<$Schema, "Comment">; -export type CommentUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, "Comment">; -export type CommentCheckedUpdateInput = $CheckedUpdateInput<$Schema, "Comment">; -export type CommentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Comment", Args, Options>; -export type ProfileFindManyArgs = $FindManyArgs<$Schema, "Profile">; -export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, "Profile">; -export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, "Profile">; -export type ProfileExistsArgs = $ExistsArgs<$Schema, "Profile">; -export type ProfileCreateArgs = $CreateArgs<$Schema, "Profile">; -export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, "Profile">; -export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpdateArgs = $UpdateArgs<$Schema, "Profile">; -export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, "Profile">; -export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpsertArgs = $UpsertArgs<$Schema, "Profile">; -export type ProfileDeleteArgs = $DeleteArgs<$Schema, "Profile">; -export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, "Profile">; -export type ProfileCountArgs = $CountArgs<$Schema, "Profile">; -export type ProfileAggregateArgs = $AggregateArgs<$Schema, "Profile">; -export type ProfileGroupByArgs = $GroupByArgs<$Schema, "Profile">; -export type ProfileWhereInput = $WhereInput<$Schema, "Profile">; -export type ProfileSelect = $SelectInput<$Schema, "Profile">; -export type ProfileInclude = $IncludeInput<$Schema, "Profile">; -export type ProfileOmit = $OmitInput<$Schema, "Profile">; -export type ProfileUncheckedCreateInput = $UncheckedCreateInput<$Schema, "Profile">; -export type ProfileCheckedCreateInput = $CheckedCreateInput<$Schema, "Profile">; -export type ProfileUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, "Profile">; -export type ProfileCheckedUpdateInput = $CheckedUpdateInput<$Schema, "Profile">; -export type ProfileGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Profile", Args, Options>; -export type PlainFindManyArgs = $FindManyArgs<$Schema, "Plain">; -export type PlainFindUniqueArgs = $FindUniqueArgs<$Schema, "Plain">; -export type PlainFindFirstArgs = $FindFirstArgs<$Schema, "Plain">; -export type PlainExistsArgs = $ExistsArgs<$Schema, "Plain">; -export type PlainCreateArgs = $CreateArgs<$Schema, "Plain">; -export type PlainCreateManyArgs = $CreateManyArgs<$Schema, "Plain">; -export type PlainCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Plain">; -export type PlainUpdateArgs = $UpdateArgs<$Schema, "Plain">; -export type PlainUpdateManyArgs = $UpdateManyArgs<$Schema, "Plain">; -export type PlainUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Plain">; -export type PlainUpsertArgs = $UpsertArgs<$Schema, "Plain">; -export type PlainDeleteArgs = $DeleteArgs<$Schema, "Plain">; -export type PlainDeleteManyArgs = $DeleteManyArgs<$Schema, "Plain">; -export type PlainCountArgs = $CountArgs<$Schema, "Plain">; -export type PlainAggregateArgs = $AggregateArgs<$Schema, "Plain">; -export type PlainGroupByArgs = $GroupByArgs<$Schema, "Plain">; -export type PlainWhereInput = $WhereInput<$Schema, "Plain">; -export type PlainSelect = $SelectInput<$Schema, "Plain">; -export type PlainInclude = $IncludeInput<$Schema, "Plain">; -export type PlainOmit = $OmitInput<$Schema, "Plain">; -export type PlainUncheckedCreateInput = $UncheckedCreateInput<$Schema, "Plain">; -export type PlainCheckedCreateInput = $CheckedCreateInput<$Schema, "Plain">; -export type PlainUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, "Plain">; -export type PlainCheckedUpdateInput = $CheckedUpdateInput<$Schema, "Plain">; -export type PlainGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Plain", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + UncheckedCreateInput as $UncheckedCreateInput, + CheckedCreateInput as $CheckedCreateInput, + UncheckedUpdateInput as $UncheckedUpdateInput, + CheckedUpdateInput as $CheckedUpdateInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserUncheckedCreateInput = $UncheckedCreateInput<$Schema, 'User'>; +export type UserCheckedCreateInput = $CheckedCreateInput<$Schema, 'User'>; +export type UserUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, 'User'>; +export type UserCheckedUpdateInput = $CheckedUpdateInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PostFindManyArgs = $FindManyArgs<$Schema, 'Post'>; +export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Post'>; +export type PostFindFirstArgs = $FindFirstArgs<$Schema, 'Post'>; +export type PostExistsArgs = $ExistsArgs<$Schema, 'Post'>; +export type PostCreateArgs = $CreateArgs<$Schema, 'Post'>; +export type PostCreateManyArgs = $CreateManyArgs<$Schema, 'Post'>; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpdateArgs = $UpdateArgs<$Schema, 'Post'>; +export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Post'>; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpsertArgs = $UpsertArgs<$Schema, 'Post'>; +export type PostDeleteArgs = $DeleteArgs<$Schema, 'Post'>; +export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Post'>; +export type PostCountArgs = $CountArgs<$Schema, 'Post'>; +export type PostAggregateArgs = $AggregateArgs<$Schema, 'Post'>; +export type PostGroupByArgs = $GroupByArgs<$Schema, 'Post'>; +export type PostWhereInput = $WhereInput<$Schema, 'Post'>; +export type PostSelect = $SelectInput<$Schema, 'Post'>; +export type PostInclude = $IncludeInput<$Schema, 'Post'>; +export type PostOmit = $OmitInput<$Schema, 'Post'>; +export type PostUncheckedCreateInput = $UncheckedCreateInput<$Schema, 'Post'>; +export type PostCheckedCreateInput = $CheckedCreateInput<$Schema, 'Post'>; +export type PostUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, 'Post'>; +export type PostCheckedUpdateInput = $CheckedUpdateInput<$Schema, 'Post'>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Post', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Post', Args, Options>; +export type CommentFindManyArgs = $FindManyArgs<$Schema, 'Comment'>; +export type CommentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Comment'>; +export type CommentFindFirstArgs = $FindFirstArgs<$Schema, 'Comment'>; +export type CommentExistsArgs = $ExistsArgs<$Schema, 'Comment'>; +export type CommentCreateArgs = $CreateArgs<$Schema, 'Comment'>; +export type CommentCreateManyArgs = $CreateManyArgs<$Schema, 'Comment'>; +export type CommentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Comment'>; +export type CommentUpdateArgs = $UpdateArgs<$Schema, 'Comment'>; +export type CommentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Comment'>; +export type CommentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Comment'>; +export type CommentUpsertArgs = $UpsertArgs<$Schema, 'Comment'>; +export type CommentDeleteArgs = $DeleteArgs<$Schema, 'Comment'>; +export type CommentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Comment'>; +export type CommentCountArgs = $CountArgs<$Schema, 'Comment'>; +export type CommentAggregateArgs = $AggregateArgs<$Schema, 'Comment'>; +export type CommentGroupByArgs = $GroupByArgs<$Schema, 'Comment'>; +export type CommentWhereInput = $WhereInput<$Schema, 'Comment'>; +export type CommentSelect = $SelectInput<$Schema, 'Comment'>; +export type CommentInclude = $IncludeInput<$Schema, 'Comment'>; +export type CommentOmit = $OmitInput<$Schema, 'Comment'>; +export type CommentUncheckedCreateInput = $UncheckedCreateInput<$Schema, 'Comment'>; +export type CommentCheckedCreateInput = $CheckedCreateInput<$Schema, 'Comment'>; +export type CommentUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, 'Comment'>; +export type CommentCheckedUpdateInput = $CheckedUpdateInput<$Schema, 'Comment'>; +export type CommentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Comment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Comment', Args, Options>; +export type ProfileFindManyArgs = $FindManyArgs<$Schema, 'Profile'>; +export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, 'Profile'>; +export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, 'Profile'>; +export type ProfileExistsArgs = $ExistsArgs<$Schema, 'Profile'>; +export type ProfileCreateArgs = $CreateArgs<$Schema, 'Profile'>; +export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, 'Profile'>; +export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpdateArgs = $UpdateArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpsertArgs = $UpsertArgs<$Schema, 'Profile'>; +export type ProfileDeleteArgs = $DeleteArgs<$Schema, 'Profile'>; +export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, 'Profile'>; +export type ProfileCountArgs = $CountArgs<$Schema, 'Profile'>; +export type ProfileAggregateArgs = $AggregateArgs<$Schema, 'Profile'>; +export type ProfileGroupByArgs = $GroupByArgs<$Schema, 'Profile'>; +export type ProfileWhereInput = $WhereInput<$Schema, 'Profile'>; +export type ProfileSelect = $SelectInput<$Schema, 'Profile'>; +export type ProfileInclude = $IncludeInput<$Schema, 'Profile'>; +export type ProfileOmit = $OmitInput<$Schema, 'Profile'>; +export type ProfileUncheckedCreateInput = $UncheckedCreateInput<$Schema, 'Profile'>; +export type ProfileCheckedCreateInput = $CheckedCreateInput<$Schema, 'Profile'>; +export type ProfileUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, 'Profile'>; +export type ProfileCheckedUpdateInput = $CheckedUpdateInput<$Schema, 'Profile'>; +export type ProfileGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Profile', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Profile', Args, Options>; +export type PlainFindManyArgs = $FindManyArgs<$Schema, 'Plain'>; +export type PlainFindUniqueArgs = $FindUniqueArgs<$Schema, 'Plain'>; +export type PlainFindFirstArgs = $FindFirstArgs<$Schema, 'Plain'>; +export type PlainExistsArgs = $ExistsArgs<$Schema, 'Plain'>; +export type PlainCreateArgs = $CreateArgs<$Schema, 'Plain'>; +export type PlainCreateManyArgs = $CreateManyArgs<$Schema, 'Plain'>; +export type PlainCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Plain'>; +export type PlainUpdateArgs = $UpdateArgs<$Schema, 'Plain'>; +export type PlainUpdateManyArgs = $UpdateManyArgs<$Schema, 'Plain'>; +export type PlainUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Plain'>; +export type PlainUpsertArgs = $UpsertArgs<$Schema, 'Plain'>; +export type PlainDeleteArgs = $DeleteArgs<$Schema, 'Plain'>; +export type PlainDeleteManyArgs = $DeleteManyArgs<$Schema, 'Plain'>; +export type PlainCountArgs = $CountArgs<$Schema, 'Plain'>; +export type PlainAggregateArgs = $AggregateArgs<$Schema, 'Plain'>; +export type PlainGroupByArgs = $GroupByArgs<$Schema, 'Plain'>; +export type PlainWhereInput = $WhereInput<$Schema, 'Plain'>; +export type PlainSelect = $SelectInput<$Schema, 'Plain'>; +export type PlainInclude = $IncludeInput<$Schema, 'Plain'>; +export type PlainOmit = $OmitInput<$Schema, 'Plain'>; +export type PlainUncheckedCreateInput = $UncheckedCreateInput<$Schema, 'Plain'>; +export type PlainCheckedCreateInput = $CheckedCreateInput<$Schema, 'Plain'>; +export type PlainUncheckedUpdateInput = $UncheckedUpdateInput<$Schema, 'Plain'>; +export type PlainCheckedUpdateInput = $CheckedUpdateInput<$Schema, 'Plain'>; +export type PlainGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Plain', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Plain', Args, Options>; diff --git a/tests/e2e/orm/schemas/basic/models.ts b/tests/e2e/orm/schemas/basic/models.ts index 39bd52fdf..769e70696 100644 --- a/tests/e2e/orm/schemas/basic/models.ts +++ b/tests/e2e/orm/schemas/basic/models.ts @@ -5,13 +5,13 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Post = $ModelResult<$Schema, "Post">; -export type Comment = $ModelResult<$Schema, "Comment">; -export type Profile = $ModelResult<$Schema, "Profile">; -export type Plain = $ModelResult<$Schema, "Plain">; -export type CommonFields = $TypeDefResult<$Schema, "CommonFields">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Post = $ModelResult<$Schema, 'Post'>; +export type Comment = $ModelResult<$Schema, 'Comment'>; +export type Profile = $ModelResult<$Schema, 'Profile'>; +export type Plain = $ModelResult<$Schema, 'Plain'>; +export type CommonFields = $TypeDefResult<$Schema, 'CommonFields'>; export const Role = $schema.enums.Role.values; export type Role = (typeof Role)[keyof typeof Role]; diff --git a/tests/e2e/orm/schemas/basic/schema.ts b/tests/e2e/orm/schemas/basic/schema.ts index 39f85eef7..ed05ad4bb 100644 --- a/tests/e2e/orm/schemas/basic/schema.ts +++ b/tests/e2e/orm/schemas/basic/schema.ts @@ -5,309 +5,516 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: { ignore: ["id", "createdAt"] }, - attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] + name: 'updatedAt', + type: 'DateTime', + updatedAt: { ignore: ['id', 'createdAt'] }, + attributes: [ + { + name: '@updatedAt', + args: [ + { + name: 'ignore', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('id'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, age: { - name: "age", - type: "Int", - optional: true + name: 'age', + type: 'Int', + optional: true, }, role: { - name: "role", - type: "Role", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], - default: "USER" as FieldDefault + name: 'role', + type: 'Role', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, + ] as readonly AttributeApplication[], + default: 'USER' as FieldDefault, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } + relation: { opposite: 'author' }, }, profile: { - name: "profile", - type: "Profile", + name: 'profile', + type: 'Profile', optional: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, meta: { - name: "meta", - type: "Json", - optional: true - } + name: 'meta', + type: 'Json', + optional: true, + }, }, attributes: [ - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("id")) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "!=", ExpressionUtils._null()) }] } + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + '==', + ExpressionUtils.field('id'), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '!=', ExpressionUtils._null()), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: { ignore: ["id", "createdAt"] }, - attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] + name: 'updatedAt', + type: 'DateTime', + updatedAt: { ignore: ['id', 'createdAt'] }, + attributes: [ + { + name: '@updatedAt', + args: [ + { + name: 'ignore', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('id'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, content: { - name: "content", - type: "String", - optional: true + name: 'content', + type: 'String', + optional: true, }, published: { - name: "published", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'published', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'posts', + fields: ['authorId'], + references: ['id'], + onUpdate: 'Cascade', + onDelete: 'Cascade', + }, }, authorId: { - name: "authorId", - type: "String", - foreignKeyFor: [ - "author" - ] as readonly string[] + name: 'authorId', + type: 'String', + foreignKeyFor: ['author'] as readonly string[], }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - relation: { opposite: "post" } - } + relation: { opposite: 'post' }, + }, }, attributes: [ - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("authorId")) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.field("published") }] } + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + '==', + ExpressionUtils.field('authorId'), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { name: 'condition', value: ExpressionUtils.field('published') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Comment: { - name: "Comment", + name: 'Comment', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: { ignore: ["id", "createdAt"] }, - attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] + name: 'updatedAt', + type: 'DateTime', + updatedAt: { ignore: ['id', 'createdAt'] }, + attributes: [ + { + name: '@updatedAt', + args: [ + { + name: 'ignore', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('id'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], }, content: { - name: "content", - type: "String" + name: 'content', + type: 'String', }, post: { - name: "post", - type: "Post", + name: 'post', + type: 'Post', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("postId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["postId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('postId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'comments', + fields: ['postId'], + references: ['id'], + onUpdate: 'Cascade', + onDelete: 'Cascade', + }, }, postId: { - name: "postId", - type: "String", + name: 'postId', + type: 'String', optional: true, - foreignKeyFor: [ - "post" - ] as readonly string[] - } + foreignKeyFor: ['post'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Profile: { - name: "Profile", + name: 'Profile', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: { ignore: ["id", "createdAt"] }, - attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] + name: 'updatedAt', + type: 'DateTime', + updatedAt: { ignore: ['id', 'createdAt'] }, + attributes: [ + { + name: '@updatedAt', + args: [ + { + name: 'ignore', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('id'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], }, bio: { - name: "bio", - type: "String" + name: 'bio', + type: 'String', }, age: { - name: "age", - type: "Int", - optional: true + name: 'age', + type: 'Int', + optional: true, }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "profile", fields: ["userId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'profile', + fields: ['userId'], + references: ['id'], + onUpdate: 'Cascade', + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "String", + name: 'userId', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] - } + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - userId: { type: "String" } - } + id: { type: 'String' }, + userId: { type: 'String' }, + }, }, Plain: { - name: "Plain", + name: 'Plain', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, value: { - name: "value", - type: "Int" - } + name: 'value', + type: 'Int', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; typeDefs = { CommonFields: { - name: "CommonFields", + name: 'CommonFields', fields: { id: { - name: "id", - type: "String", - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + name: 'id', + type: 'String', + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", - updatedAt: { ignore: ["id", "createdAt"] }, - attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] - } - } - } + name: 'updatedAt', + type: 'DateTime', + updatedAt: { ignore: ['id', 'createdAt'] }, + attributes: [ + { + name: '@updatedAt', + args: [ + { + name: 'ignore', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('id'), + ExpressionUtils.field('createdAt'), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], + }, + }, + }, } as const; enums = { Role: { - name: "Role", + name: 'Role', values: { - ADMIN: "ADMIN", - USER: "USER" - } - } + ADMIN: 'ADMIN', + USER: 'USER', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/default-auth/input.ts b/tests/e2e/orm/schemas/default-auth/input.ts index 89e46711c..cfb7e59ec 100644 --- a/tests/e2e/orm/schemas/default-auth/input.ts +++ b/tests/e2e/orm/schemas/default-auth/input.ts @@ -5,69 +5,100 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type ProfileFindManyArgs = $FindManyArgs<$Schema, "Profile">; -export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, "Profile">; -export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, "Profile">; -export type ProfileExistsArgs = $ExistsArgs<$Schema, "Profile">; -export type ProfileCreateArgs = $CreateArgs<$Schema, "Profile">; -export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, "Profile">; -export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpdateArgs = $UpdateArgs<$Schema, "Profile">; -export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, "Profile">; -export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpsertArgs = $UpsertArgs<$Schema, "Profile">; -export type ProfileDeleteArgs = $DeleteArgs<$Schema, "Profile">; -export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, "Profile">; -export type ProfileCountArgs = $CountArgs<$Schema, "Profile">; -export type ProfileAggregateArgs = $AggregateArgs<$Schema, "Profile">; -export type ProfileGroupByArgs = $GroupByArgs<$Schema, "Profile">; -export type ProfileWhereInput = $WhereInput<$Schema, "Profile">; -export type ProfileSelect = $SelectInput<$Schema, "Profile">; -export type ProfileInclude = $IncludeInput<$Schema, "Profile">; -export type ProfileOmit = $OmitInput<$Schema, "Profile">; -export type ProfileGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Profile", Args, Options>; -export type AddressFindManyArgs = $FindManyArgs<$Schema, "Address">; -export type AddressFindUniqueArgs = $FindUniqueArgs<$Schema, "Address">; -export type AddressFindFirstArgs = $FindFirstArgs<$Schema, "Address">; -export type AddressExistsArgs = $ExistsArgs<$Schema, "Address">; -export type AddressCreateArgs = $CreateArgs<$Schema, "Address">; -export type AddressCreateManyArgs = $CreateManyArgs<$Schema, "Address">; -export type AddressCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Address">; -export type AddressUpdateArgs = $UpdateArgs<$Schema, "Address">; -export type AddressUpdateManyArgs = $UpdateManyArgs<$Schema, "Address">; -export type AddressUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Address">; -export type AddressUpsertArgs = $UpsertArgs<$Schema, "Address">; -export type AddressDeleteArgs = $DeleteArgs<$Schema, "Address">; -export type AddressDeleteManyArgs = $DeleteManyArgs<$Schema, "Address">; -export type AddressCountArgs = $CountArgs<$Schema, "Address">; -export type AddressAggregateArgs = $AggregateArgs<$Schema, "Address">; -export type AddressGroupByArgs = $GroupByArgs<$Schema, "Address">; -export type AddressWhereInput = $WhereInput<$Schema, "Address">; -export type AddressSelect = $SelectInput<$Schema, "Address">; -export type AddressInclude = $IncludeInput<$Schema, "Address">; -export type AddressOmit = $OmitInput<$Schema, "Address">; -export type AddressGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Address", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type ProfileFindManyArgs = $FindManyArgs<$Schema, 'Profile'>; +export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, 'Profile'>; +export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, 'Profile'>; +export type ProfileExistsArgs = $ExistsArgs<$Schema, 'Profile'>; +export type ProfileCreateArgs = $CreateArgs<$Schema, 'Profile'>; +export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, 'Profile'>; +export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpdateArgs = $UpdateArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpsertArgs = $UpsertArgs<$Schema, 'Profile'>; +export type ProfileDeleteArgs = $DeleteArgs<$Schema, 'Profile'>; +export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, 'Profile'>; +export type ProfileCountArgs = $CountArgs<$Schema, 'Profile'>; +export type ProfileAggregateArgs = $AggregateArgs<$Schema, 'Profile'>; +export type ProfileGroupByArgs = $GroupByArgs<$Schema, 'Profile'>; +export type ProfileWhereInput = $WhereInput<$Schema, 'Profile'>; +export type ProfileSelect = $SelectInput<$Schema, 'Profile'>; +export type ProfileInclude = $IncludeInput<$Schema, 'Profile'>; +export type ProfileOmit = $OmitInput<$Schema, 'Profile'>; +export type ProfileGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Profile', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Profile', Args, Options>; +export type AddressFindManyArgs = $FindManyArgs<$Schema, 'Address'>; +export type AddressFindUniqueArgs = $FindUniqueArgs<$Schema, 'Address'>; +export type AddressFindFirstArgs = $FindFirstArgs<$Schema, 'Address'>; +export type AddressExistsArgs = $ExistsArgs<$Schema, 'Address'>; +export type AddressCreateArgs = $CreateArgs<$Schema, 'Address'>; +export type AddressCreateManyArgs = $CreateManyArgs<$Schema, 'Address'>; +export type AddressCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Address'>; +export type AddressUpdateArgs = $UpdateArgs<$Schema, 'Address'>; +export type AddressUpdateManyArgs = $UpdateManyArgs<$Schema, 'Address'>; +export type AddressUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Address'>; +export type AddressUpsertArgs = $UpsertArgs<$Schema, 'Address'>; +export type AddressDeleteArgs = $DeleteArgs<$Schema, 'Address'>; +export type AddressDeleteManyArgs = $DeleteManyArgs<$Schema, 'Address'>; +export type AddressCountArgs = $CountArgs<$Schema, 'Address'>; +export type AddressAggregateArgs = $AggregateArgs<$Schema, 'Address'>; +export type AddressGroupByArgs = $GroupByArgs<$Schema, 'Address'>; +export type AddressWhereInput = $WhereInput<$Schema, 'Address'>; +export type AddressSelect = $SelectInput<$Schema, 'Address'>; +export type AddressInclude = $IncludeInput<$Schema, 'Address'>; +export type AddressOmit = $OmitInput<$Schema, 'Address'>; +export type AddressGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Address', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Address', Args, Options>; diff --git a/tests/e2e/orm/schemas/default-auth/models.ts b/tests/e2e/orm/schemas/default-auth/models.ts index 624cfb8ec..41217d3c5 100644 --- a/tests/e2e/orm/schemas/default-auth/models.ts +++ b/tests/e2e/orm/schemas/default-auth/models.ts @@ -5,8 +5,8 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Profile = $ModelResult<$Schema, "Profile">; -export type Address = $ModelResult<$Schema, "Address">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Profile = $ModelResult<$Schema, 'Profile'>; +export type Address = $ModelResult<$Schema, 'Address'>; diff --git a/tests/e2e/orm/schemas/default-auth/schema.ts b/tests/e2e/orm/schemas/default-auth/schema.ts index 1deba2463..a9466b4c9 100644 --- a/tests/e2e/orm/schemas/default-auth/schema.ts +++ b/tests/e2e/orm/schemas/default-auth/schema.ts @@ -5,118 +5,159 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, profile: { - name: "profile", - type: "Profile", + name: 'profile', + type: 'Profile', optional: true, - relation: { opposite: "user" } - } + relation: { opposite: 'user' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Profile: { - name: "Profile", + name: 'Profile', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, bio: { - name: "bio", - type: "String", - optional: true + name: 'bio', + type: 'String', + optional: true, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', unique: true, - attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]) }] }] as readonly AttributeApplication[], - default: ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]) as FieldDefault, - foreignKeyFor: [ - "user" - ] as readonly string[] + attributes: [ + { name: '@unique' }, + { + name: '@default', + args: [ + { name: 'value', value: ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']) }, + ], + }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']) as FieldDefault, + foreignKeyFor: ['user'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "profile", fields: ["userId"], references: ["id"], hasDefault: true } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'profile', fields: ['userId'], references: ['id'], hasDefault: true }, }, address: { - name: "address", - type: "Address", + name: 'address', + type: 'Address', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("addressId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "profile", fields: ["addressId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('addressId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'profile', fields: ['addressId'], references: ['id'] }, }, addressId: { - name: "addressId", - type: "Int", + name: 'addressId', + type: 'Int', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "address" - ] as readonly string[] - } + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['address'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId: { type: "Int" }, - addressId: { type: "Int" } - } + id: { type: 'Int' }, + userId: { type: 'Int' }, + addressId: { type: 'Int' }, + }, }, Address: { - name: "Address", + name: 'Address', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, city: { - name: "city", - type: "String" + name: 'city', + type: 'String', }, profile: { - name: "profile", - type: "Profile", + name: 'profile', + type: 'Profile', optional: true, - relation: { opposite: "address" } - } + relation: { opposite: 'address' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/delegate/input.ts b/tests/e2e/orm/schemas/delegate/input.ts index 23eb5c08b..3b52629c9 100644 --- a/tests/e2e/orm/schemas/delegate/input.ts +++ b/tests/e2e/orm/schemas/delegate/input.ts @@ -5,153 +5,196 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type CommentFindManyArgs = $FindManyArgs<$Schema, "Comment">; -export type CommentFindUniqueArgs = $FindUniqueArgs<$Schema, "Comment">; -export type CommentFindFirstArgs = $FindFirstArgs<$Schema, "Comment">; -export type CommentExistsArgs = $ExistsArgs<$Schema, "Comment">; -export type CommentCreateArgs = $CreateArgs<$Schema, "Comment">; -export type CommentCreateManyArgs = $CreateManyArgs<$Schema, "Comment">; -export type CommentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Comment">; -export type CommentUpdateArgs = $UpdateArgs<$Schema, "Comment">; -export type CommentUpdateManyArgs = $UpdateManyArgs<$Schema, "Comment">; -export type CommentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Comment">; -export type CommentUpsertArgs = $UpsertArgs<$Schema, "Comment">; -export type CommentDeleteArgs = $DeleteArgs<$Schema, "Comment">; -export type CommentDeleteManyArgs = $DeleteManyArgs<$Schema, "Comment">; -export type CommentCountArgs = $CountArgs<$Schema, "Comment">; -export type CommentAggregateArgs = $AggregateArgs<$Schema, "Comment">; -export type CommentGroupByArgs = $GroupByArgs<$Schema, "Comment">; -export type CommentWhereInput = $WhereInput<$Schema, "Comment">; -export type CommentSelect = $SelectInput<$Schema, "Comment">; -export type CommentInclude = $IncludeInput<$Schema, "Comment">; -export type CommentOmit = $OmitInput<$Schema, "Comment">; -export type CommentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Comment", Args, Options>; -export type AssetFindManyArgs = $FindManyArgs<$Schema, "Asset">; -export type AssetFindUniqueArgs = $FindUniqueArgs<$Schema, "Asset">; -export type AssetFindFirstArgs = $FindFirstArgs<$Schema, "Asset">; -export type AssetExistsArgs = $ExistsArgs<$Schema, "Asset">; -export type AssetCreateArgs = $CreateArgs<$Schema, "Asset">; -export type AssetCreateManyArgs = $CreateManyArgs<$Schema, "Asset">; -export type AssetCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Asset">; -export type AssetUpdateArgs = $UpdateArgs<$Schema, "Asset">; -export type AssetUpdateManyArgs = $UpdateManyArgs<$Schema, "Asset">; -export type AssetUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Asset">; -export type AssetUpsertArgs = $UpsertArgs<$Schema, "Asset">; -export type AssetDeleteArgs = $DeleteArgs<$Schema, "Asset">; -export type AssetDeleteManyArgs = $DeleteManyArgs<$Schema, "Asset">; -export type AssetCountArgs = $CountArgs<$Schema, "Asset">; -export type AssetAggregateArgs = $AggregateArgs<$Schema, "Asset">; -export type AssetGroupByArgs = $GroupByArgs<$Schema, "Asset">; -export type AssetWhereInput = $WhereInput<$Schema, "Asset">; -export type AssetSelect = $SelectInput<$Schema, "Asset">; -export type AssetInclude = $IncludeInput<$Schema, "Asset">; -export type AssetOmit = $OmitInput<$Schema, "Asset">; -export type AssetGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Asset", Args, Options>; -export type VideoFindManyArgs = $FindManyArgs<$Schema, "Video">; -export type VideoFindUniqueArgs = $FindUniqueArgs<$Schema, "Video">; -export type VideoFindFirstArgs = $FindFirstArgs<$Schema, "Video">; -export type VideoExistsArgs = $ExistsArgs<$Schema, "Video">; -export type VideoCreateArgs = $CreateArgs<$Schema, "Video">; -export type VideoCreateManyArgs = $CreateManyArgs<$Schema, "Video">; -export type VideoCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Video">; -export type VideoUpdateArgs = $UpdateArgs<$Schema, "Video">; -export type VideoUpdateManyArgs = $UpdateManyArgs<$Schema, "Video">; -export type VideoUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Video">; -export type VideoUpsertArgs = $UpsertArgs<$Schema, "Video">; -export type VideoDeleteArgs = $DeleteArgs<$Schema, "Video">; -export type VideoDeleteManyArgs = $DeleteManyArgs<$Schema, "Video">; -export type VideoCountArgs = $CountArgs<$Schema, "Video">; -export type VideoAggregateArgs = $AggregateArgs<$Schema, "Video">; -export type VideoGroupByArgs = $GroupByArgs<$Schema, "Video">; -export type VideoWhereInput = $WhereInput<$Schema, "Video">; -export type VideoSelect = $SelectInput<$Schema, "Video">; -export type VideoInclude = $IncludeInput<$Schema, "Video">; -export type VideoOmit = $OmitInput<$Schema, "Video">; -export type VideoGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Video", Args, Options>; -export type RatedVideoFindManyArgs = $FindManyArgs<$Schema, "RatedVideo">; -export type RatedVideoFindUniqueArgs = $FindUniqueArgs<$Schema, "RatedVideo">; -export type RatedVideoFindFirstArgs = $FindFirstArgs<$Schema, "RatedVideo">; -export type RatedVideoExistsArgs = $ExistsArgs<$Schema, "RatedVideo">; -export type RatedVideoCreateArgs = $CreateArgs<$Schema, "RatedVideo">; -export type RatedVideoCreateManyArgs = $CreateManyArgs<$Schema, "RatedVideo">; -export type RatedVideoCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "RatedVideo">; -export type RatedVideoUpdateArgs = $UpdateArgs<$Schema, "RatedVideo">; -export type RatedVideoUpdateManyArgs = $UpdateManyArgs<$Schema, "RatedVideo">; -export type RatedVideoUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "RatedVideo">; -export type RatedVideoUpsertArgs = $UpsertArgs<$Schema, "RatedVideo">; -export type RatedVideoDeleteArgs = $DeleteArgs<$Schema, "RatedVideo">; -export type RatedVideoDeleteManyArgs = $DeleteManyArgs<$Schema, "RatedVideo">; -export type RatedVideoCountArgs = $CountArgs<$Schema, "RatedVideo">; -export type RatedVideoAggregateArgs = $AggregateArgs<$Schema, "RatedVideo">; -export type RatedVideoGroupByArgs = $GroupByArgs<$Schema, "RatedVideo">; -export type RatedVideoWhereInput = $WhereInput<$Schema, "RatedVideo">; -export type RatedVideoSelect = $SelectInput<$Schema, "RatedVideo">; -export type RatedVideoInclude = $IncludeInput<$Schema, "RatedVideo">; -export type RatedVideoOmit = $OmitInput<$Schema, "RatedVideo">; -export type RatedVideoGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "RatedVideo", Args, Options>; -export type ImageFindManyArgs = $FindManyArgs<$Schema, "Image">; -export type ImageFindUniqueArgs = $FindUniqueArgs<$Schema, "Image">; -export type ImageFindFirstArgs = $FindFirstArgs<$Schema, "Image">; -export type ImageExistsArgs = $ExistsArgs<$Schema, "Image">; -export type ImageCreateArgs = $CreateArgs<$Schema, "Image">; -export type ImageCreateManyArgs = $CreateManyArgs<$Schema, "Image">; -export type ImageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Image">; -export type ImageUpdateArgs = $UpdateArgs<$Schema, "Image">; -export type ImageUpdateManyArgs = $UpdateManyArgs<$Schema, "Image">; -export type ImageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Image">; -export type ImageUpsertArgs = $UpsertArgs<$Schema, "Image">; -export type ImageDeleteArgs = $DeleteArgs<$Schema, "Image">; -export type ImageDeleteManyArgs = $DeleteManyArgs<$Schema, "Image">; -export type ImageCountArgs = $CountArgs<$Schema, "Image">; -export type ImageAggregateArgs = $AggregateArgs<$Schema, "Image">; -export type ImageGroupByArgs = $GroupByArgs<$Schema, "Image">; -export type ImageWhereInput = $WhereInput<$Schema, "Image">; -export type ImageSelect = $SelectInput<$Schema, "Image">; -export type ImageInclude = $IncludeInput<$Schema, "Image">; -export type ImageOmit = $OmitInput<$Schema, "Image">; -export type ImageGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Image", Args, Options>; -export type GalleryFindManyArgs = $FindManyArgs<$Schema, "Gallery">; -export type GalleryFindUniqueArgs = $FindUniqueArgs<$Schema, "Gallery">; -export type GalleryFindFirstArgs = $FindFirstArgs<$Schema, "Gallery">; -export type GalleryExistsArgs = $ExistsArgs<$Schema, "Gallery">; -export type GalleryCreateArgs = $CreateArgs<$Schema, "Gallery">; -export type GalleryCreateManyArgs = $CreateManyArgs<$Schema, "Gallery">; -export type GalleryCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Gallery">; -export type GalleryUpdateArgs = $UpdateArgs<$Schema, "Gallery">; -export type GalleryUpdateManyArgs = $UpdateManyArgs<$Schema, "Gallery">; -export type GalleryUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Gallery">; -export type GalleryUpsertArgs = $UpsertArgs<$Schema, "Gallery">; -export type GalleryDeleteArgs = $DeleteArgs<$Schema, "Gallery">; -export type GalleryDeleteManyArgs = $DeleteManyArgs<$Schema, "Gallery">; -export type GalleryCountArgs = $CountArgs<$Schema, "Gallery">; -export type GalleryAggregateArgs = $AggregateArgs<$Schema, "Gallery">; -export type GalleryGroupByArgs = $GroupByArgs<$Schema, "Gallery">; -export type GalleryWhereInput = $WhereInput<$Schema, "Gallery">; -export type GallerySelect = $SelectInput<$Schema, "Gallery">; -export type GalleryInclude = $IncludeInput<$Schema, "Gallery">; -export type GalleryOmit = $OmitInput<$Schema, "Gallery">; -export type GalleryGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Gallery", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type CommentFindManyArgs = $FindManyArgs<$Schema, 'Comment'>; +export type CommentFindUniqueArgs = $FindUniqueArgs<$Schema, 'Comment'>; +export type CommentFindFirstArgs = $FindFirstArgs<$Schema, 'Comment'>; +export type CommentExistsArgs = $ExistsArgs<$Schema, 'Comment'>; +export type CommentCreateArgs = $CreateArgs<$Schema, 'Comment'>; +export type CommentCreateManyArgs = $CreateManyArgs<$Schema, 'Comment'>; +export type CommentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Comment'>; +export type CommentUpdateArgs = $UpdateArgs<$Schema, 'Comment'>; +export type CommentUpdateManyArgs = $UpdateManyArgs<$Schema, 'Comment'>; +export type CommentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Comment'>; +export type CommentUpsertArgs = $UpsertArgs<$Schema, 'Comment'>; +export type CommentDeleteArgs = $DeleteArgs<$Schema, 'Comment'>; +export type CommentDeleteManyArgs = $DeleteManyArgs<$Schema, 'Comment'>; +export type CommentCountArgs = $CountArgs<$Schema, 'Comment'>; +export type CommentAggregateArgs = $AggregateArgs<$Schema, 'Comment'>; +export type CommentGroupByArgs = $GroupByArgs<$Schema, 'Comment'>; +export type CommentWhereInput = $WhereInput<$Schema, 'Comment'>; +export type CommentSelect = $SelectInput<$Schema, 'Comment'>; +export type CommentInclude = $IncludeInput<$Schema, 'Comment'>; +export type CommentOmit = $OmitInput<$Schema, 'Comment'>; +export type CommentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Comment', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Comment', Args, Options>; +export type AssetFindManyArgs = $FindManyArgs<$Schema, 'Asset'>; +export type AssetFindUniqueArgs = $FindUniqueArgs<$Schema, 'Asset'>; +export type AssetFindFirstArgs = $FindFirstArgs<$Schema, 'Asset'>; +export type AssetExistsArgs = $ExistsArgs<$Schema, 'Asset'>; +export type AssetCreateArgs = $CreateArgs<$Schema, 'Asset'>; +export type AssetCreateManyArgs = $CreateManyArgs<$Schema, 'Asset'>; +export type AssetCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Asset'>; +export type AssetUpdateArgs = $UpdateArgs<$Schema, 'Asset'>; +export type AssetUpdateManyArgs = $UpdateManyArgs<$Schema, 'Asset'>; +export type AssetUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Asset'>; +export type AssetUpsertArgs = $UpsertArgs<$Schema, 'Asset'>; +export type AssetDeleteArgs = $DeleteArgs<$Schema, 'Asset'>; +export type AssetDeleteManyArgs = $DeleteManyArgs<$Schema, 'Asset'>; +export type AssetCountArgs = $CountArgs<$Schema, 'Asset'>; +export type AssetAggregateArgs = $AggregateArgs<$Schema, 'Asset'>; +export type AssetGroupByArgs = $GroupByArgs<$Schema, 'Asset'>; +export type AssetWhereInput = $WhereInput<$Schema, 'Asset'>; +export type AssetSelect = $SelectInput<$Schema, 'Asset'>; +export type AssetInclude = $IncludeInput<$Schema, 'Asset'>; +export type AssetOmit = $OmitInput<$Schema, 'Asset'>; +export type AssetGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Asset', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Asset', Args, Options>; +export type VideoFindManyArgs = $FindManyArgs<$Schema, 'Video'>; +export type VideoFindUniqueArgs = $FindUniqueArgs<$Schema, 'Video'>; +export type VideoFindFirstArgs = $FindFirstArgs<$Schema, 'Video'>; +export type VideoExistsArgs = $ExistsArgs<$Schema, 'Video'>; +export type VideoCreateArgs = $CreateArgs<$Schema, 'Video'>; +export type VideoCreateManyArgs = $CreateManyArgs<$Schema, 'Video'>; +export type VideoCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Video'>; +export type VideoUpdateArgs = $UpdateArgs<$Schema, 'Video'>; +export type VideoUpdateManyArgs = $UpdateManyArgs<$Schema, 'Video'>; +export type VideoUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Video'>; +export type VideoUpsertArgs = $UpsertArgs<$Schema, 'Video'>; +export type VideoDeleteArgs = $DeleteArgs<$Schema, 'Video'>; +export type VideoDeleteManyArgs = $DeleteManyArgs<$Schema, 'Video'>; +export type VideoCountArgs = $CountArgs<$Schema, 'Video'>; +export type VideoAggregateArgs = $AggregateArgs<$Schema, 'Video'>; +export type VideoGroupByArgs = $GroupByArgs<$Schema, 'Video'>; +export type VideoWhereInput = $WhereInput<$Schema, 'Video'>; +export type VideoSelect = $SelectInput<$Schema, 'Video'>; +export type VideoInclude = $IncludeInput<$Schema, 'Video'>; +export type VideoOmit = $OmitInput<$Schema, 'Video'>; +export type VideoGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Video', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Video', Args, Options>; +export type RatedVideoFindManyArgs = $FindManyArgs<$Schema, 'RatedVideo'>; +export type RatedVideoFindUniqueArgs = $FindUniqueArgs<$Schema, 'RatedVideo'>; +export type RatedVideoFindFirstArgs = $FindFirstArgs<$Schema, 'RatedVideo'>; +export type RatedVideoExistsArgs = $ExistsArgs<$Schema, 'RatedVideo'>; +export type RatedVideoCreateArgs = $CreateArgs<$Schema, 'RatedVideo'>; +export type RatedVideoCreateManyArgs = $CreateManyArgs<$Schema, 'RatedVideo'>; +export type RatedVideoCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'RatedVideo'>; +export type RatedVideoUpdateArgs = $UpdateArgs<$Schema, 'RatedVideo'>; +export type RatedVideoUpdateManyArgs = $UpdateManyArgs<$Schema, 'RatedVideo'>; +export type RatedVideoUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'RatedVideo'>; +export type RatedVideoUpsertArgs = $UpsertArgs<$Schema, 'RatedVideo'>; +export type RatedVideoDeleteArgs = $DeleteArgs<$Schema, 'RatedVideo'>; +export type RatedVideoDeleteManyArgs = $DeleteManyArgs<$Schema, 'RatedVideo'>; +export type RatedVideoCountArgs = $CountArgs<$Schema, 'RatedVideo'>; +export type RatedVideoAggregateArgs = $AggregateArgs<$Schema, 'RatedVideo'>; +export type RatedVideoGroupByArgs = $GroupByArgs<$Schema, 'RatedVideo'>; +export type RatedVideoWhereInput = $WhereInput<$Schema, 'RatedVideo'>; +export type RatedVideoSelect = $SelectInput<$Schema, 'RatedVideo'>; +export type RatedVideoInclude = $IncludeInput<$Schema, 'RatedVideo'>; +export type RatedVideoOmit = $OmitInput<$Schema, 'RatedVideo'>; +export type RatedVideoGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'RatedVideo', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'RatedVideo', Args, Options>; +export type ImageFindManyArgs = $FindManyArgs<$Schema, 'Image'>; +export type ImageFindUniqueArgs = $FindUniqueArgs<$Schema, 'Image'>; +export type ImageFindFirstArgs = $FindFirstArgs<$Schema, 'Image'>; +export type ImageExistsArgs = $ExistsArgs<$Schema, 'Image'>; +export type ImageCreateArgs = $CreateArgs<$Schema, 'Image'>; +export type ImageCreateManyArgs = $CreateManyArgs<$Schema, 'Image'>; +export type ImageCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Image'>; +export type ImageUpdateArgs = $UpdateArgs<$Schema, 'Image'>; +export type ImageUpdateManyArgs = $UpdateManyArgs<$Schema, 'Image'>; +export type ImageUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Image'>; +export type ImageUpsertArgs = $UpsertArgs<$Schema, 'Image'>; +export type ImageDeleteArgs = $DeleteArgs<$Schema, 'Image'>; +export type ImageDeleteManyArgs = $DeleteManyArgs<$Schema, 'Image'>; +export type ImageCountArgs = $CountArgs<$Schema, 'Image'>; +export type ImageAggregateArgs = $AggregateArgs<$Schema, 'Image'>; +export type ImageGroupByArgs = $GroupByArgs<$Schema, 'Image'>; +export type ImageWhereInput = $WhereInput<$Schema, 'Image'>; +export type ImageSelect = $SelectInput<$Schema, 'Image'>; +export type ImageInclude = $IncludeInput<$Schema, 'Image'>; +export type ImageOmit = $OmitInput<$Schema, 'Image'>; +export type ImageGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Image', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Image', Args, Options>; +export type GalleryFindManyArgs = $FindManyArgs<$Schema, 'Gallery'>; +export type GalleryFindUniqueArgs = $FindUniqueArgs<$Schema, 'Gallery'>; +export type GalleryFindFirstArgs = $FindFirstArgs<$Schema, 'Gallery'>; +export type GalleryExistsArgs = $ExistsArgs<$Schema, 'Gallery'>; +export type GalleryCreateArgs = $CreateArgs<$Schema, 'Gallery'>; +export type GalleryCreateManyArgs = $CreateManyArgs<$Schema, 'Gallery'>; +export type GalleryCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Gallery'>; +export type GalleryUpdateArgs = $UpdateArgs<$Schema, 'Gallery'>; +export type GalleryUpdateManyArgs = $UpdateManyArgs<$Schema, 'Gallery'>; +export type GalleryUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Gallery'>; +export type GalleryUpsertArgs = $UpsertArgs<$Schema, 'Gallery'>; +export type GalleryDeleteArgs = $DeleteArgs<$Schema, 'Gallery'>; +export type GalleryDeleteManyArgs = $DeleteManyArgs<$Schema, 'Gallery'>; +export type GalleryCountArgs = $CountArgs<$Schema, 'Gallery'>; +export type GalleryAggregateArgs = $AggregateArgs<$Schema, 'Gallery'>; +export type GalleryGroupByArgs = $GroupByArgs<$Schema, 'Gallery'>; +export type GalleryWhereInput = $WhereInput<$Schema, 'Gallery'>; +export type GallerySelect = $SelectInput<$Schema, 'Gallery'>; +export type GalleryInclude = $IncludeInput<$Schema, 'Gallery'>; +export type GalleryOmit = $OmitInput<$Schema, 'Gallery'>; +export type GalleryGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Gallery', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Gallery', Args, Options>; diff --git a/tests/e2e/orm/schemas/delegate/models.ts b/tests/e2e/orm/schemas/delegate/models.ts index e1fe994bd..2242e305b 100644 --- a/tests/e2e/orm/schemas/delegate/models.ts +++ b/tests/e2e/orm/schemas/delegate/models.ts @@ -5,12 +5,12 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Comment = $ModelResult<$Schema, "Comment">; -export type Asset = $ModelResult<$Schema, "Asset">; -export type Video = $ModelResult<$Schema, "Video">; -export type RatedVideo = $ModelResult<$Schema, "RatedVideo">; -export type Image = $ModelResult<$Schema, "Image">; -export type Gallery = $ModelResult<$Schema, "Gallery">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Comment = $ModelResult<$Schema, 'Comment'>; +export type Asset = $ModelResult<$Schema, 'Asset'>; +export type Video = $ModelResult<$Schema, 'Video'>; +export type RatedVideo = $ModelResult<$Schema, 'RatedVideo'>; +export type Image = $ModelResult<$Schema, 'Image'>; +export type Gallery = $ModelResult<$Schema, 'Gallery'>; diff --git a/tests/e2e/orm/schemas/delegate/schema.ts b/tests/e2e/orm/schemas/delegate/schema.ts index 2b560462e..91ba3880f 100644 --- a/tests/e2e/orm/schemas/delegate/schema.ts +++ b/tests/e2e/orm/schemas/delegate/schema.ts @@ -5,488 +5,642 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, optional: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, level: { - name: "level", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'level', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, assets: { - name: "assets", - type: "Asset", + name: 'assets', + type: 'Asset', array: true, - relation: { opposite: "owner" } + relation: { opposite: 'owner' }, }, ratedVideos: { - name: "ratedVideos", - type: "RatedVideo", + name: 'ratedVideos', + type: 'RatedVideo', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("direct") }] }] as readonly AttributeApplication[], - relation: { opposite: "user", name: "direct" } - } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('direct') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'user', name: 'direct' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - email: { type: "String" } - } + id: { type: 'Int' }, + email: { type: 'String' }, + }, }, Comment: { - name: "Comment", + name: 'Comment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, content: { - name: "content", - type: "String" + name: 'content', + type: 'String', }, asset: { - name: "asset", - type: "Asset", + name: 'asset', + type: 'Asset', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("assetId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["assetId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('assetId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['assetId'], references: ['id'], onDelete: 'Cascade' }, }, assetId: { - name: "assetId", - type: "Int", + name: 'assetId', + type: 'Int', optional: true, - foreignKeyFor: [ - "asset" - ] as readonly string[] - } + foreignKeyFor: ['asset'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Asset: { - name: "Asset", + name: 'Asset', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, viewCount: { - name: "viewCount", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'viewCount', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, owner: { - name: "owner", - type: "User", + name: 'owner', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, }, ownerId: { - name: "ownerId", - type: "Int", + name: 'ownerId', + type: 'Int', optional: true, - foreignKeyFor: [ - "owner" - ] as readonly string[] + foreignKeyFor: ['owner'] as readonly string[], }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - relation: { opposite: "asset" } + relation: { opposite: 'asset' }, }, assetType: { - name: "assetType", - type: "AssetKind", - isDiscriminator: true - } + name: 'assetType', + type: 'AssetKind', + isDiscriminator: true, + }, }, attributes: [ - { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }] }, - { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("assetType") }] } + { + name: '@@index', + args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]) }], + }, + { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('assetType') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, isDelegate: true, - subModels: ["Video", "Image"] + subModels: ['Video', 'Image'], }, Video: { - name: "Video", - baseModel: "Asset", + name: 'Video', + baseModel: 'Asset', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Asset", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Asset', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - originModel: "Asset", - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + originModel: 'Asset', + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, viewCount: { - name: "viewCount", - type: "Int", - originModel: "Asset", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'viewCount', + type: 'Int', + originModel: 'Asset', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, owner: { - name: "owner", - type: "User", + name: 'owner', + type: 'User', optional: true, - originModel: "Asset", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + originModel: 'Asset', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, }, ownerId: { - name: "ownerId", - type: "Int", + name: 'ownerId', + type: 'Int', optional: true, - originModel: "Asset", - foreignKeyFor: [ - "owner" - ] as readonly string[] + originModel: 'Asset', + foreignKeyFor: ['owner'] as readonly string[], }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - originModel: "Asset", - relation: { opposite: "asset" } + originModel: 'Asset', + relation: { opposite: 'asset' }, }, assetType: { - name: "assetType", - type: "AssetKind", - originModel: "Asset", - isDiscriminator: true + name: 'assetType', + type: 'AssetKind', + originModel: 'Asset', + isDiscriminator: true, }, duration: { - name: "duration", - type: "Int" + name: 'duration', + type: 'Int', }, url: { - name: "url", - type: "String", + name: 'url', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, videoType: { - name: "videoType", - type: "VideoKind", - isDiscriminator: true - } + name: 'videoType', + type: 'VideoKind', + isDiscriminator: true, + }, }, attributes: [ - { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("videoType") }] }, - { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("ASSET_KIND_VIDEO") }] } + { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('videoType') }] }, + { + name: '@@delegateMap', + args: [{ name: 'value', value: ExpressionUtils.literal('ASSET_KIND_VIDEO') }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - url: { type: "String" } + id: { type: 'Int' }, + url: { type: 'String' }, }, isDelegate: true, - delegateMap: "ASSET_KIND_VIDEO", - subModels: ["RatedVideo"] + delegateMap: 'ASSET_KIND_VIDEO', + subModels: ['RatedVideo'], }, RatedVideo: { - name: "RatedVideo", - baseModel: "Video", + name: 'RatedVideo', + baseModel: 'Video', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Asset", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Asset', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - originModel: "Asset", - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + originModel: 'Asset', + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, viewCount: { - name: "viewCount", - type: "Int", - originModel: "Asset", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'viewCount', + type: 'Int', + originModel: 'Asset', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, owner: { - name: "owner", - type: "User", + name: 'owner', + type: 'User', optional: true, - originModel: "Asset", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + originModel: 'Asset', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, }, ownerId: { - name: "ownerId", - type: "Int", + name: 'ownerId', + type: 'Int', optional: true, - originModel: "Asset", - foreignKeyFor: [ - "owner" - ] as readonly string[] + originModel: 'Asset', + foreignKeyFor: ['owner'] as readonly string[], }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - originModel: "Asset", - relation: { opposite: "asset" } + originModel: 'Asset', + relation: { opposite: 'asset' }, }, assetType: { - name: "assetType", - type: "AssetKind", - originModel: "Asset", - isDiscriminator: true + name: 'assetType', + type: 'AssetKind', + originModel: 'Asset', + isDiscriminator: true, }, duration: { - name: "duration", - type: "Int", - originModel: "Video" + name: 'duration', + type: 'Int', + originModel: 'Video', }, url: { - name: "url", - type: "String", + name: 'url', + type: 'String', unique: true, - originModel: "Video", - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + originModel: 'Video', + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, videoType: { - name: "videoType", - type: "VideoKind", - originModel: "Video", - isDiscriminator: true + name: 'videoType', + type: 'VideoKind', + originModel: 'Video', + isDiscriminator: true, }, rating: { - name: "rating", - type: "Int" + name: 'rating', + type: 'Int', }, user: { - name: "user", - type: "User", + name: 'user', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("direct") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "ratedVideos", name: "direct", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('direct') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'ratedVideos', + name: 'direct', + fields: ['userId'], + references: ['id'], + onDelete: 'Cascade', + }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', optional: true, - foreignKeyFor: [ - "user" - ] as readonly string[] - } + foreignKeyFor: ['user'] as readonly string[], + }, }, attributes: [ - { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("ASSET_KIND_VIDEO") }] }, - { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("VIDEO_KIND_RATED") }] } + { + name: '@@delegateMap', + args: [{ name: 'value', value: ExpressionUtils.literal('ASSET_KIND_VIDEO') }], + }, + { + name: '@@delegateMap', + args: [{ name: 'value', value: ExpressionUtils.literal('VIDEO_KIND_RATED') }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - url: { type: "String" } + id: { type: 'Int' }, + url: { type: 'String' }, }, - delegateMap: "VIDEO_KIND_RATED" + delegateMap: 'VIDEO_KIND_RATED', }, Image: { - name: "Image", - baseModel: "Asset", + name: 'Image', + baseModel: 'Asset', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Asset", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Asset', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - originModel: "Asset", - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + originModel: 'Asset', + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, viewCount: { - name: "viewCount", - type: "Int", - originModel: "Asset", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'viewCount', + type: 'Int', + originModel: 'Asset', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, owner: { - name: "owner", - type: "User", + name: 'owner', + type: 'User', optional: true, - originModel: "Asset", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + originModel: 'Asset', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, }, ownerId: { - name: "ownerId", - type: "Int", + name: 'ownerId', + type: 'Int', optional: true, - originModel: "Asset", - foreignKeyFor: [ - "owner" - ] as readonly string[] + originModel: 'Asset', + foreignKeyFor: ['owner'] as readonly string[], }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - originModel: "Asset", - relation: { opposite: "asset" } + originModel: 'Asset', + relation: { opposite: 'asset' }, }, assetType: { - name: "assetType", - type: "AssetKind", - originModel: "Asset", - isDiscriminator: true + name: 'assetType', + type: 'AssetKind', + originModel: 'Asset', + isDiscriminator: true, }, format: { - name: "format", - type: "String" + name: 'format', + type: 'String', }, gallery: { - name: "gallery", - type: "Gallery", + name: 'gallery', + type: 'Gallery', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("galleryId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "images", fields: ["galleryId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('galleryId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'images', fields: ['galleryId'], references: ['id'], onDelete: 'Cascade' }, }, galleryId: { - name: "galleryId", - type: "Int", + name: 'galleryId', + type: 'Int', optional: true, - foreignKeyFor: [ - "gallery" - ] as readonly string[] - } + foreignKeyFor: ['gallery'] as readonly string[], + }, }, attributes: [ - { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("ASSET_KIND_IMAGE") }] } + { + name: '@@delegateMap', + args: [{ name: 'value', value: ExpressionUtils.literal('ASSET_KIND_IMAGE') }], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, - delegateMap: "ASSET_KIND_IMAGE" + delegateMap: 'ASSET_KIND_IMAGE', }, Gallery: { - name: "Gallery", + name: 'Gallery', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, images: { - name: "images", - type: "Image", + name: 'images', + type: 'Image', array: true, - relation: { opposite: "gallery" } - } + relation: { opposite: 'gallery' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; enums = { AssetKind: { - name: "AssetKind", + name: 'AssetKind', values: { - ASSET_KIND_VIDEO: "ASSET_KIND_VIDEO", - ASSET_KIND_IMAGE: "ASSET_KIND_IMAGE" - } + ASSET_KIND_VIDEO: 'ASSET_KIND_VIDEO', + ASSET_KIND_IMAGE: 'ASSET_KIND_IMAGE', + }, }, VideoKind: { - name: "VideoKind", + name: 'VideoKind', values: { - VIDEO_KIND_RATED: "VIDEO_KIND_RATED" - } - } + VIDEO_KIND_RATED: 'VIDEO_KIND_RATED', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/delegate/typecheck.ts b/tests/e2e/orm/schemas/delegate/typecheck.ts index 4e0ffce37..32d3df0ad 100644 --- a/tests/e2e/orm/schemas/delegate/typecheck.ts +++ b/tests/e2e/orm/schemas/delegate/typecheck.ts @@ -79,13 +79,19 @@ async function create() { // @ts-expect-error client.asset.createMany({ data: [{ assetType: 'ASSET_KIND_VIDEO' }] }); // @ts-expect-error - client.asset.upsert({ where: { id: 1 }, create: { assetType: 'ASSET_KIND_VIDEO' }, update: { assetType: 'ASSET_KIND_VIDEO' } }); + client.asset.upsert({ + where: { id: 1 }, + create: { assetType: 'ASSET_KIND_VIDEO' }, + update: { assetType: 'ASSET_KIND_VIDEO' }, + }); // nested creation is not allowed either // @ts-expect-error client.user.create({ data: { assets: { create: { assetType: 'ASSET_KIND_VIDEO' } } } }); // @ts-expect-error - client.user.create({ data: { assets: { connectOrCreate: { where: { id: 1 }, create: { assetType: 'ASSET_KIND_VIDEO' } } } } }); + client.user.create({ + data: { assets: { connectOrCreate: { where: { id: 1 }, create: { assetType: 'ASSET_KIND_VIDEO' } } } }, + }); // @ts-expect-error client.user.update({ where: { id: 1 }, data: { assets: { create: { assetType: 'ASSET_KIND_VIDEO' } } } }); client.user.update({ @@ -97,7 +103,13 @@ async function create() { where: { id: 1 }, data: { // @ts-expect-error - assets: { upsert: { where: { id: 1 }, create: { assetType: 'ASSET_KIND_VIDEO' }, update: { assetType: 'ASSET_KIND_VIDEO' } } }, + assets: { + upsert: { + where: { id: 1 }, + create: { assetType: 'ASSET_KIND_VIDEO' }, + update: { assetType: 'ASSET_KIND_VIDEO' }, + }, + }, }, }); diff --git a/tests/e2e/orm/schemas/full-text-search/schema.ts b/tests/e2e/orm/schemas/full-text-search/schema.ts index 1c23af701..4a4615aac 100644 --- a/tests/e2e/orm/schemas/full-text-search/schema.ts +++ b/tests/e2e/orm/schemas/full-text-search/schema.ts @@ -5,52 +5,55 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { Article: { - name: "Article", + name: 'Article', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, title: { - name: "title", - type: "String", + name: 'title', + type: 'String', fullText: true, - attributes: [{ name: "@fullText" }] as readonly AttributeApplication[] + attributes: [{ name: '@fullText' }] as readonly AttributeApplication[], }, body: { - name: "body", - type: "String", + name: 'body', + type: 'String', fullText: true, - attributes: [{ name: "@fullText" }] as readonly AttributeApplication[] + attributes: [{ name: '@fullText' }] as readonly AttributeApplication[], }, subtitle: { - name: "subtitle", - type: "String", + name: 'subtitle', + type: 'String', optional: true, fullText: true, - attributes: [{ name: "@fullText" }] as readonly AttributeApplication[] + attributes: [{ name: '@fullText' }] as readonly AttributeApplication[], }, notes: { - name: "notes", - type: "String", - optional: true - } + name: 'notes', + type: 'String', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/fuzzy-search/schema.ts b/tests/e2e/orm/schemas/fuzzy-search/schema.ts index b9b7bbe98..847fd4d09 100644 --- a/tests/e2e/orm/schemas/fuzzy-search/schema.ts +++ b/tests/e2e/orm/schemas/fuzzy-search/schema.ts @@ -5,46 +5,49 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { Flavor: { - name: "Flavor", + name: 'Flavor', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String", + name: 'name', + type: 'String', optional: true, fuzzy: true, - attributes: [{ name: "@fuzzy" }] as readonly AttributeApplication[] + attributes: [{ name: '@fuzzy' }] as readonly AttributeApplication[], }, description: { - name: "description", - type: "String", + name: 'description', + type: 'String', fuzzy: true, - attributes: [{ name: "@fuzzy" }] as readonly AttributeApplication[] + attributes: [{ name: '@fuzzy' }] as readonly AttributeApplication[], }, notes: { - name: "notes", - type: "String", - optional: true - } + name: 'notes', + type: 'String', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/json/input.ts b/tests/e2e/orm/schemas/json/input.ts index 74cd690b9..80738584a 100644 --- a/tests/e2e/orm/schemas/json/input.ts +++ b/tests/e2e/orm/schemas/json/input.ts @@ -5,27 +5,52 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type FooFindManyArgs = $FindManyArgs<$Schema, "Foo">; -export type FooFindUniqueArgs = $FindUniqueArgs<$Schema, "Foo">; -export type FooFindFirstArgs = $FindFirstArgs<$Schema, "Foo">; -export type FooExistsArgs = $ExistsArgs<$Schema, "Foo">; -export type FooCreateArgs = $CreateArgs<$Schema, "Foo">; -export type FooCreateManyArgs = $CreateManyArgs<$Schema, "Foo">; -export type FooCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Foo">; -export type FooUpdateArgs = $UpdateArgs<$Schema, "Foo">; -export type FooUpdateManyArgs = $UpdateManyArgs<$Schema, "Foo">; -export type FooUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Foo">; -export type FooUpsertArgs = $UpsertArgs<$Schema, "Foo">; -export type FooDeleteArgs = $DeleteArgs<$Schema, "Foo">; -export type FooDeleteManyArgs = $DeleteManyArgs<$Schema, "Foo">; -export type FooCountArgs = $CountArgs<$Schema, "Foo">; -export type FooAggregateArgs = $AggregateArgs<$Schema, "Foo">; -export type FooGroupByArgs = $GroupByArgs<$Schema, "Foo">; -export type FooWhereInput = $WhereInput<$Schema, "Foo">; -export type FooSelect = $SelectInput<$Schema, "Foo">; -export type FooInclude = $IncludeInput<$Schema, "Foo">; -export type FooOmit = $OmitInput<$Schema, "Foo">; -export type FooGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Foo", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type FooFindManyArgs = $FindManyArgs<$Schema, 'Foo'>; +export type FooFindUniqueArgs = $FindUniqueArgs<$Schema, 'Foo'>; +export type FooFindFirstArgs = $FindFirstArgs<$Schema, 'Foo'>; +export type FooExistsArgs = $ExistsArgs<$Schema, 'Foo'>; +export type FooCreateArgs = $CreateArgs<$Schema, 'Foo'>; +export type FooCreateManyArgs = $CreateManyArgs<$Schema, 'Foo'>; +export type FooCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Foo'>; +export type FooUpdateArgs = $UpdateArgs<$Schema, 'Foo'>; +export type FooUpdateManyArgs = $UpdateManyArgs<$Schema, 'Foo'>; +export type FooUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Foo'>; +export type FooUpsertArgs = $UpsertArgs<$Schema, 'Foo'>; +export type FooDeleteArgs = $DeleteArgs<$Schema, 'Foo'>; +export type FooDeleteManyArgs = $DeleteManyArgs<$Schema, 'Foo'>; +export type FooCountArgs = $CountArgs<$Schema, 'Foo'>; +export type FooAggregateArgs = $AggregateArgs<$Schema, 'Foo'>; +export type FooGroupByArgs = $GroupByArgs<$Schema, 'Foo'>; +export type FooWhereInput = $WhereInput<$Schema, 'Foo'>; +export type FooSelect = $SelectInput<$Schema, 'Foo'>; +export type FooInclude = $IncludeInput<$Schema, 'Foo'>; +export type FooOmit = $OmitInput<$Schema, 'Foo'>; +export type FooGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Foo', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Foo', Args, Options>; diff --git a/tests/e2e/orm/schemas/json/models.ts b/tests/e2e/orm/schemas/json/models.ts index bdbfabad1..233774846 100644 --- a/tests/e2e/orm/schemas/json/models.ts +++ b/tests/e2e/orm/schemas/json/models.ts @@ -5,6 +5,6 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type Foo = $ModelResult<$Schema, "Foo">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type Foo = $ModelResult<$Schema, 'Foo'>; diff --git a/tests/e2e/orm/schemas/json/schema.ts b/tests/e2e/orm/schemas/json/schema.ts index 85621a23f..4b7aba3a0 100644 --- a/tests/e2e/orm/schemas/json/schema.ts +++ b/tests/e2e/orm/schemas/json/schema.ts @@ -5,37 +5,40 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { Foo: { - name: "Foo", + name: 'Foo', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, data: { - name: "data", - type: "Json" + name: 'data', + type: 'Json', }, data1: { - name: "data1", - type: "Json", - optional: true - } + name: 'data1', + type: 'Json', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/name-mapping/input.ts b/tests/e2e/orm/schemas/name-mapping/input.ts index c6b620ee6..54da1b3bc 100644 --- a/tests/e2e/orm/schemas/name-mapping/input.ts +++ b/tests/e2e/orm/schemas/name-mapping/input.ts @@ -5,48 +5,76 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; -export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; -export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; -export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; -export type PostCreateArgs = $CreateArgs<$Schema, "Post">; -export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; -export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; -export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; -export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; -export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; -export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; -export type PostCountArgs = $CountArgs<$Schema, "Post">; -export type PostAggregateArgs = $AggregateArgs<$Schema, "Post">; -export type PostGroupByArgs = $GroupByArgs<$Schema, "Post">; -export type PostWhereInput = $WhereInput<$Schema, "Post">; -export type PostSelect = $SelectInput<$Schema, "Post">; -export type PostInclude = $IncludeInput<$Schema, "Post">; -export type PostOmit = $OmitInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PostFindManyArgs = $FindManyArgs<$Schema, 'Post'>; +export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Post'>; +export type PostFindFirstArgs = $FindFirstArgs<$Schema, 'Post'>; +export type PostExistsArgs = $ExistsArgs<$Schema, 'Post'>; +export type PostCreateArgs = $CreateArgs<$Schema, 'Post'>; +export type PostCreateManyArgs = $CreateManyArgs<$Schema, 'Post'>; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpdateArgs = $UpdateArgs<$Schema, 'Post'>; +export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Post'>; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpsertArgs = $UpsertArgs<$Schema, 'Post'>; +export type PostDeleteArgs = $DeleteArgs<$Schema, 'Post'>; +export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Post'>; +export type PostCountArgs = $CountArgs<$Schema, 'Post'>; +export type PostAggregateArgs = $AggregateArgs<$Schema, 'Post'>; +export type PostGroupByArgs = $GroupByArgs<$Schema, 'Post'>; +export type PostWhereInput = $WhereInput<$Schema, 'Post'>; +export type PostSelect = $SelectInput<$Schema, 'Post'>; +export type PostInclude = $IncludeInput<$Schema, 'Post'>; +export type PostOmit = $OmitInput<$Schema, 'Post'>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Post', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Post', Args, Options>; diff --git a/tests/e2e/orm/schemas/name-mapping/models.ts b/tests/e2e/orm/schemas/name-mapping/models.ts index 9c5a74865..36874eba2 100644 --- a/tests/e2e/orm/schemas/name-mapping/models.ts +++ b/tests/e2e/orm/schemas/name-mapping/models.ts @@ -5,9 +5,9 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Post = $ModelResult<$Schema, "Post">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Post = $ModelResult<$Schema, 'Post'>; export const Role = $schema.enums.Role.values; export type Role = (typeof Role)[keyof typeof Role]; diff --git a/tests/e2e/orm/schemas/name-mapping/schema.ts b/tests/e2e/orm/schemas/name-mapping/schema.ts index b7b1b7e5b..c4974d8a5 100644 --- a/tests/e2e/orm/schemas/name-mapping/schema.ts +++ b/tests/e2e/orm/schemas/name-mapping/schema.ts @@ -5,120 +5,150 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_email") }] }, { name: "@unique" }] as readonly AttributeApplication[] + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_email') }] }, + { name: '@unique' }, + ] as readonly AttributeApplication[], }, role: { - name: "role", - type: "Role", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_role") }] }] as readonly AttributeApplication[], - default: "USER" as FieldDefault + name: 'role', + type: 'Role', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_role') }] }, + ] as readonly AttributeApplication[], + default: 'USER' as FieldDefault, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("users") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('users') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - email: { type: "String" } - } + id: { type: 'Int' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("post_id") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('post_id') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, title: { - name: "title", - type: "String", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("post_title") }] }] as readonly AttributeApplication[] + name: 'title', + type: 'String', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('post_title') }] }, + ] as readonly AttributeApplication[], }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"] } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'posts', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "Int", - attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("author_id") }] }] as readonly AttributeApplication[], - foreignKeyFor: [ - "author" - ] as readonly string[] - } + name: 'authorId', + type: 'Int', + attributes: [ + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('author_id') }] }, + ] as readonly AttributeApplication[], + foreignKeyFor: ['author'] as readonly string[], + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("posts") }] } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('posts') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; enums = { Role: { - name: "Role", + name: 'Role', values: { - USER: "USER", - ADMIN: "ADMIN", - MODERATOR: "MODERATOR" + USER: 'USER', + ADMIN: 'ADMIN', + MODERATOR: 'MODERATOR', }, fields: { USER: { - name: "USER", + name: 'USER', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("role_user") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('role_user') }] }, + ] as readonly AttributeApplication[], }, ADMIN: { - name: "ADMIN", + name: 'ADMIN', attributes: [ - { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("role_admin") }] } - ] as readonly AttributeApplication[] + { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('role_admin') }] }, + ] as readonly AttributeApplication[], }, MODERATOR: { - name: "MODERATOR" - } + name: 'MODERATOR', + }, }, attributes: [ - { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("user_role") }] } - ] as readonly AttributeApplication[] - } + { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_role') }] }, + ] as readonly AttributeApplication[], + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/omit/input.ts b/tests/e2e/orm/schemas/omit/input.ts index 47ada0edd..d6bbe16c1 100644 --- a/tests/e2e/orm/schemas/omit/input.ts +++ b/tests/e2e/orm/schemas/omit/input.ts @@ -5,90 +5,124 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; -export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; -export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; -export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; -export type PostCreateArgs = $CreateArgs<$Schema, "Post">; -export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; -export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; -export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; -export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; -export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; -export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; -export type PostCountArgs = $CountArgs<$Schema, "Post">; -export type PostAggregateArgs = $AggregateArgs<$Schema, "Post">; -export type PostGroupByArgs = $GroupByArgs<$Schema, "Post">; -export type PostWhereInput = $WhereInput<$Schema, "Post">; -export type PostSelect = $SelectInput<$Schema, "Post">; -export type PostInclude = $IncludeInput<$Schema, "Post">; -export type PostOmit = $OmitInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; -export type BaseFindManyArgs = $FindManyArgs<$Schema, "Base">; -export type BaseFindUniqueArgs = $FindUniqueArgs<$Schema, "Base">; -export type BaseFindFirstArgs = $FindFirstArgs<$Schema, "Base">; -export type BaseExistsArgs = $ExistsArgs<$Schema, "Base">; -export type BaseCreateArgs = $CreateArgs<$Schema, "Base">; -export type BaseCreateManyArgs = $CreateManyArgs<$Schema, "Base">; -export type BaseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Base">; -export type BaseUpdateArgs = $UpdateArgs<$Schema, "Base">; -export type BaseUpdateManyArgs = $UpdateManyArgs<$Schema, "Base">; -export type BaseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Base">; -export type BaseUpsertArgs = $UpsertArgs<$Schema, "Base">; -export type BaseDeleteArgs = $DeleteArgs<$Schema, "Base">; -export type BaseDeleteManyArgs = $DeleteManyArgs<$Schema, "Base">; -export type BaseCountArgs = $CountArgs<$Schema, "Base">; -export type BaseAggregateArgs = $AggregateArgs<$Schema, "Base">; -export type BaseGroupByArgs = $GroupByArgs<$Schema, "Base">; -export type BaseWhereInput = $WhereInput<$Schema, "Base">; -export type BaseSelect = $SelectInput<$Schema, "Base">; -export type BaseInclude = $IncludeInput<$Schema, "Base">; -export type BaseOmit = $OmitInput<$Schema, "Base">; -export type BaseGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Base", Args, Options>; -export type SubFindManyArgs = $FindManyArgs<$Schema, "Sub">; -export type SubFindUniqueArgs = $FindUniqueArgs<$Schema, "Sub">; -export type SubFindFirstArgs = $FindFirstArgs<$Schema, "Sub">; -export type SubExistsArgs = $ExistsArgs<$Schema, "Sub">; -export type SubCreateArgs = $CreateArgs<$Schema, "Sub">; -export type SubCreateManyArgs = $CreateManyArgs<$Schema, "Sub">; -export type SubCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Sub">; -export type SubUpdateArgs = $UpdateArgs<$Schema, "Sub">; -export type SubUpdateManyArgs = $UpdateManyArgs<$Schema, "Sub">; -export type SubUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Sub">; -export type SubUpsertArgs = $UpsertArgs<$Schema, "Sub">; -export type SubDeleteArgs = $DeleteArgs<$Schema, "Sub">; -export type SubDeleteManyArgs = $DeleteManyArgs<$Schema, "Sub">; -export type SubCountArgs = $CountArgs<$Schema, "Sub">; -export type SubAggregateArgs = $AggregateArgs<$Schema, "Sub">; -export type SubGroupByArgs = $GroupByArgs<$Schema, "Sub">; -export type SubWhereInput = $WhereInput<$Schema, "Sub">; -export type SubSelect = $SelectInput<$Schema, "Sub">; -export type SubInclude = $IncludeInput<$Schema, "Sub">; -export type SubOmit = $OmitInput<$Schema, "Sub">; -export type SubGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Sub", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PostFindManyArgs = $FindManyArgs<$Schema, 'Post'>; +export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Post'>; +export type PostFindFirstArgs = $FindFirstArgs<$Schema, 'Post'>; +export type PostExistsArgs = $ExistsArgs<$Schema, 'Post'>; +export type PostCreateArgs = $CreateArgs<$Schema, 'Post'>; +export type PostCreateManyArgs = $CreateManyArgs<$Schema, 'Post'>; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpdateArgs = $UpdateArgs<$Schema, 'Post'>; +export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Post'>; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpsertArgs = $UpsertArgs<$Schema, 'Post'>; +export type PostDeleteArgs = $DeleteArgs<$Schema, 'Post'>; +export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Post'>; +export type PostCountArgs = $CountArgs<$Schema, 'Post'>; +export type PostAggregateArgs = $AggregateArgs<$Schema, 'Post'>; +export type PostGroupByArgs = $GroupByArgs<$Schema, 'Post'>; +export type PostWhereInput = $WhereInput<$Schema, 'Post'>; +export type PostSelect = $SelectInput<$Schema, 'Post'>; +export type PostInclude = $IncludeInput<$Schema, 'Post'>; +export type PostOmit = $OmitInput<$Schema, 'Post'>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Post', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Post', Args, Options>; +export type BaseFindManyArgs = $FindManyArgs<$Schema, 'Base'>; +export type BaseFindUniqueArgs = $FindUniqueArgs<$Schema, 'Base'>; +export type BaseFindFirstArgs = $FindFirstArgs<$Schema, 'Base'>; +export type BaseExistsArgs = $ExistsArgs<$Schema, 'Base'>; +export type BaseCreateArgs = $CreateArgs<$Schema, 'Base'>; +export type BaseCreateManyArgs = $CreateManyArgs<$Schema, 'Base'>; +export type BaseCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Base'>; +export type BaseUpdateArgs = $UpdateArgs<$Schema, 'Base'>; +export type BaseUpdateManyArgs = $UpdateManyArgs<$Schema, 'Base'>; +export type BaseUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Base'>; +export type BaseUpsertArgs = $UpsertArgs<$Schema, 'Base'>; +export type BaseDeleteArgs = $DeleteArgs<$Schema, 'Base'>; +export type BaseDeleteManyArgs = $DeleteManyArgs<$Schema, 'Base'>; +export type BaseCountArgs = $CountArgs<$Schema, 'Base'>; +export type BaseAggregateArgs = $AggregateArgs<$Schema, 'Base'>; +export type BaseGroupByArgs = $GroupByArgs<$Schema, 'Base'>; +export type BaseWhereInput = $WhereInput<$Schema, 'Base'>; +export type BaseSelect = $SelectInput<$Schema, 'Base'>; +export type BaseInclude = $IncludeInput<$Schema, 'Base'>; +export type BaseOmit = $OmitInput<$Schema, 'Base'>; +export type BaseGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Base', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Base', Args, Options>; +export type SubFindManyArgs = $FindManyArgs<$Schema, 'Sub'>; +export type SubFindUniqueArgs = $FindUniqueArgs<$Schema, 'Sub'>; +export type SubFindFirstArgs = $FindFirstArgs<$Schema, 'Sub'>; +export type SubExistsArgs = $ExistsArgs<$Schema, 'Sub'>; +export type SubCreateArgs = $CreateArgs<$Schema, 'Sub'>; +export type SubCreateManyArgs = $CreateManyArgs<$Schema, 'Sub'>; +export type SubCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Sub'>; +export type SubUpdateArgs = $UpdateArgs<$Schema, 'Sub'>; +export type SubUpdateManyArgs = $UpdateManyArgs<$Schema, 'Sub'>; +export type SubUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Sub'>; +export type SubUpsertArgs = $UpsertArgs<$Schema, 'Sub'>; +export type SubDeleteArgs = $DeleteArgs<$Schema, 'Sub'>; +export type SubDeleteManyArgs = $DeleteManyArgs<$Schema, 'Sub'>; +export type SubCountArgs = $CountArgs<$Schema, 'Sub'>; +export type SubAggregateArgs = $AggregateArgs<$Schema, 'Sub'>; +export type SubGroupByArgs = $GroupByArgs<$Schema, 'Sub'>; +export type SubWhereInput = $WhereInput<$Schema, 'Sub'>; +export type SubSelect = $SelectInput<$Schema, 'Sub'>; +export type SubInclude = $IncludeInput<$Schema, 'Sub'>; +export type SubOmit = $OmitInput<$Schema, 'Sub'>; +export type SubGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Sub', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Sub', Args, Options>; diff --git a/tests/e2e/orm/schemas/omit/models.ts b/tests/e2e/orm/schemas/omit/models.ts index 5044cb91a..7e78949ce 100644 --- a/tests/e2e/orm/schemas/omit/models.ts +++ b/tests/e2e/orm/schemas/omit/models.ts @@ -5,9 +5,9 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Post = $ModelResult<$Schema, "Post">; -export type Base = $ModelResult<$Schema, "Base">; -export type Sub = $ModelResult<$Schema, "Sub">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Post = $ModelResult<$Schema, 'Post'>; +export type Base = $ModelResult<$Schema, 'Base'>; +export type Sub = $ModelResult<$Schema, 'Sub'>; diff --git a/tests/e2e/orm/schemas/omit/schema.ts b/tests/e2e/orm/schemas/omit/schema.ts index 02da796fe..9a7c86a92 100644 --- a/tests/e2e/orm/schemas/omit/schema.ts +++ b/tests/e2e/orm/schemas/omit/schema.ts @@ -5,134 +5,147 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, password: { - name: "password", - type: "String", + name: 'password', + type: 'String', omit: true, - attributes: [{ name: "@omit" }] as readonly AttributeApplication[] + attributes: [{ name: '@omit' }] as readonly AttributeApplication[], }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onDelete: "Cascade" } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'posts', fields: ['authorId'], references: ['id'], onDelete: 'Cascade' }, }, authorId: { - name: "authorId", - type: "Int", - foreignKeyFor: [ - "author" - ] as readonly string[] - } + name: 'authorId', + type: 'Int', + foreignKeyFor: ['author'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Base: { - name: "Base", + name: 'Base', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, type: { - name: "type", - type: "String", - isDiscriminator: true - } + name: 'type', + type: 'String', + isDiscriminator: true, + }, }, attributes: [ - { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("type") }] } + { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('type') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, isDelegate: true, - subModels: ["Sub"] + subModels: ['Sub'], }, Sub: { - name: "Sub", - baseModel: "Base", + name: 'Sub', + baseModel: 'Base', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }] as readonly AttributeApplication[] + attributes: [{ name: '@id' }] as readonly AttributeApplication[], }, type: { - name: "type", - type: "String", - originModel: "Base", - isDiscriminator: true + name: 'type', + type: 'String', + originModel: 'Base', + isDiscriminator: true, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, content: { - name: "content", - type: "String", + name: 'content', + type: 'String', omit: true, - attributes: [{ name: "@omit" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@omit' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/petstore/input.ts b/tests/e2e/orm/schemas/petstore/input.ts index 37afa4933..a0d099cd9 100644 --- a/tests/e2e/orm/schemas/petstore/input.ts +++ b/tests/e2e/orm/schemas/petstore/input.ts @@ -5,69 +5,100 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PetFindManyArgs = $FindManyArgs<$Schema, "Pet">; -export type PetFindUniqueArgs = $FindUniqueArgs<$Schema, "Pet">; -export type PetFindFirstArgs = $FindFirstArgs<$Schema, "Pet">; -export type PetExistsArgs = $ExistsArgs<$Schema, "Pet">; -export type PetCreateArgs = $CreateArgs<$Schema, "Pet">; -export type PetCreateManyArgs = $CreateManyArgs<$Schema, "Pet">; -export type PetCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Pet">; -export type PetUpdateArgs = $UpdateArgs<$Schema, "Pet">; -export type PetUpdateManyArgs = $UpdateManyArgs<$Schema, "Pet">; -export type PetUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Pet">; -export type PetUpsertArgs = $UpsertArgs<$Schema, "Pet">; -export type PetDeleteArgs = $DeleteArgs<$Schema, "Pet">; -export type PetDeleteManyArgs = $DeleteManyArgs<$Schema, "Pet">; -export type PetCountArgs = $CountArgs<$Schema, "Pet">; -export type PetAggregateArgs = $AggregateArgs<$Schema, "Pet">; -export type PetGroupByArgs = $GroupByArgs<$Schema, "Pet">; -export type PetWhereInput = $WhereInput<$Schema, "Pet">; -export type PetSelect = $SelectInput<$Schema, "Pet">; -export type PetInclude = $IncludeInput<$Schema, "Pet">; -export type PetOmit = $OmitInput<$Schema, "Pet">; -export type PetGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Pet", Args, Options>; -export type OrderFindManyArgs = $FindManyArgs<$Schema, "Order">; -export type OrderFindUniqueArgs = $FindUniqueArgs<$Schema, "Order">; -export type OrderFindFirstArgs = $FindFirstArgs<$Schema, "Order">; -export type OrderExistsArgs = $ExistsArgs<$Schema, "Order">; -export type OrderCreateArgs = $CreateArgs<$Schema, "Order">; -export type OrderCreateManyArgs = $CreateManyArgs<$Schema, "Order">; -export type OrderCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Order">; -export type OrderUpdateArgs = $UpdateArgs<$Schema, "Order">; -export type OrderUpdateManyArgs = $UpdateManyArgs<$Schema, "Order">; -export type OrderUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Order">; -export type OrderUpsertArgs = $UpsertArgs<$Schema, "Order">; -export type OrderDeleteArgs = $DeleteArgs<$Schema, "Order">; -export type OrderDeleteManyArgs = $DeleteManyArgs<$Schema, "Order">; -export type OrderCountArgs = $CountArgs<$Schema, "Order">; -export type OrderAggregateArgs = $AggregateArgs<$Schema, "Order">; -export type OrderGroupByArgs = $GroupByArgs<$Schema, "Order">; -export type OrderWhereInput = $WhereInput<$Schema, "Order">; -export type OrderSelect = $SelectInput<$Schema, "Order">; -export type OrderInclude = $IncludeInput<$Schema, "Order">; -export type OrderOmit = $OmitInput<$Schema, "Order">; -export type OrderGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Order", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PetFindManyArgs = $FindManyArgs<$Schema, 'Pet'>; +export type PetFindUniqueArgs = $FindUniqueArgs<$Schema, 'Pet'>; +export type PetFindFirstArgs = $FindFirstArgs<$Schema, 'Pet'>; +export type PetExistsArgs = $ExistsArgs<$Schema, 'Pet'>; +export type PetCreateArgs = $CreateArgs<$Schema, 'Pet'>; +export type PetCreateManyArgs = $CreateManyArgs<$Schema, 'Pet'>; +export type PetCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Pet'>; +export type PetUpdateArgs = $UpdateArgs<$Schema, 'Pet'>; +export type PetUpdateManyArgs = $UpdateManyArgs<$Schema, 'Pet'>; +export type PetUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Pet'>; +export type PetUpsertArgs = $UpsertArgs<$Schema, 'Pet'>; +export type PetDeleteArgs = $DeleteArgs<$Schema, 'Pet'>; +export type PetDeleteManyArgs = $DeleteManyArgs<$Schema, 'Pet'>; +export type PetCountArgs = $CountArgs<$Schema, 'Pet'>; +export type PetAggregateArgs = $AggregateArgs<$Schema, 'Pet'>; +export type PetGroupByArgs = $GroupByArgs<$Schema, 'Pet'>; +export type PetWhereInput = $WhereInput<$Schema, 'Pet'>; +export type PetSelect = $SelectInput<$Schema, 'Pet'>; +export type PetInclude = $IncludeInput<$Schema, 'Pet'>; +export type PetOmit = $OmitInput<$Schema, 'Pet'>; +export type PetGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Pet', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Pet', Args, Options>; +export type OrderFindManyArgs = $FindManyArgs<$Schema, 'Order'>; +export type OrderFindUniqueArgs = $FindUniqueArgs<$Schema, 'Order'>; +export type OrderFindFirstArgs = $FindFirstArgs<$Schema, 'Order'>; +export type OrderExistsArgs = $ExistsArgs<$Schema, 'Order'>; +export type OrderCreateArgs = $CreateArgs<$Schema, 'Order'>; +export type OrderCreateManyArgs = $CreateManyArgs<$Schema, 'Order'>; +export type OrderCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Order'>; +export type OrderUpdateArgs = $UpdateArgs<$Schema, 'Order'>; +export type OrderUpdateManyArgs = $UpdateManyArgs<$Schema, 'Order'>; +export type OrderUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Order'>; +export type OrderUpsertArgs = $UpsertArgs<$Schema, 'Order'>; +export type OrderDeleteArgs = $DeleteArgs<$Schema, 'Order'>; +export type OrderDeleteManyArgs = $DeleteManyArgs<$Schema, 'Order'>; +export type OrderCountArgs = $CountArgs<$Schema, 'Order'>; +export type OrderAggregateArgs = $AggregateArgs<$Schema, 'Order'>; +export type OrderGroupByArgs = $GroupByArgs<$Schema, 'Order'>; +export type OrderWhereInput = $WhereInput<$Schema, 'Order'>; +export type OrderSelect = $SelectInput<$Schema, 'Order'>; +export type OrderInclude = $IncludeInput<$Schema, 'Order'>; +export type OrderOmit = $OmitInput<$Schema, 'Order'>; +export type OrderGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Order', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Order', Args, Options>; diff --git a/tests/e2e/orm/schemas/petstore/models.ts b/tests/e2e/orm/schemas/petstore/models.ts index b55674cb0..c1aef6132 100644 --- a/tests/e2e/orm/schemas/petstore/models.ts +++ b/tests/e2e/orm/schemas/petstore/models.ts @@ -5,8 +5,8 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Pet = $ModelResult<$Schema, "Pet">; -export type Order = $ModelResult<$Schema, "Order">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Pet = $ModelResult<$Schema, 'Pet'>; +export type Order = $ModelResult<$Schema, 'Order'>; diff --git a/tests/e2e/orm/schemas/petstore/schema.ts b/tests/e2e/orm/schemas/petstore/schema.ts index 113596a6b..c864882f9 100644 --- a/tests/e2e/orm/schemas/petstore/schema.ts +++ b/tests/e2e/orm/schemas/petstore/schema.ts @@ -5,153 +5,270 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, orders: { - name: "orders", - type: "Order", + name: 'orders', + type: 'Order', array: true, - relation: { opposite: "user" } - } + relation: { opposite: 'user' }, + }, }, attributes: [ - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.literal(true) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.literal(true) }] } + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('create') }, + { name: 'condition', value: ExpressionUtils.literal(true) }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { name: 'condition', value: ExpressionUtils.literal(true) }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Pet: { - name: "Pet", + name: 'Pet', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, category: { - name: "category", - type: "String" + name: 'category', + type: 'String', }, order: { - name: "order", - type: "Order", + name: 'order', + type: 'Order', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("orderId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "pets", fields: ["orderId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('orderId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'pets', fields: ['orderId'], references: ['id'] }, }, orderId: { - name: "orderId", - type: "String", + name: 'orderId', + type: 'String', optional: true, - foreignKeyFor: [ - "order" - ] as readonly string[] - } + foreignKeyFor: ['order'] as readonly string[], + }, }, attributes: [ - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("orderId"), "==", ExpressionUtils._null()), "||", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("order"), ["user"]), "==", ExpressionUtils.call("auth"))) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "!=", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("post-update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["name"]), "==", ExpressionUtils.field("name")), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["category"]), "==", ExpressionUtils.field("category"))), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["orderId"]), "==", ExpressionUtils._null())) }] } + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.binary(ExpressionUtils.field('orderId'), '==', ExpressionUtils._null()), + '||', + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('order'), ['user']), + '==', + ExpressionUtils.call('auth'), + ), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('update') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '!=', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('post-update') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('before'), ['name']), + '==', + ExpressionUtils.field('name'), + ), + '&&', + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('before'), ['category']), + '==', + ExpressionUtils.field('category'), + ), + ), + '&&', + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('before'), ['orderId']), + '==', + ExpressionUtils._null(), + ), + ), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Order: { - name: "Order", + name: 'Order', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, pets: { - name: "pets", - type: "Pet", + name: 'pets', + type: 'Pet', array: true, - relation: { opposite: "order" } + relation: { opposite: 'order' }, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "orders", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'orders', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "String", - foreignKeyFor: [ - "user" - ] as readonly string[] - } + name: 'userId', + type: 'String', + foreignKeyFor: ['user'] as readonly string[], + }, }, attributes: [ - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read,create") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils.field("user")) }] } + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read,create') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.call('auth'), + '==', + ExpressionUtils.field('user'), + ), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/procedures/input.ts b/tests/e2e/orm/schemas/procedures/input.ts index 22bdbfa73..e03fdce73 100644 --- a/tests/e2e/orm/schemas/procedures/input.ts +++ b/tests/e2e/orm/schemas/procedures/input.ts @@ -5,27 +5,52 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; diff --git a/tests/e2e/orm/schemas/procedures/models.ts b/tests/e2e/orm/schemas/procedures/models.ts index f5d8f42dc..c39f65abb 100644 --- a/tests/e2e/orm/schemas/procedures/models.ts +++ b/tests/e2e/orm/schemas/procedures/models.ts @@ -5,9 +5,9 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Overview = $TypeDefResult<$Schema, "Overview">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Overview = $TypeDefResult<$Schema, 'Overview'>; export const Role = $schema.enums.Role.values; export type Role = (typeof Role)[keyof typeof Role]; diff --git a/tests/e2e/orm/schemas/procedures/schema.ts b/tests/e2e/orm/schemas/procedures/schema.ts index b8261afe2..a4b5f360f 100644 --- a/tests/e2e/orm/schemas/procedures/schema.ts +++ b/tests/e2e/orm/schemas/procedures/schema.ts @@ -5,117 +5,122 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String", + name: 'name', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, role: { - name: "role", - type: "Role", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], - default: "USER" as FieldDefault - } + name: 'role', + type: 'Role', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, + ] as readonly AttributeApplication[], + default: 'USER' as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - name: { type: "String" } - } - } + id: { type: 'Int' }, + name: { type: 'String' }, + }, + }, } as const; typeDefs = { Overview: { - name: "Overview", + name: 'Overview', fields: { userIds: { - name: "userIds", - type: "Int", - array: true + name: 'userIds', + type: 'Int', + array: true, }, total: { - name: "total", - type: "Int" + name: 'total', + type: 'Int', }, roles: { - name: "roles", - type: "Role", - array: true + name: 'roles', + type: 'Role', + array: true, }, meta: { - name: "meta", - type: "Json", - optional: true - } - } - } + name: 'meta', + type: 'Json', + optional: true, + }, + }, + }, } as const; enums = { Role: { - name: "Role", + name: 'Role', values: { - ADMIN: "ADMIN", - USER: "USER" - } - } + ADMIN: 'ADMIN', + USER: 'USER', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; procedures = { getUser: { params: { - id: { name: "id", type: "Int" } + id: { name: 'id', type: 'Int' }, }, - returnType: "User" + returnType: 'User', }, listUsers: { params: {}, - returnType: "User", - returnArray: true + returnType: 'User', + returnArray: true, }, signUp: { params: { - name: { name: "name", type: "String" }, - role: { name: "role", optional: true, type: "Role" } + name: { name: 'name', type: 'String' }, + role: { name: 'role', optional: true, type: 'Role' }, }, - returnType: "User", - mutation: true + returnType: 'User', + mutation: true, }, setAdmin: { params: { - userId: { name: "userId", type: "Int" } + userId: { name: 'userId', type: 'Int' }, }, - returnType: "Void", - mutation: true + returnType: 'Void', + mutation: true, }, getOverview: { params: {}, - returnType: "Overview" + returnType: 'Overview', }, createMultiple: { params: { - names: { name: "names", array: true, type: "String" } + names: { name: 'names', array: true, type: 'String' }, }, - returnType: "User", + returnType: 'User', returnArray: true, - mutation: true - } + mutation: true, + }, } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/todo/input.ts b/tests/e2e/orm/schemas/todo/input.ts index 73614082d..e6c7fd4ee 100644 --- a/tests/e2e/orm/schemas/todo/input.ts +++ b/tests/e2e/orm/schemas/todo/input.ts @@ -5,111 +5,148 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type SpaceFindManyArgs = $FindManyArgs<$Schema, "Space">; -export type SpaceFindUniqueArgs = $FindUniqueArgs<$Schema, "Space">; -export type SpaceFindFirstArgs = $FindFirstArgs<$Schema, "Space">; -export type SpaceExistsArgs = $ExistsArgs<$Schema, "Space">; -export type SpaceCreateArgs = $CreateArgs<$Schema, "Space">; -export type SpaceCreateManyArgs = $CreateManyArgs<$Schema, "Space">; -export type SpaceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Space">; -export type SpaceUpdateArgs = $UpdateArgs<$Schema, "Space">; -export type SpaceUpdateManyArgs = $UpdateManyArgs<$Schema, "Space">; -export type SpaceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Space">; -export type SpaceUpsertArgs = $UpsertArgs<$Schema, "Space">; -export type SpaceDeleteArgs = $DeleteArgs<$Schema, "Space">; -export type SpaceDeleteManyArgs = $DeleteManyArgs<$Schema, "Space">; -export type SpaceCountArgs = $CountArgs<$Schema, "Space">; -export type SpaceAggregateArgs = $AggregateArgs<$Schema, "Space">; -export type SpaceGroupByArgs = $GroupByArgs<$Schema, "Space">; -export type SpaceWhereInput = $WhereInput<$Schema, "Space">; -export type SpaceSelect = $SelectInput<$Schema, "Space">; -export type SpaceInclude = $IncludeInput<$Schema, "Space">; -export type SpaceOmit = $OmitInput<$Schema, "Space">; -export type SpaceGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Space", Args, Options>; -export type SpaceUserFindManyArgs = $FindManyArgs<$Schema, "SpaceUser">; -export type SpaceUserFindUniqueArgs = $FindUniqueArgs<$Schema, "SpaceUser">; -export type SpaceUserFindFirstArgs = $FindFirstArgs<$Schema, "SpaceUser">; -export type SpaceUserExistsArgs = $ExistsArgs<$Schema, "SpaceUser">; -export type SpaceUserCreateArgs = $CreateArgs<$Schema, "SpaceUser">; -export type SpaceUserCreateManyArgs = $CreateManyArgs<$Schema, "SpaceUser">; -export type SpaceUserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "SpaceUser">; -export type SpaceUserUpdateArgs = $UpdateArgs<$Schema, "SpaceUser">; -export type SpaceUserUpdateManyArgs = $UpdateManyArgs<$Schema, "SpaceUser">; -export type SpaceUserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "SpaceUser">; -export type SpaceUserUpsertArgs = $UpsertArgs<$Schema, "SpaceUser">; -export type SpaceUserDeleteArgs = $DeleteArgs<$Schema, "SpaceUser">; -export type SpaceUserDeleteManyArgs = $DeleteManyArgs<$Schema, "SpaceUser">; -export type SpaceUserCountArgs = $CountArgs<$Schema, "SpaceUser">; -export type SpaceUserAggregateArgs = $AggregateArgs<$Schema, "SpaceUser">; -export type SpaceUserGroupByArgs = $GroupByArgs<$Schema, "SpaceUser">; -export type SpaceUserWhereInput = $WhereInput<$Schema, "SpaceUser">; -export type SpaceUserSelect = $SelectInput<$Schema, "SpaceUser">; -export type SpaceUserInclude = $IncludeInput<$Schema, "SpaceUser">; -export type SpaceUserOmit = $OmitInput<$Schema, "SpaceUser">; -export type SpaceUserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "SpaceUser", Args, Options>; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type ListFindManyArgs = $FindManyArgs<$Schema, "List">; -export type ListFindUniqueArgs = $FindUniqueArgs<$Schema, "List">; -export type ListFindFirstArgs = $FindFirstArgs<$Schema, "List">; -export type ListExistsArgs = $ExistsArgs<$Schema, "List">; -export type ListCreateArgs = $CreateArgs<$Schema, "List">; -export type ListCreateManyArgs = $CreateManyArgs<$Schema, "List">; -export type ListCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "List">; -export type ListUpdateArgs = $UpdateArgs<$Schema, "List">; -export type ListUpdateManyArgs = $UpdateManyArgs<$Schema, "List">; -export type ListUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "List">; -export type ListUpsertArgs = $UpsertArgs<$Schema, "List">; -export type ListDeleteArgs = $DeleteArgs<$Schema, "List">; -export type ListDeleteManyArgs = $DeleteManyArgs<$Schema, "List">; -export type ListCountArgs = $CountArgs<$Schema, "List">; -export type ListAggregateArgs = $AggregateArgs<$Schema, "List">; -export type ListGroupByArgs = $GroupByArgs<$Schema, "List">; -export type ListWhereInput = $WhereInput<$Schema, "List">; -export type ListSelect = $SelectInput<$Schema, "List">; -export type ListInclude = $IncludeInput<$Schema, "List">; -export type ListOmit = $OmitInput<$Schema, "List">; -export type ListGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "List", Args, Options>; -export type TodoFindManyArgs = $FindManyArgs<$Schema, "Todo">; -export type TodoFindUniqueArgs = $FindUniqueArgs<$Schema, "Todo">; -export type TodoFindFirstArgs = $FindFirstArgs<$Schema, "Todo">; -export type TodoExistsArgs = $ExistsArgs<$Schema, "Todo">; -export type TodoCreateArgs = $CreateArgs<$Schema, "Todo">; -export type TodoCreateManyArgs = $CreateManyArgs<$Schema, "Todo">; -export type TodoCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Todo">; -export type TodoUpdateArgs = $UpdateArgs<$Schema, "Todo">; -export type TodoUpdateManyArgs = $UpdateManyArgs<$Schema, "Todo">; -export type TodoUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Todo">; -export type TodoUpsertArgs = $UpsertArgs<$Schema, "Todo">; -export type TodoDeleteArgs = $DeleteArgs<$Schema, "Todo">; -export type TodoDeleteManyArgs = $DeleteManyArgs<$Schema, "Todo">; -export type TodoCountArgs = $CountArgs<$Schema, "Todo">; -export type TodoAggregateArgs = $AggregateArgs<$Schema, "Todo">; -export type TodoGroupByArgs = $GroupByArgs<$Schema, "Todo">; -export type TodoWhereInput = $WhereInput<$Schema, "Todo">; -export type TodoSelect = $SelectInput<$Schema, "Todo">; -export type TodoInclude = $IncludeInput<$Schema, "Todo">; -export type TodoOmit = $OmitInput<$Schema, "Todo">; -export type TodoGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Todo", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type SpaceFindManyArgs = $FindManyArgs<$Schema, 'Space'>; +export type SpaceFindUniqueArgs = $FindUniqueArgs<$Schema, 'Space'>; +export type SpaceFindFirstArgs = $FindFirstArgs<$Schema, 'Space'>; +export type SpaceExistsArgs = $ExistsArgs<$Schema, 'Space'>; +export type SpaceCreateArgs = $CreateArgs<$Schema, 'Space'>; +export type SpaceCreateManyArgs = $CreateManyArgs<$Schema, 'Space'>; +export type SpaceCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Space'>; +export type SpaceUpdateArgs = $UpdateArgs<$Schema, 'Space'>; +export type SpaceUpdateManyArgs = $UpdateManyArgs<$Schema, 'Space'>; +export type SpaceUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Space'>; +export type SpaceUpsertArgs = $UpsertArgs<$Schema, 'Space'>; +export type SpaceDeleteArgs = $DeleteArgs<$Schema, 'Space'>; +export type SpaceDeleteManyArgs = $DeleteManyArgs<$Schema, 'Space'>; +export type SpaceCountArgs = $CountArgs<$Schema, 'Space'>; +export type SpaceAggregateArgs = $AggregateArgs<$Schema, 'Space'>; +export type SpaceGroupByArgs = $GroupByArgs<$Schema, 'Space'>; +export type SpaceWhereInput = $WhereInput<$Schema, 'Space'>; +export type SpaceSelect = $SelectInput<$Schema, 'Space'>; +export type SpaceInclude = $IncludeInput<$Schema, 'Space'>; +export type SpaceOmit = $OmitInput<$Schema, 'Space'>; +export type SpaceGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Space', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Space', Args, Options>; +export type SpaceUserFindManyArgs = $FindManyArgs<$Schema, 'SpaceUser'>; +export type SpaceUserFindUniqueArgs = $FindUniqueArgs<$Schema, 'SpaceUser'>; +export type SpaceUserFindFirstArgs = $FindFirstArgs<$Schema, 'SpaceUser'>; +export type SpaceUserExistsArgs = $ExistsArgs<$Schema, 'SpaceUser'>; +export type SpaceUserCreateArgs = $CreateArgs<$Schema, 'SpaceUser'>; +export type SpaceUserCreateManyArgs = $CreateManyArgs<$Schema, 'SpaceUser'>; +export type SpaceUserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'SpaceUser'>; +export type SpaceUserUpdateArgs = $UpdateArgs<$Schema, 'SpaceUser'>; +export type SpaceUserUpdateManyArgs = $UpdateManyArgs<$Schema, 'SpaceUser'>; +export type SpaceUserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'SpaceUser'>; +export type SpaceUserUpsertArgs = $UpsertArgs<$Schema, 'SpaceUser'>; +export type SpaceUserDeleteArgs = $DeleteArgs<$Schema, 'SpaceUser'>; +export type SpaceUserDeleteManyArgs = $DeleteManyArgs<$Schema, 'SpaceUser'>; +export type SpaceUserCountArgs = $CountArgs<$Schema, 'SpaceUser'>; +export type SpaceUserAggregateArgs = $AggregateArgs<$Schema, 'SpaceUser'>; +export type SpaceUserGroupByArgs = $GroupByArgs<$Schema, 'SpaceUser'>; +export type SpaceUserWhereInput = $WhereInput<$Schema, 'SpaceUser'>; +export type SpaceUserSelect = $SelectInput<$Schema, 'SpaceUser'>; +export type SpaceUserInclude = $IncludeInput<$Schema, 'SpaceUser'>; +export type SpaceUserOmit = $OmitInput<$Schema, 'SpaceUser'>; +export type SpaceUserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'SpaceUser', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'SpaceUser', Args, Options>; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type ListFindManyArgs = $FindManyArgs<$Schema, 'List'>; +export type ListFindUniqueArgs = $FindUniqueArgs<$Schema, 'List'>; +export type ListFindFirstArgs = $FindFirstArgs<$Schema, 'List'>; +export type ListExistsArgs = $ExistsArgs<$Schema, 'List'>; +export type ListCreateArgs = $CreateArgs<$Schema, 'List'>; +export type ListCreateManyArgs = $CreateManyArgs<$Schema, 'List'>; +export type ListCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'List'>; +export type ListUpdateArgs = $UpdateArgs<$Schema, 'List'>; +export type ListUpdateManyArgs = $UpdateManyArgs<$Schema, 'List'>; +export type ListUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'List'>; +export type ListUpsertArgs = $UpsertArgs<$Schema, 'List'>; +export type ListDeleteArgs = $DeleteArgs<$Schema, 'List'>; +export type ListDeleteManyArgs = $DeleteManyArgs<$Schema, 'List'>; +export type ListCountArgs = $CountArgs<$Schema, 'List'>; +export type ListAggregateArgs = $AggregateArgs<$Schema, 'List'>; +export type ListGroupByArgs = $GroupByArgs<$Schema, 'List'>; +export type ListWhereInput = $WhereInput<$Schema, 'List'>; +export type ListSelect = $SelectInput<$Schema, 'List'>; +export type ListInclude = $IncludeInput<$Schema, 'List'>; +export type ListOmit = $OmitInput<$Schema, 'List'>; +export type ListGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'List', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'List', Args, Options>; +export type TodoFindManyArgs = $FindManyArgs<$Schema, 'Todo'>; +export type TodoFindUniqueArgs = $FindUniqueArgs<$Schema, 'Todo'>; +export type TodoFindFirstArgs = $FindFirstArgs<$Schema, 'Todo'>; +export type TodoExistsArgs = $ExistsArgs<$Schema, 'Todo'>; +export type TodoCreateArgs = $CreateArgs<$Schema, 'Todo'>; +export type TodoCreateManyArgs = $CreateManyArgs<$Schema, 'Todo'>; +export type TodoCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Todo'>; +export type TodoUpdateArgs = $UpdateArgs<$Schema, 'Todo'>; +export type TodoUpdateManyArgs = $UpdateManyArgs<$Schema, 'Todo'>; +export type TodoUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Todo'>; +export type TodoUpsertArgs = $UpsertArgs<$Schema, 'Todo'>; +export type TodoDeleteArgs = $DeleteArgs<$Schema, 'Todo'>; +export type TodoDeleteManyArgs = $DeleteManyArgs<$Schema, 'Todo'>; +export type TodoCountArgs = $CountArgs<$Schema, 'Todo'>; +export type TodoAggregateArgs = $AggregateArgs<$Schema, 'Todo'>; +export type TodoGroupByArgs = $GroupByArgs<$Schema, 'Todo'>; +export type TodoWhereInput = $WhereInput<$Schema, 'Todo'>; +export type TodoSelect = $SelectInput<$Schema, 'Todo'>; +export type TodoInclude = $IncludeInput<$Schema, 'Todo'>; +export type TodoOmit = $OmitInput<$Schema, 'Todo'>; +export type TodoGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Todo', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Todo', Args, Options>; diff --git a/tests/e2e/orm/schemas/todo/models.ts b/tests/e2e/orm/schemas/todo/models.ts index 7d3c2008e..5dbfb2f75 100644 --- a/tests/e2e/orm/schemas/todo/models.ts +++ b/tests/e2e/orm/schemas/todo/models.ts @@ -5,10 +5,10 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type Space = $ModelResult<$Schema, "Space">; -export type SpaceUser = $ModelResult<$Schema, "SpaceUser">; -export type User = $ModelResult<$Schema, "User">; -export type List = $ModelResult<$Schema, "List">; -export type Todo = $ModelResult<$Schema, "Todo">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type Space = $ModelResult<$Schema, 'Space'>; +export type SpaceUser = $ModelResult<$Schema, 'SpaceUser'>; +export type User = $ModelResult<$Schema, 'User'>; +export type List = $ModelResult<$Schema, 'List'>; +export type Todo = $ModelResult<$Schema, 'Todo'>; diff --git a/tests/e2e/orm/schemas/todo/schema.ts b/tests/e2e/orm/schemas/todo/schema.ts index 901cdc5c8..01214072e 100644 --- a/tests/e2e/orm/schemas/todo/schema.ts +++ b/tests/e2e/orm/schemas/todo/schema.ts @@ -5,392 +5,885 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { Space: { - name: "Space", + name: 'Space', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String", - attributes: [{ name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(4) }, { name: "max", value: ExpressionUtils.literal(50) }] }] as readonly AttributeApplication[] + name: 'name', + type: 'String', + attributes: [ + { + name: '@length', + args: [ + { name: 'min', value: ExpressionUtils.literal(4) }, + { name: 'max', value: ExpressionUtils.literal(50) }, + ], + }, + ] as readonly AttributeApplication[], }, slug: { - name: "slug", - type: "String", + name: 'slug', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(4) }, { name: "max", value: ExpressionUtils.literal(16) }] }] as readonly AttributeApplication[] + attributes: [ + { name: '@unique' }, + { + name: '@length', + args: [ + { name: 'min', value: ExpressionUtils.literal(4) }, + { name: 'max', value: ExpressionUtils.literal(16) }, + ], + }, + ] as readonly AttributeApplication[], }, owner: { - name: "owner", - type: "User", + name: 'owner', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "ownedSpaces", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'ownedSpaces', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, }, ownerId: { - name: "ownerId", - type: "String", + name: 'ownerId', + type: 'String', optional: true, - foreignKeyFor: [ - "owner" - ] as readonly string[] + foreignKeyFor: ['owner'] as readonly string[], }, members: { - name: "members", - type: "SpaceUser", + name: 'members', + type: 'SpaceUser', array: true, - relation: { opposite: "space" } + relation: { opposite: 'space' }, }, lists: { - name: "lists", - type: "List", + name: 'lists', + type: 'List', array: true, - relation: { opposite: "space" } - } + relation: { opposite: 'space' }, + }, }, attributes: [ - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.literal(true) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("members"), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("update,delete") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("members"), "?", ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.field("role"), "==", ExpressionUtils.literal("ADMIN")))) }] } + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('create') }, + { name: 'condition', value: ExpressionUtils.literal(true) }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.field('members'), + '?', + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('update,delete') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.field('members'), + '?', + ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + '&&', + ExpressionUtils.binary( + ExpressionUtils.field('role'), + '==', + ExpressionUtils.literal('ADMIN'), + ), + ), + ), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - slug: { type: "String" } - } + id: { type: 'String' }, + slug: { type: 'String' }, + }, }, SpaceUser: { - name: "SpaceUser", + name: 'SpaceUser', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, space: { - name: "space", - type: "Space", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "members", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } + name: 'space', + type: 'Space', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'members', fields: ['spaceId'], references: ['id'], onDelete: 'Cascade' }, }, spaceId: { - name: "spaceId", - type: "String", - foreignKeyFor: [ - "space" - ] as readonly string[] + name: 'spaceId', + type: 'String', + foreignKeyFor: ['space'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "spaces", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'spaces', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, }, userId: { - name: "userId", - type: "String", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'String', + foreignKeyFor: ['user'] as readonly string[], }, role: { - name: "role", - type: "String" - } + name: 'role', + type: 'String', + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("spaceId")]) }] }, - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create,update,delete") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["ownerId"]), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "||", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.field("role"), "==", ExpressionUtils.literal("ADMIN"))))) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('userId'), + ExpressionUtils.field('spaceId'), + ]), + }, + ], + }, + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('create,update,delete') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('space'), ['ownerId']), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + '||', + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), + '?', + ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + '&&', + ExpressionUtils.binary( + ExpressionUtils.field('role'), + '==', + ExpressionUtils.literal('ADMIN'), + ), + ), + ), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), + '?', + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + ), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - userId_spaceId: { userId: { type: "String" }, spaceId: { type: "String" } } - } + id: { type: 'String' }, + userId_spaceId: { userId: { type: 'String' }, spaceId: { type: 'String' } }, + }, }, User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }, { name: "@email" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }, { name: '@email' }] as readonly AttributeApplication[], }, password: { - name: "password", - type: "String", - optional: true + name: 'password', + type: 'String', + optional: true, }, emailVerified: { - name: "emailVerified", - type: "DateTime", - optional: true + name: 'emailVerified', + type: 'DateTime', + optional: true, }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, ownedSpaces: { - name: "ownedSpaces", - type: "Space", + name: 'ownedSpaces', + type: 'Space', array: true, - relation: { opposite: "owner" } + relation: { opposite: 'owner' }, }, spaces: { - name: "spaces", - type: "SpaceUser", + name: 'spaces', + type: 'SpaceUser', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, image: { - name: "image", - type: "String", + name: 'image', + type: 'String', optional: true, - attributes: [{ name: "@url" }] as readonly AttributeApplication[] + attributes: [{ name: '@url' }] as readonly AttributeApplication[], }, lists: { - name: "lists", - type: "List", + name: 'lists', + type: 'List', array: true, - relation: { opposite: "owner" } + relation: { opposite: 'owner' }, }, todos: { - name: "todos", - type: "Todo", + name: 'todos', + type: 'Todo', array: true, - relation: { opposite: "owner" } - } + relation: { opposite: 'owner' }, + }, }, attributes: [ - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.literal(true) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("spaces"), "?", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])))) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("id")) }] } + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('create') }, + { name: 'condition', value: ExpressionUtils.literal(true) }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.field('spaces'), + '?', + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), + '?', + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + ), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + '==', + ExpressionUtils.field('id'), + ), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, List: { - name: "List", + name: 'List', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, space: { - name: "space", - type: "Space", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "lists", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } + name: 'space', + type: 'Space', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'lists', fields: ['spaceId'], references: ['id'], onDelete: 'Cascade' }, }, spaceId: { - name: "spaceId", - type: "String", - foreignKeyFor: [ - "space" - ] as readonly string[] + name: 'spaceId', + type: 'String', + foreignKeyFor: ['space'] as readonly string[], }, owner: { - name: "owner", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "lists", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + name: 'owner', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'lists', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, }, ownerId: { - name: "ownerId", - type: "String", - foreignKeyFor: [ - "owner" - ] as readonly string[] + name: 'ownerId', + type: 'String', + foreignKeyFor: ['owner'] as readonly string[], }, title: { - name: "title", - type: "String", - attributes: [{ name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(1) }, { name: "max", value: ExpressionUtils.literal(100) }] }] as readonly AttributeApplication[] + name: 'title', + type: 'String', + attributes: [ + { + name: '@length', + args: [ + { name: 'min', value: ExpressionUtils.literal(1) }, + { name: 'max', value: ExpressionUtils.literal(100) }, + ], + }, + ] as readonly AttributeApplication[], }, private: { - name: "private", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'private', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, todos: { - name: "todos", - type: "Todo", + name: 'todos', + type: 'Todo', array: true, - relation: { opposite: "list" } + relation: { opposite: 'list' }, }, revision: { - name: "revision", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault - } + name: 'revision', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, + }, }, attributes: [ - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "||", ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))), "&&", ExpressionUtils.unary("!", ExpressionUtils.field("private")))) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])))) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])))) }] }, - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("post-update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["ownerId"]), "!=", ExpressionUtils.field("ownerId")) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("delete") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])) }] } + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.field('ownerId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + '||', + ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), + '?', + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + ), + '&&', + ExpressionUtils.unary('!', ExpressionUtils.field('private')), + ), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('create') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.field('ownerId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + '&&', + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), + '?', + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + ), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('update') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.field('ownerId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + '&&', + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), + '?', + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + ), + ), + }, + ], + }, + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('post-update') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('before'), ['ownerId']), + '!=', + ExpressionUtils.field('ownerId'), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('delete') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.field('ownerId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } + id: { type: 'String' }, + }, }, Todo: { - name: "Todo", + name: 'Todo', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("uuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('uuid') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, owner: { - name: "owner", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "todos", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } + name: 'owner', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'todos', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, }, ownerId: { - name: "ownerId", - type: "String", - foreignKeyFor: [ - "owner" - ] as readonly string[] + name: 'ownerId', + type: 'String', + foreignKeyFor: ['owner'] as readonly string[], }, list: { - name: "list", - type: "List", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("listId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "todos", fields: ["listId"], references: ["id"], onDelete: "Cascade" } + name: 'list', + type: 'List', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('listId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'todos', fields: ['listId'], references: ['id'], onDelete: 'Cascade' }, }, listId: { - name: "listId", - type: "String", - foreignKeyFor: [ - "list" - ] as readonly string[] + name: 'listId', + type: 'String', + foreignKeyFor: ['list'] as readonly string[], }, title: { - name: "title", - type: "String", - attributes: [{ name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(1) }, { name: "max", value: ExpressionUtils.literal(100) }] }] as readonly AttributeApplication[] + name: 'title', + type: 'String', + attributes: [ + { + name: '@length', + args: [ + { name: 'min', value: ExpressionUtils.literal(1) }, + { name: 'max', value: ExpressionUtils.literal(100) }, + ], + }, + ] as readonly AttributeApplication[], }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true - } + name: 'completedAt', + type: 'DateTime', + optional: true, + }, }, attributes: [ - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("list"), ["ownerId"]), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("list"), ["space", "members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))), "&&", ExpressionUtils.unary("!", ExpressionUtils.member(ExpressionUtils.field("list"), ["private"]))) }] }, - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("post-update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["ownerId"]), "!=", ExpressionUtils.field("ownerId")) }] } + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('list'), ['ownerId']), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.field('list'), ['space', 'members']), + '?', + ExpressionUtils.binary( + ExpressionUtils.field('userId'), + '==', + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + ), + ), + '&&', + ExpressionUtils.unary( + '!', + ExpressionUtils.member(ExpressionUtils.field('list'), ['private']), + ), + ), + }, + ], + }, + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('post-update') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('before'), ['ownerId']), + '!=', + ExpressionUtils.field('ownerId'), + ), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/typed-json/input.ts b/tests/e2e/orm/schemas/typed-json/input.ts index 22bdbfa73..e03fdce73 100644 --- a/tests/e2e/orm/schemas/typed-json/input.ts +++ b/tests/e2e/orm/schemas/typed-json/input.ts @@ -5,27 +5,52 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; diff --git a/tests/e2e/orm/schemas/typed-json/models.ts b/tests/e2e/orm/schemas/typed-json/models.ts index e46ea2c7b..d42916305 100644 --- a/tests/e2e/orm/schemas/typed-json/models.ts +++ b/tests/e2e/orm/schemas/typed-json/models.ts @@ -5,11 +5,11 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Profile = $TypeDefResult<$Schema, "Profile">; -export type Address = $TypeDefResult<$Schema, "Address">; -export type Job = $TypeDefResult<$Schema, "Job">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Profile = $TypeDefResult<$Schema, 'Profile'>; +export type Address = $TypeDefResult<$Schema, 'Address'>; +export type Job = $TypeDefResult<$Schema, 'Job'>; export const Gender = $schema.enums.Gender.values; export type Gender = (typeof Gender)[keyof typeof Gender]; diff --git a/tests/e2e/orm/schemas/typed-json/schema.ts b/tests/e2e/orm/schemas/typed-json/schema.ts index 7bb3cc55c..86523ab75 100644 --- a/tests/e2e/orm/schemas/typed-json/schema.ts +++ b/tests/e2e/orm/schemas/typed-json/schema.ts @@ -5,103 +5,106 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, profile: { - name: "profile", - type: "Profile", - attributes: [{ name: "@json" }] as readonly AttributeApplication[] - } + name: 'profile', + type: 'Profile', + attributes: [{ name: '@json' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; typeDefs = { Profile: { - name: "Profile", + name: 'Profile', fields: { age: { - name: "age", - type: "Int" + name: 'age', + type: 'Int', }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, gender: { - name: "gender", - type: "Gender", - optional: true + name: 'gender', + type: 'Gender', + optional: true, }, jobs: { - name: "jobs", - type: "Job", - array: true + name: 'jobs', + type: 'Job', + array: true, }, address: { - name: "address", - type: "Address", - optional: true + name: 'address', + type: 'Address', + optional: true, }, tags: { - name: "tags", - type: "String", + name: 'tags', + type: 'String', optional: true, - array: true - } - } + array: true, + }, + }, }, Address: { - name: "Address", + name: 'Address', fields: { country: { - name: "country", - type: "String" + name: 'country', + type: 'String', }, zip: { - name: "zip", - type: "String", - optional: true - } - } + name: 'zip', + type: 'String', + optional: true, + }, + }, }, Job: { - name: "Job", + name: 'Job', fields: { title: { - name: "title", - type: "String" - } - } - } + name: 'title', + type: 'String', + }, + }, + }, } as const; enums = { Gender: { - name: "Gender", + name: 'Gender', values: { - MALE: "MALE", - FEMALE: "FEMALE" - } - } + MALE: 'MALE', + FEMALE: 'FEMALE', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/typing/input.ts b/tests/e2e/orm/schemas/typing/input.ts index 1fa900dc1..e553cb028 100644 --- a/tests/e2e/orm/schemas/typing/input.ts +++ b/tests/e2e/orm/schemas/typing/input.ts @@ -5,132 +5,172 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; -export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; -export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; -export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; -export type PostCreateArgs = $CreateArgs<$Schema, "Post">; -export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; -export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; -export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; -export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; -export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; -export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; -export type PostCountArgs = $CountArgs<$Schema, "Post">; -export type PostAggregateArgs = $AggregateArgs<$Schema, "Post">; -export type PostGroupByArgs = $GroupByArgs<$Schema, "Post">; -export type PostWhereInput = $WhereInput<$Schema, "Post">; -export type PostSelect = $SelectInput<$Schema, "Post">; -export type PostInclude = $IncludeInput<$Schema, "Post">; -export type PostOmit = $OmitInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; -export type ProfileFindManyArgs = $FindManyArgs<$Schema, "Profile">; -export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, "Profile">; -export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, "Profile">; -export type ProfileExistsArgs = $ExistsArgs<$Schema, "Profile">; -export type ProfileCreateArgs = $CreateArgs<$Schema, "Profile">; -export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, "Profile">; -export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpdateArgs = $UpdateArgs<$Schema, "Profile">; -export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, "Profile">; -export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Profile">; -export type ProfileUpsertArgs = $UpsertArgs<$Schema, "Profile">; -export type ProfileDeleteArgs = $DeleteArgs<$Schema, "Profile">; -export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, "Profile">; -export type ProfileCountArgs = $CountArgs<$Schema, "Profile">; -export type ProfileAggregateArgs = $AggregateArgs<$Schema, "Profile">; -export type ProfileGroupByArgs = $GroupByArgs<$Schema, "Profile">; -export type ProfileWhereInput = $WhereInput<$Schema, "Profile">; -export type ProfileSelect = $SelectInput<$Schema, "Profile">; -export type ProfileInclude = $IncludeInput<$Schema, "Profile">; -export type ProfileOmit = $OmitInput<$Schema, "Profile">; -export type ProfileGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Profile", Args, Options>; -export type TagFindManyArgs = $FindManyArgs<$Schema, "Tag">; -export type TagFindUniqueArgs = $FindUniqueArgs<$Schema, "Tag">; -export type TagFindFirstArgs = $FindFirstArgs<$Schema, "Tag">; -export type TagExistsArgs = $ExistsArgs<$Schema, "Tag">; -export type TagCreateArgs = $CreateArgs<$Schema, "Tag">; -export type TagCreateManyArgs = $CreateManyArgs<$Schema, "Tag">; -export type TagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Tag">; -export type TagUpdateArgs = $UpdateArgs<$Schema, "Tag">; -export type TagUpdateManyArgs = $UpdateManyArgs<$Schema, "Tag">; -export type TagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Tag">; -export type TagUpsertArgs = $UpsertArgs<$Schema, "Tag">; -export type TagDeleteArgs = $DeleteArgs<$Schema, "Tag">; -export type TagDeleteManyArgs = $DeleteManyArgs<$Schema, "Tag">; -export type TagCountArgs = $CountArgs<$Schema, "Tag">; -export type TagAggregateArgs = $AggregateArgs<$Schema, "Tag">; -export type TagGroupByArgs = $GroupByArgs<$Schema, "Tag">; -export type TagWhereInput = $WhereInput<$Schema, "Tag">; -export type TagSelect = $SelectInput<$Schema, "Tag">; -export type TagInclude = $IncludeInput<$Schema, "Tag">; -export type TagOmit = $OmitInput<$Schema, "Tag">; -export type TagGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Tag", Args, Options>; -export type RegionFindManyArgs = $FindManyArgs<$Schema, "Region">; -export type RegionFindUniqueArgs = $FindUniqueArgs<$Schema, "Region">; -export type RegionFindFirstArgs = $FindFirstArgs<$Schema, "Region">; -export type RegionExistsArgs = $ExistsArgs<$Schema, "Region">; -export type RegionCreateArgs = $CreateArgs<$Schema, "Region">; -export type RegionCreateManyArgs = $CreateManyArgs<$Schema, "Region">; -export type RegionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Region">; -export type RegionUpdateArgs = $UpdateArgs<$Schema, "Region">; -export type RegionUpdateManyArgs = $UpdateManyArgs<$Schema, "Region">; -export type RegionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Region">; -export type RegionUpsertArgs = $UpsertArgs<$Schema, "Region">; -export type RegionDeleteArgs = $DeleteArgs<$Schema, "Region">; -export type RegionDeleteManyArgs = $DeleteManyArgs<$Schema, "Region">; -export type RegionCountArgs = $CountArgs<$Schema, "Region">; -export type RegionAggregateArgs = $AggregateArgs<$Schema, "Region">; -export type RegionGroupByArgs = $GroupByArgs<$Schema, "Region">; -export type RegionWhereInput = $WhereInput<$Schema, "Region">; -export type RegionSelect = $SelectInput<$Schema, "Region">; -export type RegionInclude = $IncludeInput<$Schema, "Region">; -export type RegionOmit = $OmitInput<$Schema, "Region">; -export type RegionGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Region", Args, Options>; -export type MetaFindManyArgs = $FindManyArgs<$Schema, "Meta">; -export type MetaFindUniqueArgs = $FindUniqueArgs<$Schema, "Meta">; -export type MetaFindFirstArgs = $FindFirstArgs<$Schema, "Meta">; -export type MetaExistsArgs = $ExistsArgs<$Schema, "Meta">; -export type MetaCreateArgs = $CreateArgs<$Schema, "Meta">; -export type MetaCreateManyArgs = $CreateManyArgs<$Schema, "Meta">; -export type MetaCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Meta">; -export type MetaUpdateArgs = $UpdateArgs<$Schema, "Meta">; -export type MetaUpdateManyArgs = $UpdateManyArgs<$Schema, "Meta">; -export type MetaUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Meta">; -export type MetaUpsertArgs = $UpsertArgs<$Schema, "Meta">; -export type MetaDeleteArgs = $DeleteArgs<$Schema, "Meta">; -export type MetaDeleteManyArgs = $DeleteManyArgs<$Schema, "Meta">; -export type MetaCountArgs = $CountArgs<$Schema, "Meta">; -export type MetaAggregateArgs = $AggregateArgs<$Schema, "Meta">; -export type MetaGroupByArgs = $GroupByArgs<$Schema, "Meta">; -export type MetaWhereInput = $WhereInput<$Schema, "Meta">; -export type MetaSelect = $SelectInput<$Schema, "Meta">; -export type MetaInclude = $IncludeInput<$Schema, "Meta">; -export type MetaOmit = $OmitInput<$Schema, "Meta">; -export type MetaGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Meta", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PostFindManyArgs = $FindManyArgs<$Schema, 'Post'>; +export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Post'>; +export type PostFindFirstArgs = $FindFirstArgs<$Schema, 'Post'>; +export type PostExistsArgs = $ExistsArgs<$Schema, 'Post'>; +export type PostCreateArgs = $CreateArgs<$Schema, 'Post'>; +export type PostCreateManyArgs = $CreateManyArgs<$Schema, 'Post'>; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpdateArgs = $UpdateArgs<$Schema, 'Post'>; +export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Post'>; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpsertArgs = $UpsertArgs<$Schema, 'Post'>; +export type PostDeleteArgs = $DeleteArgs<$Schema, 'Post'>; +export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Post'>; +export type PostCountArgs = $CountArgs<$Schema, 'Post'>; +export type PostAggregateArgs = $AggregateArgs<$Schema, 'Post'>; +export type PostGroupByArgs = $GroupByArgs<$Schema, 'Post'>; +export type PostWhereInput = $WhereInput<$Schema, 'Post'>; +export type PostSelect = $SelectInput<$Schema, 'Post'>; +export type PostInclude = $IncludeInput<$Schema, 'Post'>; +export type PostOmit = $OmitInput<$Schema, 'Post'>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Post', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Post', Args, Options>; +export type ProfileFindManyArgs = $FindManyArgs<$Schema, 'Profile'>; +export type ProfileFindUniqueArgs = $FindUniqueArgs<$Schema, 'Profile'>; +export type ProfileFindFirstArgs = $FindFirstArgs<$Schema, 'Profile'>; +export type ProfileExistsArgs = $ExistsArgs<$Schema, 'Profile'>; +export type ProfileCreateArgs = $CreateArgs<$Schema, 'Profile'>; +export type ProfileCreateManyArgs = $CreateManyArgs<$Schema, 'Profile'>; +export type ProfileCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpdateArgs = $UpdateArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyArgs = $UpdateManyArgs<$Schema, 'Profile'>; +export type ProfileUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Profile'>; +export type ProfileUpsertArgs = $UpsertArgs<$Schema, 'Profile'>; +export type ProfileDeleteArgs = $DeleteArgs<$Schema, 'Profile'>; +export type ProfileDeleteManyArgs = $DeleteManyArgs<$Schema, 'Profile'>; +export type ProfileCountArgs = $CountArgs<$Schema, 'Profile'>; +export type ProfileAggregateArgs = $AggregateArgs<$Schema, 'Profile'>; +export type ProfileGroupByArgs = $GroupByArgs<$Schema, 'Profile'>; +export type ProfileWhereInput = $WhereInput<$Schema, 'Profile'>; +export type ProfileSelect = $SelectInput<$Schema, 'Profile'>; +export type ProfileInclude = $IncludeInput<$Schema, 'Profile'>; +export type ProfileOmit = $OmitInput<$Schema, 'Profile'>; +export type ProfileGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Profile', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Profile', Args, Options>; +export type TagFindManyArgs = $FindManyArgs<$Schema, 'Tag'>; +export type TagFindUniqueArgs = $FindUniqueArgs<$Schema, 'Tag'>; +export type TagFindFirstArgs = $FindFirstArgs<$Schema, 'Tag'>; +export type TagExistsArgs = $ExistsArgs<$Schema, 'Tag'>; +export type TagCreateArgs = $CreateArgs<$Schema, 'Tag'>; +export type TagCreateManyArgs = $CreateManyArgs<$Schema, 'Tag'>; +export type TagCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Tag'>; +export type TagUpdateArgs = $UpdateArgs<$Schema, 'Tag'>; +export type TagUpdateManyArgs = $UpdateManyArgs<$Schema, 'Tag'>; +export type TagUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Tag'>; +export type TagUpsertArgs = $UpsertArgs<$Schema, 'Tag'>; +export type TagDeleteArgs = $DeleteArgs<$Schema, 'Tag'>; +export type TagDeleteManyArgs = $DeleteManyArgs<$Schema, 'Tag'>; +export type TagCountArgs = $CountArgs<$Schema, 'Tag'>; +export type TagAggregateArgs = $AggregateArgs<$Schema, 'Tag'>; +export type TagGroupByArgs = $GroupByArgs<$Schema, 'Tag'>; +export type TagWhereInput = $WhereInput<$Schema, 'Tag'>; +export type TagSelect = $SelectInput<$Schema, 'Tag'>; +export type TagInclude = $IncludeInput<$Schema, 'Tag'>; +export type TagOmit = $OmitInput<$Schema, 'Tag'>; +export type TagGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Tag', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Tag', Args, Options>; +export type RegionFindManyArgs = $FindManyArgs<$Schema, 'Region'>; +export type RegionFindUniqueArgs = $FindUniqueArgs<$Schema, 'Region'>; +export type RegionFindFirstArgs = $FindFirstArgs<$Schema, 'Region'>; +export type RegionExistsArgs = $ExistsArgs<$Schema, 'Region'>; +export type RegionCreateArgs = $CreateArgs<$Schema, 'Region'>; +export type RegionCreateManyArgs = $CreateManyArgs<$Schema, 'Region'>; +export type RegionCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Region'>; +export type RegionUpdateArgs = $UpdateArgs<$Schema, 'Region'>; +export type RegionUpdateManyArgs = $UpdateManyArgs<$Schema, 'Region'>; +export type RegionUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Region'>; +export type RegionUpsertArgs = $UpsertArgs<$Schema, 'Region'>; +export type RegionDeleteArgs = $DeleteArgs<$Schema, 'Region'>; +export type RegionDeleteManyArgs = $DeleteManyArgs<$Schema, 'Region'>; +export type RegionCountArgs = $CountArgs<$Schema, 'Region'>; +export type RegionAggregateArgs = $AggregateArgs<$Schema, 'Region'>; +export type RegionGroupByArgs = $GroupByArgs<$Schema, 'Region'>; +export type RegionWhereInput = $WhereInput<$Schema, 'Region'>; +export type RegionSelect = $SelectInput<$Schema, 'Region'>; +export type RegionInclude = $IncludeInput<$Schema, 'Region'>; +export type RegionOmit = $OmitInput<$Schema, 'Region'>; +export type RegionGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Region', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Region', Args, Options>; +export type MetaFindManyArgs = $FindManyArgs<$Schema, 'Meta'>; +export type MetaFindUniqueArgs = $FindUniqueArgs<$Schema, 'Meta'>; +export type MetaFindFirstArgs = $FindFirstArgs<$Schema, 'Meta'>; +export type MetaExistsArgs = $ExistsArgs<$Schema, 'Meta'>; +export type MetaCreateArgs = $CreateArgs<$Schema, 'Meta'>; +export type MetaCreateManyArgs = $CreateManyArgs<$Schema, 'Meta'>; +export type MetaCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Meta'>; +export type MetaUpdateArgs = $UpdateArgs<$Schema, 'Meta'>; +export type MetaUpdateManyArgs = $UpdateManyArgs<$Schema, 'Meta'>; +export type MetaUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Meta'>; +export type MetaUpsertArgs = $UpsertArgs<$Schema, 'Meta'>; +export type MetaDeleteArgs = $DeleteArgs<$Schema, 'Meta'>; +export type MetaDeleteManyArgs = $DeleteManyArgs<$Schema, 'Meta'>; +export type MetaCountArgs = $CountArgs<$Schema, 'Meta'>; +export type MetaAggregateArgs = $AggregateArgs<$Schema, 'Meta'>; +export type MetaGroupByArgs = $GroupByArgs<$Schema, 'Meta'>; +export type MetaWhereInput = $WhereInput<$Schema, 'Meta'>; +export type MetaSelect = $SelectInput<$Schema, 'Meta'>; +export type MetaInclude = $IncludeInput<$Schema, 'Meta'>; +export type MetaOmit = $OmitInput<$Schema, 'Meta'>; +export type MetaGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Meta', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Meta', Args, Options>; diff --git a/tests/e2e/orm/schemas/typing/models.ts b/tests/e2e/orm/schemas/typing/models.ts index 20e775f4e..63b8a362f 100644 --- a/tests/e2e/orm/schemas/typing/models.ts +++ b/tests/e2e/orm/schemas/typing/models.ts @@ -5,16 +5,16 @@ /* eslint-disable */ -import { schema as $schema, type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Post = $ModelResult<$Schema, "Post">; -export type Profile = $ModelResult<$Schema, "Profile">; -export type Tag = $ModelResult<$Schema, "Tag">; -export type Region = $ModelResult<$Schema, "Region">; -export type Meta = $ModelResult<$Schema, "Meta">; -export type Identity = $TypeDefResult<$Schema, "Identity">; -export type IdentityProvider = $TypeDefResult<$Schema, "IdentityProvider">; +import { schema as $schema, type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult, TypeDefResult as $TypeDefResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Post = $ModelResult<$Schema, 'Post'>; +export type Profile = $ModelResult<$Schema, 'Profile'>; +export type Tag = $ModelResult<$Schema, 'Tag'>; +export type Region = $ModelResult<$Schema, 'Region'>; +export type Meta = $ModelResult<$Schema, 'Meta'>; +export type Identity = $TypeDefResult<$Schema, 'Identity'>; +export type IdentityProvider = $TypeDefResult<$Schema, 'IdentityProvider'>; export const Role = $schema.enums.Role.values; export type Role = (typeof Role)[keyof typeof Role]; export const Status = $schema.enums.Status.values; diff --git a/tests/e2e/orm/schemas/typing/schema.ts b/tests/e2e/orm/schemas/typing/schema.ts index 4c01c01b1..fac1b9f5a 100644 --- a/tests/e2e/orm/schemas/typing/schema.ts +++ b/tests/e2e/orm/schemas/typing/schema.ts @@ -5,345 +5,429 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, role: { - name: "role", - type: "Role", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], - default: "USER" as FieldDefault + name: 'role', + type: 'Role', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, + ] as readonly AttributeApplication[], + default: 'USER' as FieldDefault, }, status: { - name: "status", - type: "Status", - array: true + name: 'status', + type: 'Status', + array: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } + relation: { opposite: 'author' }, }, profile: { - name: "profile", - type: "Profile", + name: 'profile', + type: 'Profile', optional: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, postCount: { - name: "postCount", - type: "Int", - attributes: [{ name: "@computed" }] as readonly AttributeApplication[], - computed: true + name: 'postCount', + type: 'Int', + attributes: [{ name: '@computed' }] as readonly AttributeApplication[], + computed: true, }, identity: { - name: "identity", - type: "Identity", + name: 'identity', + type: 'Identity', optional: true, - attributes: [{ name: "@json" }] as readonly AttributeApplication[] - } + attributes: [{ name: '@json' }] as readonly AttributeApplication[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - email: { type: "String" } + id: { type: 'Int' }, + email: { type: 'String' }, }, computedFields: { - postCount(_context: { - modelAlias: string; - }): number { - throw new Error("This is a stub for computed field"); - } - } + postCount(_context: { modelAlias: string }): number { + throw new Error('This is a stub for computed field'); + }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, content: { - name: "content", - type: "String" + name: 'content', + type: 'String', }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"] } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'posts', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "Int", - foreignKeyFor: [ - "author" - ] as readonly string[] + name: 'authorId', + type: 'Int', + foreignKeyFor: ['author'] as readonly string[], }, tags: { - name: "tags", - type: "Tag", + name: 'tags', + type: 'Tag', array: true, - relation: { opposite: "posts" } + relation: { opposite: 'posts' }, }, meta: { - name: "meta", - type: "Meta", + name: 'meta', + type: 'Meta', optional: true, - relation: { opposite: "post" } - } + relation: { opposite: 'post' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Profile: { - name: "Profile", + name: 'Profile', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, age: { - name: "age", - type: "Int" + name: 'age', + type: 'Int', }, region: { - name: "region", - type: "Region", + name: 'region', + type: 'Region', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("regionCountry"), ExpressionUtils.field("regionCity")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("country"), ExpressionUtils.field("city")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "profiles", fields: ["regionCountry", "regionCity"], references: ["country", "city"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('regionCountry'), + ExpressionUtils.field('regionCity'), + ]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('country'), + ExpressionUtils.field('city'), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'profiles', + fields: ['regionCountry', 'regionCity'], + references: ['country', 'city'], + }, }, regionCountry: { - name: "regionCountry", - type: "String", + name: 'regionCountry', + type: 'String', optional: true, - foreignKeyFor: [ - "region" - ] as readonly string[] + foreignKeyFor: ['region'] as readonly string[], }, regionCity: { - name: "regionCity", - type: "String", + name: 'regionCity', + type: 'String', optional: true, - foreignKeyFor: [ - "region" - ] as readonly string[] + foreignKeyFor: ['region'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "profile", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'profile', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] - } + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId: { type: "Int" } - } + id: { type: 'Int' }, + userId: { type: 'Int' }, + }, }, Tag: { - name: "Tag", + name: 'Tag', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "tags" } - } + relation: { opposite: 'tags' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Region: { - name: "Region", + name: 'Region', fields: { country: { - name: "country", - type: "String", - id: true + name: 'country', + type: 'String', + id: true, }, city: { - name: "city", - type: "String", - id: true + name: 'city', + type: 'String', + id: true, }, zip: { - name: "zip", - type: "String", - optional: true + name: 'zip', + type: 'String', + optional: true, }, profiles: { - name: "profiles", - type: "Profile", + name: 'profiles', + type: 'Profile', array: true, - relation: { opposite: "region" } - } + relation: { opposite: 'region' }, + }, }, attributes: [ - { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("country"), ExpressionUtils.field("city")]) }] } + { + name: '@@id', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ + ExpressionUtils.field('country'), + ExpressionUtils.field('city'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["country", "city"], + idFields: ['country', 'city'], uniqueFields: { - country_city: { country: { type: "String" }, city: { type: "String" } } - } + country_city: { country: { type: 'String' }, city: { type: 'String' } }, + }, }, Meta: { - name: "Meta", + name: 'Meta', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, reviewed: { - name: "reviewed", - type: "Boolean" + name: 'reviewed', + type: 'Boolean', }, published: { - name: "published", - type: "Boolean" + name: 'published', + type: 'Boolean', }, post: { - name: "post", - type: "Post", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("postId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "meta", fields: ["postId"], references: ["id"] } + name: 'post', + type: 'Post', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('postId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'meta', fields: ['postId'], references: ['id'] }, }, postId: { - name: "postId", - type: "Int", + name: 'postId', + type: 'Int', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "post" - ] as readonly string[] - } + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['post'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - postId: { type: "Int" } - } - } + id: { type: 'Int' }, + postId: { type: 'Int' }, + }, + }, } as const; typeDefs = { Identity: { - name: "Identity", + name: 'Identity', fields: { providers: { - name: "providers", - type: "IdentityProvider", - array: true - } - } + name: 'providers', + type: 'IdentityProvider', + array: true, + }, + }, }, IdentityProvider: { - name: "IdentityProvider", + name: 'IdentityProvider', fields: { id: { - name: "id", - type: "String" + name: 'id', + type: 'String', }, name: { - name: "name", - type: "String", - optional: true - } - } - } + name: 'name', + type: 'String', + optional: true, + }, + }, + }, } as const; enums = { Role: { - name: "Role", + name: 'Role', values: { - ADMIN: "ADMIN", - USER: "USER" - } + ADMIN: 'ADMIN', + USER: 'USER', + }, }, Status: { - name: "Status", + name: 'Status', values: { - ACTIVE: "ACTIVE", - INACTIVE: "INACTIVE", - BANNED: "BANNED" - } - } + ACTIVE: 'ACTIVE', + INACTIVE: 'INACTIVE', + BANNED: 'BANNED', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/unsupported/input.ts b/tests/e2e/orm/schemas/unsupported/input.ts index 12f5b9800..6f3d0b0ab 100644 --- a/tests/e2e/orm/schemas/unsupported/input.ts +++ b/tests/e2e/orm/schemas/unsupported/input.ts @@ -5,90 +5,124 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type ItemFindManyArgs = $FindManyArgs<$Schema, "Item">; -export type ItemFindUniqueArgs = $FindUniqueArgs<$Schema, "Item">; -export type ItemFindFirstArgs = $FindFirstArgs<$Schema, "Item">; -export type ItemExistsArgs = $ExistsArgs<$Schema, "Item">; -export type ItemCreateArgs = $CreateArgs<$Schema, "Item">; -export type ItemCreateManyArgs = $CreateManyArgs<$Schema, "Item">; -export type ItemCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Item">; -export type ItemUpdateArgs = $UpdateArgs<$Schema, "Item">; -export type ItemUpdateManyArgs = $UpdateManyArgs<$Schema, "Item">; -export type ItemUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Item">; -export type ItemUpsertArgs = $UpsertArgs<$Schema, "Item">; -export type ItemDeleteArgs = $DeleteArgs<$Schema, "Item">; -export type ItemDeleteManyArgs = $DeleteManyArgs<$Schema, "Item">; -export type ItemCountArgs = $CountArgs<$Schema, "Item">; -export type ItemAggregateArgs = $AggregateArgs<$Schema, "Item">; -export type ItemGroupByArgs = $GroupByArgs<$Schema, "Item">; -export type ItemWhereInput = $WhereInput<$Schema, "Item">; -export type ItemSelect = $SelectInput<$Schema, "Item">; -export type ItemInclude = $IncludeInput<$Schema, "Item">; -export type ItemOmit = $OmitInput<$Schema, "Item">; -export type ItemGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Item", Args, Options>; -export type GeoRecordFindManyArgs = $FindManyArgs<$Schema, "GeoRecord">; -export type GeoRecordFindUniqueArgs = $FindUniqueArgs<$Schema, "GeoRecord">; -export type GeoRecordFindFirstArgs = $FindFirstArgs<$Schema, "GeoRecord">; -export type GeoRecordExistsArgs = $ExistsArgs<$Schema, "GeoRecord">; -export type GeoRecordCreateArgs = $CreateArgs<$Schema, "GeoRecord">; -export type GeoRecordCreateManyArgs = $CreateManyArgs<$Schema, "GeoRecord">; -export type GeoRecordCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "GeoRecord">; -export type GeoRecordUpdateArgs = $UpdateArgs<$Schema, "GeoRecord">; -export type GeoRecordUpdateManyArgs = $UpdateManyArgs<$Schema, "GeoRecord">; -export type GeoRecordUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "GeoRecord">; -export type GeoRecordUpsertArgs = $UpsertArgs<$Schema, "GeoRecord">; -export type GeoRecordDeleteArgs = $DeleteArgs<$Schema, "GeoRecord">; -export type GeoRecordDeleteManyArgs = $DeleteManyArgs<$Schema, "GeoRecord">; -export type GeoRecordCountArgs = $CountArgs<$Schema, "GeoRecord">; -export type GeoRecordAggregateArgs = $AggregateArgs<$Schema, "GeoRecord">; -export type GeoRecordGroupByArgs = $GroupByArgs<$Schema, "GeoRecord">; -export type GeoRecordWhereInput = $WhereInput<$Schema, "GeoRecord">; -export type GeoRecordSelect = $SelectInput<$Schema, "GeoRecord">; -export type GeoRecordInclude = $IncludeInput<$Schema, "GeoRecord">; -export type GeoRecordOmit = $OmitInput<$Schema, "GeoRecord">; -export type GeoRecordGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "GeoRecord", Args, Options>; -export type GeoParentFindManyArgs = $FindManyArgs<$Schema, "GeoParent">; -export type GeoParentFindUniqueArgs = $FindUniqueArgs<$Schema, "GeoParent">; -export type GeoParentFindFirstArgs = $FindFirstArgs<$Schema, "GeoParent">; -export type GeoParentExistsArgs = $ExistsArgs<$Schema, "GeoParent">; -export type GeoParentCreateArgs = $CreateArgs<$Schema, "GeoParent">; -export type GeoParentCreateManyArgs = $CreateManyArgs<$Schema, "GeoParent">; -export type GeoParentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "GeoParent">; -export type GeoParentUpdateArgs = $UpdateArgs<$Schema, "GeoParent">; -export type GeoParentUpdateManyArgs = $UpdateManyArgs<$Schema, "GeoParent">; -export type GeoParentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "GeoParent">; -export type GeoParentUpsertArgs = $UpsertArgs<$Schema, "GeoParent">; -export type GeoParentDeleteArgs = $DeleteArgs<$Schema, "GeoParent">; -export type GeoParentDeleteManyArgs = $DeleteManyArgs<$Schema, "GeoParent">; -export type GeoParentCountArgs = $CountArgs<$Schema, "GeoParent">; -export type GeoParentAggregateArgs = $AggregateArgs<$Schema, "GeoParent">; -export type GeoParentGroupByArgs = $GroupByArgs<$Schema, "GeoParent">; -export type GeoParentWhereInput = $WhereInput<$Schema, "GeoParent">; -export type GeoParentSelect = $SelectInput<$Schema, "GeoParent">; -export type GeoParentInclude = $IncludeInput<$Schema, "GeoParent">; -export type GeoParentOmit = $OmitInput<$Schema, "GeoParent">; -export type GeoParentGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "GeoParent", Args, Options>; -export type GeoRecordWithDefaultFindManyArgs = $FindManyArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultFindUniqueArgs = $FindUniqueArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultFindFirstArgs = $FindFirstArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultExistsArgs = $ExistsArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultCreateArgs = $CreateArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultCreateManyArgs = $CreateManyArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultUpdateArgs = $UpdateArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultUpdateManyArgs = $UpdateManyArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultUpsertArgs = $UpsertArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultDeleteArgs = $DeleteArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultDeleteManyArgs = $DeleteManyArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultCountArgs = $CountArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultAggregateArgs = $AggregateArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultGroupByArgs = $GroupByArgs<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultWhereInput = $WhereInput<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultSelect = $SelectInput<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultInclude = $IncludeInput<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultOmit = $OmitInput<$Schema, "GeoRecordWithDefault">; -export type GeoRecordWithDefaultGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "GeoRecordWithDefault", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type ItemFindManyArgs = $FindManyArgs<$Schema, 'Item'>; +export type ItemFindUniqueArgs = $FindUniqueArgs<$Schema, 'Item'>; +export type ItemFindFirstArgs = $FindFirstArgs<$Schema, 'Item'>; +export type ItemExistsArgs = $ExistsArgs<$Schema, 'Item'>; +export type ItemCreateArgs = $CreateArgs<$Schema, 'Item'>; +export type ItemCreateManyArgs = $CreateManyArgs<$Schema, 'Item'>; +export type ItemCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Item'>; +export type ItemUpdateArgs = $UpdateArgs<$Schema, 'Item'>; +export type ItemUpdateManyArgs = $UpdateManyArgs<$Schema, 'Item'>; +export type ItemUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Item'>; +export type ItemUpsertArgs = $UpsertArgs<$Schema, 'Item'>; +export type ItemDeleteArgs = $DeleteArgs<$Schema, 'Item'>; +export type ItemDeleteManyArgs = $DeleteManyArgs<$Schema, 'Item'>; +export type ItemCountArgs = $CountArgs<$Schema, 'Item'>; +export type ItemAggregateArgs = $AggregateArgs<$Schema, 'Item'>; +export type ItemGroupByArgs = $GroupByArgs<$Schema, 'Item'>; +export type ItemWhereInput = $WhereInput<$Schema, 'Item'>; +export type ItemSelect = $SelectInput<$Schema, 'Item'>; +export type ItemInclude = $IncludeInput<$Schema, 'Item'>; +export type ItemOmit = $OmitInput<$Schema, 'Item'>; +export type ItemGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Item', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Item', Args, Options>; +export type GeoRecordFindManyArgs = $FindManyArgs<$Schema, 'GeoRecord'>; +export type GeoRecordFindUniqueArgs = $FindUniqueArgs<$Schema, 'GeoRecord'>; +export type GeoRecordFindFirstArgs = $FindFirstArgs<$Schema, 'GeoRecord'>; +export type GeoRecordExistsArgs = $ExistsArgs<$Schema, 'GeoRecord'>; +export type GeoRecordCreateArgs = $CreateArgs<$Schema, 'GeoRecord'>; +export type GeoRecordCreateManyArgs = $CreateManyArgs<$Schema, 'GeoRecord'>; +export type GeoRecordCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'GeoRecord'>; +export type GeoRecordUpdateArgs = $UpdateArgs<$Schema, 'GeoRecord'>; +export type GeoRecordUpdateManyArgs = $UpdateManyArgs<$Schema, 'GeoRecord'>; +export type GeoRecordUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'GeoRecord'>; +export type GeoRecordUpsertArgs = $UpsertArgs<$Schema, 'GeoRecord'>; +export type GeoRecordDeleteArgs = $DeleteArgs<$Schema, 'GeoRecord'>; +export type GeoRecordDeleteManyArgs = $DeleteManyArgs<$Schema, 'GeoRecord'>; +export type GeoRecordCountArgs = $CountArgs<$Schema, 'GeoRecord'>; +export type GeoRecordAggregateArgs = $AggregateArgs<$Schema, 'GeoRecord'>; +export type GeoRecordGroupByArgs = $GroupByArgs<$Schema, 'GeoRecord'>; +export type GeoRecordWhereInput = $WhereInput<$Schema, 'GeoRecord'>; +export type GeoRecordSelect = $SelectInput<$Schema, 'GeoRecord'>; +export type GeoRecordInclude = $IncludeInput<$Schema, 'GeoRecord'>; +export type GeoRecordOmit = $OmitInput<$Schema, 'GeoRecord'>; +export type GeoRecordGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'GeoRecord', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'GeoRecord', Args, Options>; +export type GeoParentFindManyArgs = $FindManyArgs<$Schema, 'GeoParent'>; +export type GeoParentFindUniqueArgs = $FindUniqueArgs<$Schema, 'GeoParent'>; +export type GeoParentFindFirstArgs = $FindFirstArgs<$Schema, 'GeoParent'>; +export type GeoParentExistsArgs = $ExistsArgs<$Schema, 'GeoParent'>; +export type GeoParentCreateArgs = $CreateArgs<$Schema, 'GeoParent'>; +export type GeoParentCreateManyArgs = $CreateManyArgs<$Schema, 'GeoParent'>; +export type GeoParentCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'GeoParent'>; +export type GeoParentUpdateArgs = $UpdateArgs<$Schema, 'GeoParent'>; +export type GeoParentUpdateManyArgs = $UpdateManyArgs<$Schema, 'GeoParent'>; +export type GeoParentUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'GeoParent'>; +export type GeoParentUpsertArgs = $UpsertArgs<$Schema, 'GeoParent'>; +export type GeoParentDeleteArgs = $DeleteArgs<$Schema, 'GeoParent'>; +export type GeoParentDeleteManyArgs = $DeleteManyArgs<$Schema, 'GeoParent'>; +export type GeoParentCountArgs = $CountArgs<$Schema, 'GeoParent'>; +export type GeoParentAggregateArgs = $AggregateArgs<$Schema, 'GeoParent'>; +export type GeoParentGroupByArgs = $GroupByArgs<$Schema, 'GeoParent'>; +export type GeoParentWhereInput = $WhereInput<$Schema, 'GeoParent'>; +export type GeoParentSelect = $SelectInput<$Schema, 'GeoParent'>; +export type GeoParentInclude = $IncludeInput<$Schema, 'GeoParent'>; +export type GeoParentOmit = $OmitInput<$Schema, 'GeoParent'>; +export type GeoParentGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'GeoParent', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'GeoParent', Args, Options>; +export type GeoRecordWithDefaultFindManyArgs = $FindManyArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultFindUniqueArgs = $FindUniqueArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultFindFirstArgs = $FindFirstArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultExistsArgs = $ExistsArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultCreateArgs = $CreateArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultCreateManyArgs = $CreateManyArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultUpdateArgs = $UpdateArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultUpdateManyArgs = $UpdateManyArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultUpsertArgs = $UpsertArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultDeleteArgs = $DeleteArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultDeleteManyArgs = $DeleteManyArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultCountArgs = $CountArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultAggregateArgs = $AggregateArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultGroupByArgs = $GroupByArgs<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultWhereInput = $WhereInput<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultSelect = $SelectInput<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultInclude = $IncludeInput<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultOmit = $OmitInput<$Schema, 'GeoRecordWithDefault'>; +export type GeoRecordWithDefaultGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'GeoRecordWithDefault', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'GeoRecordWithDefault', Args, Options>; diff --git a/tests/e2e/orm/schemas/unsupported/models.ts b/tests/e2e/orm/schemas/unsupported/models.ts index 239bf0806..e9a220cfc 100644 --- a/tests/e2e/orm/schemas/unsupported/models.ts +++ b/tests/e2e/orm/schemas/unsupported/models.ts @@ -5,9 +5,9 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type Item = $ModelResult<$Schema, "Item">; -export type GeoRecord = $ModelResult<$Schema, "GeoRecord">; -export type GeoParent = $ModelResult<$Schema, "GeoParent">; -export type GeoRecordWithDefault = $ModelResult<$Schema, "GeoRecordWithDefault">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type Item = $ModelResult<$Schema, 'Item'>; +export type GeoRecord = $ModelResult<$Schema, 'GeoRecord'>; +export type GeoParent = $ModelResult<$Schema, 'GeoParent'>; +export type GeoRecordWithDefault = $ModelResult<$Schema, 'GeoRecordWithDefault'>; diff --git a/tests/e2e/orm/schemas/unsupported/schema.ts b/tests/e2e/orm/schemas/unsupported/schema.ts index ec6524a95..ef527872e 100644 --- a/tests/e2e/orm/schemas/unsupported/schema.ts +++ b/tests/e2e/orm/schemas/unsupported/schema.ts @@ -5,128 +5,166 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { Item: { - name: "Item", + name: 'Item', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, data: { - name: "data", - type: "Unsupported", - optional: true - } + name: 'data', + type: 'Unsupported', + optional: true, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, GeoRecord: { - name: "GeoRecord", + name: 'GeoRecord', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, extra: { - name: "extra", - type: "Unsupported" + name: 'extra', + type: 'Unsupported', }, parent: { - name: "parent", - type: "GeoParent", + name: 'parent', + type: 'GeoParent', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "records", fields: ["parentId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'records', fields: ['parentId'], references: ['id'] }, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - foreignKeyFor: [ - "parent" - ] as readonly string[] - } + foreignKeyFor: ['parent'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, GeoParent: { - name: "GeoParent", + name: 'GeoParent', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, records: { - name: "records", - type: "GeoRecord", + name: 'records', + type: 'GeoRecord', array: true, - relation: { opposite: "parent" } - } + relation: { opposite: 'parent' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, GeoRecordWithDefault: { - name: "GeoRecordWithDefault", + name: 'GeoRecordWithDefault', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, label: { - name: "label", - type: "String" + name: 'label', + type: 'String', }, area: { - name: "area", - type: "Unsupported", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("dbgenerated", [ExpressionUtils.literal("''::xml")]) }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("dbgenerated", [ExpressionUtils.literal("''::xml")]) as FieldDefault - } + name: 'area', + type: 'Unsupported', + attributes: [ + { + name: '@default', + args: [ + { + name: 'value', + value: ExpressionUtils.call('dbgenerated', [ + ExpressionUtils.literal("''::xml"), + ]), + }, + ], + }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('dbgenerated', [ + ExpressionUtils.literal("''::xml"), + ]) as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } - } + id: { type: 'Int' }, + }, + }, } as const; plugins = {}; } diff --git a/tests/e2e/performance/tsc-torture/main.ts b/tests/e2e/performance/tsc-torture/main.ts index 8461a6dec..6d4dffc1c 100644 --- a/tests/e2e/performance/tsc-torture/main.ts +++ b/tests/e2e/performance/tsc-torture/main.ts @@ -126,9 +126,7 @@ async function seedDeep(db: Client) { dueDate: new Date('2026-05-01'), status: 'SENT', lineItems: { - create: [ - { description: 'Pro plan — April 2026', quantity: 1, unitCents: 9900 }, - ], + create: [{ description: 'Pro plan — April 2026', quantity: 1, unitCents: 9900 }], }, }, ], diff --git a/tests/e2e/performance/tsc-torture/zenstack/schema.ts b/tests/e2e/performance/tsc-torture/zenstack/schema.ts index 37e56a71f..7f2ea4618 100644 --- a/tests/e2e/performance/tsc-torture/zenstack/schema.ts +++ b/tests/e2e/performance/tsc-torture/zenstack/schema.ts @@ -5,3106 +5,4277 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { Organization: { - name: "Organization", + name: 'Organization', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, slug: { - name: "slug", - type: "String", + name: 'slug', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, logoUrl: { - name: "logoUrl", - type: "String", - optional: true + name: 'logoUrl', + type: 'String', + optional: true, }, website: { - name: "website", - type: "String", - optional: true + name: 'website', + type: 'String', + optional: true, }, teams: { - name: "teams", - type: "Team", + name: 'teams', + type: 'Team', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, members: { - name: "members", - type: "OrganizationMember", + name: 'members', + type: 'OrganizationMember', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, projects: { - name: "projects", - type: "Project", + name: 'projects', + type: 'Project', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, billingInfo: { - name: "billingInfo", - type: "BillingInfo", + name: 'billingInfo', + type: 'BillingInfo', optional: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, auditLogs: { - name: "auditLogs", - type: "AuditLog", + name: 'auditLogs', + type: 'AuditLog', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, activityLog: { - name: "activityLog", - type: "ActivityLogEntry", + name: 'activityLog', + type: 'ActivityLogEntry', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, integrations: { - name: "integrations", - type: "Integration", + name: 'integrations', + type: 'Integration', array: true, - relation: { opposite: "organization" } + relation: { opposite: 'organization' }, }, customFields: { - name: "customFields", - type: "CustomFieldDefinition", + name: 'customFields', + type: 'CustomFieldDefinition', array: true, - relation: { opposite: "organization" } - } + relation: { opposite: 'organization' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - slug: { type: "String" } - } + id: { type: 'Int' }, + slug: { type: 'String' }, + }, }, BillingInfo: { - name: "BillingInfo", + name: 'BillingInfo', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, planName: { - name: "planName", - type: "String" + name: 'planName', + type: 'String', }, billingEmail: { - name: "billingEmail", - type: "String" + name: 'billingEmail', + type: 'String', }, paymentMethod: { - name: "paymentMethod", - type: "PaymentMethod" + name: 'paymentMethod', + type: 'PaymentMethod', }, stripeCustomerId: { - name: "stripeCustomerId", - type: "String", - optional: true + name: 'stripeCustomerId', + type: 'String', + optional: true, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "billingInfo", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'billingInfo', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", + name: 'organizationId', + type: 'Int', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "organization" - ] as readonly string[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['organization'] as readonly string[], }, invoices: { - name: "invoices", - type: "Invoice", + name: 'invoices', + type: 'Invoice', array: true, - relation: { opposite: "billingInfo" } - } + relation: { opposite: 'billingInfo' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - organizationId: { type: "Int" } - } + id: { type: 'Int' }, + organizationId: { type: 'Int' }, + }, }, Invoice: { - name: "Invoice", + name: 'Invoice', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, number: { - name: "number", - type: "String", + name: 'number', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, amountCents: { - name: "amountCents", - type: "Int" + name: 'amountCents', + type: 'Int', }, currency: { - name: "currency", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USD") }] }] as readonly AttributeApplication[], - default: "USD" as FieldDefault + name: 'currency', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USD') }] }, + ] as readonly AttributeApplication[], + default: 'USD' as FieldDefault, }, status: { - name: "status", - type: "InvoiceStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("DRAFT") }] }] as readonly AttributeApplication[], - default: "DRAFT" as FieldDefault + name: 'status', + type: 'InvoiceStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('DRAFT') }] }, + ] as readonly AttributeApplication[], + default: 'DRAFT' as FieldDefault, }, dueDate: { - name: "dueDate", - type: "DateTime" + name: 'dueDate', + type: 'DateTime', }, paidAt: { - name: "paidAt", - type: "DateTime", - optional: true + name: 'paidAt', + type: 'DateTime', + optional: true, }, billingInfo: { - name: "billingInfo", - type: "BillingInfo", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("billingInfoId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "invoices", fields: ["billingInfoId"], references: ["id"] } + name: 'billingInfo', + type: 'BillingInfo', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('billingInfoId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'invoices', fields: ['billingInfoId'], references: ['id'] }, }, billingInfoId: { - name: "billingInfoId", - type: "Int", - foreignKeyFor: [ - "billingInfo" - ] as readonly string[] + name: 'billingInfoId', + type: 'Int', + foreignKeyFor: ['billingInfo'] as readonly string[], }, lineItems: { - name: "lineItems", - type: "InvoiceLineItem", + name: 'lineItems', + type: 'InvoiceLineItem', array: true, - relation: { opposite: "invoice" } - } + relation: { opposite: 'invoice' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - number: { type: "String" } - } + id: { type: 'Int' }, + number: { type: 'String' }, + }, }, InvoiceLineItem: { - name: "InvoiceLineItem", + name: 'InvoiceLineItem', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, description: { - name: "description", - type: "String" + name: 'description', + type: 'String', }, quantity: { - name: "quantity", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], - default: 1 as FieldDefault + name: 'quantity', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, + ] as readonly AttributeApplication[], + default: 1 as FieldDefault, }, unitCents: { - name: "unitCents", - type: "Int" + name: 'unitCents', + type: 'Int', }, invoice: { - name: "invoice", - type: "Invoice", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("invoiceId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "lineItems", fields: ["invoiceId"], references: ["id"] } + name: 'invoice', + type: 'Invoice', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('invoiceId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'lineItems', fields: ['invoiceId'], references: ['id'] }, }, invoiceId: { - name: "invoiceId", - type: "Int", - foreignKeyFor: [ - "invoice" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'invoiceId', + type: 'Int', + foreignKeyFor: ['invoice'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, username: { - name: "username", - type: "String", + name: 'username', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, displayName: { - name: "displayName", - type: "String" + name: 'displayName', + type: 'String', }, avatarUrl: { - name: "avatarUrl", - type: "String", - optional: true + name: 'avatarUrl', + type: 'String', + optional: true, }, timezone: { - name: "timezone", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UTC") }] }] as readonly AttributeApplication[], - default: "UTC" as FieldDefault + name: 'timezone', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UTC') }] }, + ] as readonly AttributeApplication[], + default: 'UTC' as FieldDefault, }, locale: { - name: "locale", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("en") }] }] as readonly AttributeApplication[], - default: "en" as FieldDefault + name: 'locale', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('en') }] }, + ] as readonly AttributeApplication[], + default: 'en' as FieldDefault, }, orgMemberships: { - name: "orgMemberships", - type: "OrganizationMember", + name: 'orgMemberships', + type: 'OrganizationMember', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, teamMemberships: { - name: "teamMemberships", - type: "TeamMember", + name: 'teamMemberships', + type: 'TeamMember', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, ownedProjects: { - name: "ownedProjects", - type: "Project", + name: 'ownedProjects', + type: 'Project', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectOwner") }] }] as readonly AttributeApplication[], - relation: { opposite: "owner", name: "ProjectOwner" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('ProjectOwner') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'owner', name: 'ProjectOwner' }, }, assignedTasks: { - name: "assignedTasks", - type: "Task", + name: 'assignedTasks', + type: 'Task', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskAssignee") }] }] as readonly AttributeApplication[], - relation: { opposite: "assignee", name: "TaskAssignee" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskAssignee') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'assignee', name: 'TaskAssignee' }, }, reportedTasks: { - name: "reportedTasks", - type: "Task", + name: 'reportedTasks', + type: 'Task', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskReporter") }] }] as readonly AttributeApplication[], - relation: { opposite: "reporter", name: "TaskReporter" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskReporter') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'reporter', name: 'TaskReporter' }, }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - relation: { opposite: "author" } + relation: { opposite: 'author' }, }, notifications: { - name: "notifications", - type: "Notification", + name: 'notifications', + type: 'Notification', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, reviews: { - name: "reviews", - type: "Review", + name: 'reviews', + type: 'Review', array: true, - relation: { opposite: "reviewer" } + relation: { opposite: 'reviewer' }, }, auditLogs: { - name: "auditLogs", - type: "AuditLog", + name: 'auditLogs', + type: 'AuditLog', array: true, - relation: { opposite: "actor" } + relation: { opposite: 'actor' }, }, userPreferences: { - name: "userPreferences", - type: "UserPreferences", + name: 'userPreferences', + type: 'UserPreferences', optional: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, activityLog: { - name: "activityLog", - type: "ActivityLogEntry", + name: 'activityLog', + type: 'ActivityLogEntry', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, timeEntries: { - name: "timeEntries", - type: "TimeEntry", + name: 'timeEntries', + type: 'TimeEntry', array: true, - relation: { opposite: "user" } + relation: { opposite: 'user' }, }, apiTokens: { - name: "apiTokens", - type: "ApiToken", + name: 'apiTokens', + type: 'ApiToken', array: true, - relation: { opposite: "user" } - } + relation: { opposite: 'user' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - email: { type: "String" }, - username: { type: "String" } - } + id: { type: 'Int' }, + email: { type: 'String' }, + username: { type: 'String' }, + }, }, UserPreferences: { - name: "UserPreferences", + name: 'UserPreferences', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, emailNotifications: { - name: "emailNotifications", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], - default: true as FieldDefault + name: 'emailNotifications', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, + ] as readonly AttributeApplication[], + default: true as FieldDefault, }, slackNotifications: { - name: "slackNotifications", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'slackNotifications', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, theme: { - name: "theme", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("light") }] }] as readonly AttributeApplication[], - default: "light" as FieldDefault + name: 'theme', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('light') }] }, + ] as readonly AttributeApplication[], + default: 'light' as FieldDefault, }, defaultProjectId: { - name: "defaultProjectId", - type: "Int", - optional: true + name: 'defaultProjectId', + type: 'Int', + optional: true, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "userPreferences", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'userPreferences', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", + name: 'userId', + type: 'Int', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[], - foreignKeyFor: [ - "user" - ] as readonly string[] - } + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + foreignKeyFor: ['user'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - userId: { type: "Int" } - } + id: { type: 'Int' }, + userId: { type: 'Int' }, + }, }, ApiToken: { - name: "ApiToken", + name: 'ApiToken', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, lastUsedAt: { - name: "lastUsedAt", - type: "DateTime", - optional: true + name: 'lastUsedAt', + type: 'DateTime', + optional: true, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, tokenHash: { - name: "tokenHash", - type: "String", + name: 'tokenHash', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, expiresAt: { - name: "expiresAt", - type: "DateTime", - optional: true + name: 'expiresAt', + type: 'DateTime', + optional: true, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "apiTokens", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'apiTokens', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - tokenHash: { type: "String" } - } + id: { type: 'Int' }, + tokenHash: { type: 'String' }, + }, }, OrganizationMember: { - name: "OrganizationMember", + name: 'OrganizationMember', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, joinedAt: { - name: "joinedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'joinedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, role: { - name: "role", - type: "UserRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], - default: "MEMBER" as FieldDefault + name: 'role', + type: 'UserRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, + ] as readonly AttributeApplication[], + default: 'MEMBER' as FieldDefault, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "members", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'members', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "orgMemberships", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'orgMemberships', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] - } + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("userId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('userId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - organizationId_userId: { organizationId: { type: "Int" }, userId: { type: "Int" } } - } + id: { type: 'Int' }, + organizationId_userId: { organizationId: { type: 'Int' }, userId: { type: 'Int' } }, + }, }, Team: { - name: "Team", + name: 'Team', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, color: { - name: "color", - type: "String", - optional: true + name: 'color', + type: 'String', + optional: true, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "teams", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'teams', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, members: { - name: "members", - type: "TeamMember", + name: 'members', + type: 'TeamMember', array: true, - relation: { opposite: "team" } + relation: { opposite: 'team' }, }, projects: { - name: "projects", - type: "ProjectTeamAssignment", + name: 'projects', + type: 'ProjectTeamAssignment', array: true, - relation: { opposite: "team" } - } + relation: { opposite: 'team' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, TeamMember: { - name: "TeamMember", + name: 'TeamMember', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, joinedAt: { - name: "joinedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'joinedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, role: { - name: "role", - type: "UserRole", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], - default: "MEMBER" as FieldDefault + name: 'role', + type: 'UserRole', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, + ] as readonly AttributeApplication[], + default: 'MEMBER' as FieldDefault, }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "members", fields: ["teamId"], references: ["id"] } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'members', fields: ['teamId'], references: ['id'] }, }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "teamMemberships", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'teamMemberships', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] - } + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("userId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('teamId'), + ExpressionUtils.field('userId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - teamId_userId: { teamId: { type: "Int" }, userId: { type: "Int" } } - } + id: { type: 'Int' }, + teamId_userId: { teamId: { type: 'Int' }, userId: { type: 'Int' } }, + }, }, Project: { - name: "Project", + name: 'Project', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, slug: { - name: "slug", - type: "String" + name: 'slug', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, status: { - name: "status", - type: "ProjectStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACTIVE") }] }] as readonly AttributeApplication[], - default: "ACTIVE" as FieldDefault + name: 'status', + type: 'ProjectStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACTIVE') }] }, + ] as readonly AttributeApplication[], + default: 'ACTIVE' as FieldDefault, }, startDate: { - name: "startDate", - type: "DateTime", - optional: true + name: 'startDate', + type: 'DateTime', + optional: true, }, endDate: { - name: "endDate", - type: "DateTime", - optional: true + name: 'endDate', + type: 'DateTime', + optional: true, }, budget: { - name: "budget", - type: "Int", - optional: true + name: 'budget', + type: 'Int', + optional: true, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "projects", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'projects', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, owner: { - name: "owner", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectOwner") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "ownedProjects", name: "ProjectOwner", fields: ["ownerId"], references: ["id"] } + name: 'owner', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('ProjectOwner') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'ownedProjects', + name: 'ProjectOwner', + fields: ['ownerId'], + references: ['id'], + }, }, ownerId: { - name: "ownerId", - type: "Int", - foreignKeyFor: [ - "owner" - ] as readonly string[] + name: 'ownerId', + type: 'Int', + foreignKeyFor: ['owner'] as readonly string[], }, teamAssignments: { - name: "teamAssignments", - type: "ProjectTeamAssignment", + name: 'teamAssignments', + type: 'ProjectTeamAssignment', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, milestones: { - name: "milestones", - type: "Milestone", + name: 'milestones', + type: 'Milestone', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, tasks: { - name: "tasks", - type: "Task", + name: 'tasks', + type: 'Task', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, labels: { - name: "labels", - type: "Label", + name: 'labels', + type: 'Label', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, sprints: { - name: "sprints", - type: "Sprint", + name: 'sprints', + type: 'Sprint', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, documents: { - name: "documents", - type: "Document", + name: 'documents', + type: 'Document', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, customFieldValues: { - name: "customFieldValues", - type: "CustomFieldValue", + name: 'customFieldValues', + type: 'CustomFieldValue', array: true, - relation: { opposite: "project" } + relation: { opposite: 'project' }, }, integrationLinks: { - name: "integrationLinks", - type: "IntegrationLink", + name: 'integrationLinks', + type: 'IntegrationLink', array: true, - relation: { opposite: "project" } - } + relation: { opposite: 'project' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("slug")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('slug'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - organizationId_slug: { organizationId: { type: "Int" }, slug: { type: "String" } } - } + id: { type: 'Int' }, + organizationId_slug: { organizationId: { type: 'Int' }, slug: { type: 'String' } }, + }, }, ProjectTeamAssignment: { - name: "ProjectTeamAssignment", + name: 'ProjectTeamAssignment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, assignedAt: { - name: "assignedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'assignedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "teamAssignments", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'teamAssignments', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'Int', + foreignKeyFor: ['project'] as readonly string[], }, team: { - name: "team", - type: "Team", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "projects", fields: ["teamId"], references: ["id"] } + name: 'team', + type: 'Team', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'projects', fields: ['teamId'], references: ['id'] }, }, teamId: { - name: "teamId", - type: "Int", - foreignKeyFor: [ - "team" - ] as readonly string[] - } + name: 'teamId', + type: 'Int', + foreignKeyFor: ['team'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId"), ExpressionUtils.field("teamId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('teamId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - projectId_teamId: { projectId: { type: "Int" }, teamId: { type: "Int" } } - } + id: { type: 'Int' }, + projectId_teamId: { projectId: { type: 'Int' }, teamId: { type: 'Int' } }, + }, }, Milestone: { - name: "Milestone", + name: 'Milestone', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, dueDate: { - name: "dueDate", - type: "DateTime", - optional: true + name: 'dueDate', + type: 'DateTime', + optional: true, }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true + name: 'completedAt', + type: 'DateTime', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "milestones", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'milestones', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'Int', + foreignKeyFor: ['project'] as readonly string[], }, tasks: { - name: "tasks", - type: "Task", + name: 'tasks', + type: 'Task', array: true, - relation: { opposite: "milestone" } - } + relation: { opposite: 'milestone' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Sprint: { - name: "Sprint", + name: 'Sprint', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, goal: { - name: "goal", - type: "String", - optional: true + name: 'goal', + type: 'String', + optional: true, }, startDate: { - name: "startDate", - type: "DateTime" + name: 'startDate', + type: 'DateTime', }, endDate: { - name: "endDate", - type: "DateTime" + name: 'endDate', + type: 'DateTime', }, closedAt: { - name: "closedAt", - type: "DateTime", - optional: true + name: 'closedAt', + type: 'DateTime', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "sprints", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'sprints', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'Int', + foreignKeyFor: ['project'] as readonly string[], }, tasks: { - name: "tasks", - type: "Task", + name: 'tasks', + type: 'Task', array: true, - relation: { opposite: "sprint" } - } + relation: { opposite: 'sprint' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Task: { - name: "Task", + name: 'Task', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, status: { - name: "status", - type: "TaskStatus", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("BACKLOG") }] }] as readonly AttributeApplication[], - default: "BACKLOG" as FieldDefault + name: 'status', + type: 'TaskStatus', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('BACKLOG') }] }, + ] as readonly AttributeApplication[], + default: 'BACKLOG' as FieldDefault, }, priority: { - name: "priority", - type: "TaskPriority", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEDIUM") }] }] as readonly AttributeApplication[], - default: "MEDIUM" as FieldDefault + name: 'priority', + type: 'TaskPriority', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEDIUM') }] }, + ] as readonly AttributeApplication[], + default: 'MEDIUM' as FieldDefault, }, storyPoints: { - name: "storyPoints", - type: "Int", - optional: true + name: 'storyPoints', + type: 'Int', + optional: true, }, dueDate: { - name: "dueDate", - type: "DateTime", - optional: true + name: 'dueDate', + type: 'DateTime', + optional: true, }, completedAt: { - name: "completedAt", - type: "DateTime", - optional: true + name: 'completedAt', + type: 'DateTime', + optional: true, }, position: { - name: "position", - type: "Int", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], - default: 0 as FieldDefault + name: 'position', + type: 'Int', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, + ] as readonly AttributeApplication[], + default: 0 as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "tasks", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'tasks', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'Int', + foreignKeyFor: ['project'] as readonly string[], }, assignee: { - name: "assignee", - type: "User", + name: 'assignee', + type: 'User', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskAssignee") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("assigneeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "assignedTasks", name: "TaskAssignee", fields: ["assigneeId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('TaskAssignee') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('assigneeId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'assignedTasks', + name: 'TaskAssignee', + fields: ['assigneeId'], + references: ['id'], + }, }, assigneeId: { - name: "assigneeId", - type: "Int", + name: 'assigneeId', + type: 'Int', optional: true, - foreignKeyFor: [ - "assignee" - ] as readonly string[] + foreignKeyFor: ['assignee'] as readonly string[], }, reporter: { - name: "reporter", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskReporter") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reporterId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "reportedTasks", name: "TaskReporter", fields: ["reporterId"], references: ["id"] } + name: 'reporter', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('TaskReporter') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('reporterId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'reportedTasks', + name: 'TaskReporter', + fields: ['reporterId'], + references: ['id'], + }, }, reporterId: { - name: "reporterId", - type: "Int", - foreignKeyFor: [ - "reporter" - ] as readonly string[] + name: 'reporterId', + type: 'Int', + foreignKeyFor: ['reporter'] as readonly string[], }, milestone: { - name: "milestone", - type: "Milestone", + name: 'milestone', + type: 'Milestone', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("milestoneId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "tasks", fields: ["milestoneId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('milestoneId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'tasks', fields: ['milestoneId'], references: ['id'] }, }, milestoneId: { - name: "milestoneId", - type: "Int", + name: 'milestoneId', + type: 'Int', optional: true, - foreignKeyFor: [ - "milestone" - ] as readonly string[] + foreignKeyFor: ['milestone'] as readonly string[], }, sprint: { - name: "sprint", - type: "Sprint", + name: 'sprint', + type: 'Sprint', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("sprintId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "tasks", fields: ["sprintId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('sprintId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'tasks', fields: ['sprintId'], references: ['id'] }, }, sprintId: { - name: "sprintId", - type: "Int", + name: 'sprintId', + type: 'Int', optional: true, - foreignKeyFor: [ - "sprint" - ] as readonly string[] + foreignKeyFor: ['sprint'] as readonly string[], }, parent: { - name: "parent", - type: "Task", + name: 'parent', + type: 'Task', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskSubtasks") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "subtasks", name: "TaskSubtasks", fields: ["parentId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('TaskSubtasks') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'subtasks', name: 'TaskSubtasks', fields: ['parentId'], references: ['id'] }, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - foreignKeyFor: [ - "parent" - ] as readonly string[] + foreignKeyFor: ['parent'] as readonly string[], }, subtasks: { - name: "subtasks", - type: "Task", + name: 'subtasks', + type: 'Task', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskSubtasks") }] }] as readonly AttributeApplication[], - relation: { opposite: "parent", name: "TaskSubtasks" } + attributes: [ + { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskSubtasks') }] }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parent', name: 'TaskSubtasks' }, }, labels: { - name: "labels", - type: "TaskLabel", + name: 'labels', + type: 'TaskLabel', array: true, - relation: { opposite: "task" } + relation: { opposite: 'task' }, }, comments: { - name: "comments", - type: "Comment", + name: 'comments', + type: 'Comment', array: true, - relation: { opposite: "task" } + relation: { opposite: 'task' }, }, attachments: { - name: "attachments", - type: "Attachment", + name: 'attachments', + type: 'Attachment', array: true, - relation: { opposite: "task" } + relation: { opposite: 'task' }, }, reviews: { - name: "reviews", - type: "Review", + name: 'reviews', + type: 'Review', array: true, - relation: { opposite: "task" } + relation: { opposite: 'task' }, }, timeEntries: { - name: "timeEntries", - type: "TimeEntry", + name: 'timeEntries', + type: 'TimeEntry', array: true, - relation: { opposite: "task" } + relation: { opposite: 'task' }, }, customFieldValues: { - name: "customFieldValues", - type: "CustomFieldValue", + name: 'customFieldValues', + type: 'CustomFieldValue', array: true, - relation: { opposite: "task" } + relation: { opposite: 'task' }, }, activityLog: { - name: "activityLog", - type: "ActivityLogEntry", + name: 'activityLog', + type: 'ActivityLogEntry', array: true, - relation: { opposite: "task" } - } + relation: { opposite: 'task' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Label: { - name: "Label", + name: 'Label', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, color: { - name: "color", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("#888888") }] }] as readonly AttributeApplication[], - default: "#888888" as FieldDefault + name: 'color', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('#888888') }] }, + ] as readonly AttributeApplication[], + default: '#888888' as FieldDefault, }, description: { - name: "description", - type: "String", - optional: true + name: 'description', + type: 'String', + optional: true, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "labels", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'labels', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'Int', + foreignKeyFor: ['project'] as readonly string[], }, tasks: { - name: "tasks", - type: "TaskLabel", + name: 'tasks', + type: 'TaskLabel', array: true, - relation: { opposite: "label" } - } + relation: { opposite: 'label' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId"), ExpressionUtils.field("name")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('projectId'), + ExpressionUtils.field('name'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - projectId_name: { projectId: { type: "Int" }, name: { type: "String" } } - } + id: { type: 'Int' }, + projectId_name: { projectId: { type: 'Int' }, name: { type: 'String' } }, + }, }, TaskLabel: { - name: "TaskLabel", + name: 'TaskLabel', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, appliedAt: { - name: "appliedAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'appliedAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, task: { - name: "task", - type: "Task", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "labels", fields: ["taskId"], references: ["id"] } + name: 'task', + type: 'Task', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'labels', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", - foreignKeyFor: [ - "task" - ] as readonly string[] + name: 'taskId', + type: 'Int', + foreignKeyFor: ['task'] as readonly string[], }, label: { - name: "label", - type: "Label", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("labelId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "tasks", fields: ["labelId"], references: ["id"] } + name: 'label', + type: 'Label', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('labelId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'tasks', fields: ['labelId'], references: ['id'] }, }, labelId: { - name: "labelId", - type: "Int", - foreignKeyFor: [ - "label" - ] as readonly string[] - } + name: 'labelId', + type: 'Int', + foreignKeyFor: ['label'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId"), ExpressionUtils.field("labelId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('taskId'), + ExpressionUtils.field('labelId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - taskId_labelId: { taskId: { type: "Int" }, labelId: { type: "Int" } } - } + id: { type: 'Int' }, + taskId_labelId: { taskId: { type: 'Int' }, labelId: { type: 'Int' } }, + }, }, Comment: { - name: "Comment", + name: 'Comment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, body: { - name: "body", - type: "String" + name: 'body', + type: 'String', }, kind: { - name: "kind", - type: "CommentKind", - isDiscriminator: true + name: 'kind', + type: 'CommentKind', + isDiscriminator: true, }, edited: { - name: "edited", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'edited', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, resolved: { - name: "resolved", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'resolved', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, task: { - name: "task", - type: "Task", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } + name: 'task', + type: 'Task', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", - foreignKeyFor: [ - "task" - ] as readonly string[] + name: 'taskId', + type: 'Int', + foreignKeyFor: ['task'] as readonly string[], }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "Int", - foreignKeyFor: [ - "author" - ] as readonly string[] + name: 'authorId', + type: 'Int', + foreignKeyFor: ['author'] as readonly string[], }, parent: { - name: "parent", - type: "Comment", + name: 'parent', + type: 'Comment', optional: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - foreignKeyFor: [ - "parent" - ] as readonly string[] + foreignKeyFor: ['parent'] as readonly string[], }, replies: { - name: "replies", - type: "Comment", + name: 'replies', + type: 'Comment', array: true, - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], - relation: { opposite: "parent", name: "CommentReplies" } + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parent', name: 'CommentReplies' }, }, reactions: { - name: "reactions", - type: "CommentReaction", + name: 'reactions', + type: 'CommentReaction', array: true, - relation: { opposite: "comment" } - } + relation: { opposite: 'comment' }, + }, }, attributes: [ - { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("kind") }] } + { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('kind') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, isDelegate: true, - subModels: ["TextComment", "CodeSnippetComment", "AttachmentComment"] + subModels: ['TextComment', 'CodeSnippetComment', 'AttachmentComment'], }, TextComment: { - name: "TextComment", - baseModel: "Comment", + name: 'TextComment', + baseModel: 'Comment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - originModel: "Comment", - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + originModel: 'Comment', + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, body: { - name: "body", - type: "String", - originModel: "Comment" + name: 'body', + type: 'String', + originModel: 'Comment', }, kind: { - name: "kind", - type: "CommentKind", - originModel: "Comment", - isDiscriminator: true + name: 'kind', + type: 'CommentKind', + originModel: 'Comment', + isDiscriminator: true, }, edited: { - name: "edited", - type: "Boolean", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'edited', + type: 'Boolean', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, resolved: { - name: "resolved", - type: "Boolean", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'resolved', + type: 'Boolean', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, task: { - name: "task", - type: "Task", - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } + name: 'task', + type: 'Task', + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", - originModel: "Comment", - foreignKeyFor: [ - "task" - ] as readonly string[] + name: 'taskId', + type: 'Int', + originModel: 'Comment', + foreignKeyFor: ['task'] as readonly string[], }, author: { - name: "author", - type: "User", - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } + name: 'author', + type: 'User', + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "Int", - originModel: "Comment", - foreignKeyFor: [ - "author" - ] as readonly string[] + name: 'authorId', + type: 'Int', + originModel: 'Comment', + foreignKeyFor: ['author'] as readonly string[], }, parent: { - name: "parent", - type: "Comment", + name: 'parent', + type: 'Comment', optional: true, - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - originModel: "Comment", - foreignKeyFor: [ - "parent" - ] as readonly string[] + originModel: 'Comment', + foreignKeyFor: ['parent'] as readonly string[], }, replies: { - name: "replies", - type: "Comment", + name: 'replies', + type: 'Comment', array: true, - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], - relation: { opposite: "parent", name: "CommentReplies" } + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parent', name: 'CommentReplies' }, }, reactions: { - name: "reactions", - type: "CommentReaction", + name: 'reactions', + type: 'CommentReaction', array: true, - originModel: "Comment", - relation: { opposite: "comment" } - } + originModel: 'Comment', + relation: { opposite: 'comment' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, CodeSnippetComment: { - name: "CodeSnippetComment", - baseModel: "Comment", + name: 'CodeSnippetComment', + baseModel: 'Comment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - originModel: "Comment", - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + originModel: 'Comment', + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, body: { - name: "body", - type: "String", - originModel: "Comment" + name: 'body', + type: 'String', + originModel: 'Comment', }, kind: { - name: "kind", - type: "CommentKind", - originModel: "Comment", - isDiscriminator: true + name: 'kind', + type: 'CommentKind', + originModel: 'Comment', + isDiscriminator: true, }, edited: { - name: "edited", - type: "Boolean", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'edited', + type: 'Boolean', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, resolved: { - name: "resolved", - type: "Boolean", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'resolved', + type: 'Boolean', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, task: { - name: "task", - type: "Task", - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } + name: 'task', + type: 'Task', + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", - originModel: "Comment", - foreignKeyFor: [ - "task" - ] as readonly string[] + name: 'taskId', + type: 'Int', + originModel: 'Comment', + foreignKeyFor: ['task'] as readonly string[], }, author: { - name: "author", - type: "User", - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } + name: 'author', + type: 'User', + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "Int", - originModel: "Comment", - foreignKeyFor: [ - "author" - ] as readonly string[] + name: 'authorId', + type: 'Int', + originModel: 'Comment', + foreignKeyFor: ['author'] as readonly string[], }, parent: { - name: "parent", - type: "Comment", + name: 'parent', + type: 'Comment', optional: true, - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - originModel: "Comment", - foreignKeyFor: [ - "parent" - ] as readonly string[] + originModel: 'Comment', + foreignKeyFor: ['parent'] as readonly string[], }, replies: { - name: "replies", - type: "Comment", + name: 'replies', + type: 'Comment', array: true, - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], - relation: { opposite: "parent", name: "CommentReplies" } + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parent', name: 'CommentReplies' }, }, reactions: { - name: "reactions", - type: "CommentReaction", + name: 'reactions', + type: 'CommentReaction', array: true, - originModel: "Comment", - relation: { opposite: "comment" } + originModel: 'Comment', + relation: { opposite: 'comment' }, }, language: { - name: "language", - type: "String", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("plaintext") }] }] as readonly AttributeApplication[], - default: "plaintext" as FieldDefault - } + name: 'language', + type: 'String', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('plaintext') }] }, + ] as readonly AttributeApplication[], + default: 'plaintext' as FieldDefault, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, AttachmentComment: { - name: "AttachmentComment", - baseModel: "Comment", + name: 'AttachmentComment', + baseModel: 'Comment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - originModel: "Comment", - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + originModel: 'Comment', + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, body: { - name: "body", - type: "String", - originModel: "Comment" + name: 'body', + type: 'String', + originModel: 'Comment', }, kind: { - name: "kind", - type: "CommentKind", - originModel: "Comment", - isDiscriminator: true + name: 'kind', + type: 'CommentKind', + originModel: 'Comment', + isDiscriminator: true, }, edited: { - name: "edited", - type: "Boolean", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'edited', + type: 'Boolean', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, resolved: { - name: "resolved", - type: "Boolean", - originModel: "Comment", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'resolved', + type: 'Boolean', + originModel: 'Comment', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, task: { - name: "task", - type: "Task", - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } + name: 'task', + type: 'Task', + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", - originModel: "Comment", - foreignKeyFor: [ - "task" - ] as readonly string[] + name: 'taskId', + type: 'Int', + originModel: 'Comment', + foreignKeyFor: ['task'] as readonly string[], }, author: { - name: "author", - type: "User", - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } + name: 'author', + type: 'User', + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, }, authorId: { - name: "authorId", - type: "Int", - originModel: "Comment", - foreignKeyFor: [ - "author" - ] as readonly string[] + name: 'authorId', + type: 'Int', + originModel: 'Comment', + foreignKeyFor: ['author'] as readonly string[], }, parent: { - name: "parent", - type: "Comment", + name: 'parent', + type: 'Comment', optional: true, - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, }, parentId: { - name: "parentId", - type: "Int", + name: 'parentId', + type: 'Int', optional: true, - originModel: "Comment", - foreignKeyFor: [ - "parent" - ] as readonly string[] + originModel: 'Comment', + foreignKeyFor: ['parent'] as readonly string[], }, replies: { - name: "replies", - type: "Comment", + name: 'replies', + type: 'Comment', array: true, - originModel: "Comment", - attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], - relation: { opposite: "parent", name: "CommentReplies" } + originModel: 'Comment', + attributes: [ + { + name: '@relation', + args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'parent', name: 'CommentReplies' }, }, reactions: { - name: "reactions", - type: "CommentReaction", + name: 'reactions', + type: 'CommentReaction', array: true, - originModel: "Comment", - relation: { opposite: "comment" } + originModel: 'Comment', + relation: { opposite: 'comment' }, }, attachFilename: { - name: "attachFilename", - type: "String" + name: 'attachFilename', + type: 'String', }, attachMimeType: { - name: "attachMimeType", - type: "String" + name: 'attachMimeType', + type: 'String', }, attachSizeBytes: { - name: "attachSizeBytes", - type: "Int" + name: 'attachSizeBytes', + type: 'Int', }, attachStorageKey: { - name: "attachStorageKey", - type: "String" - } + name: 'attachStorageKey', + type: 'String', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, CommentReaction: { - name: "CommentReaction", + name: 'CommentReaction', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, emoji: { - name: "emoji", - type: "String" + name: 'emoji', + type: 'String', }, comment: { - name: "comment", - type: "Comment", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("commentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "reactions", fields: ["commentId"], references: ["id"] } + name: 'comment', + type: 'Comment', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('commentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'reactions', fields: ['commentId'], references: ['id'] }, }, commentId: { - name: "commentId", - type: "Int", - foreignKeyFor: [ - "comment" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'commentId', + type: 'Int', + foreignKeyFor: ['comment'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Review: { - name: "Review", + name: 'Review', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, decision: { - name: "decision", - type: "ReviewDecision", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], - default: "PENDING" as FieldDefault + name: 'decision', + type: 'ReviewDecision', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, + ] as readonly AttributeApplication[], + default: 'PENDING' as FieldDefault, }, summary: { - name: "summary", - type: "String", - optional: true + name: 'summary', + type: 'String', + optional: true, }, task: { - name: "task", - type: "Task", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "reviews", fields: ["taskId"], references: ["id"] } + name: 'task', + type: 'Task', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'reviews', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", - foreignKeyFor: [ - "task" - ] as readonly string[] + name: 'taskId', + type: 'Int', + foreignKeyFor: ['task'] as readonly string[], }, reviewer: { - name: "reviewer", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reviewerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "reviews", fields: ["reviewerId"], references: ["id"] } + name: 'reviewer', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('reviewerId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'reviews', fields: ['reviewerId'], references: ['id'] }, }, reviewerId: { - name: "reviewerId", - type: "Int", - foreignKeyFor: [ - "reviewer" - ] as readonly string[] + name: 'reviewerId', + type: 'Int', + foreignKeyFor: ['reviewer'] as readonly string[], }, comments: { - name: "comments", - type: "ReviewComment", + name: 'comments', + type: 'ReviewComment', array: true, - relation: { opposite: "review" } - } + relation: { opposite: 'review' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, ReviewComment: { - name: "ReviewComment", + name: 'ReviewComment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, body: { - name: "body", - type: "String" + name: 'body', + type: 'String', }, lineRef: { - name: "lineRef", - type: "String", - optional: true + name: 'lineRef', + type: 'String', + optional: true, }, review: { - name: "review", - type: "Review", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reviewId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "comments", fields: ["reviewId"], references: ["id"] } + name: 'review', + type: 'Review', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('reviewId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'comments', fields: ['reviewId'], references: ['id'] }, }, reviewId: { - name: "reviewId", - type: "Int", - foreignKeyFor: [ - "review" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'reviewId', + type: 'Int', + foreignKeyFor: ['review'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Attachment: { - name: "Attachment", + name: 'Attachment', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, filename: { - name: "filename", - type: "String" + name: 'filename', + type: 'String', }, mimeType: { - name: "mimeType", - type: "String" + name: 'mimeType', + type: 'String', }, sizeBytes: { - name: "sizeBytes", - type: "Int" + name: 'sizeBytes', + type: 'Int', }, storageKey: { - name: "storageKey", - type: "String" + name: 'storageKey', + type: 'String', }, task: { - name: "task", - type: "Task", + name: 'task', + type: 'Task', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "attachments", fields: ["taskId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'attachments', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", + name: 'taskId', + type: 'Int', optional: true, - foreignKeyFor: [ - "task" - ] as readonly string[] - } + foreignKeyFor: ['task'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Document: { - name: "Document", + name: 'Document', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, content: { - name: "content", - type: "String", - optional: true + name: 'content', + type: 'String', + optional: true, }, published: { - name: "published", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'published', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "documents", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'documents', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", - foreignKeyFor: [ - "project" - ] as readonly string[] + name: 'projectId', + type: 'Int', + foreignKeyFor: ['project'] as readonly string[], }, sections: { - name: "sections", - type: "DocumentSection", + name: 'sections', + type: 'DocumentSection', array: true, - relation: { opposite: "document" } - } + relation: { opposite: 'document' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, DocumentSection: { - name: "DocumentSection", + name: 'DocumentSection', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, order: { - name: "order", - type: "Int" + name: 'order', + type: 'Int', }, heading: { - name: "heading", - type: "String" + name: 'heading', + type: 'String', }, content: { - name: "content", - type: "String", - optional: true + name: 'content', + type: 'String', + optional: true, }, document: { - name: "document", - type: "Document", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("documentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "sections", fields: ["documentId"], references: ["id"] } + name: 'document', + type: 'Document', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('documentId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'sections', fields: ['documentId'], references: ['id'] }, }, documentId: { - name: "documentId", - type: "Int", - foreignKeyFor: [ - "document" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'documentId', + type: 'Int', + foreignKeyFor: ['document'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, TimeEntry: { - name: "TimeEntry", + name: 'TimeEntry', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, startedAt: { - name: "startedAt", - type: "DateTime" + name: 'startedAt', + type: 'DateTime', }, stoppedAt: { - name: "stoppedAt", - type: "DateTime", - optional: true + name: 'stoppedAt', + type: 'DateTime', + optional: true, }, durationMin: { - name: "durationMin", - type: "Int", - optional: true + name: 'durationMin', + type: 'Int', + optional: true, }, note: { - name: "note", - type: "String", - optional: true + name: 'note', + type: 'String', + optional: true, }, task: { - name: "task", - type: "Task", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "timeEntries", fields: ["taskId"], references: ["id"] } + name: 'task', + type: 'Task', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'timeEntries', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", - foreignKeyFor: [ - "task" - ] as readonly string[] + name: 'taskId', + type: 'Int', + foreignKeyFor: ['task'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "timeEntries", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'timeEntries', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Notification: { - name: "Notification", + name: 'Notification', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, readAt: { - name: "readAt", - type: "DateTime", - optional: true + name: 'readAt', + type: 'DateTime', + optional: true, }, kind: { - name: "kind", - type: "NotificationType", - isDiscriminator: true + name: 'kind', + type: 'NotificationType', + isDiscriminator: true, }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] - } + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], + }, }, attributes: [ - { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("kind") }] } + { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('kind') }] }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } + id: { type: 'Int' }, }, isDelegate: true, - subModels: ["MentionNotification", "AssignmentNotification", "StatusChangeNotification", "CommentNotification", "ReviewRequestNotification", "ApprovalNotification"] + subModels: [ + 'MentionNotification', + 'AssignmentNotification', + 'StatusChangeNotification', + 'CommentNotification', + 'ReviewRequestNotification', + 'ApprovalNotification', + ], }, MentionNotification: { - name: "MentionNotification", - baseModel: "Notification", + name: 'MentionNotification', + baseModel: 'Notification', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Notification", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Notification', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, readAt: { - name: "readAt", - type: "DateTime", + name: 'readAt', + type: 'DateTime', optional: true, - originModel: "Notification" + originModel: 'Notification', }, kind: { - name: "kind", - type: "NotificationType", - originModel: "Notification", - isDiscriminator: true + name: 'kind', + type: 'NotificationType', + originModel: 'Notification', + isDiscriminator: true, }, user: { - name: "user", - type: "User", - originModel: "Notification", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + originModel: 'Notification', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - originModel: "Notification", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + originModel: 'Notification', + foreignKeyFor: ['user'] as readonly string[], }, mentionedByUserId: { - name: "mentionedByUserId", - type: "Int" + name: 'mentionedByUserId', + type: 'Int', }, taskId: { - name: "taskId", - type: "Int" - } + name: 'taskId', + type: 'Int', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, AssignmentNotification: { - name: "AssignmentNotification", - baseModel: "Notification", + name: 'AssignmentNotification', + baseModel: 'Notification', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Notification", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Notification', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, readAt: { - name: "readAt", - type: "DateTime", + name: 'readAt', + type: 'DateTime', optional: true, - originModel: "Notification" + originModel: 'Notification', }, kind: { - name: "kind", - type: "NotificationType", - originModel: "Notification", - isDiscriminator: true + name: 'kind', + type: 'NotificationType', + originModel: 'Notification', + isDiscriminator: true, }, user: { - name: "user", - type: "User", - originModel: "Notification", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + originModel: 'Notification', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - originModel: "Notification", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + originModel: 'Notification', + foreignKeyFor: ['user'] as readonly string[], }, taskId: { - name: "taskId", - type: "Int" + name: 'taskId', + type: 'Int', }, assignedByUserId: { - name: "assignedByUserId", - type: "Int" - } + name: 'assignedByUserId', + type: 'Int', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, StatusChangeNotification: { - name: "StatusChangeNotification", - baseModel: "Notification", + name: 'StatusChangeNotification', + baseModel: 'Notification', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Notification", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Notification', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, readAt: { - name: "readAt", - type: "DateTime", + name: 'readAt', + type: 'DateTime', optional: true, - originModel: "Notification" + originModel: 'Notification', }, kind: { - name: "kind", - type: "NotificationType", - originModel: "Notification", - isDiscriminator: true + name: 'kind', + type: 'NotificationType', + originModel: 'Notification', + isDiscriminator: true, }, user: { - name: "user", - type: "User", - originModel: "Notification", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + originModel: 'Notification', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - originModel: "Notification", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + originModel: 'Notification', + foreignKeyFor: ['user'] as readonly string[], }, taskId: { - name: "taskId", - type: "Int" + name: 'taskId', + type: 'Int', }, fromStatus: { - name: "fromStatus", - type: "String" + name: 'fromStatus', + type: 'String', }, toStatus: { - name: "toStatus", - type: "String" - } + name: 'toStatus', + type: 'String', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, CommentNotification: { - name: "CommentNotification", - baseModel: "Notification", + name: 'CommentNotification', + baseModel: 'Notification', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Notification", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Notification', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, readAt: { - name: "readAt", - type: "DateTime", + name: 'readAt', + type: 'DateTime', optional: true, - originModel: "Notification" + originModel: 'Notification', }, kind: { - name: "kind", - type: "NotificationType", - originModel: "Notification", - isDiscriminator: true + name: 'kind', + type: 'NotificationType', + originModel: 'Notification', + isDiscriminator: true, }, user: { - name: "user", - type: "User", - originModel: "Notification", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + originModel: 'Notification', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - originModel: "Notification", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + originModel: 'Notification', + foreignKeyFor: ['user'] as readonly string[], }, commentId: { - name: "commentId", - type: "Int" - } + name: 'commentId', + type: 'Int', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, ReviewRequestNotification: { - name: "ReviewRequestNotification", - baseModel: "Notification", + name: 'ReviewRequestNotification', + baseModel: 'Notification', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Notification", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Notification', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, readAt: { - name: "readAt", - type: "DateTime", + name: 'readAt', + type: 'DateTime', optional: true, - originModel: "Notification" + originModel: 'Notification', }, kind: { - name: "kind", - type: "NotificationType", - originModel: "Notification", - isDiscriminator: true + name: 'kind', + type: 'NotificationType', + originModel: 'Notification', + isDiscriminator: true, }, user: { - name: "user", - type: "User", - originModel: "Notification", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + originModel: 'Notification', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - originModel: "Notification", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + originModel: 'Notification', + foreignKeyFor: ['user'] as readonly string[], }, reviewId: { - name: "reviewId", - type: "Int" + name: 'reviewId', + type: 'Int', }, requestedByUserId: { - name: "requestedByUserId", - type: "Int" - } + name: 'requestedByUserId', + type: 'Int', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, ApprovalNotification: { - name: "ApprovalNotification", - baseModel: "Notification", + name: 'ApprovalNotification', + baseModel: 'Notification', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - originModel: "Notification", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + originModel: 'Notification', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, readAt: { - name: "readAt", - type: "DateTime", + name: 'readAt', + type: 'DateTime', optional: true, - originModel: "Notification" + originModel: 'Notification', }, kind: { - name: "kind", - type: "NotificationType", - originModel: "Notification", - isDiscriminator: true + name: 'kind', + type: 'NotificationType', + originModel: 'Notification', + isDiscriminator: true, }, user: { - name: "user", - type: "User", - originModel: "Notification", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + originModel: 'Notification', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - originModel: "Notification", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + originModel: 'Notification', + foreignKeyFor: ['user'] as readonly string[], }, targetType: { - name: "targetType", - type: "String" + name: 'targetType', + type: 'String', }, targetId: { - name: "targetId", - type: "Int" - } + name: 'targetId', + type: 'Int', + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, ActivityLogEntry: { - name: "ActivityLogEntry", + name: 'ActivityLogEntry', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, action: { - name: "action", - type: "String" + name: 'action', + type: 'String', }, meta: { - name: "meta", - type: "String", - optional: true + name: 'meta', + type: 'String', + optional: true, }, organization: { - name: "organization", - type: "Organization", + name: 'organization', + type: 'Organization', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "activityLog", fields: ["organizationId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'activityLog', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", + name: 'organizationId', + type: 'Int', optional: true, - foreignKeyFor: [ - "organization" - ] as readonly string[] + foreignKeyFor: ['organization'] as readonly string[], }, user: { - name: "user", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "activityLog", fields: ["userId"], references: ["id"] } + name: 'user', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'activityLog', fields: ['userId'], references: ['id'] }, }, userId: { - name: "userId", - type: "Int", - foreignKeyFor: [ - "user" - ] as readonly string[] + name: 'userId', + type: 'Int', + foreignKeyFor: ['user'] as readonly string[], }, task: { - name: "task", - type: "Task", + name: 'task', + type: 'Task', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "activityLog", fields: ["taskId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'activityLog', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", + name: 'taskId', + type: 'Int', optional: true, - foreignKeyFor: [ - "task" - ] as readonly string[] - } + foreignKeyFor: ['task'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, AuditLog: { - name: "AuditLog", + name: 'AuditLog', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, entityType: { - name: "entityType", - type: "String" + name: 'entityType', + type: 'String', }, entityId: { - name: "entityId", - type: "Int" + name: 'entityId', + type: 'Int', }, action: { - name: "action", - type: "String" + name: 'action', + type: 'String', }, diff: { - name: "diff", - type: "String", - optional: true + name: 'diff', + type: 'String', + optional: true, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "auditLogs", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'auditLogs', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, actor: { - name: "actor", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("actorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "auditLogs", fields: ["actorId"], references: ["id"] } + name: 'actor', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('actorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'auditLogs', fields: ['actorId'], references: ['id'] }, }, actorId: { - name: "actorId", - type: "Int", - foreignKeyFor: [ - "actor" - ] as readonly string[] - } - }, - idFields: ["id"], + name: 'actorId', + type: 'Int', + foreignKeyFor: ['actor'] as readonly string[], + }, + }, + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, CustomFieldDefinition: { - name: "CustomFieldDefinition", + name: 'CustomFieldDefinition', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, name: { - name: "name", - type: "String" + name: 'name', + type: 'String', }, fieldType: { - name: "fieldType", - type: "String" + name: 'fieldType', + type: 'String', }, required: { - name: "required", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'required', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, defaultValue: { - name: "defaultValue", - type: "String", - optional: true + name: 'defaultValue', + type: 'String', + optional: true, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "customFields", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'customFields', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, values: { - name: "values", - type: "CustomFieldValue", + name: 'values', + type: 'CustomFieldValue', array: true, - relation: { opposite: "field" } - } + relation: { opposite: 'field' }, + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, CustomFieldValue: { - name: "CustomFieldValue", + name: 'CustomFieldValue', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, value: { - name: "value", - type: "String" + name: 'value', + type: 'String', }, field: { - name: "field", - type: "CustomFieldDefinition", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("fieldId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "values", fields: ["fieldId"], references: ["id"] } + name: 'field', + type: 'CustomFieldDefinition', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('fieldId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'values', fields: ['fieldId'], references: ['id'] }, }, fieldId: { - name: "fieldId", - type: "Int", - foreignKeyFor: [ - "field" - ] as readonly string[] + name: 'fieldId', + type: 'Int', + foreignKeyFor: ['field'] as readonly string[], }, project: { - name: "project", - type: "Project", + name: 'project', + type: 'Project', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "customFieldValues", fields: ["projectId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'customFieldValues', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", + name: 'projectId', + type: 'Int', optional: true, - foreignKeyFor: [ - "project" - ] as readonly string[] + foreignKeyFor: ['project'] as readonly string[], }, task: { - name: "task", - type: "Task", + name: 'task', + type: 'Task', optional: true, - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "customFieldValues", fields: ["taskId"], references: ["id"] } + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'customFieldValues', fields: ['taskId'], references: ['id'] }, }, taskId: { - name: "taskId", - type: "Int", + name: 'taskId', + type: 'Int', optional: true, - foreignKeyFor: [ - "task" - ] as readonly string[] - } + foreignKeyFor: ['task'] as readonly string[], + }, }, - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" } - } + id: { type: 'Int' }, + }, }, Integration: { - name: "Integration", + name: 'Integration', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, updatedAt: { - name: "updatedAt", - type: "DateTime", + name: 'updatedAt', + type: 'DateTime', updatedAt: true, - attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], }, provider: { - name: "provider", - type: "String" + name: 'provider', + type: 'String', }, accessToken: { - name: "accessToken", - type: "String", - optional: true + name: 'accessToken', + type: 'String', + optional: true, }, config: { - name: "config", - type: "String", - optional: true + name: 'config', + type: 'String', + optional: true, }, organization: { - name: "organization", - type: "Organization", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "integrations", fields: ["organizationId"], references: ["id"] } + name: 'organization', + type: 'Organization', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'integrations', fields: ['organizationId'], references: ['id'] }, }, organizationId: { - name: "organizationId", - type: "Int", - foreignKeyFor: [ - "organization" - ] as readonly string[] + name: 'organizationId', + type: 'Int', + foreignKeyFor: ['organization'] as readonly string[], }, links: { - name: "links", - type: "IntegrationLink", + name: 'links', + type: 'IntegrationLink', array: true, - relation: { opposite: "integration" } - } + relation: { opposite: 'integration' }, + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("provider")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('organizationId'), + ExpressionUtils.field('provider'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - organizationId_provider: { organizationId: { type: "Int" }, provider: { type: "String" } } - } + id: { type: 'Int' }, + organizationId_provider: { organizationId: { type: 'Int' }, provider: { type: 'String' } }, + }, }, IntegrationLink: { - name: "IntegrationLink", + name: 'IntegrationLink', fields: { id: { - name: "id", - type: "Int", + name: 'id', + type: 'Int', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("autoincrement") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('autoincrement') as FieldDefault, }, createdAt: { - name: "createdAt", - type: "DateTime", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("now") as FieldDefault + name: 'createdAt', + type: 'DateTime', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('now') as FieldDefault, }, externalId: { - name: "externalId", - type: "String" + name: 'externalId', + type: 'String', }, url: { - name: "url", - type: "String", - optional: true + name: 'url', + type: 'String', + optional: true, }, integration: { - name: "integration", - type: "Integration", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("integrationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "links", fields: ["integrationId"], references: ["id"] } + name: 'integration', + type: 'Integration', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('integrationId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'links', fields: ['integrationId'], references: ['id'] }, }, integrationId: { - name: "integrationId", - type: "Int", - foreignKeyFor: [ - "integration" - ] as readonly string[] + name: 'integrationId', + type: 'Int', + foreignKeyFor: ['integration'] as readonly string[], }, project: { - name: "project", - type: "Project", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], - relation: { opposite: "integrationLinks", fields: ["projectId"], references: ["id"] } + name: 'project', + type: 'Project', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), + }, + ], + }, + ] as readonly AttributeApplication[], + relation: { opposite: 'integrationLinks', fields: ['projectId'], references: ['id'] }, }, projectId: { - name: "projectId", - type: "Int", - foreignKeyFor: [ - "project" - ] as readonly string[] - } + name: 'projectId', + type: 'Int', + foreignKeyFor: ['project'] as readonly string[], + }, }, attributes: [ - { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("integrationId"), ExpressionUtils.field("externalId")]) }] } + { + name: '@@unique', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('Int', [ + ExpressionUtils.field('integrationId'), + ExpressionUtils.field('externalId'), + ]), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "Int" }, - integrationId_externalId: { integrationId: { type: "Int" }, externalId: { type: "String" } } - } - } + id: { type: 'Int' }, + integrationId_externalId: { integrationId: { type: 'Int' }, externalId: { type: 'String' } }, + }, + }, } as const; enums = { UserRole: { - name: "UserRole", + name: 'UserRole', values: { - SUPER_ADMIN: "SUPER_ADMIN", - ADMIN: "ADMIN", - MANAGER: "MANAGER", - MEMBER: "MEMBER", - GUEST: "GUEST" - } + SUPER_ADMIN: 'SUPER_ADMIN', + ADMIN: 'ADMIN', + MANAGER: 'MANAGER', + MEMBER: 'MEMBER', + GUEST: 'GUEST', + }, }, ProjectStatus: { - name: "ProjectStatus", + name: 'ProjectStatus', values: { - DRAFT: "DRAFT", - ACTIVE: "ACTIVE", - ARCHIVED: "ARCHIVED", - DELETED: "DELETED" - } + DRAFT: 'DRAFT', + ACTIVE: 'ACTIVE', + ARCHIVED: 'ARCHIVED', + DELETED: 'DELETED', + }, }, TaskStatus: { - name: "TaskStatus", + name: 'TaskStatus', values: { - BACKLOG: "BACKLOG", - TODO: "TODO", - IN_PROGRESS: "IN_PROGRESS", - IN_REVIEW: "IN_REVIEW", - DONE: "DONE", - CANCELLED: "CANCELLED" - } + BACKLOG: 'BACKLOG', + TODO: 'TODO', + IN_PROGRESS: 'IN_PROGRESS', + IN_REVIEW: 'IN_REVIEW', + DONE: 'DONE', + CANCELLED: 'CANCELLED', + }, }, TaskPriority: { - name: "TaskPriority", + name: 'TaskPriority', values: { - CRITICAL: "CRITICAL", - HIGH: "HIGH", - MEDIUM: "MEDIUM", - LOW: "LOW" - } + CRITICAL: 'CRITICAL', + HIGH: 'HIGH', + MEDIUM: 'MEDIUM', + LOW: 'LOW', + }, }, CommentKind: { - name: "CommentKind", + name: 'CommentKind', values: { - TEXT: "TEXT", - CODE_SNIPPET: "CODE_SNIPPET", - ATTACHMENT: "ATTACHMENT" - } + TEXT: 'TEXT', + CODE_SNIPPET: 'CODE_SNIPPET', + ATTACHMENT: 'ATTACHMENT', + }, }, NotificationType: { - name: "NotificationType", + name: 'NotificationType', values: { - MENTION: "MENTION", - ASSIGNMENT: "ASSIGNMENT", - STATUS_CHANGE: "STATUS_CHANGE", - COMMENT: "COMMENT", - REVIEW_REQUEST: "REVIEW_REQUEST", - APPROVAL_NEEDED: "APPROVAL_NEEDED" - } + MENTION: 'MENTION', + ASSIGNMENT: 'ASSIGNMENT', + STATUS_CHANGE: 'STATUS_CHANGE', + COMMENT: 'COMMENT', + REVIEW_REQUEST: 'REVIEW_REQUEST', + APPROVAL_NEEDED: 'APPROVAL_NEEDED', + }, }, ReviewDecision: { - name: "ReviewDecision", + name: 'ReviewDecision', values: { - PENDING: "PENDING", - APPROVED: "APPROVED", - REJECTED: "REJECTED", - CHANGES_REQUESTED: "CHANGES_REQUESTED" - } + PENDING: 'PENDING', + APPROVED: 'APPROVED', + REJECTED: 'REJECTED', + CHANGES_REQUESTED: 'CHANGES_REQUESTED', + }, }, InvoiceStatus: { - name: "InvoiceStatus", + name: 'InvoiceStatus', values: { - DRAFT: "DRAFT", - SENT: "SENT", - PAID: "PAID", - OVERDUE: "OVERDUE", - CANCELLED: "CANCELLED" - } + DRAFT: 'DRAFT', + SENT: 'SENT', + PAID: 'PAID', + OVERDUE: 'OVERDUE', + CANCELLED: 'CANCELLED', + }, }, PaymentMethod: { - name: "PaymentMethod", + name: 'PaymentMethod', values: { - CREDIT_CARD: "CREDIT_CARD", - BANK_TRANSFER: "BANK_TRANSFER", - PAYPAL: "PAYPAL", - CRYPTO: "CRYPTO" - } - } + CREDIT_CARD: 'CREDIT_CARD', + BANK_TRANSFER: 'BANK_TRANSFER', + PAYPAL: 'PAYPAL', + CRYPTO: 'CRYPTO', + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/regression/test/issue-2433.test.ts b/tests/regression/test/issue-2433.test.ts index ca0e93a2d..0e448ca97 100644 --- a/tests/regression/test/issue-2433.test.ts +++ b/tests/regression/test/issue-2433.test.ts @@ -17,9 +17,7 @@ model Post { content: 'hello', }); // Should fail validation: content exceeds max - await expect( - db.post.create({ data: { content: 'x'.repeat(10001) } }), - ).toBeRejectedByValidation(); + await expect(db.post.create({ data: { content: 'x'.repeat(10001) } })).toBeRejectedByValidation(); }); it('should reject short string when only @length(min: N) is specified', async () => { @@ -36,8 +34,6 @@ model Post { content: 'hello world', }); // Should fail validation: content is too short - await expect( - db.post.create({ data: { content: 'hi' } }), - ).toBeRejectedByValidation(); + await expect(db.post.create({ data: { content: 'hi' } })).toBeRejectedByValidation(); }); }); diff --git a/tests/regression/test/issue-2460.test.ts b/tests/regression/test/issue-2460.test.ts index 2ad48a147..e7547e346 100644 --- a/tests/regression/test/issue-2460.test.ts +++ b/tests/regression/test/issue-2460.test.ts @@ -26,10 +26,7 @@ model Item { const user = await db.user.create({ data: { role: 'admin' } }); const result = await db.$setAuth(user).item.createManyAndReturn({ - data: [ - { key: 'a', note: 'hello' }, - { key: 'b' }, - ], + data: [{ key: 'a', note: 'hello' }, { key: 'b' }], }); expect(result).toHaveLength(2); diff --git a/tests/regression/test/issue-2757.test.ts b/tests/regression/test/issue-2757.test.ts index 9c797e341..3041b4d13 100644 --- a/tests/regression/test/issue-2757.test.ts +++ b/tests/regression/test/issue-2757.test.ts @@ -30,18 +30,18 @@ model Product { }); // nested read traverses the right column - await expect(db.category.findUnique({ where: { id: c1.id }, include: { products: true } })).resolves.toMatchObject( - { products: [expect.objectContaining({ id: 'p1' })] }, - ); - await expect(db.category.findUnique({ where: { id: c1.id }, include: { featured: true } })).resolves.toMatchObject( - { featured: [] }, - ); - await expect(db.category.findUnique({ where: { id: c2.id }, include: { products: true } })).resolves.toMatchObject( - { products: [] }, - ); - await expect(db.category.findUnique({ where: { id: c2.id }, include: { featured: true } })).resolves.toMatchObject( - { featured: [expect.objectContaining({ id: 'p1' })] }, - ); + await expect( + db.category.findUnique({ where: { id: c1.id }, include: { products: true } }), + ).resolves.toMatchObject({ products: [expect.objectContaining({ id: 'p1' })] }); + await expect( + db.category.findUnique({ where: { id: c1.id }, include: { featured: true } }), + ).resolves.toMatchObject({ featured: [] }); + await expect( + db.category.findUnique({ where: { id: c2.id }, include: { products: true } }), + ).resolves.toMatchObject({ products: [] }); + await expect( + db.category.findUnique({ where: { id: c2.id }, include: { featured: true } }), + ).resolves.toMatchObject({ featured: [expect.objectContaining({ id: 'p1' })] }); // relation filters traverse the right column await expect(db.category.findMany({ where: { products: { none: {} } } })).resolves.toEqual([ diff --git a/tests/regression/test/issue-2768.test.ts b/tests/regression/test/issue-2768.test.ts index 8a5b7a3a1..8ac652491 100644 --- a/tests/regression/test/issue-2768.test.ts +++ b/tests/regression/test/issue-2768.test.ts @@ -83,12 +83,12 @@ describe('Regression for issue 2768', () => { await db.employeeDeskSession.create({ data: { id: 's1', deskId: desk1.id } }); - await expect( - db.location.findMany({ where: { resources: { some: { name: 'desk1' } } } }), - ).resolves.toEqual([expect.objectContaining({ id: l1.id })]); + await expect(db.location.findMany({ where: { resources: { some: { name: 'desk1' } } } })).resolves.toEqual([ + expect.objectContaining({ id: l1.id }), + ]); - await expect( - db.location.findMany({ where: { resources: { none: { name: 'desk1' } } } }), - ).resolves.toEqual([expect.objectContaining({ id: l2.id })]); + await expect(db.location.findMany({ where: { resources: { none: { name: 'desk1' } } } })).resolves.toEqual([ + expect.objectContaining({ id: l2.id }), + ]); }); }); diff --git a/tests/regression/test/issue-423.test.ts b/tests/regression/test/issue-423.test.ts index 4b0ee49fa..cbc6631e7 100644 --- a/tests/regression/test/issue-423.test.ts +++ b/tests/regression/test/issue-423.test.ts @@ -10,7 +10,12 @@ model SampleBigInt { data String }`, ); - await expect(db.SampleBigInt.create({ data: { data: "create", id: BigInt(1) } })).resolves.toMatchObject({ id: BigInt(1), data: "create" }); - await expect(db.SampleBigInt.update({ data: { data: "update" }, where: { id: BigInt(1) } })).resolves.toMatchObject({ id: BigInt(1), data: "update" }); + await expect(db.SampleBigInt.create({ data: { data: 'create', id: BigInt(1) } })).resolves.toMatchObject({ + id: BigInt(1), + data: 'create', + }); + await expect( + db.SampleBigInt.update({ data: { data: 'update' }, where: { id: BigInt(1) } }), + ).resolves.toMatchObject({ id: BigInt(1), data: 'update' }); }); }); diff --git a/tests/runtimes/bun/schemas/input.ts b/tests/runtimes/bun/schemas/input.ts index c6b620ee6..54da1b3bc 100644 --- a/tests/runtimes/bun/schemas/input.ts +++ b/tests/runtimes/bun/schemas/input.ts @@ -5,48 +5,76 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; -export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; -export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; -export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; -export type PostCreateArgs = $CreateArgs<$Schema, "Post">; -export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; -export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; -export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; -export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; -export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; -export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; -export type PostCountArgs = $CountArgs<$Schema, "Post">; -export type PostAggregateArgs = $AggregateArgs<$Schema, "Post">; -export type PostGroupByArgs = $GroupByArgs<$Schema, "Post">; -export type PostWhereInput = $WhereInput<$Schema, "Post">; -export type PostSelect = $SelectInput<$Schema, "Post">; -export type PostInclude = $IncludeInput<$Schema, "Post">; -export type PostOmit = $OmitInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PostFindManyArgs = $FindManyArgs<$Schema, 'Post'>; +export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Post'>; +export type PostFindFirstArgs = $FindFirstArgs<$Schema, 'Post'>; +export type PostExistsArgs = $ExistsArgs<$Schema, 'Post'>; +export type PostCreateArgs = $CreateArgs<$Schema, 'Post'>; +export type PostCreateManyArgs = $CreateManyArgs<$Schema, 'Post'>; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpdateArgs = $UpdateArgs<$Schema, 'Post'>; +export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Post'>; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpsertArgs = $UpsertArgs<$Schema, 'Post'>; +export type PostDeleteArgs = $DeleteArgs<$Schema, 'Post'>; +export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Post'>; +export type PostCountArgs = $CountArgs<$Schema, 'Post'>; +export type PostAggregateArgs = $AggregateArgs<$Schema, 'Post'>; +export type PostGroupByArgs = $GroupByArgs<$Schema, 'Post'>; +export type PostWhereInput = $WhereInput<$Schema, 'Post'>; +export type PostSelect = $SelectInput<$Schema, 'Post'>; +export type PostInclude = $IncludeInput<$Schema, 'Post'>; +export type PostOmit = $OmitInput<$Schema, 'Post'>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Post', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Post', Args, Options>; diff --git a/tests/runtimes/bun/schemas/models.ts b/tests/runtimes/bun/schemas/models.ts index 03524da52..ca4b30618 100644 --- a/tests/runtimes/bun/schemas/models.ts +++ b/tests/runtimes/bun/schemas/models.ts @@ -5,7 +5,7 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Post = $ModelResult<$Schema, "Post">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Post = $ModelResult<$Schema, 'Post'>; diff --git a/tests/runtimes/bun/schemas/schema.ts b/tests/runtimes/bun/schemas/schema.ts index 64aa70864..508cf878c 100644 --- a/tests/runtimes/bun/schemas/schema.ts +++ b/tests/runtimes/bun/schemas/schema.ts @@ -5,96 +5,174 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "sqlite" + type: 'sqlite', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, attributes: [ - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("id")) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "!=", ExpressionUtils._null()) }] } + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + '==', + ExpressionUtils.field('id'), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '!=', ExpressionUtils._null()), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, published: { - name: "published", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'published', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'posts', + fields: ['authorId'], + references: ['id'], + onUpdate: 'Cascade', + onDelete: 'Cascade', + }, }, authorId: { - name: "authorId", - type: "String", - foreignKeyFor: [ - "author" - ] as readonly string[] - } + name: 'authorId', + type: 'String', + foreignKeyFor: ['author'] as readonly string[], + }, }, attributes: [ - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("authorId")) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.field("published") }] } + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + '==', + ExpressionUtils.field('authorId'), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { name: 'condition', value: ExpressionUtils.field('published') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/runtimes/edge-runtime/schemas/input.ts b/tests/runtimes/edge-runtime/schemas/input.ts index c6b620ee6..54da1b3bc 100644 --- a/tests/runtimes/edge-runtime/schemas/input.ts +++ b/tests/runtimes/edge-runtime/schemas/input.ts @@ -5,48 +5,76 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, ExistsArgs as $ExistsArgs, CreateArgs as $CreateArgs, CreateManyArgs as $CreateManyArgs, CreateManyAndReturnArgs as $CreateManyAndReturnArgs, UpdateArgs as $UpdateArgs, UpdateManyArgs as $UpdateManyArgs, UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, UpsertArgs as $UpsertArgs, DeleteArgs as $DeleteArgs, DeleteManyArgs as $DeleteManyArgs, CountArgs as $CountArgs, AggregateArgs as $AggregateArgs, GroupByArgs as $GroupByArgs, WhereInput as $WhereInput, SelectInput as $SelectInput, IncludeInput as $IncludeInput, OmitInput as $OmitInput, QueryOptions as $QueryOptions } from "@zenstackhq/orm"; -import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm"; -export type UserFindManyArgs = $FindManyArgs<$Schema, "User">; -export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">; -export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">; -export type UserExistsArgs = $ExistsArgs<$Schema, "User">; -export type UserCreateArgs = $CreateArgs<$Schema, "User">; -export type UserCreateManyArgs = $CreateManyArgs<$Schema, "User">; -export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "User">; -export type UserUpdateArgs = $UpdateArgs<$Schema, "User">; -export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, "User">; -export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "User">; -export type UserUpsertArgs = $UpsertArgs<$Schema, "User">; -export type UserDeleteArgs = $DeleteArgs<$Schema, "User">; -export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, "User">; -export type UserCountArgs = $CountArgs<$Schema, "User">; -export type UserAggregateArgs = $AggregateArgs<$Schema, "User">; -export type UserGroupByArgs = $GroupByArgs<$Schema, "User">; -export type UserWhereInput = $WhereInput<$Schema, "User">; -export type UserSelect = $SelectInput<$Schema, "User">; -export type UserInclude = $IncludeInput<$Schema, "User">; -export type UserOmit = $OmitInput<$Schema, "User">; -export type UserGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>; -export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">; -export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">; -export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">; -export type PostExistsArgs = $ExistsArgs<$Schema, "Post">; -export type PostCreateArgs = $CreateArgs<$Schema, "Post">; -export type PostCreateManyArgs = $CreateManyArgs<$Schema, "Post">; -export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, "Post">; -export type PostUpdateArgs = $UpdateArgs<$Schema, "Post">; -export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, "Post">; -export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, "Post">; -export type PostUpsertArgs = $UpsertArgs<$Schema, "Post">; -export type PostDeleteArgs = $DeleteArgs<$Schema, "Post">; -export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, "Post">; -export type PostCountArgs = $CountArgs<$Schema, "Post">; -export type PostAggregateArgs = $AggregateArgs<$Schema, "Post">; -export type PostGroupByArgs = $GroupByArgs<$Schema, "Post">; -export type PostWhereInput = $WhereInput<$Schema, "Post">; -export type PostSelect = $SelectInput<$Schema, "Post">; -export type PostInclude = $IncludeInput<$Schema, "Post">; -export type PostOmit = $OmitInput<$Schema, "Post">; -export type PostGetPayload, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>; +import { type SchemaType as $Schema } from './schema'; +import type { + FindManyArgs as $FindManyArgs, + FindUniqueArgs as $FindUniqueArgs, + FindFirstArgs as $FindFirstArgs, + ExistsArgs as $ExistsArgs, + CreateArgs as $CreateArgs, + CreateManyArgs as $CreateManyArgs, + CreateManyAndReturnArgs as $CreateManyAndReturnArgs, + UpdateArgs as $UpdateArgs, + UpdateManyArgs as $UpdateManyArgs, + UpdateManyAndReturnArgs as $UpdateManyAndReturnArgs, + UpsertArgs as $UpsertArgs, + DeleteArgs as $DeleteArgs, + DeleteManyArgs as $DeleteManyArgs, + CountArgs as $CountArgs, + AggregateArgs as $AggregateArgs, + GroupByArgs as $GroupByArgs, + WhereInput as $WhereInput, + SelectInput as $SelectInput, + IncludeInput as $IncludeInput, + OmitInput as $OmitInput, + QueryOptions as $QueryOptions, +} from '@zenstackhq/orm'; +import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from '@zenstackhq/orm'; +export type UserFindManyArgs = $FindManyArgs<$Schema, 'User'>; +export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, 'User'>; +export type UserFindFirstArgs = $FindFirstArgs<$Schema, 'User'>; +export type UserExistsArgs = $ExistsArgs<$Schema, 'User'>; +export type UserCreateArgs = $CreateArgs<$Schema, 'User'>; +export type UserCreateManyArgs = $CreateManyArgs<$Schema, 'User'>; +export type UserCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpdateArgs = $UpdateArgs<$Schema, 'User'>; +export type UserUpdateManyArgs = $UpdateManyArgs<$Schema, 'User'>; +export type UserUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'User'>; +export type UserUpsertArgs = $UpsertArgs<$Schema, 'User'>; +export type UserDeleteArgs = $DeleteArgs<$Schema, 'User'>; +export type UserDeleteManyArgs = $DeleteManyArgs<$Schema, 'User'>; +export type UserCountArgs = $CountArgs<$Schema, 'User'>; +export type UserAggregateArgs = $AggregateArgs<$Schema, 'User'>; +export type UserGroupByArgs = $GroupByArgs<$Schema, 'User'>; +export type UserWhereInput = $WhereInput<$Schema, 'User'>; +export type UserSelect = $SelectInput<$Schema, 'User'>; +export type UserInclude = $IncludeInput<$Schema, 'User'>; +export type UserOmit = $OmitInput<$Schema, 'User'>; +export type UserGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'User', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'User', Args, Options>; +export type PostFindManyArgs = $FindManyArgs<$Schema, 'Post'>; +export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, 'Post'>; +export type PostFindFirstArgs = $FindFirstArgs<$Schema, 'Post'>; +export type PostExistsArgs = $ExistsArgs<$Schema, 'Post'>; +export type PostCreateArgs = $CreateArgs<$Schema, 'Post'>; +export type PostCreateManyArgs = $CreateManyArgs<$Schema, 'Post'>; +export type PostCreateManyAndReturnArgs = $CreateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpdateArgs = $UpdateArgs<$Schema, 'Post'>; +export type PostUpdateManyArgs = $UpdateManyArgs<$Schema, 'Post'>; +export type PostUpdateManyAndReturnArgs = $UpdateManyAndReturnArgs<$Schema, 'Post'>; +export type PostUpsertArgs = $UpsertArgs<$Schema, 'Post'>; +export type PostDeleteArgs = $DeleteArgs<$Schema, 'Post'>; +export type PostDeleteManyArgs = $DeleteManyArgs<$Schema, 'Post'>; +export type PostCountArgs = $CountArgs<$Schema, 'Post'>; +export type PostAggregateArgs = $AggregateArgs<$Schema, 'Post'>; +export type PostGroupByArgs = $GroupByArgs<$Schema, 'Post'>; +export type PostWhereInput = $WhereInput<$Schema, 'Post'>; +export type PostSelect = $SelectInput<$Schema, 'Post'>; +export type PostInclude = $IncludeInput<$Schema, 'Post'>; +export type PostOmit = $OmitInput<$Schema, 'Post'>; +export type PostGetPayload< + Args extends $SelectIncludeOmit<$Schema, 'Post', true>, + Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>, +> = $Result<$Schema, 'Post', Args, Options>; diff --git a/tests/runtimes/edge-runtime/schemas/models.ts b/tests/runtimes/edge-runtime/schemas/models.ts index 03524da52..ca4b30618 100644 --- a/tests/runtimes/edge-runtime/schemas/models.ts +++ b/tests/runtimes/edge-runtime/schemas/models.ts @@ -5,7 +5,7 @@ /* eslint-disable */ -import { type SchemaType as $Schema } from "./schema"; -import type { ModelResult as $ModelResult } from "@zenstackhq/orm"; -export type User = $ModelResult<$Schema, "User">; -export type Post = $ModelResult<$Schema, "Post">; +import { type SchemaType as $Schema } from './schema'; +import type { ModelResult as $ModelResult } from '@zenstackhq/orm'; +export type User = $ModelResult<$Schema, 'User'>; +export type Post = $ModelResult<$Schema, 'Post'>; diff --git a/tests/runtimes/edge-runtime/schemas/schema.ts b/tests/runtimes/edge-runtime/schemas/schema.ts index 81947757f..b421f9956 100644 --- a/tests/runtimes/edge-runtime/schemas/schema.ts +++ b/tests/runtimes/edge-runtime/schemas/schema.ts @@ -5,96 +5,174 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; export class SchemaType implements SchemaDef { provider = { - type: "postgresql" + type: 'postgresql', } as const; models = { User: { - name: "User", + name: 'User', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, email: { - name: "email", - type: "String", + name: 'email', + type: 'String', unique: true, - attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + attributes: [{ name: '@unique' }] as readonly AttributeApplication[], }, name: { - name: "name", - type: "String", - optional: true + name: 'name', + type: 'String', + optional: true, }, posts: { - name: "posts", - type: "Post", + name: 'posts', + type: 'Post', array: true, - relation: { opposite: "author" } - } + relation: { opposite: 'author' }, + }, }, attributes: [ - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("id")) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "!=", ExpressionUtils._null()) }] } + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + '==', + ExpressionUtils.field('id'), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '!=', ExpressionUtils._null()), + }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" }, - email: { type: "String" } - } + id: { type: 'String' }, + email: { type: 'String' }, + }, }, Post: { - name: "Post", + name: 'Post', fields: { id: { - name: "id", - type: "String", + name: 'id', + type: 'String', id: true, - attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], - default: ExpressionUtils.call("cuid") as FieldDefault + attributes: [ + { name: '@id' }, + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, + ] as readonly AttributeApplication[], + default: ExpressionUtils.call('cuid') as FieldDefault, }, title: { - name: "title", - type: "String" + name: 'title', + type: 'String', }, published: { - name: "published", - type: "Boolean", - attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], - default: false as FieldDefault + name: 'published', + type: 'Boolean', + attributes: [ + { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, + ] as readonly AttributeApplication[], + default: false as FieldDefault, }, author: { - name: "author", - type: "User", - attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], - relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } + name: 'author', + type: 'User', + attributes: [ + { + name: '@relation', + args: [ + { + name: 'fields', + value: ExpressionUtils.array('String', [ExpressionUtils.field('authorId')]), + }, + { + name: 'references', + value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), + }, + { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, + { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, + ], + }, + ] as readonly AttributeApplication[], + relation: { + opposite: 'posts', + fields: ['authorId'], + references: ['id'], + onUpdate: 'Cascade', + onDelete: 'Cascade', + }, }, authorId: { - name: "authorId", - type: "String", - foreignKeyFor: [ - "author" - ] as readonly string[] - } + name: 'authorId', + type: 'String', + foreignKeyFor: ['author'] as readonly string[], + }, }, attributes: [ - { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("authorId")) }] }, - { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.field("published") }] } + { + name: '@@deny', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('all') }, + { + name: 'condition', + value: ExpressionUtils.binary( + ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), + '==', + ExpressionUtils.field('authorId'), + ), + }, + ], + }, + { + name: '@@allow', + args: [ + { name: 'operation', value: ExpressionUtils.literal('read') }, + { name: 'condition', value: ExpressionUtils.field('published') }, + ], + }, ] as readonly AttributeApplication[], - idFields: ["id"], + idFields: ['id'], uniqueFields: { - id: { type: "String" } - } - } + id: { type: 'String' }, + }, + }, } as const; - authType = "User" as const; + authType = 'User' as const; plugins = {}; } export const schema = new SchemaType(); From 9b6373b240793f2e10fb43c3c31e1233b8d9b564 Mon Sep 17 00:00:00 2001 From: jiasheng Date: Sat, 1 Aug 2026 17:04:36 +0800 Subject: [PATCH 2/2] fix build error --- .prettierignore | 3 + tests/e2e/apps/rally/zenstack/schema.ts | 4441 ++--- tests/e2e/github-repos/cal.com/schema.ts | 16403 ++++++---------- tests/e2e/github-repos/formbricks/schema.ts | 5368 ++--- tests/e2e/github-repos/trigger.dev/schema.ts | 11183 ++++------- .../orm/plugin-infra/ext-query-args/schema.ts | 33 +- .../e2e/orm/plugin-infra/ext-result/schema.ts | 100 +- tests/e2e/orm/schemas/auth-type/schema.ts | 64 +- tests/e2e/orm/schemas/basic/schema.ts | 567 +- tests/e2e/orm/schemas/default-auth/schema.ts | 171 +- tests/e2e/orm/schemas/delegate/schema.ts | 720 +- tests/e2e/orm/schemas/delegate/typecheck.ts | 5 +- .../orm/schemas/full-text-search/schema.ts | 51 +- tests/e2e/orm/schemas/fuzzy-search/schema.ts | 45 +- tests/e2e/orm/schemas/json/schema.ts | 37 +- tests/e2e/orm/schemas/name-mapping/schema.ts | 156 +- tests/e2e/orm/schemas/omit/schema.ts | 151 +- tests/e2e/orm/schemas/petstore/schema.ts | 283 +- tests/e2e/orm/schemas/procedures/schema.ts | 119 +- tests/e2e/orm/schemas/todo/schema.ts | 957 +- tests/e2e/orm/schemas/typed-json/schema.ts | 111 +- tests/e2e/orm/schemas/typing/schema.ts | 476 +- tests/e2e/orm/schemas/unsupported/schema.ts | 174 +- .../tsc-torture/zenstack/schema.ts | 4953 ++--- 24 files changed, 16232 insertions(+), 30339 deletions(-) diff --git a/.prettierignore b/.prettierignore index 2f2b01e6b..eb2a845a4 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,3 +5,6 @@ packages/language/src/generated/** samples/**/schema.ts samples/**/models.ts samples/**/input.ts +tests/e2e/**/schema.ts +tests/e2e/**/models.ts +tests/e2e/**/input.ts diff --git a/tests/e2e/apps/rally/zenstack/schema.ts b/tests/e2e/apps/rally/zenstack/schema.ts index 83101978a..34a1bf454 100644 --- a/tests/e2e/apps/rally/zenstack/schema.ts +++ b/tests/e2e/apps/rally/zenstack/schema.ts @@ -5,3988 +5,2533 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { Account: { - name: 'Account', + name: "Account", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, provider: { - name: 'provider', - type: 'String', + name: "provider", + type: "String" }, providerAccountId: { - name: 'providerAccountId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('provider_account_id') }], - }, - ] as readonly AttributeApplication[], + name: "providerAccountId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_account_id") }] }] as readonly AttributeApplication[] }, refresh_token: { - name: 'refresh_token', - type: 'String', + name: "refresh_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, access_token: { - name: 'access_token', - type: 'String', + name: "access_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, expires_at: { - name: 'expires_at', - type: 'Int', - optional: true, + name: "expires_at", + type: "Int", + optional: true }, scope: { - name: 'scope', - type: 'String', - optional: true, + name: "scope", + type: "String", + optional: true }, id_token: { - name: 'id_token', - type: 'String', + name: "id_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'accounts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "accounts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, accessTokenExpiresAt: { - name: 'accessTokenExpiresAt', - type: 'DateTime', + name: "accessTokenExpiresAt", + type: "DateTime", optional: true, - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('access_token_expires_at') }], - }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("access_token_expires_at") }] }] as readonly AttributeApplication[] }, refreshTokenExpiresAt: { - name: 'refreshTokenExpiresAt', - type: 'DateTime', + name: "refreshTokenExpiresAt", + type: "DateTime", optional: true, - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('refresh_token_expires_at') }], - }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("refresh_token_expires_at") }] }] as readonly AttributeApplication[] }, password: { - name: 'password', - type: 'String', + name: "password", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('password') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("password") }] }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('provider'), - ExpressionUtils.field('providerAccountId'), - ]), - }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('accounts') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("accounts") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - provider_providerAccountId: { provider: { type: 'String' }, providerAccountId: { type: 'String' } }, - }, + id: { type: "String" }, + provider_providerAccountId: { provider: { type: "String" }, providerAccountId: { type: "String" } } + } }, User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }, { name: '@db.Citext' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@db.Citext" }] as readonly AttributeApplication[] }, emailVerified: { - name: 'emailVerified', - type: 'Boolean', + name: "emailVerified", + type: "Boolean", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('email_verified') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("email_verified") }] }] as readonly AttributeApplication[] }, image: { - name: 'image', - type: 'String', - optional: true, + name: "image", + type: "String", + optional: true }, timeZone: { - name: 'timeZone', - type: 'String', + name: "timeZone", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] }, weekStart: { - name: 'weekStart', - type: 'Int', + name: "weekStart", + type: "Int", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('week_start') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("week_start") }] }] as readonly AttributeApplication[] }, timeFormat: { - name: 'timeFormat', - type: 'TimeFormat', + name: "timeFormat", + type: "TimeFormat", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_format') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_format") }] }] as readonly AttributeApplication[] }, locale: { - name: 'locale', - type: 'String', - optional: true, + name: "locale", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, customerId: { - name: 'customerId', - type: 'String', + name: "customerId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('customer_id') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("customer_id") }] }] as readonly AttributeApplication[] }, banned: { - name: 'banned', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "banned", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, bannedAt: { - name: 'bannedAt', - type: 'DateTime', + name: "bannedAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('banned_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("banned_at") }] }] as readonly AttributeApplication[] }, banReason: { - name: 'banReason', - type: 'String', + name: "banReason", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ban_reason') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ban_reason") }] }] as readonly AttributeApplication[] }, banExpires: { - name: 'banExpires', - type: 'DateTime', + name: "banExpires", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ban_expires') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ban_expires") }] }] as readonly AttributeApplication[] }, role: { - name: 'role', - type: 'UserRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('user') }] }, - ] as readonly AttributeApplication[], - default: 'user' as FieldDefault, + name: "role", + type: "UserRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("user") }] }] as readonly AttributeApplication[], + default: "user" as FieldDefault }, lastLoginMethod: { - name: 'lastLoginMethod', - type: 'String', + name: "lastLoginMethod", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('last_login_method') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("last_login_method") }] }] as readonly AttributeApplication[] }, isAnonymous: { - name: 'isAnonymous', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('anonymous') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isAnonymous", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("anonymous") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, polls: { - name: 'polls', - type: 'Poll', + name: "polls", + type: "Poll", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, watcher: { - name: 'watcher', - type: 'Watcher', + name: "watcher", + type: "Watcher", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, accounts: { - name: 'accounts', - type: 'Account', + name: "accounts", + type: "Account", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, participants: { - name: 'participants', - type: 'Participant', + name: "participants", + type: "Participant", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, paymentMethods: { - name: 'paymentMethods', - type: 'PaymentMethod', + name: "paymentMethods", + type: "PaymentMethod", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, spaceMemberInvites: { - name: 'spaceMemberInvites', - type: 'SpaceMemberInvite', + name: "spaceMemberInvites", + type: "SpaceMemberInvite", array: true, - relation: { opposite: 'invitedBy' }, + relation: { opposite: "invitedBy" } }, subscriptions: { - name: 'subscriptions', - type: 'Subscription', + name: "subscriptions", + type: "Subscription", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('UserToSubscription') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'user', name: 'UserToSubscription' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserToSubscription") }] }] as readonly AttributeApplication[], + relation: { opposite: "user", name: "UserToSubscription" } }, spaces: { - name: 'spaces', - type: 'Space', + name: "spaces", + type: "Space", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('UserSpaces') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'owner', name: 'UserSpaces' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserSpaces") }] }] as readonly AttributeApplication[], + relation: { opposite: "owner", name: "UserSpaces" } }, memberOf: { - name: 'memberOf', - type: 'SpaceMember', + name: "memberOf", + type: "SpaceMember", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, pollViews: { - name: 'pollViews', - type: 'PollView', + name: "pollViews", + type: "PollView", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, scheduledEvents: { - name: 'scheduledEvents', - type: 'ScheduledEvent', + name: "scheduledEvents", + type: "ScheduledEvent", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, scheduledEventInvites: { - name: 'scheduledEventInvites', - type: 'ScheduledEventInvite', + name: "scheduledEventInvites", + type: "ScheduledEventInvite", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, calendarConnections: { - name: 'calendarConnections', - type: 'CalendarConnection', + name: "calendarConnections", + type: "CalendarConnection", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, credentials: { - name: 'credentials', - type: 'Credential', + name: "credentials", + type: "Credential", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, defaultDestinationCalendarId: { - name: 'defaultDestinationCalendarId', - type: 'String', + name: "defaultDestinationCalendarId", + type: "String", optional: true, - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('default_destination_calendar_id') }], - }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['defaultDestinationCalendar'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("default_destination_calendar_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "defaultDestinationCalendar" + ] as readonly string[] }, defaultDestinationCalendar: { - name: 'defaultDestinationCalendar', - type: 'ProviderCalendar', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('UserDefaultDestinationCalendar') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('defaultDestinationCalendarId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'userDefaultDestination', - name: 'UserDefaultDestinationCalendar', - fields: ['defaultDestinationCalendarId'], - references: ['id'], - onDelete: 'SetNull', - }, + name: "defaultDestinationCalendar", + type: "ProviderCalendar", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserDefaultDestinationCalendar") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("defaultDestinationCalendarId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "userDefaultDestination", name: "UserDefaultDestinationCalendar", fields: ["defaultDestinationCalendarId"], references: ["id"], onDelete: "SetNull" } }, sessions: { - name: 'sessions', - type: 'Session', + name: "sessions", + type: "Session", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, impersonatedSessions: { - name: 'impersonatedSessions', - type: 'Session', + name: "impersonatedSessions", + type: "Session", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('ImpersonatedSessions') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'impersonatedByUser', name: 'ImpersonatedSessions' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ImpersonatedSessions") }] }] as readonly AttributeApplication[], + relation: { opposite: "impersonatedByUser", name: "ImpersonatedSessions" } + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('users') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("users") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - email: { type: 'String' }, - }, + id: { type: "String" }, + email: { type: "String" } + } }, VerificationToken: { - name: 'VerificationToken', + name: "VerificationToken", fields: { identifier: { - name: 'identifier', - type: 'String', - attributes: [{ name: '@db.Citext' }] as readonly AttributeApplication[], + name: "identifier", + type: "String", + attributes: [{ name: "@db.Citext" }] as readonly AttributeApplication[] }, token: { - name: 'token', - type: 'String', + name: "token", + type: "String", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, expires: { - name: 'expires', - type: 'DateTime', - }, + name: "expires", + type: "DateTime" + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('identifier'), - ExpressionUtils.field('token'), - ]), - }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('verification_tokens') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("identifier"), ExpressionUtils.field("token")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("verification_tokens") }] } ] as readonly AttributeApplication[], - idFields: ['token'], + idFields: ["token"], uniqueFields: { - token: { type: 'String' }, - identifier_token: { identifier: { type: 'String' }, token: { type: 'String' } }, - }, + token: { type: "String" }, + identifier_token: { identifier: { type: "String" }, token: { type: "String" } } + } }, Session: { - name: 'Session', + name: "Session", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, - ] as readonly AttributeApplication[], + name: "expiresAt", + type: "DateTime", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] }, token: { - name: 'token', - type: 'String', + name: "token", + type: "String" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, ipAddress: { - name: 'ipAddress', - type: 'String', + name: "ipAddress", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ip_address') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ip_address") }] }] as readonly AttributeApplication[] }, userAgent: { - name: 'userAgent', - type: 'String', + name: "userAgent", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_agent') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_agent") }] }] as readonly AttributeApplication[] }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, impersonatedBy: { - name: 'impersonatedBy', - type: 'String', + name: "impersonatedBy", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('impersonated_by') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['impersonatedByUser'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_by") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "impersonatedByUser" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'sessions', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "sessions", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, impersonatedByUser: { - name: 'impersonatedByUser', - type: 'User', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('ImpersonatedSessions') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('impersonatedBy')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'impersonatedSessions', - name: 'ImpersonatedSessions', - fields: ['impersonatedBy'], - references: ['id'], - }, - }, + name: "impersonatedByUser", + type: "User", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ImpersonatedSessions") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("impersonatedBy")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "impersonatedSessions", name: "ImpersonatedSessions", fields: ["impersonatedBy"], references: ["id"] } + } }, attributes: [ - { - name: '@@unique', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('token')]) }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('sessions') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("token")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("sessions") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - token: { type: 'String' }, - }, + id: { type: "String" }, + token: { type: "String" } + } }, Verification: { - name: 'Verification', + name: "Verification", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, identifier: { - name: 'identifier', - type: 'String', + name: "identifier", + type: "String" }, value: { - name: 'value', - type: 'String', + name: "value", + type: "String" }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, - ] as readonly AttributeApplication[], + name: "expiresAt", + type: "DateTime", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('verifications') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("verifications") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Poll: { - name: 'Poll', + name: "Poll", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, unique: true, - attributes: [ - { name: '@id' }, - { name: '@unique' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('id') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("id") }] }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, deadline: { - name: 'deadline', - type: 'DateTime', - optional: true, + name: "deadline", + type: "DateTime", + optional: true }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, location: { - name: 'location', - type: 'String', - optional: true, + name: "location", + type: "String", + optional: true }, userId: { - name: 'userId', - type: 'String', + name: "userId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, guestId: { - name: 'guestId', - type: 'String', + name: "guestId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('guest_id') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("guest_id") }] }] as readonly AttributeApplication[] }, timeZone: { - name: 'timeZone', - type: 'String', + name: "timeZone", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'PollStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('live') }] }, - ] as readonly AttributeApplication[], - default: 'live' as FieldDefault, + name: "status", + type: "PollStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("live") }] }] as readonly AttributeApplication[], + default: "live" as FieldDefault }, deleted: { - name: 'deleted', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "deleted", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, deletedAt: { - name: 'deletedAt', - type: 'DateTime', + name: "deletedAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted_at") }] }] as readonly AttributeApplication[] }, touchedAt: { - name: 'touchedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('touched_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "touchedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("touched_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, participantUrlId: { - name: 'participantUrlId', - type: 'String', + name: "participantUrlId", + type: "String", unique: true, - attributes: [ - { name: '@unique' }, - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('participant_url_id') }], - }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("participant_url_id") }] }] as readonly AttributeApplication[] }, adminUrlId: { - name: 'adminUrlId', - type: 'String', + name: "adminUrlId", + type: "String", unique: true, - attributes: [ - { name: '@unique' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('admin_url_id') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("admin_url_id") }] }] as readonly AttributeApplication[] }, eventId: { - name: 'eventId', - type: 'String', + name: "eventId", + type: "String", unique: true, optional: true, - attributes: [ - { name: '@unique' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('event_id') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("event_id") }] }] as readonly AttributeApplication[] }, scheduledEventId: { - name: 'scheduledEventId', - type: 'String', + name: "scheduledEventId", + type: "String", optional: true, - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_id') }], - }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['scheduledEvent'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "scheduledEvent" + ] as readonly string[] }, hideParticipants: { - name: 'hideParticipants', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('hide_participants') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideParticipants", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("hide_participants") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hideScores: { - name: 'hideScores', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('hide_scores') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideScores", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("hide_scores") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, disableComments: { - name: 'disableComments', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('disable_comments') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableComments", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("disable_comments") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, requireParticipantEmail: { - name: 'requireParticipantEmail', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('require_participant_email') }], - }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "requireParticipantEmail", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("require_participant_email") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, user: { - name: 'user', - type: 'User', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'polls', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "polls", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, scheduledEvent: { - name: 'scheduledEvent', - type: 'ScheduledEvent', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'polls', - fields: ['scheduledEventId'], - references: ['id'], - onDelete: 'SetNull', - }, + name: "scheduledEvent", + type: "ScheduledEvent", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "polls", fields: ["scheduledEventId"], references: ["id"], onDelete: "SetNull" } }, options: { - name: 'options', - type: 'Option', + name: "options", + type: "Option", array: true, - relation: { opposite: 'poll' }, + relation: { opposite: "poll" } }, participants: { - name: 'participants', - type: 'Participant', + name: "participants", + type: "Participant", array: true, - relation: { opposite: 'poll' }, + relation: { opposite: "poll" } }, watchers: { - name: 'watchers', - type: 'Watcher', + name: "watchers", + type: "Watcher", array: true, - relation: { opposite: 'poll' }, + relation: { opposite: "poll" } }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - relation: { opposite: 'poll' }, + relation: { opposite: "poll" } }, votes: { - name: 'votes', - type: 'Vote', + name: "votes", + type: "Vote", array: true, - relation: { opposite: 'poll' }, + relation: { opposite: "poll" } }, views: { - name: 'views', - type: 'PollView', + name: "views", + type: "PollView", array: true, - relation: { opposite: 'poll' }, + relation: { opposite: "poll" } }, space: { - name: 'space', - type: 'Space', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'polls', fields: ['spaceId'], references: ['id'], onDelete: 'SetNull' }, + name: "space", + type: "Space", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "polls", fields: ["spaceId"], references: ["id"], onDelete: "SetNull" } }, spaceId: { - name: 'spaceId', - type: 'String', + name: "spaceId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['space'] as readonly string[], - }, + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "space" + ] as readonly string[] + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('guestId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('polls') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("guestId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("polls") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - participantUrlId: { type: 'String' }, - adminUrlId: { type: 'String' }, - eventId: { type: 'String' }, - }, + id: { type: "String" }, + participantUrlId: { type: "String" }, + adminUrlId: { type: "String" }, + eventId: { type: "String" } + } }, Watcher: { - name: 'Watcher', + name: "Watcher", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, pollId: { - name: 'pollId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['poll'] as readonly string[], + name: "pollId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "poll" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, poll: { - name: 'poll', - type: 'Poll', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'watchers', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, + name: "poll", + type: "Poll", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "watchers", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'watcher', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "watcher", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('watchers') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("watchers") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Participant: { - name: 'Participant', + name: "Participant", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, email: { - name: 'email', - type: 'String', - optional: true, + name: "email", + type: "String", + optional: true }, userId: { - name: 'userId', - type: 'String', + name: "userId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, guestId: { - name: 'guestId', - type: 'String', + name: "guestId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('guest_id') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("guest_id") }] }] as readonly AttributeApplication[] }, pollId: { - name: 'pollId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['poll'] as readonly string[], + name: "pollId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "poll" + ] as readonly string[] }, locale: { - name: 'locale', - type: 'String', - optional: true, + name: "locale", + type: "String", + optional: true }, timeZone: { - name: 'timeZone', - type: 'String', + name: "timeZone", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, deleted: { - name: 'deleted', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "deleted", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, deletedAt: { - name: 'deletedAt', - type: 'DateTime', + name: "deletedAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted_at") }] }] as readonly AttributeApplication[] }, votes: { - name: 'votes', - type: 'Vote', + name: "votes", + type: "Vote", array: true, - relation: { opposite: 'participant' }, + relation: { opposite: "participant" } }, poll: { - name: 'poll', - type: 'Poll', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'participants', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, + name: "poll", + type: "Poll", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "participants", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } }, user: { - name: 'user', - type: 'User', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'participants', fields: ['userId'], references: ['id'], onDelete: 'SetNull' }, - }, + name: "user", + type: "User", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "participants", fields: ["userId"], references: ["id"], onDelete: "SetNull" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('participants') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("participants") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Option: { - name: 'Option', + name: "Option", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, startTime: { - name: 'startTime', - type: 'DateTime', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('start_time') }] }, - { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], + name: "startTime", + type: "DateTime", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("start_time") }] }, { name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[] }, duration: { - name: 'duration', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('duration_minutes') }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "duration", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("duration_minutes") }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, pollId: { - name: 'pollId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['poll'] as readonly string[], + name: "pollId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "poll" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, votes: { - name: 'votes', - type: 'Vote', + name: "votes", + type: "Vote", array: true, - relation: { opposite: 'option' }, + relation: { opposite: "option" } }, poll: { - name: 'poll', - type: 'Poll', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'options', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "poll", + type: "Poll", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "options", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('options') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("options") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Vote: { - name: 'Vote', + name: "Vote", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, participantId: { - name: 'participantId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('participant_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['participant'] as readonly string[], + name: "participantId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("participant_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "participant" + ] as readonly string[] }, optionId: { - name: 'optionId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('option_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['option'] as readonly string[], + name: "optionId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("option_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "option" + ] as readonly string[] }, pollId: { - name: 'pollId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['poll'] as readonly string[], + name: "pollId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "poll" + ] as readonly string[] }, type: { - name: 'type', - type: 'VoteType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('yes') }] }, - ] as readonly AttributeApplication[], - default: 'yes' as FieldDefault, + name: "type", + type: "VoteType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("yes") }] }] as readonly AttributeApplication[], + default: "yes" as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, participant: { - name: 'participant', - type: 'Participant', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('participantId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'votes', fields: ['participantId'], references: ['id'], onDelete: 'Cascade' }, + name: "participant", + type: "Participant", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("participantId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "votes", fields: ["participantId"], references: ["id"], onDelete: "Cascade" } }, option: { - name: 'option', - type: 'Option', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('optionId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'votes', fields: ['optionId'], references: ['id'], onDelete: 'Cascade' }, + name: "option", + type: "Option", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("optionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "votes", fields: ["optionId"], references: ["id"], onDelete: "Cascade" } }, poll: { - name: 'poll', - type: 'Poll', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'votes', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "poll", + type: "Poll", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "votes", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('participantId')]), - }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('optionId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('votes') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("participantId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("optionId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("votes") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Comment: { - name: 'Comment', + name: "Comment", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, content: { - name: 'content', - type: 'String', + name: "content", + type: "String" }, pollId: { - name: 'pollId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['poll'] as readonly string[], + name: "pollId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "poll" + ] as readonly string[] }, authorName: { - name: 'authorName', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('author_name') }] }, - ] as readonly AttributeApplication[], + name: "authorName", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("author_name") }] }] as readonly AttributeApplication[] }, userId: { - name: 'userId', - type: 'String', + name: "userId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, guestId: { - name: 'guestId', - type: 'String', + name: "guestId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('guest_id') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("guest_id") }] }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, poll: { - name: 'poll', - type: 'Poll', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, + name: "poll", + type: "Poll", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } }, user: { - name: 'user', - type: 'User', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "user", + type: "User", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('comments') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("comments") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, PollView: { - name: 'PollView', + name: "PollView", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, pollId: { - name: 'pollId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['poll'] as readonly string[], + name: "pollId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "poll" + ] as readonly string[] }, ipAddress: { - name: 'ipAddress', - type: 'String', + name: "ipAddress", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ip_address') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ip_address") }] }] as readonly AttributeApplication[] }, userId: { - name: 'userId', - type: 'String', + name: "userId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, userAgent: { - name: 'userAgent', - type: 'String', + name: "userAgent", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_agent') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_agent") }] }] as readonly AttributeApplication[] }, viewedAt: { - name: 'viewedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('viewed_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "viewedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("viewed_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, poll: { - name: 'poll', - type: 'Poll', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'views', fields: ['pollId'], references: ['id'], onDelete: 'Cascade' }, + name: "poll", + type: "Poll", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "views", fields: ["pollId"], references: ["id"], onDelete: "Cascade" } }, user: { - name: 'user', - type: 'User', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'pollViews', fields: ['userId'], references: ['id'], onDelete: 'SetNull' }, - }, + name: "user", + type: "User", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "pollViews", fields: ["userId"], references: ["id"], onDelete: "SetNull" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('pollId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('viewedAt')]), - }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_views') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("pollId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("viewedAt")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_views") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Space: { - name: 'Space', + name: "Space", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, image: { - name: 'image', - type: 'String', - optional: true, + name: "image", + type: "String", + optional: true }, ownerId: { - name: 'ownerId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('owner_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['owner'] as readonly string[], + name: "ownerId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("owner_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "owner" + ] as readonly string[] }, tier: { - name: 'tier', - type: 'SpaceTier', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('hobby') }] }, - ] as readonly AttributeApplication[], - default: 'hobby' as FieldDefault, + name: "tier", + type: "SpaceTier", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("hobby") }] }] as readonly AttributeApplication[], + default: "hobby" as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, owner: { - name: 'owner', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('UserSpaces') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'spaces', - name: 'UserSpaces', - fields: ['ownerId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "owner", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserSpaces") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "spaces", name: "UserSpaces", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, polls: { - name: 'polls', - type: 'Poll', + name: "polls", + type: "Poll", array: true, - relation: { opposite: 'space' }, + relation: { opposite: "space" } }, scheduledEvents: { - name: 'scheduledEvents', - type: 'ScheduledEvent', + name: "scheduledEvents", + type: "ScheduledEvent", array: true, - relation: { opposite: 'space' }, + relation: { opposite: "space" } }, subscriptions: { - name: 'subscriptions', - type: 'Subscription', + name: "subscriptions", + type: "Subscription", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('SpaceToSubscription') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'space', name: 'SpaceToSubscription' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SpaceToSubscription") }] }] as readonly AttributeApplication[], + relation: { opposite: "space", name: "SpaceToSubscription" } }, members: { - name: 'members', - type: 'SpaceMember', + name: "members", + type: "SpaceMember", array: true, - relation: { opposite: 'space' }, + relation: { opposite: "space" } }, memberInvites: { - name: 'memberInvites', - type: 'SpaceMemberInvite', + name: "memberInvites", + type: "SpaceMemberInvite", array: true, - relation: { opposite: 'space' }, - }, + relation: { opposite: "space" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('spaces') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("spaces") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, SpaceMember: { - name: 'SpaceMember', + name: "SpaceMember", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, spaceId: { - name: 'spaceId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['space'] as readonly string[], + name: "spaceId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "space" + ] as readonly string[] }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, role: { - name: 'role', - type: 'SpaceMemberRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, - ] as readonly AttributeApplication[], - default: 'MEMBER' as FieldDefault, + name: "role", + type: "SpaceMemberRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], + default: "MEMBER" as FieldDefault }, lastSelectedAt: { - name: 'lastSelectedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('last_selected_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "lastSelectedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("last_selected_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, space: { - name: 'space', - type: 'Space', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'members', fields: ['spaceId'], references: ['id'], onDelete: 'Cascade' }, + name: "space", + type: "Space", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "members", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'memberOf', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "memberOf", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('spaceId'), - ExpressionUtils.field('userId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - { name: 'map', value: ExpressionUtils.literal('space_members_space_id_idx') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - { name: 'map', value: ExpressionUtils.literal('space_members_user_id_idx') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_members') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId"), ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }, { name: "map", value: ExpressionUtils.literal("space_members_space_id_idx") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }, { name: "map", value: ExpressionUtils.literal("space_members_user_id_idx") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("space_members") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - spaceId_userId: { spaceId: { type: 'String' }, userId: { type: 'String' } }, - }, + id: { type: "String" }, + spaceId_userId: { spaceId: { type: "String" }, userId: { type: "String" } } + } }, SpaceMemberInvite: { - name: 'SpaceMemberInvite', + name: "SpaceMemberInvite", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, spaceId: { - name: 'spaceId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['space'] as readonly string[], + name: "spaceId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "space" + ] as readonly string[] }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, role: { - name: 'role', - type: 'SpaceMemberRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, - ] as readonly AttributeApplication[], - default: 'MEMBER' as FieldDefault, + name: "role", + type: "SpaceMemberRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], + default: "MEMBER" as FieldDefault }, inviterId: { - name: 'inviterId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('inviter_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['invitedBy'] as readonly string[], + name: "inviterId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("inviter_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "invitedBy" + ] as readonly string[] }, invitedBy: { - name: 'invitedBy', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('inviterId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'spaceMemberInvites', - fields: ['inviterId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "invitedBy", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviterId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "spaceMemberInvites", fields: ["inviterId"], references: ["id"], onDelete: "Cascade" } }, space: { - name: 'space', - type: 'Space', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'memberInvites', - fields: ['spaceId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "space", + type: "Space", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "memberInvites", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('spaceId'), - ExpressionUtils.field('email'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - { name: 'map', value: ExpressionUtils.literal('space_member_invites_space_id_idx') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_member_invites') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId"), ExpressionUtils.field("email")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }, { name: "map", value: ExpressionUtils.literal("space_member_invites_space_id_idx") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("space_member_invites") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - spaceId_email: { spaceId: { type: 'String' }, email: { type: 'String' } }, - }, + id: { type: "String" }, + spaceId_email: { spaceId: { type: "String" }, email: { type: "String" } } + } }, Subscription: { - name: 'Subscription', + name: "Subscription", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, priceId: { - name: 'priceId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('price_id') }] }, - ] as readonly AttributeApplication[], + name: "priceId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("price_id") }] }] as readonly AttributeApplication[] }, quantity: { - name: 'quantity', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, - ] as readonly AttributeApplication[], - default: 1 as FieldDefault, + name: "quantity", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], + default: 1 as FieldDefault }, subscriptionItemId: { - name: 'subscriptionItemId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('subscription_item_id') }], - }, - ] as readonly AttributeApplication[], + name: "subscriptionItemId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("subscription_item_id") }] }] as readonly AttributeApplication[] }, amount: { - name: 'amount', - type: 'Int', + name: "amount", + type: "Int" }, status: { - name: 'status', - type: 'SubscriptionStatus', + name: "status", + type: "SubscriptionStatus" }, active: { - name: 'active', - type: 'Boolean', + name: "active", + type: "Boolean" }, currency: { - name: 'currency', - type: 'String', + name: "currency", + type: "String" }, interval: { - name: 'interval', - type: 'SubscriptionInterval', + name: "interval", + type: "SubscriptionInterval" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, periodStart: { - name: 'periodStart', - type: 'DateTime', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('period_start') }] }, - ] as readonly AttributeApplication[], + name: "periodStart", + type: "DateTime", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("period_start") }] }] as readonly AttributeApplication[] }, periodEnd: { - name: 'periodEnd', - type: 'DateTime', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('period_end') }] }, - ] as readonly AttributeApplication[], + name: "periodEnd", + type: "DateTime", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("period_end") }] }] as readonly AttributeApplication[] }, cancelAtPeriodEnd: { - name: 'cancelAtPeriodEnd', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('cancel_at_period_end') }], - }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "cancelAtPeriodEnd", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("cancel_at_period_end") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, spaceId: { - name: 'spaceId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['space'] as readonly string[], + name: "spaceId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "space" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('UserToSubscription') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'subscriptions', - name: 'UserToSubscription', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserToSubscription") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "subscriptions", name: "UserToSubscription", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, space: { - name: 'space', - type: 'Space', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('SpaceToSubscription') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'subscriptions', - name: 'SpaceToSubscription', - fields: ['spaceId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "space", + type: "Space", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SpaceToSubscription") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "subscriptions", name: "SpaceToSubscription", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('subscriptions') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("subscriptions") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, PaymentMethod: { - name: 'PaymentMethod', + name: "PaymentMethod", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, type: { - name: 'type', - type: 'String', + name: "type", + type: "String" }, data: { - name: 'data', - type: 'Json', + name: "data", + type: "Json" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'paymentMethods', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "paymentMethods", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('payment_methods') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("payment_methods") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ScheduledEvent: { - name: 'ScheduledEvent', + name: "ScheduledEvent", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, spaceId: { - name: 'spaceId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['space'] as readonly string[], + name: "spaceId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("space_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "space" + ] as readonly string[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, location: { - name: 'location', - type: 'String', - optional: true, + name: "location", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'ScheduledEventStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('confirmed') }] }, - ] as readonly AttributeApplication[], - default: 'confirmed' as FieldDefault, + name: "status", + type: "ScheduledEventStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("confirmed") }] }] as readonly AttributeApplication[], + default: "confirmed" as FieldDefault }, timeZone: { - name: 'timeZone', - type: 'String', + name: "timeZone", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] }, start: { - name: 'start', - type: 'DateTime', + name: "start", + type: "DateTime" }, end: { - name: 'end', - type: 'DateTime', + name: "end", + type: "DateTime" }, allDay: { - name: 'allDay', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('all_day') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "allDay", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("all_day") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, deletedAt: { - name: 'deletedAt', - type: 'DateTime', + name: "deletedAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted_at") }] }] as readonly AttributeApplication[] }, sequence: { - name: 'sequence', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "sequence", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'scheduledEvents', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "scheduledEvents", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, space: { - name: 'space', - type: 'Space', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'scheduledEvents', - fields: ['spaceId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "space", + type: "Space", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "scheduledEvents", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } }, rescheduledDates: { - name: 'rescheduledDates', - type: 'RescheduledEventDate', + name: "rescheduledDates", + type: "RescheduledEventDate", array: true, - relation: { opposite: 'scheduledEvent' }, + relation: { opposite: "scheduledEvent" } }, invites: { - name: 'invites', - type: 'ScheduledEventInvite', + name: "invites", + type: "ScheduledEventInvite", array: true, - relation: { opposite: 'scheduledEvent' }, + relation: { opposite: "scheduledEvent" } }, polls: { - name: 'polls', - type: 'Poll', + name: "polls", + type: "Poll", array: true, - relation: { opposite: 'scheduledEvent' }, - }, + relation: { opposite: "scheduledEvent" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - { name: 'type', value: ExpressionUtils.literal('Hash') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_events') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "type", value: ExpressionUtils.literal("Hash") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_events") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - uid: { type: 'String' }, - }, + id: { type: "String" }, + uid: { type: "String" } + } }, RescheduledEventDate: { - name: 'RescheduledEventDate', + name: "RescheduledEventDate", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, scheduledEventId: { - name: 'scheduledEventId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_id') }], - }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['scheduledEvent'] as readonly string[], + name: "scheduledEventId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "scheduledEvent" + ] as readonly string[] }, start: { - name: 'start', - type: 'DateTime', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('start') }] }, - ] as readonly AttributeApplication[], + name: "start", + type: "DateTime", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("start") }] }] as readonly AttributeApplication[] }, end: { - name: 'end', - type: 'DateTime', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('end') }] }, - ] as readonly AttributeApplication[], + name: "end", + type: "DateTime", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("end") }] }] as readonly AttributeApplication[] }, allDay: { - name: 'allDay', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('all_day') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "allDay", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("all_day") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, scheduledEvent: { - name: 'scheduledEvent', - type: 'ScheduledEvent', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'rescheduledDates', - fields: ['scheduledEventId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "scheduledEvent", + type: "ScheduledEvent", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "rescheduledDates", fields: ["scheduledEventId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), - }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('rescheduled_event_dates') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("rescheduled_event_dates") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ScheduledEventInvite: { - name: 'ScheduledEventInvite', + name: "ScheduledEventInvite", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, scheduledEventId: { - name: 'scheduledEventId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_id') }], - }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['scheduledEvent'] as readonly string[], + name: "scheduledEventId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "scheduledEvent" + ] as readonly string[] }, inviteeName: { - name: 'inviteeName', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_name') }] }, - ] as readonly AttributeApplication[], + name: "inviteeName", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_name") }] }] as readonly AttributeApplication[] }, inviteeEmail: { - name: 'inviteeEmail', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_email') }] }, - ] as readonly AttributeApplication[], + name: "inviteeEmail", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_email") }] }] as readonly AttributeApplication[] }, inviteeId: { - name: 'inviteeId', - type: 'String', + name: "inviteeId", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, inviteeTimeZone: { - name: 'inviteeTimeZone', - type: 'String', + name: "inviteeTimeZone", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('invitee_time_zone') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("invitee_time_zone") }] }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'ScheduledEventInviteStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('pending') }] }, - ] as readonly AttributeApplication[], - default: 'pending' as FieldDefault, + name: "status", + type: "ScheduledEventInviteStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("pending") }] }] as readonly AttributeApplication[], + default: "pending" as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, scheduledEvent: { - name: 'scheduledEvent', - type: 'ScheduledEvent', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'invites', - fields: ['scheduledEventId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "scheduledEvent", + type: "ScheduledEvent", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "invites", fields: ["scheduledEventId"], references: ["id"], onDelete: "Cascade" } }, user: { - name: 'user', - type: 'User', - optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('inviteeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'scheduledEventInvites', - fields: ['inviteeId'], - references: ['id'], - onDelete: 'SetNull', - }, - }, + name: "user", + type: "User", + optional: true, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviteeId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "scheduledEventInvites", fields: ["inviteeId"], references: ["id"], onDelete: "SetNull" } + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduledEventId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('inviteeId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('inviteeEmail')]), - }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_invites') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduledEventId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviteeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviteeEmail")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_invites") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Credential: { - name: 'Credential', + name: "Credential", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, provider: { - name: 'provider', - type: 'String', + name: "provider", + type: "String" }, providerAccountId: { - name: 'providerAccountId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('provider_account_id') }], - }, - ] as readonly AttributeApplication[], + name: "providerAccountId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_account_id") }] }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'CredentialType', + name: "type", + type: "CredentialType" }, secret: { - name: 'secret', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('secret') }] }, - ] as readonly AttributeApplication[], + name: "secret", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("secret") }] }] as readonly AttributeApplication[] }, scopes: { - name: 'scopes', - type: 'String', - array: true, + name: "scopes", + type: "String", + array: true }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, calendarConnections: { - name: 'calendarConnections', - type: 'CalendarConnection', + name: "calendarConnections", + type: "CalendarConnection", array: true, - relation: { opposite: 'credential' }, + relation: { opposite: "credential" } }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'credentials', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "credentials", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('provider'), - ExpressionUtils.field('providerAccountId'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('user_provider_account_unique') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('expiresAt')]), - }, - { name: 'name', value: ExpressionUtils.literal('credential_expiry_idx') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('credentials') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }, { name: "name", value: ExpressionUtils.literal("user_provider_account_unique") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("expiresAt")]) }, { name: "name", value: ExpressionUtils.literal("credential_expiry_idx") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("credentials") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - user_provider_account_unique: { - userId: { type: 'String' }, - provider: { type: 'String' }, - providerAccountId: { type: 'String' }, - }, - }, + id: { type: "String" }, + user_provider_account_unique: { userId: { type: "String" }, provider: { type: "String" }, providerAccountId: { type: "String" } } + } }, CalendarConnection: { - name: 'CalendarConnection', + name: "CalendarConnection", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userId: { - name: 'userId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, provider: { - name: 'provider', - type: 'String', + name: "provider", + type: "String" }, integrationId: { - name: 'integrationId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('integration_id') }] }, - ] as readonly AttributeApplication[], + name: "integrationId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("integration_id") }] }] as readonly AttributeApplication[] }, providerAccountId: { - name: 'providerAccountId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('provider_account_id') }], - }, - ] as readonly AttributeApplication[], + name: "providerAccountId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_account_id") }] }] as readonly AttributeApplication[] }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, displayName: { - name: 'displayName', - type: 'String', + name: "displayName", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('display_name') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("display_name") }] }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, credential: { - name: 'credential', - type: 'Credential', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('credentialId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'calendarConnections', - fields: ['credentialId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "credential", + type: "Credential", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "calendarConnections", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } }, credentialId: { - name: 'credentialId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('credential_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['credential'] as readonly string[], + name: "credentialId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("credential_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "credential" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'calendarConnections', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "calendarConnections", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, providerCalendars: { - name: 'providerCalendars', - type: 'ProviderCalendar', + name: "providerCalendars", + type: "ProviderCalendar", array: true, - relation: { opposite: 'calendarConnection' }, - }, + relation: { opposite: "calendarConnection" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('provider'), - ExpressionUtils.field('providerAccountId'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('user_provider_account_unique') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('calendar_connections') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }, { name: "name", value: ExpressionUtils.literal("user_provider_account_unique") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("calendar_connections") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - user_provider_account_unique: { - userId: { type: 'String' }, - provider: { type: 'String' }, - providerAccountId: { type: 'String' }, - }, - }, + id: { type: "String" }, + user_provider_account_unique: { userId: { type: "String" }, provider: { type: "String" }, providerAccountId: { type: "String" } } + } }, ProviderCalendar: { - name: 'ProviderCalendar', + name: "ProviderCalendar", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, calendarConnectionId: { - name: 'calendarConnectionId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('calendar_connection_id') }], - }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['calendarConnection'] as readonly string[], + name: "calendarConnectionId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("calendar_connection_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "calendarConnection" + ] as readonly string[] }, providerCalendarId: { - name: 'providerCalendarId', - type: 'String', - attributes: [ - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('provider_calendar_id') }], - }, - ] as readonly AttributeApplication[], + name: "providerCalendarId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_calendar_id") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, isPrimary: { - name: 'isPrimary', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('primary') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isPrimary", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("primary") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, timeZone: { - name: 'timeZone', - type: 'String', + name: "timeZone", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_zone') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("time_zone") }] }] as readonly AttributeApplication[] }, isSelected: { - name: 'isSelected', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('selected') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isSelected", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("selected") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isDeleted: { - name: 'isDeleted', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('deleted') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isDeleted", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("deleted") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isWritable: { - name: 'isWritable', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('writable') }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isWritable", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("writable") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, providerData: { - name: 'providerData', - type: 'Json', + name: "providerData", + type: "Json", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('provider_data') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_data") }] }] as readonly AttributeApplication[] }, lastSyncedAt: { - name: 'lastSyncedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('last_synced_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "lastSyncedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("last_synced_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, calendarConnection: { - name: 'calendarConnection', - type: 'CalendarConnection', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('calendarConnectionId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'providerCalendars', - fields: ['calendarConnectionId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "calendarConnection", + type: "CalendarConnection", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("calendarConnectionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "providerCalendars", fields: ["calendarConnectionId"], references: ["id"], onDelete: "Cascade" } }, userDefaultDestination: { - name: 'userDefaultDestination', - type: 'User', + name: "userDefaultDestination", + type: "User", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('UserDefaultDestinationCalendar') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'defaultDestinationCalendar', name: 'UserDefaultDestinationCalendar' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UserDefaultDestinationCalendar") }] }] as readonly AttributeApplication[], + relation: { opposite: "defaultDestinationCalendar", name: "UserDefaultDestinationCalendar" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('calendarConnectionId'), - ExpressionUtils.field('providerCalendarId'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('connection_calendar_unique') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('calendarConnectionId'), - ExpressionUtils.field('isSelected'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('connection_selected_idx') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('isPrimary')]), - }, - { name: 'name', value: ExpressionUtils.literal('primary_calendar_idx') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('lastSyncedAt')]), - }, - { name: 'name', value: ExpressionUtils.literal('sync_time_idx') }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('provider_calendars') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("calendarConnectionId"), ExpressionUtils.field("providerCalendarId")]) }, { name: "name", value: ExpressionUtils.literal("connection_calendar_unique") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("calendarConnectionId"), ExpressionUtils.field("isSelected")]) }, { name: "name", value: ExpressionUtils.literal("connection_selected_idx") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("isPrimary")]) }, { name: "name", value: ExpressionUtils.literal("primary_calendar_idx") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("lastSyncedAt")]) }, { name: "name", value: ExpressionUtils.literal("sync_time_idx") }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("provider_calendars") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - connection_calendar_unique: { - calendarConnectionId: { type: 'String' }, - providerCalendarId: { type: 'String' }, - }, - }, + id: { type: "String" }, + connection_calendar_unique: { calendarConnectionId: { type: "String" }, providerCalendarId: { type: "String" } } + } }, InstanceSettings: { - name: 'InstanceSettings', + name: "InstanceSettings", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, - ] as readonly AttributeApplication[], - default: 1 as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], + default: 1 as FieldDefault }, disableUserRegistration: { - name: 'disableUserRegistration', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - { - name: '@map', - args: [{ name: 'name', value: ExpressionUtils.literal('disable_user_registration') }], - }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableUserRegistration", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("disable_user_registration") }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('instance_settings') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("instance_settings") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, License: { - name: 'License', + name: "License", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, licenseKey: { - name: 'licenseKey', - type: 'String', + name: "licenseKey", + type: "String", unique: true, - attributes: [ - { name: '@unique' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_key') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("license_key") }] }] as readonly AttributeApplication[] }, version: { - name: 'version', - type: 'Int', + name: "version", + type: "Int", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('version') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("version") }] }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'LicenseType', + name: "type", + type: "LicenseType" }, seats: { - name: 'seats', - type: 'Int', + name: "seats", + type: "Int", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('seats') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("seats") }] }] as readonly AttributeApplication[] }, issuedAt: { - name: 'issuedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('issued_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "issuedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("issued_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] }, licenseeEmail: { - name: 'licenseeEmail', - type: 'String', + name: "licenseeEmail", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_email') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_email") }] }] as readonly AttributeApplication[] }, licenseeName: { - name: 'licenseeName', - type: 'String', + name: "licenseeName", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_name') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_name") }] }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'LicenseStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACTIVE') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('status') }] }, - ] as readonly AttributeApplication[], - default: 'ACTIVE' as FieldDefault, + name: "status", + type: "LicenseStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACTIVE") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("status") }] }] as readonly AttributeApplication[], + default: "ACTIVE" as FieldDefault }, validations: { - name: 'validations', - type: 'LicenseValidation', + name: "validations", + type: "LicenseValidation", array: true, - relation: { opposite: 'license' }, - }, + relation: { opposite: "license" } + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('licenses') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("licenses") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - licenseKey: { type: 'String' }, - }, + id: { type: "String" }, + licenseKey: { type: "String" } + } }, LicenseValidation: { - name: 'LicenseValidation', + name: "LicenseValidation", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, licenseId: { - name: 'licenseId', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['license'] as readonly string[], + name: "licenseId", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("license_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "license" + ] as readonly string[] }, license: { - name: 'license', - type: 'License', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('licenseId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'validations', - fields: ['licenseId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "license", + type: "License", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("licenseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "validations", fields: ["licenseId"], references: ["id"], onDelete: "Cascade" } }, ipAddress: { - name: 'ipAddress', - type: 'String', + name: "ipAddress", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('ip_address') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("ip_address") }] }] as readonly AttributeApplication[] }, fingerprint: { - name: 'fingerprint', - type: 'String', + name: "fingerprint", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('fingerprint') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("fingerprint") }] }] as readonly AttributeApplication[] }, validatedAt: { - name: 'validatedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('validated_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "validatedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("validated_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, userAgent: { - name: 'userAgent', - type: 'String', + name: "userAgent", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_agent') }] }, - ] as readonly AttributeApplication[], - }, + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_agent") }] }] as readonly AttributeApplication[] + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_validations') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("license_validations") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, InstanceLicense: { - name: 'InstanceLicense', + name: "InstanceLicense", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, licenseKey: { - name: 'licenseKey', - type: 'String', + name: "licenseKey", + type: "String", unique: true, - attributes: [ - { name: '@unique' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('license_key') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("license_key") }] }] as readonly AttributeApplication[] }, version: { - name: 'version', - type: 'Int', + name: "version", + type: "Int", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('version') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("version") }] }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'LicenseType', + name: "type", + type: "LicenseType" }, seats: { - name: 'seats', - type: 'Int', + name: "seats", + type: "Int", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('seats') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("seats") }] }] as readonly AttributeApplication[] }, issuedAt: { - name: 'issuedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('issued_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "issuedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("issued_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('expires_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("expires_at") }] }] as readonly AttributeApplication[] }, licenseeEmail: { - name: 'licenseeEmail', - type: 'String', + name: "licenseeEmail", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_email') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_email") }] }] as readonly AttributeApplication[] }, licenseeName: { - name: 'licenseeName', - type: 'String', + name: "licenseeName", + type: "String", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('licensee_name') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("licensee_name") }] }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'LicenseStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACTIVE') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('status') }] }, - ] as readonly AttributeApplication[], - default: 'ACTIVE' as FieldDefault, - }, + name: "status", + type: "LicenseStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACTIVE") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("status") }] }] as readonly AttributeApplication[], + default: "ACTIVE" as FieldDefault + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('instance_licenses') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("instance_licenses") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - licenseKey: { type: 'String' }, - }, - }, + id: { type: "String" }, + licenseKey: { type: "String" } + } + } } as const; enums = { TimeFormat: { - name: 'TimeFormat', + name: "TimeFormat", values: { - hours12: 'hours12', - hours24: 'hours24', + hours12: "hours12", + hours24: "hours24" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('time_format') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("time_format") }] } + ] as readonly AttributeApplication[] }, UserRole: { - name: 'UserRole', + name: "UserRole", values: { - admin: 'admin', - user: 'user', + admin: "admin", + user: "user" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_role') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("user_role") }] } + ] as readonly AttributeApplication[] }, ParticipantVisibility: { - name: 'ParticipantVisibility', + name: "ParticipantVisibility", values: { - full: 'full', - scoresOnly: 'scoresOnly', - limited: 'limited', + full: "full", + scoresOnly: "scoresOnly", + limited: "limited" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('participant_visibility') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("participant_visibility") }] } + ] as readonly AttributeApplication[] }, PollStatus: { - name: 'PollStatus', + name: "PollStatus", values: { - live: 'live', - paused: 'paused', - finalized: 'finalized', + live: "live", + paused: "paused", + finalized: "finalized" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('poll_status') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("poll_status") }] } + ] as readonly AttributeApplication[] }, VoteType: { - name: 'VoteType', + name: "VoteType", values: { - yes: 'yes', - no: 'no', - ifNeedBe: 'ifNeedBe', + yes: "yes", + no: "no", + ifNeedBe: "ifNeedBe" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('vote_type') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("vote_type") }] } + ] as readonly AttributeApplication[] }, SpaceMemberRole: { - name: 'SpaceMemberRole', + name: "SpaceMemberRole", values: { - ADMIN: 'ADMIN', - MEMBER: 'MEMBER', - }, + ADMIN: "ADMIN", + MEMBER: "MEMBER" + } }, SpaceTier: { - name: 'SpaceTier', + name: "SpaceTier", values: { - hobby: 'hobby', - pro: 'pro', + hobby: "hobby", + pro: "pro" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('space_tiers') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("space_tiers") }] } + ] as readonly AttributeApplication[] }, SubscriptionStatus: { - name: 'SubscriptionStatus', + name: "SubscriptionStatus", values: { - incomplete: 'incomplete', - incomplete_expired: 'incomplete_expired', - active: 'active', - paused: 'paused', - trialing: 'trialing', - past_due: 'past_due', - canceled: 'canceled', - unpaid: 'unpaid', + incomplete: "incomplete", + incomplete_expired: "incomplete_expired", + active: "active", + paused: "paused", + trialing: "trialing", + past_due: "past_due", + canceled: "canceled", + unpaid: "unpaid" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('subscription_status') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("subscription_status") }] } + ] as readonly AttributeApplication[] }, SubscriptionInterval: { - name: 'SubscriptionInterval', + name: "SubscriptionInterval", values: { - month: 'month', - year: 'year', + month: "month", + year: "year" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('subscription_interval') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("subscription_interval") }] } + ] as readonly AttributeApplication[] }, ScheduledEventStatus: { - name: 'ScheduledEventStatus', + name: "ScheduledEventStatus", values: { - confirmed: 'confirmed', - canceled: 'canceled', - unconfirmed: 'unconfirmed', + confirmed: "confirmed", + canceled: "canceled", + unconfirmed: "unconfirmed" }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_status') }] }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_status") }] } + ] as readonly AttributeApplication[] }, ScheduledEventInviteStatus: { - name: 'ScheduledEventInviteStatus', + name: "ScheduledEventInviteStatus", values: { - pending: 'pending', - accepted: 'accepted', - declined: 'declined', - tentative: 'tentative', + pending: "pending", + accepted: "accepted", + declined: "declined", + tentative: "tentative" }, attributes: [ - { - name: '@@map', - args: [{ name: 'name', value: ExpressionUtils.literal('scheduled_event_invite_status') }], - }, - ] as readonly AttributeApplication[], + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("scheduled_event_invite_status") }] } + ] as readonly AttributeApplication[] }, CredentialType: { - name: 'CredentialType', + name: "CredentialType", values: { - OAUTH: 'OAUTH', - }, + OAUTH: "OAUTH" + } }, LicenseType: { - name: 'LicenseType', + name: "LicenseType", values: { - PLUS: 'PLUS', - ORGANIZATION: 'ORGANIZATION', - ENTERPRISE: 'ENTERPRISE', - }, + PLUS: "PLUS", + ORGANIZATION: "ORGANIZATION", + ENTERPRISE: "ENTERPRISE" + } }, LicenseStatus: { - name: 'LicenseStatus', + name: "LicenseStatus", values: { - ACTIVE: 'ACTIVE', - REVOKED: 'REVOKED', - }, - }, + ACTIVE: "ACTIVE", + REVOKED: "REVOKED" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/github-repos/cal.com/schema.ts b/tests/e2e/github-repos/cal.com/schema.ts index 2af7655de..787417aee 100644 --- a/tests/e2e/github-repos/cal.com/schema.ts +++ b/tests/e2e/github-repos/cal.com/schema.ts @@ -5,14666 +5,9673 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { Host: { - name: 'Host', + name: "Host", fields: { user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'hosts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "hosts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", id: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, eventType: { - name: 'eventType', - type: 'EventType', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'hosts', fields: ['eventTypeId'], references: ['id'], onDelete: 'Cascade' }, + name: "eventType", + type: "EventType", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "hosts", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int", id: true, - foreignKeyFor: ['eventType'] as readonly string[], + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, isFixed: { - name: 'isFixed', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isFixed", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, priority: { - name: 'priority', - type: 'Int', - optional: true, + name: "priority", + type: "Int", + optional: true }, weight: { - name: 'weight', - type: 'Int', - optional: true, + name: "weight", + type: "Int", + optional: true }, weightAdjustment: { - name: 'weightAdjustment', - type: 'Int', - optional: true, + name: "weightAdjustment", + type: "Int", + optional: true }, schedule: { - name: 'schedule', - type: 'Schedule', + name: "schedule", + type: "Schedule", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'Host', fields: ['scheduleId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "Host", fields: ["scheduleId"], references: ["id"] } }, scheduleId: { - name: 'scheduleId', - type: 'Int', + name: "scheduleId", + type: "Int", optional: true, - foreignKeyFor: ['schedule'] as readonly string[], + foreignKeyFor: [ + "schedule" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('eventTypeId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]) }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }] } ] as readonly AttributeApplication[], - idFields: ['userId', 'eventTypeId'], + idFields: ["userId", "eventTypeId"], uniqueFields: { - userId_eventTypeId: { userId: { type: 'Int' }, eventTypeId: { type: 'Int' } }, - }, + userId_eventTypeId: { userId: { type: "Int" }, eventTypeId: { type: "Int" } } + } }, CalVideoSettings: { - name: 'CalVideoSettings', + name: "CalVideoSettings", fields: { eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], - foreignKeyFor: ['eventType'] as readonly string[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, eventType: { - name: 'eventType', - type: 'EventType', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'calVideoSettings', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "eventType", + type: "EventType", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "calVideoSettings", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, disableRecordingForOrganizer: { - name: 'disableRecordingForOrganizer', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableRecordingForOrganizer", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, disableRecordingForGuests: { - name: 'disableRecordingForGuests', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableRecordingForGuests", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, enableAutomaticTranscription: { - name: 'enableAutomaticTranscription', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "enableAutomaticTranscription", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, redirectUrlOnExit: { - name: 'redirectUrlOnExit', - type: 'String', - optional: true, + name: "redirectUrlOnExit", + type: "String", + optional: true }, disableTranscriptionForGuests: { - name: 'disableTranscriptionForGuests', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableTranscriptionForGuests", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, disableTranscriptionForOrganizer: { - name: 'disableTranscriptionForOrganizer', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableTranscriptionForOrganizer", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['eventTypeId'], + idFields: ["eventTypeId"], uniqueFields: { - eventTypeId: { type: 'Int' }, - }, + eventTypeId: { type: "Int" } + } }, EventType: { - name: 'EventType', + name: "EventType", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, interfaceLanguage: { - name: 'interfaceLanguage', - type: 'String', - optional: true, + name: "interfaceLanguage", + type: "String", + optional: true }, position: { - name: 'position', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "position", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, locations: { - name: 'locations', - type: 'Json', - optional: true, + name: "locations", + type: "Json", + optional: true }, length: { - name: 'length', - type: 'Int', + name: "length", + type: "Int" }, offsetStart: { - name: 'offsetStart', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "offsetStart", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, hidden: { - name: 'hidden', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hidden", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hosts: { - name: 'hosts', - type: 'Host', + name: "hosts", + type: "Host", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, users: { - name: 'users', - type: 'User', + name: "users", + type: "User", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('user_eventtype') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'eventTypes', name: 'user_eventtype' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("user_eventtype") }] }] as readonly AttributeApplication[], + relation: { opposite: "eventTypes", name: "user_eventtype" } }, owner: { - name: 'owner', - type: 'User', + name: "owner", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('owner') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'ownedEventTypes', - name: 'owner', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("owner") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "ownedEventTypes", name: "owner", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['owner'] as readonly string[], + foreignKeyFor: [ + "owner" + ] as readonly string[] }, profileId: { - name: 'profileId', - type: 'Int', + name: "profileId", + type: "Int", optional: true, - foreignKeyFor: ['profile'] as readonly string[], + foreignKeyFor: [ + "profile" + ] as readonly string[] }, profile: { - name: 'profile', - type: 'Profile', + name: "profile", + type: "Profile", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('profileId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'eventTypes', fields: ['profileId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("profileId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "eventTypes", fields: ["profileId"], references: ["id"] } }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'eventTypes', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "eventTypes", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, hashedLink: { - name: 'hashedLink', - type: 'HashedLink', + name: "hashedLink", + type: "HashedLink", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, bookings: { - name: 'bookings', - type: 'Booking', + name: "bookings", + type: "Booking", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, availability: { - name: 'availability', - type: 'Availability', + name: "availability", + type: "Availability", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, webhooks: { - name: 'webhooks', - type: 'Webhook', + name: "webhooks", + type: "Webhook", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, destinationCalendar: { - name: 'destinationCalendar', - type: 'DestinationCalendar', + name: "destinationCalendar", + type: "DestinationCalendar", optional: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, useEventLevelSelectedCalendars: { - name: 'useEventLevelSelectedCalendars', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "useEventLevelSelectedCalendars", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, eventName: { - name: 'eventName', - type: 'String', - optional: true, + name: "eventName", + type: "String", + optional: true }, customInputs: { - name: 'customInputs', - type: 'EventTypeCustomInput', + name: "customInputs", + type: "EventTypeCustomInput", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - foreignKeyFor: ['parent'] as readonly string[], + foreignKeyFor: [ + "parent" + ] as readonly string[] }, parent: { - name: 'parent', - type: 'EventType', + name: "parent", + type: "EventType", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('managed_eventtype') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'children', - name: 'managed_eventtype', - fields: ['parentId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("managed_eventtype") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "children", name: "managed_eventtype", fields: ["parentId"], references: ["id"], onDelete: "Cascade" } }, children: { - name: 'children', - type: 'EventType', + name: "children", + type: "EventType", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('managed_eventtype') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parent', name: 'managed_eventtype' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("managed_eventtype") }] }] as readonly AttributeApplication[], + relation: { opposite: "parent", name: "managed_eventtype" } }, bookingFields: { - name: 'bookingFields', - type: 'Json', - optional: true, + name: "bookingFields", + type: "Json", + optional: true }, timeZone: { - name: 'timeZone', - type: 'String', - optional: true, + name: "timeZone", + type: "String", + optional: true }, periodType: { - name: 'periodType', - type: 'PeriodType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNLIMITED') }] }, - ] as readonly AttributeApplication[], - default: 'UNLIMITED' as FieldDefault, + name: "periodType", + type: "PeriodType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNLIMITED") }] }] as readonly AttributeApplication[], + default: "UNLIMITED" as FieldDefault }, periodStartDate: { - name: 'periodStartDate', - type: 'DateTime', - optional: true, + name: "periodStartDate", + type: "DateTime", + optional: true }, periodEndDate: { - name: 'periodEndDate', - type: 'DateTime', - optional: true, + name: "periodEndDate", + type: "DateTime", + optional: true }, periodDays: { - name: 'periodDays', - type: 'Int', - optional: true, + name: "periodDays", + type: "Int", + optional: true }, periodCountCalendarDays: { - name: 'periodCountCalendarDays', - type: 'Boolean', - optional: true, + name: "periodCountCalendarDays", + type: "Boolean", + optional: true }, lockTimeZoneToggleOnBookingPage: { - name: 'lockTimeZoneToggleOnBookingPage', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "lockTimeZoneToggleOnBookingPage", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, requiresConfirmation: { - name: 'requiresConfirmation', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "requiresConfirmation", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, requiresConfirmationWillBlockSlot: { - name: 'requiresConfirmationWillBlockSlot', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "requiresConfirmationWillBlockSlot", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, requiresConfirmationForFreeEmail: { - name: 'requiresConfirmationForFreeEmail', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "requiresConfirmationForFreeEmail", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, requiresBookerEmailVerification: { - name: 'requiresBookerEmailVerification', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "requiresBookerEmailVerification", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, canSendCalVideoTranscriptionEmails: { - name: 'canSendCalVideoTranscriptionEmails', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "canSendCalVideoTranscriptionEmails", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, autoTranslateDescriptionEnabled: { - name: 'autoTranslateDescriptionEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "autoTranslateDescriptionEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, recurringEvent: { - name: 'recurringEvent', - type: 'Json', - optional: true, + name: "recurringEvent", + type: "Json", + optional: true }, disableGuests: { - name: 'disableGuests', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableGuests", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hideCalendarNotes: { - name: 'hideCalendarNotes', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideCalendarNotes", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hideCalendarEventDetails: { - name: 'hideCalendarEventDetails', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideCalendarEventDetails", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, minimumBookingNotice: { - name: 'minimumBookingNotice', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(120) }] }, - ] as readonly AttributeApplication[], - default: 120 as FieldDefault, + name: "minimumBookingNotice", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(120) }] }] as readonly AttributeApplication[], + default: 120 as FieldDefault }, beforeEventBuffer: { - name: 'beforeEventBuffer', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "beforeEventBuffer", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, afterEventBuffer: { - name: 'afterEventBuffer', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "afterEventBuffer", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, seatsPerTimeSlot: { - name: 'seatsPerTimeSlot', - type: 'Int', - optional: true, + name: "seatsPerTimeSlot", + type: "Int", + optional: true }, onlyShowFirstAvailableSlot: { - name: 'onlyShowFirstAvailableSlot', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "onlyShowFirstAvailableSlot", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, disableCancelling: { - name: 'disableCancelling', - type: 'Boolean', + name: "disableCancelling", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, disableRescheduling: { - name: 'disableRescheduling', - type: 'Boolean', + name: "disableRescheduling", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, seatsShowAttendees: { - name: 'seatsShowAttendees', - type: 'Boolean', + name: "seatsShowAttendees", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, seatsShowAvailabilityCount: { - name: 'seatsShowAvailabilityCount', - type: 'Boolean', + name: "seatsShowAvailabilityCount", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, schedulingType: { - name: 'schedulingType', - type: 'SchedulingType', - optional: true, + name: "schedulingType", + type: "SchedulingType", + optional: true }, schedule: { - name: 'schedule', - type: 'Schedule', + name: "schedule", + type: "Schedule", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'eventType', fields: ['scheduleId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "eventType", fields: ["scheduleId"], references: ["id"] } }, scheduleId: { - name: 'scheduleId', - type: 'Int', + name: "scheduleId", + type: "Int", optional: true, - foreignKeyFor: ['schedule'] as readonly string[], + foreignKeyFor: [ + "schedule" + ] as readonly string[] }, allowReschedulingCancelledBookings: { - name: 'allowReschedulingCancelledBookings', - type: 'Boolean', + name: "allowReschedulingCancelledBookings", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, price: { - name: 'price', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "price", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, currency: { - name: 'currency', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('usd') }] }, - ] as readonly AttributeApplication[], - default: 'usd' as FieldDefault, + name: "currency", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("usd") }] }] as readonly AttributeApplication[], + default: "usd" as FieldDefault }, slotInterval: { - name: 'slotInterval', - type: 'Int', - optional: true, + name: "slotInterval", + type: "Int", + optional: true }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, + name: "metadata", + type: "Json", + optional: true }, successRedirectUrl: { - name: 'successRedirectUrl', - type: 'String', - optional: true, + name: "successRedirectUrl", + type: "String", + optional: true }, forwardParamsSuccessRedirect: { - name: 'forwardParamsSuccessRedirect', - type: 'Boolean', + name: "forwardParamsSuccessRedirect", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, workflows: { - name: 'workflows', - type: 'WorkflowsOnEventTypes', + name: "workflows", + type: "WorkflowsOnEventTypes", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, bookingLimits: { - name: 'bookingLimits', - type: 'Json', - optional: true, + name: "bookingLimits", + type: "Json", + optional: true }, durationLimits: { - name: 'durationLimits', - type: 'Json', - optional: true, + name: "durationLimits", + type: "Json", + optional: true }, isInstantEvent: { - name: 'isInstantEvent', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isInstantEvent", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, instantMeetingExpiryTimeOffsetInSeconds: { - name: 'instantMeetingExpiryTimeOffsetInSeconds', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(90) }] }, - ] as readonly AttributeApplication[], - default: 90 as FieldDefault, + name: "instantMeetingExpiryTimeOffsetInSeconds", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(90) }] }] as readonly AttributeApplication[], + default: 90 as FieldDefault }, instantMeetingScheduleId: { - name: 'instantMeetingScheduleId', - type: 'Int', + name: "instantMeetingScheduleId", + type: "Int", optional: true, - foreignKeyFor: ['instantMeetingSchedule'] as readonly string[], + foreignKeyFor: [ + "instantMeetingSchedule" + ] as readonly string[] }, instantMeetingSchedule: { - name: 'instantMeetingSchedule', - type: 'Schedule', + name: "instantMeetingSchedule", + type: "Schedule", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('InstantMeetingSchedule') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('instantMeetingScheduleId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'instantMeetingEvents', - name: 'InstantMeetingSchedule', - fields: ['instantMeetingScheduleId'], - references: ['id'], - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("InstantMeetingSchedule") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("instantMeetingScheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "instantMeetingEvents", name: "InstantMeetingSchedule", fields: ["instantMeetingScheduleId"], references: ["id"] } }, instantMeetingParameters: { - name: 'instantMeetingParameters', - type: 'String', - array: true, + name: "instantMeetingParameters", + type: "String", + array: true }, assignAllTeamMembers: { - name: 'assignAllTeamMembers', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "assignAllTeamMembers", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, assignRRMembersUsingSegment: { - name: 'assignRRMembersUsingSegment', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "assignRRMembersUsingSegment", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, rrSegmentQueryValue: { - name: 'rrSegmentQueryValue', - type: 'Json', - optional: true, + name: "rrSegmentQueryValue", + type: "Json", + optional: true }, useEventTypeDestinationCalendarEmail: { - name: 'useEventTypeDestinationCalendarEmail', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "useEventTypeDestinationCalendarEmail", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, aiPhoneCallConfig: { - name: 'aiPhoneCallConfig', - type: 'AIPhoneCallConfiguration', + name: "aiPhoneCallConfig", + type: "AIPhoneCallConfiguration", optional: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, isRRWeightsEnabled: { - name: 'isRRWeightsEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isRRWeightsEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, fieldTranslations: { - name: 'fieldTranslations', - type: 'EventTypeTranslation', + name: "fieldTranslations", + type: "EventTypeTranslation", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, maxLeadThreshold: { - name: 'maxLeadThreshold', - type: 'Int', - optional: true, + name: "maxLeadThreshold", + type: "Int", + optional: true }, includeNoShowInRRCalculation: { - name: 'includeNoShowInRRCalculation', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "includeNoShowInRRCalculation", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, selectedCalendars: { - name: 'selectedCalendars', - type: 'SelectedCalendar', + name: "selectedCalendars", + type: "SelectedCalendar", array: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, allowReschedulingPastBookings: { - name: 'allowReschedulingPastBookings', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "allowReschedulingPastBookings", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hideOrganizerEmail: { - name: 'hideOrganizerEmail', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideOrganizerEmail", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, maxActiveBookingsPerBooker: { - name: 'maxActiveBookingsPerBooker', - type: 'Int', - optional: true, + name: "maxActiveBookingsPerBooker", + type: "Int", + optional: true }, maxActiveBookingPerBookerOfferReschedule: { - name: 'maxActiveBookingPerBookerOfferReschedule', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "maxActiveBookingPerBookerOfferReschedule", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, customReplyToEmail: { - name: 'customReplyToEmail', - type: 'String', - optional: true, + name: "customReplyToEmail", + type: "String", + optional: true }, calVideoSettings: { - name: 'calVideoSettings', - type: 'CalVideoSettings', + name: "calVideoSettings", + type: "CalVideoSettings", optional: true, - relation: { opposite: 'eventType' }, + relation: { opposite: "eventType" } }, eventTypeColor: { - name: 'eventTypeColor', - type: 'Json', - optional: true, + name: "eventTypeColor", + type: "Json", + optional: true }, rescheduleWithSameRoundRobinHost: { - name: 'rescheduleWithSameRoundRobinHost', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "rescheduleWithSameRoundRobinHost", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, secondaryEmailId: { - name: 'secondaryEmailId', - type: 'Int', + name: "secondaryEmailId", + type: "Int", optional: true, - foreignKeyFor: ['secondaryEmail'] as readonly string[], + foreignKeyFor: [ + "secondaryEmail" + ] as readonly string[] }, secondaryEmail: { - name: 'secondaryEmail', - type: 'SecondaryEmail', + name: "secondaryEmail", + type: "SecondaryEmail", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'eventTypes', - fields: ['secondaryEmailId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "eventTypes", fields: ["secondaryEmailId"], references: ["id"], onDelete: "Cascade" } }, useBookerTimezone: { - name: 'useBookerTimezone', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "useBookerTimezone", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, restrictionScheduleId: { - name: 'restrictionScheduleId', - type: 'Int', + name: "restrictionScheduleId", + type: "Int", optional: true, - foreignKeyFor: ['restrictionSchedule'] as readonly string[], + foreignKeyFor: [ + "restrictionSchedule" + ] as readonly string[] }, restrictionSchedule: { - name: 'restrictionSchedule', - type: 'Schedule', + name: "restrictionSchedule", + type: "Schedule", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('restrictionSchedule') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('restrictionScheduleId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'restrictionSchedule', - name: 'restrictionSchedule', - fields: ['restrictionScheduleId'], - references: ['id'], - }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("restrictionSchedule") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("restrictionScheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "restrictionSchedule", name: "restrictionSchedule", fields: ["restrictionScheduleId"], references: ["id"] } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('slug'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('slug'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('parentId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('profileId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('restrictionScheduleId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("slug")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("slug")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("parentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("profileId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("restrictionScheduleId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId_slug: { userId: { type: 'Int' }, slug: { type: 'String' } }, - teamId_slug: { teamId: { type: 'Int' }, slug: { type: 'String' } }, - userId_parentId: { userId: { type: 'Int' }, parentId: { type: 'Int' } }, - }, + id: { type: "Int" }, + userId_slug: { userId: { type: "Int" }, slug: { type: "String" } }, + teamId_slug: { teamId: { type: "Int" }, slug: { type: "String" } }, + userId_parentId: { userId: { type: "Int" }, parentId: { type: "Int" } } + } }, Credential: { - name: 'Credential', + name: "Credential", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, type: { - name: 'type', - type: 'String', + name: "type", + type: "String" }, key: { - name: 'key', - type: 'Json', + name: "key", + type: "Json" }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'credentials', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "credentials", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'credentials', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "credentials", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, app: { - name: 'app', - type: 'App', + name: "app", + type: "App", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'credentials', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "credentials", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } }, appId: { - name: 'appId', - type: 'String', + name: "appId", + type: "String", optional: true, - foreignKeyFor: ['app'] as readonly string[], + foreignKeyFor: [ + "app" + ] as readonly string[] }, subscriptionId: { - name: 'subscriptionId', - type: 'String', - optional: true, + name: "subscriptionId", + type: "String", + optional: true }, paymentStatus: { - name: 'paymentStatus', - type: 'String', - optional: true, + name: "paymentStatus", + type: "String", + optional: true }, billingCycleStart: { - name: 'billingCycleStart', - type: 'Int', - optional: true, + name: "billingCycleStart", + type: "Int", + optional: true }, destinationCalendars: { - name: 'destinationCalendars', - type: 'DestinationCalendar', + name: "destinationCalendars", + type: "DestinationCalendar", array: true, - relation: { opposite: 'credential' }, + relation: { opposite: "credential" } }, selectedCalendars: { - name: 'selectedCalendars', - type: 'SelectedCalendar', + name: "selectedCalendars", + type: "SelectedCalendar", array: true, - relation: { opposite: 'credential' }, + relation: { opposite: "credential" } }, invalid: { - name: 'invalid', - type: 'Boolean', + name: "invalid", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, CalendarCache: { - name: 'CalendarCache', - type: 'CalendarCache', + name: "CalendarCache", + type: "CalendarCache", array: true, - relation: { opposite: 'credential' }, + relation: { opposite: "credential" } }, references: { - name: 'references', - type: 'BookingReference', + name: "references", + type: "BookingReference", array: true, - relation: { opposite: 'credential' }, + relation: { opposite: "credential" } }, delegationCredentialId: { - name: 'delegationCredentialId', - type: 'String', + name: "delegationCredentialId", + type: "String", optional: true, - foreignKeyFor: ['delegationCredential'] as readonly string[], + foreignKeyFor: [ + "delegationCredential" + ] as readonly string[] }, delegationCredential: { - name: 'delegationCredential', - type: 'DelegationCredential', + name: "delegationCredential", + type: "DelegationCredential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('delegationCredentialId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'credentials', - fields: ['delegationCredentialId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "credentials", fields: ["delegationCredentialId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('subscriptionId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('invalid')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('delegationCredentialId'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("subscriptionId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("invalid")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("delegationCredentialId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, DestinationCalendar: { - name: 'DestinationCalendar', + name: "DestinationCalendar", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, integration: { - name: 'integration', - type: 'String', + name: "integration", + type: "String" }, externalId: { - name: 'externalId', - type: 'String', + name: "externalId", + type: "String" }, primaryEmail: { - name: 'primaryEmail', - type: 'String', - optional: true, + name: "primaryEmail", + type: "String", + optional: true }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'destinationCalendar', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "destinationCalendar", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", array: true, - relation: { opposite: 'destinationCalendar' }, + relation: { opposite: "destinationCalendar" } }, eventType: { - name: 'eventType', - type: 'EventType', + name: "eventType", + type: "EventType", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'destinationCalendar', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "destinationCalendar", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['eventType'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, credentialId: { - name: 'credentialId', - type: 'Int', + name: "credentialId", + type: "Int", optional: true, - foreignKeyFor: ['credential'] as readonly string[], + foreignKeyFor: [ + "credential" + ] as readonly string[] }, credential: { - name: 'credential', - type: 'Credential', + name: "credential", + type: "Credential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'destinationCalendars', - fields: ['credentialId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "destinationCalendars", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } }, delegationCredential: { - name: 'delegationCredential', - type: 'DelegationCredential', + name: "delegationCredential", + type: "DelegationCredential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('delegationCredentialId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'destinationCalendar', - fields: ['delegationCredentialId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "destinationCalendar", fields: ["delegationCredentialId"], references: ["id"], onDelete: "Cascade" } }, delegationCredentialId: { - name: 'delegationCredentialId', - type: 'String', + name: "delegationCredentialId", + type: "String", optional: true, - foreignKeyFor: ['delegationCredential'] as readonly string[], + foreignKeyFor: [ + "delegationCredential" + ] as readonly string[] }, domainWideDelegation: { - name: 'domainWideDelegation', - type: 'DomainWideDelegation', + name: "domainWideDelegation", + type: "DomainWideDelegation", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('domainWideDelegationCredentialId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'destinationCalendar', - fields: ['domainWideDelegationCredentialId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("domainWideDelegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "destinationCalendar", fields: ["domainWideDelegationCredentialId"], references: ["id"], onDelete: "Cascade" } }, domainWideDelegationCredentialId: { - name: 'domainWideDelegationCredentialId', - type: 'String', + name: "domainWideDelegationCredentialId", + type: "String", optional: true, - foreignKeyFor: ['domainWideDelegation'] as readonly string[], - }, + foreignKeyFor: [ + "domainWideDelegation" + ] as readonly string[] + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId: { type: 'Int' }, - eventTypeId: { type: 'Int' }, - }, + id: { type: "Int" }, + userId: { type: "Int" }, + eventTypeId: { type: "Int" } + } }, UserPassword: { - name: 'UserPassword', + name: "UserPassword", fields: { hash: { - name: 'hash', - type: 'String', + name: "hash", + type: "String" }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'password', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "password", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, - idFields: ['userId'], + idFields: ["userId"], uniqueFields: { - userId: { type: 'Int' }, - }, + userId: { type: "Int" } + } }, TravelSchedule: { - name: 'TravelSchedule', + name: "TravelSchedule", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'travelSchedules', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "travelSchedules", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, timeZone: { - name: 'timeZone', - type: 'String', + name: "timeZone", + type: "String" }, startDate: { - name: 'startDate', - type: 'DateTime', + name: "startDate", + type: "DateTime" }, endDate: { - name: 'endDate', - type: 'DateTime', - optional: true, + name: "endDate", + type: "DateTime", + optional: true }, prevTimeZone: { - name: 'prevTimeZone', - type: 'String', - optional: true, - }, + name: "prevTimeZone", + type: "String", + optional: true + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('startDate')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('endDate')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("startDate")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("endDate")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, username: { - name: 'username', - type: 'String', - optional: true, + name: "username", + type: "String", + optional: true }, name: { - name: 'name', - type: 'String', - optional: true, + name: "name", + type: "String", + optional: true }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, emailVerified: { - name: 'emailVerified', - type: 'DateTime', - optional: true, + name: "emailVerified", + type: "DateTime", + optional: true }, password: { - name: 'password', - type: 'UserPassword', + name: "password", + type: "UserPassword", optional: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, bio: { - name: 'bio', - type: 'String', - optional: true, + name: "bio", + type: "String", + optional: true }, avatarUrl: { - name: 'avatarUrl', - type: 'String', - optional: true, + name: "avatarUrl", + type: "String", + optional: true }, timeZone: { - name: 'timeZone', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('Europe/London') }], - }, - ] as readonly AttributeApplication[], - default: 'Europe/London' as FieldDefault, + name: "timeZone", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Europe/London") }] }] as readonly AttributeApplication[], + default: "Europe/London" as FieldDefault }, travelSchedules: { - name: 'travelSchedules', - type: 'TravelSchedule', + name: "travelSchedules", + type: "TravelSchedule", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, weekStart: { - name: 'weekStart', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('Sunday') }] }, - ] as readonly AttributeApplication[], - default: 'Sunday' as FieldDefault, + name: "weekStart", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Sunday") }] }] as readonly AttributeApplication[], + default: "Sunday" as FieldDefault }, startTime: { - name: 'startTime', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "startTime", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, endTime: { - name: 'endTime', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1440) }] }, - ] as readonly AttributeApplication[], - default: 1440 as FieldDefault, + name: "endTime", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1440) }] }] as readonly AttributeApplication[], + default: 1440 as FieldDefault }, bufferTime: { - name: 'bufferTime', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "bufferTime", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, hideBranding: { - name: 'hideBranding', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideBranding", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, theme: { - name: 'theme', - type: 'String', - optional: true, + name: "theme", + type: "String", + optional: true }, appTheme: { - name: 'appTheme', - type: 'String', - optional: true, + name: "appTheme", + type: "String", + optional: true }, createdDate: { - name: 'createdDate', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdDate", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, trialEndsAt: { - name: 'trialEndsAt', - type: 'DateTime', - optional: true, + name: "trialEndsAt", + type: "DateTime", + optional: true }, lastActiveAt: { - name: 'lastActiveAt', - type: 'DateTime', - optional: true, + name: "lastActiveAt", + type: "DateTime", + optional: true }, eventTypes: { - name: 'eventTypes', - type: 'EventType', + name: "eventTypes", + type: "EventType", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('user_eventtype') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'users', name: 'user_eventtype' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("user_eventtype") }] }] as readonly AttributeApplication[], + relation: { opposite: "users", name: "user_eventtype" } }, credentials: { - name: 'credentials', - type: 'Credential', + name: "credentials", + type: "Credential", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, teams: { - name: 'teams', - type: 'Membership', + name: "teams", + type: "Membership", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, bookings: { - name: 'bookings', - type: 'Booking', + name: "bookings", + type: "Booking", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, schedules: { - name: 'schedules', - type: 'Schedule', + name: "schedules", + type: "Schedule", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, defaultScheduleId: { - name: 'defaultScheduleId', - type: 'Int', - optional: true, + name: "defaultScheduleId", + type: "Int", + optional: true }, selectedCalendars: { - name: 'selectedCalendars', - type: 'SelectedCalendar', + name: "selectedCalendars", + type: "SelectedCalendar", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, completedOnboarding: { - name: 'completedOnboarding', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "completedOnboarding", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, locale: { - name: 'locale', - type: 'String', - optional: true, + name: "locale", + type: "String", + optional: true }, timeFormat: { - name: 'timeFormat', - type: 'Int', + name: "timeFormat", + type: "Int", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(12) }] }, - ] as readonly AttributeApplication[], - default: 12 as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(12) }] }] as readonly AttributeApplication[], + default: 12 as FieldDefault }, twoFactorSecret: { - name: 'twoFactorSecret', - type: 'String', - optional: true, + name: "twoFactorSecret", + type: "String", + optional: true }, twoFactorEnabled: { - name: 'twoFactorEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "twoFactorEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, backupCodes: { - name: 'backupCodes', - type: 'String', - optional: true, + name: "backupCodes", + type: "String", + optional: true }, identityProvider: { - name: 'identityProvider', - type: 'IdentityProvider', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CAL') }] }, - ] as readonly AttributeApplication[], - default: 'CAL' as FieldDefault, + name: "identityProvider", + type: "IdentityProvider", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CAL") }] }] as readonly AttributeApplication[], + default: "CAL" as FieldDefault }, identityProviderId: { - name: 'identityProviderId', - type: 'String', - optional: true, + name: "identityProviderId", + type: "String", + optional: true }, availability: { - name: 'availability', - type: 'Availability', + name: "availability", + type: "Availability", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, invitedTo: { - name: 'invitedTo', - type: 'Int', - optional: true, + name: "invitedTo", + type: "Int", + optional: true }, webhooks: { - name: 'webhooks', - type: 'Webhook', + name: "webhooks", + type: "Webhook", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, brandColor: { - name: 'brandColor', - type: 'String', - optional: true, + name: "brandColor", + type: "String", + optional: true }, darkBrandColor: { - name: 'darkBrandColor', - type: 'String', - optional: true, + name: "darkBrandColor", + type: "String", + optional: true }, destinationCalendar: { - name: 'destinationCalendar', - type: 'DestinationCalendar', + name: "destinationCalendar", + type: "DestinationCalendar", optional: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, allowDynamicBooking: { - name: 'allowDynamicBooking', - type: 'Boolean', + name: "allowDynamicBooking", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, allowSEOIndexing: { - name: 'allowSEOIndexing', - type: 'Boolean', + name: "allowSEOIndexing", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, receiveMonthlyDigestEmail: { - name: 'receiveMonthlyDigestEmail', - type: 'Boolean', + name: "receiveMonthlyDigestEmail", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, + name: "metadata", + type: "Json", + optional: true }, verified: { - name: 'verified', - type: 'Boolean', + name: "verified", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, role: { - name: 'role', - type: 'UserPermissionRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, - ] as readonly AttributeApplication[], - default: 'USER' as FieldDefault, + name: "role", + type: "UserPermissionRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], + default: "USER" as FieldDefault }, disableImpersonation: { - name: 'disableImpersonation', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableImpersonation", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, impersonatedUsers: { - name: 'impersonatedUsers', - type: 'Impersonations', + name: "impersonatedUsers", + type: "Impersonations", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('impersonated_user') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'impersonatedUser', name: 'impersonated_user' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_user") }] }] as readonly AttributeApplication[], + relation: { opposite: "impersonatedUser", name: "impersonated_user" } }, impersonatedBy: { - name: 'impersonatedBy', - type: 'Impersonations', + name: "impersonatedBy", + type: "Impersonations", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('impersonated_by_user') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'impersonatedBy', name: 'impersonated_by_user' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_by_user") }] }] as readonly AttributeApplication[], + relation: { opposite: "impersonatedBy", name: "impersonated_by_user" } }, apiKeys: { - name: 'apiKeys', - type: 'ApiKey', + name: "apiKeys", + type: "ApiKey", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, accounts: { - name: 'accounts', - type: 'Account', + name: "accounts", + type: "Account", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, sessions: { - name: 'sessions', - type: 'Session', + name: "sessions", + type: "Session", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, Feedback: { - name: 'Feedback', - type: 'Feedback', + name: "Feedback", + type: "Feedback", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, ownedEventTypes: { - name: 'ownedEventTypes', - type: 'EventType', + name: "ownedEventTypes", + type: "EventType", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('owner') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'owner', name: 'owner' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("owner") }] }] as readonly AttributeApplication[], + relation: { opposite: "owner", name: "owner" } }, workflows: { - name: 'workflows', - type: 'Workflow', + name: "workflows", + type: "Workflow", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, routingForms: { - name: 'routingForms', - type: 'App_RoutingForms_Form', + name: "routingForms", + type: "App_RoutingForms_Form", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('routing-form') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'user', name: 'routing-form' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("routing-form") }] }] as readonly AttributeApplication[], + relation: { opposite: "user", name: "routing-form" } }, updatedRoutingForms: { - name: 'updatedRoutingForms', - type: 'App_RoutingForms_Form', + name: "updatedRoutingForms", + type: "App_RoutingForms_Form", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('updated-routing-form') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'updatedBy', name: 'updated-routing-form' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updated-routing-form") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedBy", name: "updated-routing-form" } }, verifiedNumbers: { - name: 'verifiedNumbers', - type: 'VerifiedNumber', + name: "verifiedNumbers", + type: "VerifiedNumber", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, verifiedEmails: { - name: 'verifiedEmails', - type: 'VerifiedEmail', + name: "verifiedEmails", + type: "VerifiedEmail", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, hosts: { - name: 'hosts', - type: 'Host', + name: "hosts", + type: "Host", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, organizationId: { - name: 'organizationId', - type: 'Int', + name: "organizationId", + type: "Int", optional: true, - foreignKeyFor: ['organization'] as readonly string[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Team', + name: "organization", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('scope') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'orgUsers', - name: 'scope', - fields: ['organizationId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("scope") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "orgUsers", name: "scope", fields: ["organizationId"], references: ["id"], onDelete: "SetNull" } }, accessCodes: { - name: 'accessCodes', - type: 'AccessCode', + name: "accessCodes", + type: "AccessCode", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, bookingRedirects: { - name: 'bookingRedirects', - type: 'OutOfOfficeEntry', + name: "bookingRedirects", + type: "OutOfOfficeEntry", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, bookingRedirectsTo: { - name: 'bookingRedirectsTo', - type: 'OutOfOfficeEntry', + name: "bookingRedirectsTo", + type: "OutOfOfficeEntry", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('toUser') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'toUser', name: 'toUser' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("toUser") }] }] as readonly AttributeApplication[], + relation: { opposite: "toUser", name: "toUser" } }, locked: { - name: 'locked', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "locked", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, platformOAuthClients: { - name: 'platformOAuthClients', - type: 'PlatformOAuthClient', + name: "platformOAuthClients", + type: "PlatformOAuthClient", array: true, - relation: { opposite: 'users' }, + relation: { opposite: "users" } }, AccessToken: { - name: 'AccessToken', - type: 'AccessToken', + name: "AccessToken", + type: "AccessToken", array: true, - relation: { opposite: 'owner' }, + relation: { opposite: "owner" } }, RefreshToken: { - name: 'RefreshToken', - type: 'RefreshToken', + name: "RefreshToken", + type: "RefreshToken", array: true, - relation: { opposite: 'owner' }, + relation: { opposite: "owner" } }, PlatformAuthorizationToken: { - name: 'PlatformAuthorizationToken', - type: 'PlatformAuthorizationToken', + name: "PlatformAuthorizationToken", + type: "PlatformAuthorizationToken", array: true, - relation: { opposite: 'owner' }, + relation: { opposite: "owner" } }, profiles: { - name: 'profiles', - type: 'Profile', + name: "profiles", + type: "Profile", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, movedToProfileId: { - name: 'movedToProfileId', - type: 'Int', + name: "movedToProfileId", + type: "Int", optional: true, - foreignKeyFor: ['movedToProfile'] as readonly string[], + foreignKeyFor: [ + "movedToProfile" + ] as readonly string[] }, movedToProfile: { - name: 'movedToProfile', - type: 'Profile', + name: "movedToProfile", + type: "Profile", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('moved_to_profile') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('movedToProfileId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'movedFromUser', - name: 'moved_to_profile', - fields: ['movedToProfileId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("moved_to_profile") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("movedToProfileId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "movedFromUser", name: "moved_to_profile", fields: ["movedToProfileId"], references: ["id"], onDelete: "SetNull" } }, secondaryEmails: { - name: 'secondaryEmails', - type: 'SecondaryEmail', + name: "secondaryEmails", + type: "SecondaryEmail", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, isPlatformManaged: { - name: 'isPlatformManaged', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isPlatformManaged", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, OutOfOfficeReasons: { - name: 'OutOfOfficeReasons', - type: 'OutOfOfficeReason', + name: "OutOfOfficeReasons", + type: "OutOfOfficeReason", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, smsLockState: { - name: 'smsLockState', - type: 'SMSLockState', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNLOCKED') }] }, - ] as readonly AttributeApplication[], - default: 'UNLOCKED' as FieldDefault, + name: "smsLockState", + type: "SMSLockState", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNLOCKED") }] }] as readonly AttributeApplication[], + default: "UNLOCKED" as FieldDefault }, smsLockReviewedByAdmin: { - name: 'smsLockReviewedByAdmin', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "smsLockReviewedByAdmin", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, NotificationsSubscriptions: { - name: 'NotificationsSubscriptions', - type: 'NotificationsSubscriptions', + name: "NotificationsSubscriptions", + type: "NotificationsSubscriptions", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, referralLinkId: { - name: 'referralLinkId', - type: 'String', - optional: true, + name: "referralLinkId", + type: "String", + optional: true }, features: { - name: 'features', - type: 'UserFeatures', + name: "features", + type: "UserFeatures", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, reassignedBookings: { - name: 'reassignedBookings', - type: 'Booking', + name: "reassignedBookings", + type: "Booking", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('reassignByUser') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'reassignBy', name: 'reassignByUser' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("reassignByUser") }] }] as readonly AttributeApplication[], + relation: { opposite: "reassignBy", name: "reassignByUser" } }, createdAttributeToUsers: { - name: 'createdAttributeToUsers', - type: 'AttributeToUser', + name: "createdAttributeToUsers", + type: "AttributeToUser", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('createdBy') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'createdBy', name: 'createdBy' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdBy") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdBy", name: "createdBy" } }, updatedAttributeToUsers: { - name: 'updatedAttributeToUsers', - type: 'AttributeToUser', + name: "updatedAttributeToUsers", + type: "AttributeToUser", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('updatedBy') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'updatedBy', name: 'updatedBy' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedBy") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedBy", name: "updatedBy" } }, createdTranslations: { - name: 'createdTranslations', - type: 'EventTypeTranslation', + name: "createdTranslations", + type: "EventTypeTranslation", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CreatedEventTypeTranslations') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'creator', name: 'CreatedEventTypeTranslations' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedEventTypeTranslations") }] }] as readonly AttributeApplication[], + relation: { opposite: "creator", name: "CreatedEventTypeTranslations" } }, updatedTranslations: { - name: 'updatedTranslations', - type: 'EventTypeTranslation', + name: "updatedTranslations", + type: "EventTypeTranslation", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('UpdatedEventTypeTranslations') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'updater', name: 'UpdatedEventTypeTranslations' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedEventTypeTranslations") }] }] as readonly AttributeApplication[], + relation: { opposite: "updater", name: "UpdatedEventTypeTranslations" } }, createdWatchlists: { - name: 'createdWatchlists', - type: 'Watchlist', + name: "createdWatchlists", + type: "Watchlist", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CreatedWatchlists') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'createdBy', name: 'CreatedWatchlists' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedWatchlists") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdBy", name: "CreatedWatchlists" } }, updatedWatchlists: { - name: 'updatedWatchlists', - type: 'Watchlist', + name: "updatedWatchlists", + type: "Watchlist", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('UpdatedWatchlists') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'updatedBy', name: 'UpdatedWatchlists' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedWatchlists") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedBy", name: "UpdatedWatchlists" } }, BookingInternalNote: { - name: 'BookingInternalNote', - type: 'BookingInternalNote', + name: "BookingInternalNote", + type: "BookingInternalNote", array: true, - relation: { opposite: 'createdBy' }, + relation: { opposite: "createdBy" } }, creationSource: { - name: 'creationSource', - type: 'CreationSource', - optional: true, + name: "creationSource", + type: "CreationSource", + optional: true }, createdOrganizationOnboardings: { - name: 'createdOrganizationOnboardings', - type: 'OrganizationOnboarding', + name: "createdOrganizationOnboardings", + type: "OrganizationOnboarding", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CreatedOrganizationOnboardings') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'createdBy', name: 'CreatedOrganizationOnboardings' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedOrganizationOnboardings") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdBy", name: "CreatedOrganizationOnboardings" } }, filterSegments: { - name: 'filterSegments', - type: 'FilterSegment', + name: "filterSegments", + type: "FilterSegment", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, filterSegmentPreferences: { - name: 'filterSegmentPreferences', - type: 'UserFilterSegmentPreference', + name: "filterSegmentPreferences", + type: "UserFilterSegmentPreference", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, creditBalance: { - name: 'creditBalance', - type: 'CreditBalance', + name: "creditBalance", + type: "CreditBalance", optional: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, whitelistWorkflows: { - name: 'whitelistWorkflows', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "whitelistWorkflows", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('email'), - ExpressionUtils.field('username'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('username'), - ExpressionUtils.field('organizationId'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('movedToProfileId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('username')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('emailVerified')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('IdentityProvider', [ - ExpressionUtils.field('identityProvider'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('identityProviderId')]), - }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('users') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email"), ExpressionUtils.field("username")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("username"), ExpressionUtils.field("organizationId")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("movedToProfileId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("username")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("emailVerified")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("IdentityProvider", [ExpressionUtils.field("identityProvider")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("identityProviderId")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("users") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - email: { type: 'String' }, - email_username: { email: { type: 'String' }, username: { type: 'String' } }, - username_organizationId: { username: { type: 'String' }, organizationId: { type: 'Int' } }, - movedToProfileId: { type: 'Int' }, - }, + id: { type: "Int" }, + email: { type: "String" }, + email_username: { email: { type: "String" }, username: { type: "String" } }, + username_organizationId: { username: { type: "String" }, organizationId: { type: "Int" } }, + movedToProfileId: { type: "Int" } + } }, NotificationsSubscriptions: { - name: 'NotificationsSubscriptions', + name: "NotificationsSubscriptions", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'NotificationsSubscriptions', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "NotificationsSubscriptions", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, subscription: { - name: 'subscription', - type: 'String', - }, + name: "subscription", + type: "String" + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('subscription'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("subscription")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Profile: { - name: 'Profile', + name: "Profile", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String" }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'profiles', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "profiles", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'orgProfiles', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "orgProfiles", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, username: { - name: 'username', - type: 'String', + name: "username", + type: "String" }, eventTypes: { - name: 'eventTypes', - type: 'EventType', + name: "eventTypes", + type: "EventType", array: true, - relation: { opposite: 'profile' }, + relation: { opposite: "profile" } }, movedFromUser: { - name: 'movedFromUser', - type: 'User', + name: "movedFromUser", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('moved_to_profile') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'movedToProfile', name: 'moved_to_profile' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("moved_to_profile") }] }] as readonly AttributeApplication[], + relation: { opposite: "movedToProfile", name: "moved_to_profile" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('organizationId'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('username'), - ExpressionUtils.field('organizationId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("organizationId")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("username"), ExpressionUtils.field("organizationId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId_organizationId: { userId: { type: 'Int' }, organizationId: { type: 'Int' } }, - username_organizationId: { username: { type: 'String' }, organizationId: { type: 'Int' } }, - }, + id: { type: "Int" }, + userId_organizationId: { userId: { type: "Int" }, organizationId: { type: "Int" } }, + username_organizationId: { username: { type: "String" }, organizationId: { type: "Int" } } + } }, Team: { - name: 'Team', + name: "Team", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, slug: { - name: 'slug', - type: 'String', - optional: true, + name: "slug", + type: "String", + optional: true }, logoUrl: { - name: 'logoUrl', - type: 'String', - optional: true, + name: "logoUrl", + type: "String", + optional: true }, calVideoLogo: { - name: 'calVideoLogo', - type: 'String', - optional: true, + name: "calVideoLogo", + type: "String", + optional: true }, appLogo: { - name: 'appLogo', - type: 'String', - optional: true, + name: "appLogo", + type: "String", + optional: true }, appIconLogo: { - name: 'appIconLogo', - type: 'String', - optional: true, + name: "appIconLogo", + type: "String", + optional: true }, bio: { - name: 'bio', - type: 'String', - optional: true, + name: "bio", + type: "String", + optional: true }, hideBranding: { - name: 'hideBranding', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideBranding", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hideTeamProfileLink: { - name: 'hideTeamProfileLink', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideTeamProfileLink", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isPrivate: { - name: 'isPrivate', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isPrivate", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hideBookATeamMember: { - name: 'hideBookATeamMember', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hideBookATeamMember", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, members: { - name: 'members', - type: 'Membership', + name: "members", + type: "Membership", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, eventTypes: { - name: 'eventTypes', - type: 'EventType', + name: "eventTypes", + type: "EventType", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, workflows: { - name: 'workflows', - type: 'Workflow', + name: "workflows", + type: "Workflow", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, + name: "metadata", + type: "Json", + optional: true }, theme: { - name: 'theme', - type: 'String', - optional: true, + name: "theme", + type: "String", + optional: true }, rrResetInterval: { - name: 'rrResetInterval', - type: 'RRResetInterval', + name: "rrResetInterval", + type: "RRResetInterval", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MONTH') }] }, - ] as readonly AttributeApplication[], - default: 'MONTH' as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MONTH") }] }] as readonly AttributeApplication[], + default: "MONTH" as FieldDefault }, rrTimestampBasis: { - name: 'rrTimestampBasis', - type: 'RRTimestampBasis', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CREATED_AT') }] }, - ] as readonly AttributeApplication[], - default: 'CREATED_AT' as FieldDefault, + name: "rrTimestampBasis", + type: "RRTimestampBasis", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CREATED_AT") }] }] as readonly AttributeApplication[], + default: "CREATED_AT" as FieldDefault }, brandColor: { - name: 'brandColor', - type: 'String', - optional: true, + name: "brandColor", + type: "String", + optional: true }, darkBrandColor: { - name: 'darkBrandColor', - type: 'String', - optional: true, + name: "darkBrandColor", + type: "String", + optional: true }, verifiedNumbers: { - name: 'verifiedNumbers', - type: 'VerifiedNumber', + name: "verifiedNumbers", + type: "VerifiedNumber", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, verifiedEmails: { - name: 'verifiedEmails', - type: 'VerifiedEmail', + name: "verifiedEmails", + type: "VerifiedEmail", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, bannerUrl: { - name: 'bannerUrl', - type: 'String', - optional: true, + name: "bannerUrl", + type: "String", + optional: true }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - foreignKeyFor: ['parent'] as readonly string[], + foreignKeyFor: [ + "parent" + ] as readonly string[] }, parent: { - name: 'parent', - type: 'Team', + name: "parent", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('organization') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'children', - name: 'organization', - fields: ['parentId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("organization") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "children", name: "organization", fields: ["parentId"], references: ["id"], onDelete: "Cascade" } }, children: { - name: 'children', - type: 'Team', + name: "children", + type: "Team", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('organization') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parent', name: 'organization' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("organization") }] }] as readonly AttributeApplication[], + relation: { opposite: "parent", name: "organization" } }, orgUsers: { - name: 'orgUsers', - type: 'User', + name: "orgUsers", + type: "User", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('scope') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'organization', name: 'scope' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("scope") }] }] as readonly AttributeApplication[], + relation: { opposite: "organization", name: "scope" } }, inviteTokens: { - name: 'inviteTokens', - type: 'VerificationToken', + name: "inviteTokens", + type: "VerificationToken", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, webhooks: { - name: 'webhooks', - type: 'Webhook', + name: "webhooks", + type: "Webhook", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, timeFormat: { - name: 'timeFormat', - type: 'Int', - optional: true, + name: "timeFormat", + type: "Int", + optional: true }, timeZone: { - name: 'timeZone', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('Europe/London') }], - }, - ] as readonly AttributeApplication[], - default: 'Europe/London' as FieldDefault, + name: "timeZone", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Europe/London") }] }] as readonly AttributeApplication[], + default: "Europe/London" as FieldDefault }, weekStart: { - name: 'weekStart', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('Sunday') }] }, - ] as readonly AttributeApplication[], - default: 'Sunday' as FieldDefault, + name: "weekStart", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("Sunday") }] }] as readonly AttributeApplication[], + default: "Sunday" as FieldDefault }, routingForms: { - name: 'routingForms', - type: 'App_RoutingForms_Form', + name: "routingForms", + type: "App_RoutingForms_Form", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, apiKeys: { - name: 'apiKeys', - type: 'ApiKey', + name: "apiKeys", + type: "ApiKey", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, credentials: { - name: 'credentials', - type: 'Credential', + name: "credentials", + type: "Credential", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, accessCodes: { - name: 'accessCodes', - type: 'AccessCode', + name: "accessCodes", + type: "AccessCode", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, isOrganization: { - name: 'isOrganization', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isOrganization", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, organizationSettings: { - name: 'organizationSettings', - type: 'OrganizationSettings', + name: "organizationSettings", + type: "OrganizationSettings", optional: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, instantMeetingTokens: { - name: 'instantMeetingTokens', - type: 'InstantMeetingToken', + name: "instantMeetingTokens", + type: "InstantMeetingToken", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, orgProfiles: { - name: 'orgProfiles', - type: 'Profile', + name: "orgProfiles", + type: "Profile", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, pendingPayment: { - name: 'pendingPayment', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "pendingPayment", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, dsyncTeamGroupMapping: { - name: 'dsyncTeamGroupMapping', - type: 'DSyncTeamGroupMapping', + name: "dsyncTeamGroupMapping", + type: "DSyncTeamGroupMapping", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, isPlatform: { - name: 'isPlatform', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isPlatform", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, platformOAuthClient: { - name: 'platformOAuthClient', - type: 'PlatformOAuthClient', + name: "platformOAuthClient", + type: "PlatformOAuthClient", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, createdByOAuthClient: { - name: 'createdByOAuthClient', - type: 'PlatformOAuthClient', + name: "createdByOAuthClient", + type: "PlatformOAuthClient", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CreatedByOAuthClient') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('createdByOAuthClientId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'teams', - name: 'CreatedByOAuthClient', - fields: ['createdByOAuthClientId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedByOAuthClient") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("createdByOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "teams", name: "CreatedByOAuthClient", fields: ["createdByOAuthClientId"], references: ["id"], onDelete: "Cascade" } }, createdByOAuthClientId: { - name: 'createdByOAuthClientId', - type: 'String', + name: "createdByOAuthClientId", + type: "String", optional: true, - foreignKeyFor: ['createdByOAuthClient'] as readonly string[], + foreignKeyFor: [ + "createdByOAuthClient" + ] as readonly string[] }, smsLockState: { - name: 'smsLockState', - type: 'SMSLockState', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNLOCKED') }] }, - ] as readonly AttributeApplication[], - default: 'UNLOCKED' as FieldDefault, + name: "smsLockState", + type: "SMSLockState", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNLOCKED") }] }] as readonly AttributeApplication[], + default: "UNLOCKED" as FieldDefault }, platformBilling: { - name: 'platformBilling', - type: 'PlatformBilling', + name: "platformBilling", + type: "PlatformBilling", optional: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, activeOrgWorkflows: { - name: 'activeOrgWorkflows', - type: 'WorkflowsOnTeams', + name: "activeOrgWorkflows", + type: "WorkflowsOnTeams", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, attributes: { - name: 'attributes', - type: 'Attribute', + name: "attributes", + type: "Attribute", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, smsLockReviewedByAdmin: { - name: 'smsLockReviewedByAdmin', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "smsLockReviewedByAdmin", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, delegationCredentials: { - name: 'delegationCredentials', - type: 'DelegationCredential', + name: "delegationCredentials", + type: "DelegationCredential", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, domainWideDelegations: { - name: 'domainWideDelegations', - type: 'DomainWideDelegation', + name: "domainWideDelegations", + type: "DomainWideDelegation", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, roles: { - name: 'roles', - type: 'Role', + name: "roles", + type: "Role", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, features: { - name: 'features', - type: 'TeamFeatures', + name: "features", + type: "TeamFeatures", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, bookingLimits: { - name: 'bookingLimits', - type: 'Json', - optional: true, + name: "bookingLimits", + type: "Json", + optional: true }, includeManagedEventsInLimits: { - name: 'includeManagedEventsInLimits', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "includeManagedEventsInLimits", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, internalNotePresets: { - name: 'internalNotePresets', - type: 'InternalNotePreset', + name: "internalNotePresets", + type: "InternalNotePreset", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, creditBalance: { - name: 'creditBalance', - type: 'CreditBalance', + name: "creditBalance", + type: "CreditBalance", optional: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, organizationOnboarding: { - name: 'organizationOnboarding', - type: 'OrganizationOnboarding', + name: "organizationOnboarding", + type: "OrganizationOnboarding", optional: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, managedOrganization: { - name: 'managedOrganization', - type: 'ManagedOrganization', + name: "managedOrganization", + type: "ManagedOrganization", optional: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('ManagedOrganization') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'managedOrganization', name: 'ManagedOrganization' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagedOrganization") }] }] as readonly AttributeApplication[], + relation: { opposite: "managedOrganization", name: "ManagedOrganization" } }, managedOrganizations: { - name: 'managedOrganizations', - type: 'ManagedOrganization', + name: "managedOrganizations", + type: "ManagedOrganization", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('ManagerOrganization') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'managerOrganization', name: 'ManagerOrganization' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagerOrganization") }] }] as readonly AttributeApplication[], + relation: { opposite: "managerOrganization", name: "ManagerOrganization" } }, filterSegments: { - name: 'filterSegments', - type: 'FilterSegment', + name: "filterSegments", + type: "FilterSegment", array: true, - relation: { opposite: 'team' }, - }, + relation: { opposite: "team" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('slug'), - ExpressionUtils.field('parentId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug"), ExpressionUtils.field("parentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - slug_parentId: { slug: { type: 'String' }, parentId: { type: 'Int' } }, - }, + id: { type: "Int" }, + slug_parentId: { slug: { type: "String" }, parentId: { type: "Int" } } + } }, CreditBalance: { - name: 'CreditBalance', + name: "CreditBalance", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'creditBalance', - fields: ['teamId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "creditBalance", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['team'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'creditBalance', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "creditBalance", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, additionalCredits: { - name: 'additionalCredits', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "additionalCredits", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, limitReachedAt: { - name: 'limitReachedAt', - type: 'DateTime', - optional: true, + name: "limitReachedAt", + type: "DateTime", + optional: true }, warningSentAt: { - name: 'warningSentAt', - type: 'DateTime', - optional: true, + name: "warningSentAt", + type: "DateTime", + optional: true }, expenseLogs: { - name: 'expenseLogs', - type: 'CreditExpenseLog', + name: "expenseLogs", + type: "CreditExpenseLog", array: true, - relation: { opposite: 'creditBalance' }, + relation: { opposite: "creditBalance" } }, purchaseLogs: { - name: 'purchaseLogs', - type: 'CreditPurchaseLog', + name: "purchaseLogs", + type: "CreditPurchaseLog", array: true, - relation: { opposite: 'creditBalance' }, - }, + relation: { opposite: "creditBalance" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - teamId: { type: 'Int' }, - userId: { type: 'Int' }, - }, + id: { type: "String" }, + teamId: { type: "Int" }, + userId: { type: "Int" } + } }, CreditPurchaseLog: { - name: 'CreditPurchaseLog', + name: "CreditPurchaseLog", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, creditBalanceId: { - name: 'creditBalanceId', - type: 'String', - foreignKeyFor: ['creditBalance'] as readonly string[], + name: "creditBalanceId", + type: "String", + foreignKeyFor: [ + "creditBalance" + ] as readonly string[] }, creditBalance: { - name: 'creditBalance', - type: 'CreditBalance', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('creditBalanceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'purchaseLogs', - fields: ['creditBalanceId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "creditBalance", + type: "CreditBalance", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("creditBalanceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "purchaseLogs", fields: ["creditBalanceId"], references: ["id"], onDelete: "Cascade" } }, credits: { - name: 'credits', - type: 'Int', + name: "credits", + type: "Int" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, CreditExpenseLog: { - name: 'CreditExpenseLog', + name: "CreditExpenseLog", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, creditBalanceId: { - name: 'creditBalanceId', - type: 'String', - foreignKeyFor: ['creditBalance'] as readonly string[], + name: "creditBalanceId", + type: "String", + foreignKeyFor: [ + "creditBalance" + ] as readonly string[] }, creditBalance: { - name: 'creditBalance', - type: 'CreditBalance', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('creditBalanceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'expenseLogs', - fields: ['creditBalanceId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "creditBalance", + type: "CreditBalance", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("creditBalanceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "expenseLogs", fields: ["creditBalanceId"], references: ["id"], onDelete: "Cascade" } }, bookingUid: { - name: 'bookingUid', - type: 'String', + name: "bookingUid", + type: "String", optional: true, - foreignKeyFor: ['booking'] as readonly string[], + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('bookingUid')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'expenseLogs', - fields: ['bookingUid'], - references: ['uid'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("bookingUid")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "expenseLogs", fields: ["bookingUid"], references: ["uid"], onDelete: "Cascade" } }, credits: { - name: 'credits', - type: 'Int', - optional: true, + name: "credits", + type: "Int", + optional: true }, creditType: { - name: 'creditType', - type: 'CreditType', + name: "creditType", + type: "CreditType" }, date: { - name: 'date', - type: 'DateTime', + name: "date", + type: "DateTime" }, smsSid: { - name: 'smsSid', - type: 'String', - optional: true, + name: "smsSid", + type: "String", + optional: true }, smsSegments: { - name: 'smsSegments', - type: 'Int', - optional: true, - }, + name: "smsSegments", + type: "Int", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, OrganizationSettings: { - name: 'OrganizationSettings', + name: "OrganizationSettings", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, organization: { - name: 'organization', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'organizationSettings', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "organizationSettings", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'Int', + name: "organizationId", + type: "Int", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['organization'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, isOrganizationConfigured: { - name: 'isOrganizationConfigured', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isOrganizationConfigured", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isOrganizationVerified: { - name: 'isOrganizationVerified', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isOrganizationVerified", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, orgAutoAcceptEmail: { - name: 'orgAutoAcceptEmail', - type: 'String', + name: "orgAutoAcceptEmail", + type: "String" }, lockEventTypeCreationForUsers: { - name: 'lockEventTypeCreationForUsers', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "lockEventTypeCreationForUsers", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, adminGetsNoSlotsNotification: { - name: 'adminGetsNoSlotsNotification', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "adminGetsNoSlotsNotification", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isAdminReviewed: { - name: 'isAdminReviewed', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isAdminReviewed", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, dSyncData: { - name: 'dSyncData', - type: 'DSyncData', + name: "dSyncData", + type: "DSyncData", optional: true, - relation: { opposite: 'org' }, + relation: { opposite: "org" } }, isAdminAPIEnabled: { - name: 'isAdminAPIEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isAdminAPIEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, allowSEOIndexing: { - name: 'allowSEOIndexing', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "allowSEOIndexing", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, orgProfileRedirectsToVerifiedDomain: { - name: 'orgProfileRedirectsToVerifiedDomain', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "orgProfileRedirectsToVerifiedDomain", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, disablePhoneOnlySMSNotifications: { - name: 'disablePhoneOnlySMSNotifications', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "disablePhoneOnlySMSNotifications", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - organizationId: { type: 'Int' }, - }, + id: { type: "Int" }, + organizationId: { type: "Int" } + } }, Membership: { - name: 'Membership', + name: "Membership", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, accepted: { - name: 'accepted', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "accepted", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, role: { - name: 'role', - type: 'MembershipRole', + name: "role", + type: "MembershipRole" }, customRoleId: { - name: 'customRoleId', - type: 'String', + name: "customRoleId", + type: "String", optional: true, - foreignKeyFor: ['customRole'] as readonly string[], + foreignKeyFor: [ + "customRole" + ] as readonly string[] }, customRole: { - name: 'customRole', - type: 'Role', + name: "customRole", + type: "Role", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('customRoleId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'memberships', fields: ['customRoleId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("customRoleId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "memberships", fields: ["customRoleId"], references: ["id"] } }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'members', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "members", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'teams', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "teams", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, disableImpersonation: { - name: 'disableImpersonation', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disableImpersonation", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, AttributeToUser: { - name: 'AttributeToUser', - type: 'AttributeToUser', + name: "AttributeToUser", + type: "AttributeToUser", array: true, - relation: { opposite: 'member' }, + relation: { opposite: "member" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', + name: "createdAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('teamId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('accepted')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('MembershipRole', [ExpressionUtils.field('role')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('customRoleId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("accepted")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("MembershipRole", [ExpressionUtils.field("role")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("customRoleId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId_teamId: { userId: { type: 'Int' }, teamId: { type: 'Int' } }, - }, + id: { type: "Int" }, + userId_teamId: { userId: { type: "Int" }, teamId: { type: "Int" } } + } }, VerificationToken: { - name: 'VerificationToken', + name: "VerificationToken", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, identifier: { - name: 'identifier', - type: 'String', + name: "identifier", + type: "String" }, token: { - name: 'token', - type: 'String', + name: "token", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, expires: { - name: 'expires', - type: 'DateTime', + name: "expires", + type: "DateTime" }, expiresInDays: { - name: 'expiresInDays', - type: 'Int', - optional: true, + name: "expiresInDays", + type: "Int", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'inviteTokens', fields: ['teamId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "inviteTokens", fields: ["teamId"], references: ["id"] } }, secondaryEmailId: { - name: 'secondaryEmailId', - type: 'Int', + name: "secondaryEmailId", + type: "Int", optional: true, - foreignKeyFor: ['secondaryEmail'] as readonly string[], + foreignKeyFor: [ + "secondaryEmail" + ] as readonly string[] }, secondaryEmail: { - name: 'secondaryEmail', - type: 'SecondaryEmail', + name: "secondaryEmail", + type: "SecondaryEmail", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'verificationTokens', fields: ['secondaryEmailId'], references: ['id'] }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "verificationTokens", fields: ["secondaryEmailId"], references: ["id"] } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('identifier'), - ExpressionUtils.field('token'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('token')]) }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('secondaryEmailId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("identifier"), ExpressionUtils.field("token")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("token")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("secondaryEmailId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - token: { type: 'String' }, - identifier_token: { identifier: { type: 'String' }, token: { type: 'String' } }, - }, + id: { type: "Int" }, + token: { type: "String" }, + identifier_token: { identifier: { type: "String" }, token: { type: "String" } } + } }, InstantMeetingToken: { - name: 'InstantMeetingToken', + name: "InstantMeetingToken", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, token: { - name: 'token', - type: 'String', + name: "token", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, expires: { - name: 'expires', - type: 'DateTime', + name: "expires", + type: "DateTime" }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'instantMeetingTokens', fields: ['teamId'], references: ['id'] }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "instantMeetingTokens", fields: ["teamId"], references: ["id"] } }, bookingId: { - name: 'bookingId', - type: 'Int', + name: "bookingId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['booking'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'instantMeetingToken', - fields: ['bookingId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "instantMeetingToken", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('token')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("token")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - token: { type: 'String' }, - bookingId: { type: 'Int' }, - }, + id: { type: "Int" }, + token: { type: "String" }, + bookingId: { type: "Int" } + } }, BookingReference: { - name: 'BookingReference', + name: "BookingReference", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, type: { - name: 'type', - type: 'String', + name: "type", + type: "String" }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String" }, meetingId: { - name: 'meetingId', - type: 'String', - optional: true, + name: "meetingId", + type: "String", + optional: true }, thirdPartyRecurringEventId: { - name: 'thirdPartyRecurringEventId', - type: 'String', - optional: true, + name: "thirdPartyRecurringEventId", + type: "String", + optional: true }, meetingPassword: { - name: 'meetingPassword', - type: 'String', - optional: true, + name: "meetingPassword", + type: "String", + optional: true }, meetingUrl: { - name: 'meetingUrl', - type: 'String', - optional: true, + name: "meetingUrl", + type: "String", + optional: true }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'references', - fields: ['bookingId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "references", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, bookingId: { - name: 'bookingId', - type: 'Int', + name: "bookingId", + type: "Int", optional: true, - foreignKeyFor: ['booking'] as readonly string[], + foreignKeyFor: [ + "booking" + ] as readonly string[] }, externalCalendarId: { - name: 'externalCalendarId', - type: 'String', - optional: true, + name: "externalCalendarId", + type: "String", + optional: true }, deleted: { - name: 'deleted', - type: 'Boolean', - optional: true, + name: "deleted", + type: "Boolean", + optional: true }, credential: { - name: 'credential', - type: 'Credential', + name: "credential", + type: "Credential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'references', - fields: ['credentialId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "references", fields: ["credentialId"], references: ["id"], onDelete: "SetNull" } }, credentialId: { - name: 'credentialId', - type: 'Int', + name: "credentialId", + type: "Int", optional: true, - foreignKeyFor: ['credential'] as readonly string[], + foreignKeyFor: [ + "credential" + ] as readonly string[] }, delegationCredential: { - name: 'delegationCredential', - type: 'DelegationCredential', + name: "delegationCredential", + type: "DelegationCredential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('delegationCredentialId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'bookingReferences', - fields: ['delegationCredentialId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "bookingReferences", fields: ["delegationCredentialId"], references: ["id"], onDelete: "SetNull" } }, delegationCredentialId: { - name: 'delegationCredentialId', - type: 'String', + name: "delegationCredentialId", + type: "String", optional: true, - foreignKeyFor: ['delegationCredential'] as readonly string[], + foreignKeyFor: [ + "delegationCredential" + ] as readonly string[] }, domainWideDelegation: { - name: 'domainWideDelegation', - type: 'DomainWideDelegation', + name: "domainWideDelegation", + type: "DomainWideDelegation", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('domainWideDelegationCredentialId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'bookingReferences', - fields: ['domainWideDelegationCredentialId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("domainWideDelegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "bookingReferences", fields: ["domainWideDelegationCredentialId"], references: ["id"], onDelete: "SetNull" } }, domainWideDelegationCredentialId: { - name: 'domainWideDelegationCredentialId', - type: 'String', + name: "domainWideDelegationCredentialId", + type: "String", optional: true, - foreignKeyFor: ['domainWideDelegation'] as readonly string[], - }, + foreignKeyFor: [ + "domainWideDelegation" + ] as readonly string[] + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('type')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("type")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Attendee: { - name: 'Attendee', + name: "Attendee", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, timeZone: { - name: 'timeZone', - type: 'String', + name: "timeZone", + type: "String" }, phoneNumber: { - name: 'phoneNumber', - type: 'String', - optional: true, + name: "phoneNumber", + type: "String", + optional: true }, locale: { - name: 'locale', - type: 'String', + name: "locale", + type: "String", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('en') }] }, - ] as readonly AttributeApplication[], - default: 'en' as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("en") }] }] as readonly AttributeApplication[], + default: "en" as FieldDefault }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'attendees', fields: ['bookingId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attendees", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, bookingId: { - name: 'bookingId', - type: 'Int', + name: "bookingId", + type: "Int", optional: true, - foreignKeyFor: ['booking'] as readonly string[], + foreignKeyFor: [ + "booking" + ] as readonly string[] }, bookingSeat: { - name: 'bookingSeat', - type: 'BookingSeat', + name: "bookingSeat", + type: "BookingSeat", optional: true, - relation: { opposite: 'attendee' }, + relation: { opposite: "attendee" } }, noShow: { - name: 'noShow', - type: 'Boolean', + name: "noShow", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Booking: { - name: 'Booking', + name: "Booking", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, idempotencyKey: { - name: 'idempotencyKey', - type: 'String', + name: "idempotencyKey", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'bookings', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "bookings", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, userPrimaryEmail: { - name: 'userPrimaryEmail', - type: 'String', - optional: true, + name: "userPrimaryEmail", + type: "String", + optional: true }, references: { - name: 'references', - type: 'BookingReference', + name: "references", + type: "BookingReference", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, eventType: { - name: 'eventType', - type: 'EventType', + name: "eventType", + type: "EventType", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'bookings', fields: ['eventTypeId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "bookings", fields: ["eventTypeId"], references: ["id"] } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int", optional: true, - foreignKeyFor: ['eventType'] as readonly string[], + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, customInputs: { - name: 'customInputs', - type: 'Json', - optional: true, + name: "customInputs", + type: "Json", + optional: true }, responses: { - name: 'responses', - type: 'Json', - optional: true, + name: "responses", + type: "Json", + optional: true }, startTime: { - name: 'startTime', - type: 'DateTime', + name: "startTime", + type: "DateTime" }, endTime: { - name: 'endTime', - type: 'DateTime', + name: "endTime", + type: "DateTime" }, attendees: { - name: 'attendees', - type: 'Attendee', + name: "attendees", + type: "Attendee", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, location: { - name: 'location', - type: 'String', - optional: true, + name: "location", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'BookingStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACCEPTED') }] }, - ] as readonly AttributeApplication[], - default: 'ACCEPTED' as FieldDefault, + name: "status", + type: "BookingStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACCEPTED") }] }] as readonly AttributeApplication[], + default: "ACCEPTED" as FieldDefault }, paid: { - name: 'paid', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "paid", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, payment: { - name: 'payment', - type: 'Payment', + name: "payment", + type: "Payment", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, destinationCalendar: { - name: 'destinationCalendar', - type: 'DestinationCalendar', + name: "destinationCalendar", + type: "DestinationCalendar", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('destinationCalendarId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'booking', fields: ['destinationCalendarId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("destinationCalendarId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "booking", fields: ["destinationCalendarId"], references: ["id"] } }, destinationCalendarId: { - name: 'destinationCalendarId', - type: 'Int', + name: "destinationCalendarId", + type: "Int", optional: true, - foreignKeyFor: ['destinationCalendar'] as readonly string[], + foreignKeyFor: [ + "destinationCalendar" + ] as readonly string[] }, cancellationReason: { - name: 'cancellationReason', - type: 'String', - optional: true, + name: "cancellationReason", + type: "String", + optional: true }, rejectionReason: { - name: 'rejectionReason', - type: 'String', - optional: true, + name: "rejectionReason", + type: "String", + optional: true }, reassignReason: { - name: 'reassignReason', - type: 'String', - optional: true, + name: "reassignReason", + type: "String", + optional: true }, reassignBy: { - name: 'reassignBy', - type: 'User', + name: "reassignBy", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('reassignByUser') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('reassignById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'reassignedBookings', - name: 'reassignByUser', - fields: ['reassignById'], - references: ['id'], - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("reassignByUser") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reassignById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "reassignedBookings", name: "reassignByUser", fields: ["reassignById"], references: ["id"] } }, reassignById: { - name: 'reassignById', - type: 'Int', + name: "reassignById", + type: "Int", optional: true, - foreignKeyFor: ['reassignBy'] as readonly string[], + foreignKeyFor: [ + "reassignBy" + ] as readonly string[] }, dynamicEventSlugRef: { - name: 'dynamicEventSlugRef', - type: 'String', - optional: true, + name: "dynamicEventSlugRef", + type: "String", + optional: true }, dynamicGroupSlugRef: { - name: 'dynamicGroupSlugRef', - type: 'String', - optional: true, + name: "dynamicGroupSlugRef", + type: "String", + optional: true }, rescheduled: { - name: 'rescheduled', - type: 'Boolean', - optional: true, + name: "rescheduled", + type: "Boolean", + optional: true }, fromReschedule: { - name: 'fromReschedule', - type: 'String', - optional: true, + name: "fromReschedule", + type: "String", + optional: true }, recurringEventId: { - name: 'recurringEventId', - type: 'String', - optional: true, + name: "recurringEventId", + type: "String", + optional: true }, smsReminderNumber: { - name: 'smsReminderNumber', - type: 'String', - optional: true, + name: "smsReminderNumber", + type: "String", + optional: true }, workflowReminders: { - name: 'workflowReminders', - type: 'WorkflowReminder', + name: "workflowReminders", + type: "WorkflowReminder", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, scheduledJobs: { - name: 'scheduledJobs', - type: 'String', - array: true, + name: "scheduledJobs", + type: "String", + array: true }, seatsReferences: { - name: 'seatsReferences', - type: 'BookingSeat', + name: "seatsReferences", + type: "BookingSeat", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, + name: "metadata", + type: "Json", + optional: true }, isRecorded: { - name: 'isRecorded', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isRecorded", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, iCalUID: { - name: 'iCalUID', - type: 'String', + name: "iCalUID", + type: "String", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('') }] }, - ] as readonly AttributeApplication[], - default: '' as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("") }] }] as readonly AttributeApplication[], + default: "" as FieldDefault }, iCalSequence: { - name: 'iCalSequence', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "iCalSequence", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, instantMeetingToken: { - name: 'instantMeetingToken', - type: 'InstantMeetingToken', + name: "instantMeetingToken", + type: "InstantMeetingToken", optional: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, rating: { - name: 'rating', - type: 'Int', - optional: true, + name: "rating", + type: "Int", + optional: true }, ratingFeedback: { - name: 'ratingFeedback', - type: 'String', - optional: true, + name: "ratingFeedback", + type: "String", + optional: true }, noShowHost: { - name: 'noShowHost', - type: 'Boolean', + name: "noShowHost", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, scheduledTriggers: { - name: 'scheduledTriggers', - type: 'WebhookScheduledTriggers', + name: "scheduledTriggers", + type: "WebhookScheduledTriggers", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, oneTimePassword: { - name: 'oneTimePassword', - type: 'String', + name: "oneTimePassword", + type: "String", unique: true, optional: true, - attributes: [ - { name: '@unique' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, cancelledBy: { - name: 'cancelledBy', - type: 'String', - optional: true, + name: "cancelledBy", + type: "String", + optional: true }, rescheduledBy: { - name: 'rescheduledBy', - type: 'String', - optional: true, + name: "rescheduledBy", + type: "String", + optional: true }, routedFromRoutingFormReponse: { - name: 'routedFromRoutingFormReponse', - type: 'App_RoutingForms_FormResponse', + name: "routedFromRoutingFormReponse", + type: "App_RoutingForms_FormResponse", optional: true, - relation: { opposite: 'routedToBooking' }, + relation: { opposite: "routedToBooking" } }, assignmentReason: { - name: 'assignmentReason', - type: 'AssignmentReason', + name: "assignmentReason", + type: "AssignmentReason", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, internalNote: { - name: 'internalNote', - type: 'BookingInternalNote', + name: "internalNote", + type: "BookingInternalNote", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, creationSource: { - name: 'creationSource', - type: 'CreationSource', - optional: true, + name: "creationSource", + type: "CreationSource", + optional: true }, tracking: { - name: 'tracking', - type: 'Tracking', + name: "tracking", + type: "Tracking", optional: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, routingFormResponses: { - name: 'routingFormResponses', - type: 'RoutingFormResponseDenormalized', + name: "routingFormResponses", + type: "RoutingFormResponseDenormalized", array: true, - relation: { opposite: 'booking' }, + relation: { opposite: "booking" } }, expenseLogs: { - name: 'expenseLogs', - type: 'CreditExpenseLog', + name: "expenseLogs", + type: "CreditExpenseLog", array: true, - relation: { opposite: 'booking' }, - }, + relation: { opposite: "booking" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('destinationCalendarId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('recurringEventId')]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('BookingStatus', [ExpressionUtils.field('status')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ - ExpressionUtils.field('startTime'), - ExpressionUtils.field('endTime'), - ExpressionUtils.field('status'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("destinationCalendarId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("recurringEventId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("BookingStatus", [ExpressionUtils.field("status")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("startTime"), ExpressionUtils.field("endTime"), ExpressionUtils.field("status")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - uid: { type: 'String' }, - idempotencyKey: { type: 'String' }, - oneTimePassword: { type: 'String' }, - }, + id: { type: "Int" }, + uid: { type: "String" }, + idempotencyKey: { type: "String" }, + oneTimePassword: { type: "String" } + } }, Tracking: { - name: 'Tracking', + name: "Tracking", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, bookingId: { - name: 'bookingId', - type: 'Int', - foreignKeyFor: ['booking'] as readonly string[], + name: "bookingId", + type: "Int", + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'tracking', fields: ['bookingId'], references: ['id'], onDelete: 'Cascade' }, + name: "booking", + type: "Booking", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "tracking", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, utm_source: { - name: 'utm_source', - type: 'String', - optional: true, + name: "utm_source", + type: "String", + optional: true }, utm_medium: { - name: 'utm_medium', - type: 'String', - optional: true, + name: "utm_medium", + type: "String", + optional: true }, utm_campaign: { - name: 'utm_campaign', - type: 'String', - optional: true, + name: "utm_campaign", + type: "String", + optional: true }, utm_term: { - name: 'utm_term', - type: 'String', - optional: true, + name: "utm_term", + type: "String", + optional: true }, utm_content: { - name: 'utm_content', - type: 'String', - optional: true, - }, + name: "utm_content", + type: "String", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - bookingId: { type: 'Int' }, - }, + id: { type: "Int" }, + bookingId: { type: "Int" } + } }, Schedule: { - name: 'Schedule', + name: "Schedule", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'schedules', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "schedules", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, eventType: { - name: 'eventType', - type: 'EventType', + name: "eventType", + type: "EventType", array: true, - relation: { opposite: 'schedule' }, + relation: { opposite: "schedule" } }, instantMeetingEvents: { - name: 'instantMeetingEvents', - type: 'EventType', + name: "instantMeetingEvents", + type: "EventType", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('InstantMeetingSchedule') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'instantMeetingSchedule', name: 'InstantMeetingSchedule' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("InstantMeetingSchedule") }] }] as readonly AttributeApplication[], + relation: { opposite: "instantMeetingSchedule", name: "InstantMeetingSchedule" } }, restrictionSchedule: { - name: 'restrictionSchedule', - type: 'EventType', + name: "restrictionSchedule", + type: "EventType", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('restrictionSchedule') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'restrictionSchedule', name: 'restrictionSchedule' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("restrictionSchedule") }] }] as readonly AttributeApplication[], + relation: { opposite: "restrictionSchedule", name: "restrictionSchedule" } }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, timeZone: { - name: 'timeZone', - type: 'String', - optional: true, + name: "timeZone", + type: "String", + optional: true }, availability: { - name: 'availability', - type: 'Availability', + name: "availability", + type: "Availability", array: true, - relation: { opposite: 'Schedule' }, + relation: { opposite: "Schedule" } }, Host: { - name: 'Host', - type: 'Host', + name: "Host", + type: "Host", array: true, - relation: { opposite: 'schedule' }, - }, + relation: { opposite: "schedule" } + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Availability: { - name: 'Availability', + name: "Availability", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'availability', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "availability", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, eventType: { - name: 'eventType', - type: 'EventType', + name: "eventType", + type: "EventType", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'availability', fields: ['eventTypeId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "availability", fields: ["eventTypeId"], references: ["id"] } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int", optional: true, - foreignKeyFor: ['eventType'] as readonly string[], + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, days: { - name: 'days', - type: 'Int', - array: true, + name: "days", + type: "Int", + array: true }, startTime: { - name: 'startTime', - type: 'DateTime', - attributes: [{ name: '@db.Time' }] as readonly AttributeApplication[], + name: "startTime", + type: "DateTime", + attributes: [{ name: "@db.Time" }] as readonly AttributeApplication[] }, endTime: { - name: 'endTime', - type: 'DateTime', - attributes: [{ name: '@db.Time' }] as readonly AttributeApplication[], + name: "endTime", + type: "DateTime", + attributes: [{ name: "@db.Time" }] as readonly AttributeApplication[] }, date: { - name: 'date', - type: 'DateTime', + name: "date", + type: "DateTime", optional: true, - attributes: [{ name: '@db.Date' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Date" }] as readonly AttributeApplication[] }, Schedule: { - name: 'Schedule', - type: 'Schedule', + name: "Schedule", + type: "Schedule", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'availability', fields: ['scheduleId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "availability", fields: ["scheduleId"], references: ["id"] } }, scheduleId: { - name: 'scheduleId', - type: 'Int', + name: "scheduleId", + type: "Int", optional: true, - foreignKeyFor: ['Schedule'] as readonly string[], - }, + foreignKeyFor: [ + "Schedule" + ] as readonly string[] + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('scheduleId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("scheduleId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, SelectedCalendar: { - name: 'SelectedCalendar', + name: "SelectedCalendar", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'selectedCalendars', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "selectedCalendars", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, integration: { - name: 'integration', - type: 'String', + name: "integration", + type: "String" }, externalId: { - name: 'externalId', - type: 'String', + name: "externalId", + type: "String" }, credential: { - name: 'credential', - type: 'Credential', + name: "credential", + type: "Credential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'selectedCalendars', - fields: ['credentialId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "selectedCalendars", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } }, credentialId: { - name: 'credentialId', - type: 'Int', + name: "credentialId", + type: "Int", optional: true, - foreignKeyFor: ['credential'] as readonly string[], + foreignKeyFor: [ + "credential" + ] as readonly string[] }, googleChannelId: { - name: 'googleChannelId', - type: 'String', - optional: true, + name: "googleChannelId", + type: "String", + optional: true }, googleChannelKind: { - name: 'googleChannelKind', - type: 'String', - optional: true, + name: "googleChannelKind", + type: "String", + optional: true }, googleChannelResourceId: { - name: 'googleChannelResourceId', - type: 'String', - optional: true, + name: "googleChannelResourceId", + type: "String", + optional: true }, googleChannelResourceUri: { - name: 'googleChannelResourceUri', - type: 'String', - optional: true, + name: "googleChannelResourceUri", + type: "String", + optional: true }, googleChannelExpiration: { - name: 'googleChannelExpiration', - type: 'String', - optional: true, + name: "googleChannelExpiration", + type: "String", + optional: true }, delegationCredential: { - name: 'delegationCredential', - type: 'DelegationCredential', + name: "delegationCredential", + type: "DelegationCredential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('delegationCredentialId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'selectedCalendars', - fields: ['delegationCredentialId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("delegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "selectedCalendars", fields: ["delegationCredentialId"], references: ["id"], onDelete: "Cascade" } }, delegationCredentialId: { - name: 'delegationCredentialId', - type: 'String', + name: "delegationCredentialId", + type: "String", optional: true, - foreignKeyFor: ['delegationCredential'] as readonly string[], + foreignKeyFor: [ + "delegationCredential" + ] as readonly string[] }, domainWideDelegationCredential: { - name: 'domainWideDelegationCredential', - type: 'DomainWideDelegation', + name: "domainWideDelegationCredential", + type: "DomainWideDelegation", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('domainWideDelegationCredentialId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'selectedCalendars', - fields: ['domainWideDelegationCredentialId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("domainWideDelegationCredentialId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "selectedCalendars", fields: ["domainWideDelegationCredentialId"], references: ["id"], onDelete: "Cascade" } }, domainWideDelegationCredentialId: { - name: 'domainWideDelegationCredentialId', - type: 'String', + name: "domainWideDelegationCredentialId", + type: "String", optional: true, - foreignKeyFor: ['domainWideDelegationCredential'] as readonly string[], + foreignKeyFor: [ + "domainWideDelegationCredential" + ] as readonly string[] }, error: { - name: 'error', - type: 'String', - optional: true, + name: "error", + type: "String", + optional: true }, lastErrorAt: { - name: 'lastErrorAt', - type: 'DateTime', - optional: true, + name: "lastErrorAt", + type: "DateTime", + optional: true }, watchAttempts: { - name: 'watchAttempts', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "watchAttempts", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, unwatchAttempts: { - name: 'unwatchAttempts', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "unwatchAttempts", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, maxAttempts: { - name: 'maxAttempts', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(3) }] }, - ] as readonly AttributeApplication[], - default: 3 as FieldDefault, + name: "maxAttempts", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[], + default: 3 as FieldDefault }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int", optional: true, - foreignKeyFor: ['eventType'] as readonly string[], + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, eventType: { - name: 'eventType', - type: 'EventType', + name: "eventType", + type: "EventType", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'selectedCalendars', fields: ['eventTypeId'], references: ['id'] }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "selectedCalendars", fields: ["eventTypeId"], references: ["id"] } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('integration'), - ExpressionUtils.field('externalId'), - ExpressionUtils.field('eventTypeId'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('googleChannelId'), - ExpressionUtils.field('eventTypeId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('externalId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('integration'), - ExpressionUtils.field('googleChannelExpiration'), - ExpressionUtils.field('error'), - ExpressionUtils.field('watchAttempts'), - ExpressionUtils.field('maxAttempts'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('SelectedCalendar_watch_idx') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('integration'), - ExpressionUtils.field('googleChannelExpiration'), - ExpressionUtils.field('error'), - ExpressionUtils.field('unwatchAttempts'), - ExpressionUtils.field('maxAttempts'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('SelectedCalendar_unwatch_idx') }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("integration"), ExpressionUtils.field("externalId"), ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("googleChannelId"), ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("externalId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("integration"), ExpressionUtils.field("googleChannelExpiration"), ExpressionUtils.field("error"), ExpressionUtils.field("watchAttempts"), ExpressionUtils.field("maxAttempts")]) }, { name: "name", value: ExpressionUtils.literal("SelectedCalendar_watch_idx") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("integration"), ExpressionUtils.field("googleChannelExpiration"), ExpressionUtils.field("error"), ExpressionUtils.field("unwatchAttempts"), ExpressionUtils.field("maxAttempts")]) }, { name: "name", value: ExpressionUtils.literal("SelectedCalendar_unwatch_idx") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - userId_integration_externalId_eventTypeId: { - userId: { type: 'Int' }, - integration: { type: 'String' }, - externalId: { type: 'String' }, - eventTypeId: { type: 'Int' }, - }, - googleChannelId_eventTypeId: { googleChannelId: { type: 'String' }, eventTypeId: { type: 'Int' } }, - }, + id: { type: "String" }, + userId_integration_externalId_eventTypeId: { userId: { type: "Int" }, integration: { type: "String" }, externalId: { type: "String" }, eventTypeId: { type: "Int" } }, + googleChannelId_eventTypeId: { googleChannelId: { type: "String" }, eventTypeId: { type: "Int" } } + } }, EventTypeCustomInput: { - name: 'EventTypeCustomInput', + name: "EventTypeCustomInput", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - foreignKeyFor: ['eventType'] as readonly string[], + name: "eventTypeId", + type: "Int", + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, eventType: { - name: 'eventType', - type: 'EventType', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'customInputs', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "eventType", + type: "EventType", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "customInputs", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, label: { - name: 'label', - type: 'String', + name: "label", + type: "String" }, type: { - name: 'type', - type: 'EventTypeCustomInputType', + name: "type", + type: "EventTypeCustomInputType" }, options: { - name: 'options', - type: 'Json', - optional: true, + name: "options", + type: "Json", + optional: true }, required: { - name: 'required', - type: 'Boolean', + name: "required", + type: "Boolean" }, placeholder: { - name: 'placeholder', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('') }] }, - ] as readonly AttributeApplication[], - default: '' as FieldDefault, - }, + name: "placeholder", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("") }] }] as readonly AttributeApplication[], + default: "" as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, ResetPasswordRequest: { - name: 'ResetPasswordRequest', + name: "ResetPasswordRequest", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, expires: { - name: 'expires', - type: 'DateTime', - }, + name: "expires", + type: "DateTime" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ReminderMail: { - name: 'ReminderMail', + name: "ReminderMail", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, referenceId: { - name: 'referenceId', - type: 'Int', + name: "referenceId", + type: "Int" }, reminderType: { - name: 'reminderType', - type: 'ReminderType', + name: "reminderType", + type: "ReminderType" }, elapsedMinutes: { - name: 'elapsedMinutes', - type: 'Int', + name: "elapsedMinutes", + type: "Int" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('referenceId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('ReminderType', [ExpressionUtils.field('reminderType')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("referenceId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("ReminderType", [ExpressionUtils.field("reminderType")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Payment: { - name: 'Payment', + name: "Payment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, app: { - name: 'app', - type: 'App', + name: "app", + type: "App", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'payments', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "payments", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } }, appId: { - name: 'appId', - type: 'String', + name: "appId", + type: "String", optional: true, - foreignKeyFor: ['app'] as readonly string[], + foreignKeyFor: [ + "app" + ] as readonly string[] }, bookingId: { - name: 'bookingId', - type: 'Int', - foreignKeyFor: ['booking'] as readonly string[], + name: "bookingId", + type: "Int", + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'payment', fields: ['bookingId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "payment", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, amount: { - name: 'amount', - type: 'Int', + name: "amount", + type: "Int" }, fee: { - name: 'fee', - type: 'Int', + name: "fee", + type: "Int" }, currency: { - name: 'currency', - type: 'String', + name: "currency", + type: "String" }, success: { - name: 'success', - type: 'Boolean', + name: "success", + type: "Boolean" }, refunded: { - name: 'refunded', - type: 'Boolean', + name: "refunded", + type: "Boolean" }, data: { - name: 'data', - type: 'Json', + name: "data", + type: "Json" }, externalId: { - name: 'externalId', - type: 'String', + name: "externalId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, paymentOption: { - name: 'paymentOption', - type: 'PaymentOption', + name: "paymentOption", + type: "PaymentOption", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ON_BOOKING') }] }, - ] as readonly AttributeApplication[], - default: 'ON_BOOKING' as FieldDefault, - }, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ON_BOOKING") }] }] as readonly AttributeApplication[], + default: "ON_BOOKING" as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('externalId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("externalId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - uid: { type: 'String' }, - externalId: { type: 'String' }, - }, + id: { type: "Int" }, + uid: { type: "String" }, + externalId: { type: "String" } + } }, Webhook: { - name: 'Webhook', + name: "Webhook", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, unique: true, - attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int", optional: true, - foreignKeyFor: ['eventType'] as readonly string[], + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, platformOAuthClientId: { - name: 'platformOAuthClientId', - type: 'String', + name: "platformOAuthClientId", + type: "String", optional: true, - foreignKeyFor: ['platformOAuthClient'] as readonly string[], + foreignKeyFor: [ + "platformOAuthClient" + ] as readonly string[] }, subscriberUrl: { - name: 'subscriberUrl', - type: 'String', + name: "subscriberUrl", + type: "String" }, payloadTemplate: { - name: 'payloadTemplate', - type: 'String', - optional: true, + name: "payloadTemplate", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, active: { - name: 'active', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "active", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, eventTriggers: { - name: 'eventTriggers', - type: 'WebhookTriggerEvents', - array: true, + name: "eventTriggers", + type: "WebhookTriggerEvents", + array: true }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'webhooks', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "webhooks", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'webhooks', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "webhooks", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, eventType: { - name: 'eventType', - type: 'EventType', + name: "eventType", + type: "EventType", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'webhooks', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "webhooks", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, platformOAuthClient: { - name: 'platformOAuthClient', - type: 'PlatformOAuthClient', + name: "platformOAuthClient", + type: "PlatformOAuthClient", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('platformOAuthClientId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'webhook', - fields: ['platformOAuthClientId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "webhook", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } }, app: { - name: 'app', - type: 'App', + name: "app", + type: "App", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'Webhook', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "Webhook", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } }, appId: { - name: 'appId', - type: 'String', + name: "appId", + type: "String", optional: true, - foreignKeyFor: ['app'] as readonly string[], + foreignKeyFor: [ + "app" + ] as readonly string[] }, secret: { - name: 'secret', - type: 'String', - optional: true, + name: "secret", + type: "String", + optional: true }, platform: { - name: 'platform', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "platform", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, scheduledTriggers: { - name: 'scheduledTriggers', - type: 'WebhookScheduledTriggers', + name: "scheduledTriggers", + type: "WebhookScheduledTriggers", array: true, - relation: { opposite: 'webhook' }, + relation: { opposite: "webhook" } }, time: { - name: 'time', - type: 'Int', - optional: true, + name: "time", + type: "Int", + optional: true }, timeUnit: { - name: 'timeUnit', - type: 'TimeUnit', - optional: true, - }, + name: "timeUnit", + type: "TimeUnit", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('subscriberUrl'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('courseIdentifier') }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('platformOAuthClientId'), - ExpressionUtils.field('subscriberUrl'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('oauthclientwebhook') }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('active')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("subscriberUrl")]) }, { name: "name", value: ExpressionUtils.literal("courseIdentifier") }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId"), ExpressionUtils.field("subscriberUrl")]) }, { name: "name", value: ExpressionUtils.literal("oauthclientwebhook") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("active")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - courseIdentifier: { userId: { type: 'Int' }, subscriberUrl: { type: 'String' } }, - oauthclientwebhook: { platformOAuthClientId: { type: 'String' }, subscriberUrl: { type: 'String' } }, - }, + id: { type: "String" }, + courseIdentifier: { userId: { type: "Int" }, subscriberUrl: { type: "String" } }, + oauthclientwebhook: { platformOAuthClientId: { type: "String" }, subscriberUrl: { type: "String" } } + } }, Impersonations: { - name: 'Impersonations', + name: "Impersonations", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, impersonatedUser: { - name: 'impersonatedUser', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('impersonated_user') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedUserId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'impersonatedUsers', - name: 'impersonated_user', - fields: ['impersonatedUserId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "impersonatedUser", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_user") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedUserId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "impersonatedUsers", name: "impersonated_user", fields: ["impersonatedUserId"], references: ["id"], onDelete: "Cascade" } }, impersonatedBy: { - name: 'impersonatedBy', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('impersonated_by_user') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'impersonatedBy', - name: 'impersonated_by_user', - fields: ['impersonatedById'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "impersonatedBy", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("impersonated_by_user") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "impersonatedBy", name: "impersonated_by_user", fields: ["impersonatedById"], references: ["id"], onDelete: "Cascade" } }, impersonatedUserId: { - name: 'impersonatedUserId', - type: 'Int', - foreignKeyFor: ['impersonatedUser'] as readonly string[], + name: "impersonatedUserId", + type: "Int", + foreignKeyFor: [ + "impersonatedUser" + ] as readonly string[] }, impersonatedById: { - name: 'impersonatedById', - type: 'Int', - foreignKeyFor: ['impersonatedBy'] as readonly string[], - }, + name: "impersonatedById", + type: "Int", + foreignKeyFor: [ + "impersonatedBy" + ] as readonly string[] + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedUserId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('impersonatedById')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedUserId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("impersonatedById")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, ApiKey: { - name: 'ApiKey', + name: "ApiKey", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, unique: true, - attributes: [ - { name: '@id' }, - { name: '@unique' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, note: { - name: 'note', - type: 'String', - optional: true, + name: "note", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', - optional: true, + name: "expiresAt", + type: "DateTime", + optional: true }, lastUsedAt: { - name: 'lastUsedAt', - type: 'DateTime', - optional: true, + name: "lastUsedAt", + type: "DateTime", + optional: true }, hashedKey: { - name: 'hashedKey', - type: 'String', + name: "hashedKey", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'apiKeys', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "apiKeys", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'apiKeys', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "apiKeys", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, app: { - name: 'app', - type: 'App', + name: "app", + type: "App", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('appId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'ApiKey', fields: ['appId'], references: ['slug'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("appId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "ApiKey", fields: ["appId"], references: ["slug"], onDelete: "Cascade" } }, appId: { - name: 'appId', - type: 'String', + name: "appId", + type: "String", optional: true, - foreignKeyFor: ['app'] as readonly string[], + foreignKeyFor: [ + "app" + ] as readonly string[] }, rateLimits: { - name: 'rateLimits', - type: 'RateLimit', + name: "rateLimits", + type: "RateLimit", array: true, - relation: { opposite: 'apiKey' }, - }, + relation: { opposite: "apiKey" } + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - hashedKey: { type: 'String' }, - }, + id: { type: "String" }, + hashedKey: { type: "String" } + } }, RateLimit: { - name: 'RateLimit', + name: "RateLimit", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, apiKeyId: { - name: 'apiKeyId', - type: 'String', - foreignKeyFor: ['apiKey'] as readonly string[], + name: "apiKeyId", + type: "String", + foreignKeyFor: [ + "apiKey" + ] as readonly string[] }, ttl: { - name: 'ttl', - type: 'Int', + name: "ttl", + type: "Int" }, limit: { - name: 'limit', - type: 'Int', + name: "limit", + type: "Int" }, blockDuration: { - name: 'blockDuration', - type: 'Int', + name: "blockDuration", + type: "Int" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, apiKey: { - name: 'apiKey', - type: 'ApiKey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('apiKeyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'rateLimits', fields: ['apiKeyId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "apiKey", + type: "ApiKey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "rateLimits", fields: ["apiKeyId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('apiKeyId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, HashedLink: { - name: 'HashedLink', + name: "HashedLink", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, link: { - name: 'link', - type: 'String', + name: "link", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, eventType: { - name: 'eventType', - type: 'EventType', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'hashedLink', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "eventType", + type: "EventType", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "hashedLink", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - foreignKeyFor: ['eventType'] as readonly string[], - }, - }, - idFields: ['id'], + name: "eventTypeId", + type: "Int", + foreignKeyFor: [ + "eventType" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - link: { type: 'String' }, - }, + id: { type: "Int" }, + link: { type: "String" } + } }, Account: { - name: 'Account', + name: "Account", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, type: { - name: 'type', - type: 'String', + name: "type", + type: "String" }, provider: { - name: 'provider', - type: 'String', + name: "provider", + type: "String" }, providerAccountId: { - name: 'providerAccountId', - type: 'String', + name: "providerAccountId", + type: "String" }, providerEmail: { - name: 'providerEmail', - type: 'String', - optional: true, + name: "providerEmail", + type: "String", + optional: true }, refresh_token: { - name: 'refresh_token', - type: 'String', + name: "refresh_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, access_token: { - name: 'access_token', - type: 'String', + name: "access_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, expires_at: { - name: 'expires_at', - type: 'Int', - optional: true, + name: "expires_at", + type: "Int", + optional: true }, token_type: { - name: 'token_type', - type: 'String', - optional: true, + name: "token_type", + type: "String", + optional: true }, scope: { - name: 'scope', - type: 'String', - optional: true, + name: "scope", + type: "String", + optional: true }, id_token: { - name: 'id_token', - type: 'String', + name: "id_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, session_state: { - name: 'session_state', - type: 'String', - optional: true, + name: "session_state", + type: "String", + optional: true }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'accounts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "accounts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('provider'), - ExpressionUtils.field('providerAccountId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('type')]) }], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("type")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - provider_providerAccountId: { provider: { type: 'String' }, providerAccountId: { type: 'String' } }, - }, + id: { type: "String" }, + provider_providerAccountId: { provider: { type: "String" }, providerAccountId: { type: "String" } } + } }, Session: { - name: 'Session', + name: "Session", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, sessionToken: { - name: 'sessionToken', - type: 'String', + name: "sessionToken", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, expires: { - name: 'expires', - type: 'DateTime', + name: "expires", + type: "DateTime" }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'sessions', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "sessions", fields: ["userId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - sessionToken: { type: 'String' }, - }, + id: { type: "String" }, + sessionToken: { type: "String" } + } }, App: { - name: 'App', + name: "App", fields: { slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String", id: true, unique: true, - attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] }, dirName: { - name: 'dirName', - type: 'String', + name: "dirName", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, keys: { - name: 'keys', - type: 'Json', - optional: true, + name: "keys", + type: "Json", + optional: true }, categories: { - name: 'categories', - type: 'AppCategories', - array: true, + name: "categories", + type: "AppCategories", + array: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, credentials: { - name: 'credentials', - type: 'Credential', + name: "credentials", + type: "Credential", array: true, - relation: { opposite: 'app' }, + relation: { opposite: "app" } }, payments: { - name: 'payments', - type: 'Payment', + name: "payments", + type: "Payment", array: true, - relation: { opposite: 'app' }, + relation: { opposite: "app" } }, Webhook: { - name: 'Webhook', - type: 'Webhook', + name: "Webhook", + type: "Webhook", array: true, - relation: { opposite: 'app' }, + relation: { opposite: "app" } }, ApiKey: { - name: 'ApiKey', - type: 'ApiKey', + name: "ApiKey", + type: "ApiKey", array: true, - relation: { opposite: 'app' }, + relation: { opposite: "app" } }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('enabled')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("enabled")]) }] } ] as readonly AttributeApplication[], - idFields: ['slug'], + idFields: ["slug"], uniqueFields: { - slug: { type: 'String' }, - dirName: { type: 'String' }, - }, + slug: { type: "String" }, + dirName: { type: "String" } + } }, App_RoutingForms_Form: { - name: 'App_RoutingForms_Form', + name: "App_RoutingForms_Form", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, position: { - name: 'position', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "position", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, routes: { - name: 'routes', - type: 'Json', - optional: true, + name: "routes", + type: "Json", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, fields: { - name: 'fields', - type: 'Json', - optional: true, + name: "fields", + type: "Json", + optional: true }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('routing-form') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'routingForms', - name: 'routing-form', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("routing-form") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "routingForms", name: "routing-form", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, updatedBy: { - name: 'updatedBy', - type: 'User', + name: "updatedBy", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('updated-routing-form') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'updatedRoutingForms', - name: 'updated-routing-form', - fields: ['updatedById'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updated-routing-form") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedRoutingForms", name: "updated-routing-form", fields: ["updatedById"], references: ["id"], onDelete: "SetNull" } }, updatedById: { - name: 'updatedById', - type: 'Int', + name: "updatedById", + type: "Int", optional: true, - foreignKeyFor: ['updatedBy'] as readonly string[], + foreignKeyFor: [ + "updatedBy" + ] as readonly string[] }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'routingForms', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "routingForms", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, responses: { - name: 'responses', - type: 'App_RoutingForms_FormResponse', + name: "responses", + type: "App_RoutingForms_FormResponse", array: true, - relation: { opposite: 'form' }, + relation: { opposite: "form" } }, queuedResponses: { - name: 'queuedResponses', - type: 'App_RoutingForms_QueuedFormResponse', + name: "queuedResponses", + type: "App_RoutingForms_QueuedFormResponse", array: true, - relation: { opposite: 'form' }, + relation: { opposite: "form" } }, disabled: { - name: 'disabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "disabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, settings: { - name: 'settings', - type: 'Json', - optional: true, + name: "settings", + type: "Json", + optional: true }, incompleteBookingActions: { - name: 'incompleteBookingActions', - type: 'App_RoutingForms_IncompleteBookingActions', + name: "incompleteBookingActions", + type: "App_RoutingForms_IncompleteBookingActions", array: true, - relation: { opposite: 'form' }, - }, + relation: { opposite: "form" } + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('disabled')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("disabled")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, App_RoutingForms_FormResponse: { - name: 'App_RoutingForms_FormResponse', + name: "App_RoutingForms_FormResponse", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, formFillerId: { - name: 'formFillerId', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + name: "formFillerId", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, form: { - name: 'form', - type: 'App_RoutingForms_Form', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'responses', fields: ['formId'], references: ['id'], onDelete: 'Cascade' }, + name: "form", + type: "App_RoutingForms_Form", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "responses", fields: ["formId"], references: ["id"], onDelete: "Cascade" } }, formId: { - name: 'formId', - type: 'String', - foreignKeyFor: ['form'] as readonly string[], + name: "formId", + type: "String", + foreignKeyFor: [ + "form" + ] as readonly string[] }, response: { - name: 'response', - type: 'Json', + name: "response", + type: "Json" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, routedToBookingUid: { - name: 'routedToBookingUid', - type: 'String', + name: "routedToBookingUid", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['routedToBooking'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "routedToBooking" + ] as readonly string[] }, routedToBooking: { - name: 'routedToBooking', - type: 'Booking', + name: "routedToBooking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('routedToBookingUid'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'routedFromRoutingFormReponse', - fields: ['routedToBookingUid'], - references: ['uid'], - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("routedToBookingUid")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "routedFromRoutingFormReponse", fields: ["routedToBookingUid"], references: ["uid"] } }, chosenRouteId: { - name: 'chosenRouteId', - type: 'String', - optional: true, + name: "chosenRouteId", + type: "String", + optional: true }, routingFormResponseFields: { - name: 'routingFormResponseFields', - type: 'RoutingFormResponseField', + name: "routingFormResponseFields", + type: "RoutingFormResponseField", array: true, - relation: { opposite: 'response' }, + relation: { opposite: "response" } }, routingFormResponses: { - name: 'routingFormResponses', - type: 'RoutingFormResponseDenormalized', + name: "routingFormResponses", + type: "RoutingFormResponseDenormalized", array: true, - relation: { opposite: 'response' }, + relation: { opposite: "response" } }, queuedFormResponse: { - name: 'queuedFormResponse', - type: 'App_RoutingForms_QueuedFormResponse', + name: "queuedFormResponse", + type: "App_RoutingForms_QueuedFormResponse", optional: true, - relation: { opposite: 'actualResponse' }, - }, + relation: { opposite: "actualResponse" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('formFillerId'), - ExpressionUtils.field('formId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('formFillerId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('routedToBookingUid')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formFillerId"), ExpressionUtils.field("formId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formFillerId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("routedToBookingUid")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - routedToBookingUid: { type: 'String' }, - formFillerId_formId: { formFillerId: { type: 'String' }, formId: { type: 'String' } }, - }, + id: { type: "Int" }, + routedToBookingUid: { type: "String" }, + formFillerId_formId: { formFillerId: { type: "String" }, formId: { type: "String" } } + } }, App_RoutingForms_QueuedFormResponse: { - name: 'App_RoutingForms_QueuedFormResponse', + name: "App_RoutingForms_QueuedFormResponse", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, form: { - name: 'form', - type: 'App_RoutingForms_Form', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'queuedResponses', - fields: ['formId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "form", + type: "App_RoutingForms_Form", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "queuedResponses", fields: ["formId"], references: ["id"], onDelete: "Cascade" } }, formId: { - name: 'formId', - type: 'String', - foreignKeyFor: ['form'] as readonly string[], + name: "formId", + type: "String", + foreignKeyFor: [ + "form" + ] as readonly string[] }, response: { - name: 'response', - type: 'Json', + name: "response", + type: "Json" }, chosenRouteId: { - name: 'chosenRouteId', - type: 'String', - optional: true, + name: "chosenRouteId", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, actualResponseId: { - name: 'actualResponseId', - type: 'Int', + name: "actualResponseId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['actualResponse'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "actualResponse" + ] as readonly string[] }, actualResponse: { - name: 'actualResponse', - type: 'App_RoutingForms_FormResponse', + name: "actualResponse", + type: "App_RoutingForms_FormResponse", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('actualResponseId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'queuedFormResponse', - fields: ['actualResponseId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("actualResponseId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "queuedFormResponse", fields: ["actualResponseId"], references: ["id"], onDelete: "Cascade" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - actualResponseId: { type: 'Int' }, - }, + id: { type: "String" }, + actualResponseId: { type: "Int" } + } }, RoutingFormResponseField: { - name: 'RoutingFormResponseField', + name: "RoutingFormResponseField", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, responseId: { - name: 'responseId', - type: 'Int', - foreignKeyFor: ['response', 'denormalized'] as readonly string[], + name: "responseId", + type: "Int", + foreignKeyFor: [ + "response", + "denormalized" + ] as readonly string[] }, fieldId: { - name: 'fieldId', - type: 'String', + name: "fieldId", + type: "String" }, valueString: { - name: 'valueString', - type: 'String', - optional: true, + name: "valueString", + type: "String", + optional: true }, valueNumber: { - name: 'valueNumber', - type: 'Decimal', - optional: true, + name: "valueNumber", + type: "Decimal", + optional: true }, valueStringArray: { - name: 'valueStringArray', - type: 'String', - array: true, + name: "valueStringArray", + type: "String", + array: true }, response: { - name: 'response', - type: 'App_RoutingForms_FormResponse', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('responseId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { - name: 'map', - value: ExpressionUtils.literal('RoutingFormResponseField_response_fkey'), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'routingFormResponseFields', - fields: ['responseId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "response", + type: "App_RoutingForms_FormResponse", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "map", value: ExpressionUtils.literal("RoutingFormResponseField_response_fkey") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "routingFormResponseFields", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } }, denormalized: { - name: 'denormalized', - type: 'RoutingFormResponseDenormalized', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('DenormalizedResponseToFields') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('responseId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'fields', - name: 'DenormalizedResponseToFields', - fields: ['responseId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "denormalized", + type: "RoutingFormResponseDenormalized", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DenormalizedResponseToFields") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "fields", name: "DenormalizedResponseToFields", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('responseId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('fieldId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Float', [ExpressionUtils.field('valueNumber')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('valueStringArray')]), - }, - { name: 'type', value: ExpressionUtils.literal('Gin') }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("responseId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("fieldId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Float", [ExpressionUtils.field("valueNumber")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("valueStringArray")]) }, { name: "type", value: ExpressionUtils.literal("Gin") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, RoutingFormResponse: { - name: 'RoutingFormResponse', + name: "RoutingFormResponse", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, response: { - name: 'response', - type: 'Json', + name: "response", + type: "Json" }, responseLowercase: { - name: 'responseLowercase', - type: 'Json', + name: "responseLowercase", + type: "Json" }, formId: { - name: 'formId', - type: 'String', + name: "formId", + type: "String" }, formName: { - name: 'formName', - type: 'String', + name: "formName", + type: "String" }, formTeamId: { - name: 'formTeamId', - type: 'Int', - optional: true, + name: "formTeamId", + type: "Int", + optional: true }, formUserId: { - name: 'formUserId', - type: 'Int', - optional: true, + name: "formUserId", + type: "Int", + optional: true }, bookingUid: { - name: 'bookingUid', - type: 'String', - optional: true, + name: "bookingUid", + type: "String", + optional: true }, bookingStatus: { - name: 'bookingStatus', - type: 'BookingStatus', - optional: true, + name: "bookingStatus", + type: "BookingStatus", + optional: true }, bookingStatusOrder: { - name: 'bookingStatusOrder', - type: 'Int', - optional: true, + name: "bookingStatusOrder", + type: "Int", + optional: true }, bookingCreatedAt: { - name: 'bookingCreatedAt', - type: 'DateTime', - optional: true, + name: "bookingCreatedAt", + type: "DateTime", + optional: true }, bookingAttendees: { - name: 'bookingAttendees', - type: 'Json', - optional: true, + name: "bookingAttendees", + type: "Json", + optional: true }, bookingUserId: { - name: 'bookingUserId', - type: 'Int', - optional: true, + name: "bookingUserId", + type: "Int", + optional: true }, bookingUserName: { - name: 'bookingUserName', - type: 'String', - optional: true, + name: "bookingUserName", + type: "String", + optional: true }, bookingUserEmail: { - name: 'bookingUserEmail', - type: 'String', - optional: true, + name: "bookingUserEmail", + type: "String", + optional: true }, bookingUserAvatarUrl: { - name: 'bookingUserAvatarUrl', - type: 'String', - optional: true, + name: "bookingUserAvatarUrl", + type: "String", + optional: true }, bookingAssignmentReason: { - name: 'bookingAssignmentReason', - type: 'String', - optional: true, + name: "bookingAssignmentReason", + type: "String", + optional: true }, bookingAssignmentReasonLowercase: { - name: 'bookingAssignmentReasonLowercase', - type: 'String', - optional: true, + name: "bookingAssignmentReasonLowercase", + type: "String", + optional: true }, bookingStartTime: { - name: 'bookingStartTime', - type: 'DateTime', - optional: true, + name: "bookingStartTime", + type: "DateTime", + optional: true }, bookingEndTime: { - name: 'bookingEndTime', - type: 'DateTime', - optional: true, + name: "bookingEndTime", + type: "DateTime", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', + name: "createdAt", + type: "DateTime" }, utm_source: { - name: 'utm_source', - type: 'String', - optional: true, + name: "utm_source", + type: "String", + optional: true }, utm_medium: { - name: 'utm_medium', - type: 'String', - optional: true, + name: "utm_medium", + type: "String", + optional: true }, utm_campaign: { - name: 'utm_campaign', - type: 'String', - optional: true, + name: "utm_campaign", + type: "String", + optional: true }, utm_term: { - name: 'utm_term', - type: 'String', - optional: true, + name: "utm_term", + type: "String", + optional: true }, utm_content: { - name: 'utm_content', - type: 'String', - optional: true, - }, + name: "utm_content", + type: "String", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, - isView: true, + isView: true }, RoutingFormResponseDenormalized: { - name: 'RoutingFormResponseDenormalized', + name: "RoutingFormResponseDenormalized", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], - foreignKeyFor: ['response'] as readonly string[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "response" + ] as readonly string[] }, formId: { - name: 'formId', - type: 'String', + name: "formId", + type: "String" }, formName: { - name: 'formName', - type: 'String', + name: "formName", + type: "String" }, formTeamId: { - name: 'formTeamId', - type: 'Int', - optional: true, + name: "formTeamId", + type: "Int", + optional: true }, formUserId: { - name: 'formUserId', - type: 'Int', + name: "formUserId", + type: "Int" }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'routingFormResponses', - fields: ['bookingId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "routingFormResponses", fields: ["bookingId"], references: ["id"], onDelete: "SetNull" } }, bookingUid: { - name: 'bookingUid', - type: 'String', - optional: true, + name: "bookingUid", + type: "String", + optional: true }, bookingId: { - name: 'bookingId', - type: 'Int', + name: "bookingId", + type: "Int", optional: true, - foreignKeyFor: ['booking'] as readonly string[], + foreignKeyFor: [ + "booking" + ] as readonly string[] }, bookingStatus: { - name: 'bookingStatus', - type: 'BookingStatus', - optional: true, + name: "bookingStatus", + type: "BookingStatus", + optional: true }, bookingStatusOrder: { - name: 'bookingStatusOrder', - type: 'Int', - optional: true, + name: "bookingStatusOrder", + type: "Int", + optional: true }, bookingCreatedAt: { - name: 'bookingCreatedAt', - type: 'DateTime', + name: "bookingCreatedAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] }, bookingStartTime: { - name: 'bookingStartTime', - type: 'DateTime', + name: "bookingStartTime", + type: "DateTime", optional: true, - attributes: [ - { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] }, bookingEndTime: { - name: 'bookingEndTime', - type: 'DateTime', + name: "bookingEndTime", + type: "DateTime", optional: true, - attributes: [ - { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] }, bookingUserId: { - name: 'bookingUserId', - type: 'Int', - optional: true, + name: "bookingUserId", + type: "Int", + optional: true }, bookingUserName: { - name: 'bookingUserName', - type: 'String', - optional: true, + name: "bookingUserName", + type: "String", + optional: true }, bookingUserEmail: { - name: 'bookingUserEmail', - type: 'String', - optional: true, + name: "bookingUserEmail", + type: "String", + optional: true }, bookingUserAvatarUrl: { - name: 'bookingUserAvatarUrl', - type: 'String', - optional: true, + name: "bookingUserAvatarUrl", + type: "String", + optional: true }, bookingAssignmentReason: { - name: 'bookingAssignmentReason', - type: 'String', - optional: true, + name: "bookingAssignmentReason", + type: "String", + optional: true }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - optional: true, + name: "eventTypeId", + type: "Int", + optional: true }, eventTypeParentId: { - name: 'eventTypeParentId', - type: 'Int', - optional: true, + name: "eventTypeParentId", + type: "Int", + optional: true }, eventTypeSchedulingType: { - name: 'eventTypeSchedulingType', - type: 'String', - optional: true, + name: "eventTypeSchedulingType", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@db.Timestamp', args: [{ name: 'x', value: ExpressionUtils.literal(3) }] }, - ] as readonly AttributeApplication[], + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@db.Timestamp", args: [{ name: "x", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[] }, utm_source: { - name: 'utm_source', - type: 'String', - optional: true, + name: "utm_source", + type: "String", + optional: true }, utm_medium: { - name: 'utm_medium', - type: 'String', - optional: true, + name: "utm_medium", + type: "String", + optional: true }, utm_campaign: { - name: 'utm_campaign', - type: 'String', - optional: true, + name: "utm_campaign", + type: "String", + optional: true }, utm_term: { - name: 'utm_term', - type: 'String', - optional: true, + name: "utm_term", + type: "String", + optional: true }, utm_content: { - name: 'utm_content', - type: 'String', - optional: true, + name: "utm_content", + type: "String", + optional: true }, response: { - name: 'response', - type: 'App_RoutingForms_FormResponse', - attributes: [ - { - name: '@relation', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]) }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'routingFormResponses', - fields: ['id'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "response", + type: "App_RoutingForms_FormResponse", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "routingFormResponses", fields: ["id"], references: ["id"], onDelete: "Cascade" } }, fields: { - name: 'fields', - type: 'RoutingFormResponseField', + name: "fields", + type: "RoutingFormResponseField", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('DenormalizedResponseToFields') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'denormalized', name: 'DenormalizedResponseToFields' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DenormalizedResponseToFields") }] }] as readonly AttributeApplication[], + relation: { opposite: "denormalized", name: "DenormalizedResponseToFields" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('formTeamId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('formUserId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('formId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingUserId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('eventTypeId'), - ExpressionUtils.field('eventTypeParentId'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("formTeamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("formUserId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId"), ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingUserId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId"), ExpressionUtils.field("eventTypeParentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Feedback: { - name: 'Feedback', + name: "Feedback", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, date: { - name: 'date', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "date", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'Feedback', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "Feedback", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, rating: { - name: 'rating', - type: 'String', + name: "rating", + type: "String" }, comment: { - name: 'comment', - type: 'String', - optional: true, - }, + name: "comment", + type: "String", + optional: true + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('rating')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("rating")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, WorkflowStep: { - name: 'WorkflowStep', + name: "WorkflowStep", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, stepNumber: { - name: 'stepNumber', - type: 'Int', + name: "stepNumber", + type: "Int" }, action: { - name: 'action', - type: 'WorkflowActions', + name: "action", + type: "WorkflowActions" }, workflowId: { - name: 'workflowId', - type: 'Int', - foreignKeyFor: ['workflow'] as readonly string[], + name: "workflowId", + type: "Int", + foreignKeyFor: [ + "workflow" + ] as readonly string[] }, workflow: { - name: 'workflow', - type: 'Workflow', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'steps', fields: ['workflowId'], references: ['id'], onDelete: 'Cascade' }, + name: "workflow", + type: "Workflow", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "steps", fields: ["workflowId"], references: ["id"], onDelete: "Cascade" } }, sendTo: { - name: 'sendTo', - type: 'String', - optional: true, + name: "sendTo", + type: "String", + optional: true }, reminderBody: { - name: 'reminderBody', - type: 'String', - optional: true, + name: "reminderBody", + type: "String", + optional: true }, emailSubject: { - name: 'emailSubject', - type: 'String', - optional: true, + name: "emailSubject", + type: "String", + optional: true }, template: { - name: 'template', - type: 'WorkflowTemplates', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('REMINDER') }] }, - ] as readonly AttributeApplication[], - default: 'REMINDER' as FieldDefault, + name: "template", + type: "WorkflowTemplates", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("REMINDER") }] }] as readonly AttributeApplication[], + default: "REMINDER" as FieldDefault }, workflowReminders: { - name: 'workflowReminders', - type: 'WorkflowReminder', + name: "workflowReminders", + type: "WorkflowReminder", array: true, - relation: { opposite: 'workflowStep' }, + relation: { opposite: "workflowStep" } }, numberRequired: { - name: 'numberRequired', - type: 'Boolean', - optional: true, + name: "numberRequired", + type: "Boolean", + optional: true }, sender: { - name: 'sender', - type: 'String', - optional: true, + name: "sender", + type: "String", + optional: true }, numberVerificationPending: { - name: 'numberVerificationPending', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "numberVerificationPending", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, includeCalendarEvent: { - name: 'includeCalendarEvent', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "includeCalendarEvent", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, verifiedAt: { - name: 'verifiedAt', - type: 'DateTime', - optional: true, - }, + name: "verifiedAt", + type: "DateTime", + optional: true + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Workflow: { - name: 'Workflow', + name: "Workflow", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, position: { - name: 'position', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "position", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'workflows', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workflows", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'workflows', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workflows", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, activeOn: { - name: 'activeOn', - type: 'WorkflowsOnEventTypes', + name: "activeOn", + type: "WorkflowsOnEventTypes", array: true, - relation: { opposite: 'workflow' }, + relation: { opposite: "workflow" } }, activeOnTeams: { - name: 'activeOnTeams', - type: 'WorkflowsOnTeams', + name: "activeOnTeams", + type: "WorkflowsOnTeams", array: true, - relation: { opposite: 'workflow' }, + relation: { opposite: "workflow" } }, isActiveOnAll: { - name: 'isActiveOnAll', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isActiveOnAll", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, trigger: { - name: 'trigger', - type: 'WorkflowTriggerEvents', + name: "trigger", + type: "WorkflowTriggerEvents" }, time: { - name: 'time', - type: 'Int', - optional: true, + name: "time", + type: "Int", + optional: true }, timeUnit: { - name: 'timeUnit', - type: 'TimeUnit', - optional: true, + name: "timeUnit", + type: "TimeUnit", + optional: true }, steps: { - name: 'steps', - type: 'WorkflowStep', + name: "steps", + type: "WorkflowStep", array: true, - relation: { opposite: 'workflow' }, - }, + relation: { opposite: "workflow" } + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, AIPhoneCallConfiguration: { - name: 'AIPhoneCallConfiguration', + name: "AIPhoneCallConfiguration", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, eventType: { - name: 'eventType', - type: 'EventType', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'aiPhoneCallConfig', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "eventType", + type: "EventType", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "aiPhoneCallConfig", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - foreignKeyFor: ['eventType'] as readonly string[], + name: "eventTypeId", + type: "Int", + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, templateType: { - name: 'templateType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('CUSTOM_TEMPLATE') }], - }, - ] as readonly AttributeApplication[], - default: 'CUSTOM_TEMPLATE' as FieldDefault, + name: "templateType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CUSTOM_TEMPLATE") }] }] as readonly AttributeApplication[], + default: "CUSTOM_TEMPLATE" as FieldDefault }, schedulerName: { - name: 'schedulerName', - type: 'String', - optional: true, + name: "schedulerName", + type: "String", + optional: true }, generalPrompt: { - name: 'generalPrompt', - type: 'String', - optional: true, + name: "generalPrompt", + type: "String", + optional: true }, yourPhoneNumber: { - name: 'yourPhoneNumber', - type: 'String', + name: "yourPhoneNumber", + type: "String" }, numberToCall: { - name: 'numberToCall', - type: 'String', + name: "numberToCall", + type: "String" }, guestName: { - name: 'guestName', - type: 'String', - optional: true, + name: "guestName", + type: "String", + optional: true }, guestEmail: { - name: 'guestEmail', - type: 'String', - optional: true, + name: "guestEmail", + type: "String", + optional: true }, guestCompany: { - name: 'guestCompany', - type: 'String', - optional: true, + name: "guestCompany", + type: "String", + optional: true }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, beginMessage: { - name: 'beginMessage', - type: 'String', - optional: true, + name: "beginMessage", + type: "String", + optional: true }, llmId: { - name: 'llmId', - type: 'String', - optional: true, - }, + name: "llmId", + type: "String", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - eventTypeId: { type: 'Int' }, - }, + id: { type: "Int" }, + eventTypeId: { type: "Int" } + } }, WorkflowsOnEventTypes: { - name: 'WorkflowsOnEventTypes', + name: "WorkflowsOnEventTypes", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, workflow: { - name: 'workflow', - type: 'Workflow', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'activeOn', fields: ['workflowId'], references: ['id'], onDelete: 'Cascade' }, + name: "workflow", + type: "Workflow", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "activeOn", fields: ["workflowId"], references: ["id"], onDelete: "Cascade" } }, workflowId: { - name: 'workflowId', - type: 'Int', - foreignKeyFor: ['workflow'] as readonly string[], + name: "workflowId", + type: "Int", + foreignKeyFor: [ + "workflow" + ] as readonly string[] }, eventType: { - name: 'eventType', - type: 'EventType', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workflows', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "eventType", + type: "EventType", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workflows", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - foreignKeyFor: ['eventType'] as readonly string[], - }, + name: "eventTypeId", + type: "Int", + foreignKeyFor: [ + "eventType" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('workflowId'), - ExpressionUtils.field('eventTypeId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId"), ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - workflowId_eventTypeId: { workflowId: { type: 'Int' }, eventTypeId: { type: 'Int' } }, - }, + id: { type: "Int" }, + workflowId_eventTypeId: { workflowId: { type: "Int" }, eventTypeId: { type: "Int" } } + } }, WorkflowsOnTeams: { - name: 'WorkflowsOnTeams', + name: "WorkflowsOnTeams", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, workflow: { - name: 'workflow', - type: 'Workflow', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'activeOnTeams', - fields: ['workflowId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "workflow", + type: "Workflow", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "activeOnTeams", fields: ["workflowId"], references: ["id"], onDelete: "Cascade" } }, workflowId: { - name: 'workflowId', - type: 'Int', - foreignKeyFor: ['workflow'] as readonly string[], + name: "workflowId", + type: "Int", + foreignKeyFor: [ + "workflow" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'activeOrgWorkflows', - fields: ['teamId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "activeOrgWorkflows", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], - }, + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('workflowId'), - ExpressionUtils.field('teamId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowId')]) }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId"), ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - workflowId_teamId: { workflowId: { type: 'Int' }, teamId: { type: 'Int' } }, - }, + id: { type: "Int" }, + workflowId_teamId: { workflowId: { type: "Int" }, teamId: { type: "Int" } } + } }, Deployment: { - name: 'Deployment', + name: "Deployment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, - ] as readonly AttributeApplication[], - default: 1 as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], + default: 1 as FieldDefault }, logo: { - name: 'logo', - type: 'String', - optional: true, + name: "logo", + type: "String", + optional: true }, theme: { - name: 'theme', - type: 'Json', - optional: true, + name: "theme", + type: "Json", + optional: true }, licenseKey: { - name: 'licenseKey', - type: 'String', - optional: true, + name: "licenseKey", + type: "String", + optional: true }, agreedLicenseAt: { - name: 'agreedLicenseAt', - type: 'DateTime', - optional: true, - }, + name: "agreedLicenseAt", + type: "DateTime", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, WorkflowReminder: { - name: 'WorkflowReminder', + name: "WorkflowReminder", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, uuid: { - name: 'uuid', - type: 'String', + name: "uuid", + type: "String", unique: true, optional: true, - attributes: [ - { name: '@unique' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, bookingUid: { - name: 'bookingUid', - type: 'String', + name: "bookingUid", + type: "String", optional: true, - foreignKeyFor: ['booking'] as readonly string[], + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('bookingUid')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('uid')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'workflowReminders', fields: ['bookingUid'], references: ['uid'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("bookingUid")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("uid")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "workflowReminders", fields: ["bookingUid"], references: ["uid"] } }, method: { - name: 'method', - type: 'WorkflowMethods', + name: "method", + type: "WorkflowMethods" }, scheduledDate: { - name: 'scheduledDate', - type: 'DateTime', + name: "scheduledDate", + type: "DateTime" }, referenceId: { - name: 'referenceId', - type: 'String', + name: "referenceId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, scheduled: { - name: 'scheduled', - type: 'Boolean', + name: "scheduled", + type: "Boolean" }, workflowStepId: { - name: 'workflowStepId', - type: 'Int', + name: "workflowStepId", + type: "Int", optional: true, - foreignKeyFor: ['workflowStep'] as readonly string[], + foreignKeyFor: [ + "workflowStep" + ] as readonly string[] }, workflowStep: { - name: 'workflowStep', - type: 'WorkflowStep', + name: "workflowStep", + type: "WorkflowStep", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowStepId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workflowReminders', - fields: ['workflowStepId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowStepId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workflowReminders", fields: ["workflowStepId"], references: ["id"], onDelete: "Cascade" } }, cancelled: { - name: 'cancelled', - type: 'Boolean', - optional: true, + name: "cancelled", + type: "Boolean", + optional: true }, seatReferenceId: { - name: 'seatReferenceId', - type: 'String', - optional: true, + name: "seatReferenceId", + type: "String", + optional: true }, isMandatoryReminder: { - name: 'isMandatoryReminder', - type: 'Boolean', + name: "isMandatoryReminder", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, retryCount: { - name: 'retryCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, - }, + name: "retryCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('bookingUid')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('workflowStepId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('seatReferenceId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('WorkflowMethods', [ - ExpressionUtils.field('method'), - ExpressionUtils.field('scheduled'), - ExpressionUtils.field('scheduledDate'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Boolean', [ - ExpressionUtils.field('cancelled'), - ExpressionUtils.field('scheduledDate'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("bookingUid")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workflowStepId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("seatReferenceId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("WorkflowMethods", [ExpressionUtils.field("method"), ExpressionUtils.field("scheduled"), ExpressionUtils.field("scheduledDate")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("cancelled"), ExpressionUtils.field("scheduledDate")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - uuid: { type: 'String' }, - referenceId: { type: 'String' }, - }, + id: { type: "Int" }, + uuid: { type: "String" }, + referenceId: { type: "String" } + } }, WebhookScheduledTriggers: { - name: 'WebhookScheduledTriggers', + name: "WebhookScheduledTriggers", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, jobName: { - name: 'jobName', - type: 'String', - optional: true, + name: "jobName", + type: "String", + optional: true }, subscriberUrl: { - name: 'subscriberUrl', - type: 'String', + name: "subscriberUrl", + type: "String" }, payload: { - name: 'payload', - type: 'String', + name: "payload", + type: "String" }, startAfter: { - name: 'startAfter', - type: 'DateTime', + name: "startAfter", + type: "DateTime" }, retryCount: { - name: 'retryCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "retryCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', + name: "createdAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, appId: { - name: 'appId', - type: 'String', - optional: true, + name: "appId", + type: "String", + optional: true }, webhookId: { - name: 'webhookId', - type: 'String', + name: "webhookId", + type: "String", optional: true, - foreignKeyFor: ['webhook'] as readonly string[], + foreignKeyFor: [ + "webhook" + ] as readonly string[] }, webhook: { - name: 'webhook', - type: 'Webhook', + name: "webhook", + type: "Webhook", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('webhookId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'scheduledTriggers', - fields: ['webhookId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("webhookId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "scheduledTriggers", fields: ["webhookId"], references: ["id"], onDelete: "Cascade" } }, bookingId: { - name: 'bookingId', - type: 'Int', + name: "bookingId", + type: "Int", optional: true, - foreignKeyFor: ['booking'] as readonly string[], + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', + name: "booking", + type: "Booking", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'scheduledTriggers', - fields: ['bookingId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "scheduledTriggers", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, BookingSeat: { - name: 'BookingSeat', + name: "BookingSeat", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, referenceUid: { - name: 'referenceUid', - type: 'String', + name: "referenceUid", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, bookingId: { - name: 'bookingId', - type: 'Int', - foreignKeyFor: ['booking'] as readonly string[], + name: "bookingId", + type: "Int", + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'seatsReferences', - fields: ['bookingId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "booking", + type: "Booking", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "seatsReferences", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, attendeeId: { - name: 'attendeeId', - type: 'Int', + name: "attendeeId", + type: "Int", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['attendee'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "attendee" + ] as readonly string[] }, attendee: { - name: 'attendee', - type: 'Attendee', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('attendeeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'bookingSeat', - fields: ['attendeeId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "attendee", + type: "Attendee", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("attendeeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "bookingSeat", fields: ["attendeeId"], references: ["id"], onDelete: "Cascade" } }, data: { - name: 'data', - type: 'Json', - optional: true, + name: "data", + type: "Json", + optional: true }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, - }, + name: "metadata", + type: "Json", + optional: true + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('attendeeId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("attendeeId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - referenceUid: { type: 'String' }, - attendeeId: { type: 'Int' }, - }, + id: { type: "Int" }, + referenceUid: { type: "String" }, + attendeeId: { type: "Int" } + } }, VerifiedNumber: { - name: 'VerifiedNumber', + name: "VerifiedNumber", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'verifiedNumbers', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "verifiedNumbers", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'verifiedNumbers', - fields: ['teamId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "verifiedNumbers", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, phoneNumber: { - name: 'phoneNumber', - type: 'String', - }, + name: "phoneNumber", + type: "String" + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, VerifiedEmail: { - name: 'VerifiedEmail', + name: "VerifiedEmail", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'verifiedEmails', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "verifiedEmails", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'verifiedEmails', - fields: ['teamId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "verifiedEmails", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, email: { - name: 'email', - type: 'String', - }, + name: "email", + type: "String" + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Feature: { - name: 'Feature', + name: "Feature", fields: { slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String", id: true, unique: true, - attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, type: { - name: 'type', - type: 'FeatureType', + name: "type", + type: "FeatureType", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('RELEASE') }] }, - ] as readonly AttributeApplication[], - default: 'RELEASE' as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("RELEASE") }] }] as readonly AttributeApplication[], + default: "RELEASE" as FieldDefault }, stale: { - name: 'stale', - type: 'Boolean', + name: "stale", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, lastUsedAt: { - name: 'lastUsedAt', - type: 'DateTime', - optional: true, + name: "lastUsedAt", + type: "DateTime", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', + name: "createdAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@updatedAt' }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedBy: { - name: 'updatedBy', - type: 'Int', - optional: true, + name: "updatedBy", + type: "Int", + optional: true }, users: { - name: 'users', - type: 'UserFeatures', + name: "users", + type: "UserFeatures", array: true, - relation: { opposite: 'feature' }, + relation: { opposite: "feature" } }, teams: { - name: 'teams', - type: 'TeamFeatures', + name: "teams", + type: "TeamFeatures", array: true, - relation: { opposite: 'feature' }, - }, + relation: { opposite: "feature" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('enabled')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('stale')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("enabled")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("stale")]) }] } ] as readonly AttributeApplication[], - idFields: ['slug'], + idFields: ["slug"], uniqueFields: { - slug: { type: 'String' }, - }, + slug: { type: "String" } + } }, UserFeatures: { - name: 'UserFeatures', + name: "UserFeatures", fields: { user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'features', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "features", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", id: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, feature: { - name: 'feature', - type: 'Feature', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('featureId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'users', fields: ['featureId'], references: ['slug'], onDelete: 'Cascade' }, + name: "feature", + type: "Feature", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("featureId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "users", fields: ["featureId"], references: ["slug"], onDelete: "Cascade" } }, featureId: { - name: 'featureId', - type: 'String', + name: "featureId", + type: "String", id: true, - foreignKeyFor: ['feature'] as readonly string[], + foreignKeyFor: [ + "feature" + ] as readonly string[] }, assignedAt: { - name: 'assignedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "assignedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, assignedBy: { - name: 'assignedBy', - type: 'String', + name: "assignedBy", + type: "String" }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('featureId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('featureId'), - ]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("featureId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("featureId")]) }] } ] as readonly AttributeApplication[], - idFields: ['userId', 'featureId'], + idFields: ["userId", "featureId"], uniqueFields: { - userId_featureId: { userId: { type: 'Int' }, featureId: { type: 'String' } }, - }, + userId_featureId: { userId: { type: "Int" }, featureId: { type: "String" } } + } }, TeamFeatures: { - name: 'TeamFeatures', + name: "TeamFeatures", fields: { team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'features', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "features", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", id: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, feature: { - name: 'feature', - type: 'Feature', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('featureId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'teams', fields: ['featureId'], references: ['slug'], onDelete: 'Cascade' }, + name: "feature", + type: "Feature", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("featureId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "teams", fields: ["featureId"], references: ["slug"], onDelete: "Cascade" } }, featureId: { - name: 'featureId', - type: 'String', + name: "featureId", + type: "String", id: true, - foreignKeyFor: ['feature'] as readonly string[], + foreignKeyFor: [ + "feature" + ] as readonly string[] }, assignedAt: { - name: 'assignedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "assignedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, assignedBy: { - name: 'assignedBy', - type: 'String', + name: "assignedBy", + type: "String" }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('featureId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('featureId'), - ]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("featureId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("featureId")]) }] } ] as readonly AttributeApplication[], - idFields: ['teamId', 'featureId'], + idFields: ["teamId", "featureId"], uniqueFields: { - teamId_featureId: { teamId: { type: 'Int' }, featureId: { type: 'String' } }, - }, + teamId_featureId: { teamId: { type: "Int" }, featureId: { type: "String" } } + } }, SelectedSlots: { - name: 'SelectedSlots', + name: "SelectedSlots", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', + name: "eventTypeId", + type: "Int" }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int" }, slotUtcStartDate: { - name: 'slotUtcStartDate', - type: 'DateTime', + name: "slotUtcStartDate", + type: "DateTime" }, slotUtcEndDate: { - name: 'slotUtcEndDate', - type: 'DateTime', + name: "slotUtcEndDate", + type: "DateTime" }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String" }, releaseAt: { - name: 'releaseAt', - type: 'DateTime', + name: "releaseAt", + type: "DateTime" }, isSeat: { - name: 'isSeat', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "isSeat", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('slotUtcStartDate'), - ExpressionUtils.field('slotUtcEndDate'), - ExpressionUtils.field('uid'), - ]), - }, - { name: 'name', value: ExpressionUtils.literal('selectedSlotUnique') }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("slotUtcStartDate"), ExpressionUtils.field("slotUtcEndDate"), ExpressionUtils.field("uid")]) }, { name: "name", value: ExpressionUtils.literal("selectedSlotUnique") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - selectedSlotUnique: { - userId: { type: 'Int' }, - slotUtcStartDate: { type: 'DateTime' }, - slotUtcEndDate: { type: 'DateTime' }, - uid: { type: 'String' }, - }, - }, + id: { type: "Int" }, + selectedSlotUnique: { userId: { type: "Int" }, slotUtcStartDate: { type: "DateTime" }, slotUtcEndDate: { type: "DateTime" }, uid: { type: "String" } } + } }, OAuthClient: { - name: 'OAuthClient', + name: "OAuthClient", fields: { clientId: { - name: 'clientId', - type: 'String', + name: "clientId", + type: "String", id: true, unique: true, - attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] }, redirectUri: { - name: 'redirectUri', - type: 'String', + name: "redirectUri", + type: "String" }, clientSecret: { - name: 'clientSecret', - type: 'String', + name: "clientSecret", + type: "String" }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, logo: { - name: 'logo', - type: 'String', - optional: true, + name: "logo", + type: "String", + optional: true }, accessCodes: { - name: 'accessCodes', - type: 'AccessCode', + name: "accessCodes", + type: "AccessCode", array: true, - relation: { opposite: 'client' }, - }, + relation: { opposite: "client" } + } }, - idFields: ['clientId'], + idFields: ["clientId"], uniqueFields: { - clientId: { type: 'String' }, - }, + clientId: { type: "String" } + } }, AccessCode: { - name: 'AccessCode', + name: "AccessCode", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, code: { - name: 'code', - type: 'String', + name: "code", + type: "String" }, clientId: { - name: 'clientId', - type: 'String', + name: "clientId", + type: "String", optional: true, - foreignKeyFor: ['client'] as readonly string[], + foreignKeyFor: [ + "client" + ] as readonly string[] }, client: { - name: 'client', - type: 'OAuthClient', + name: "client", + type: "OAuthClient", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('clientId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('clientId')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'accessCodes', - fields: ['clientId'], - references: ['clientId'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("clientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("clientId")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "accessCodes", fields: ["clientId"], references: ["clientId"], onDelete: "Cascade" } }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime" }, scopes: { - name: 'scopes', - type: 'AccessScope', - array: true, + name: "scopes", + type: "AccessScope", + array: true }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'accessCodes', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "accessCodes", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'accessCodes', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "accessCodes", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, BookingTimeStatus: { - name: 'BookingTimeStatus', + name: "BookingTimeStatus", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, uid: { - name: 'uid', - type: 'String', - optional: true, + name: "uid", + type: "String", + optional: true }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - optional: true, + name: "eventTypeId", + type: "Int", + optional: true }, title: { - name: 'title', - type: 'String', - optional: true, + name: "title", + type: "String", + optional: true }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, startTime: { - name: 'startTime', - type: 'DateTime', - optional: true, + name: "startTime", + type: "DateTime", + optional: true }, endTime: { - name: 'endTime', - type: 'DateTime', - optional: true, + name: "endTime", + type: "DateTime", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - optional: true, + name: "createdAt", + type: "DateTime", + optional: true }, location: { - name: 'location', - type: 'String', - optional: true, + name: "location", + type: "String", + optional: true }, paid: { - name: 'paid', - type: 'Boolean', - optional: true, + name: "paid", + type: "Boolean", + optional: true }, status: { - name: 'status', - type: 'BookingStatus', - optional: true, + name: "status", + type: "BookingStatus", + optional: true }, rescheduled: { - name: 'rescheduled', - type: 'Boolean', - optional: true, + name: "rescheduled", + type: "Boolean", + optional: true }, userId: { - name: 'userId', - type: 'Int', - optional: true, + name: "userId", + type: "Int", + optional: true }, teamId: { - name: 'teamId', - type: 'Int', - optional: true, + name: "teamId", + type: "Int", + optional: true }, eventLength: { - name: 'eventLength', - type: 'Int', - optional: true, + name: "eventLength", + type: "Int", + optional: true }, timeStatus: { - name: 'timeStatus', - type: 'String', - optional: true, + name: "timeStatus", + type: "String", + optional: true }, eventParentId: { - name: 'eventParentId', - type: 'Int', - optional: true, + name: "eventParentId", + type: "Int", + optional: true }, userEmail: { - name: 'userEmail', - type: 'String', - optional: true, + name: "userEmail", + type: "String", + optional: true }, username: { - name: 'username', - type: 'String', - optional: true, + name: "username", + type: "String", + optional: true }, ratingFeedback: { - name: 'ratingFeedback', - type: 'String', - optional: true, + name: "ratingFeedback", + type: "String", + optional: true }, rating: { - name: 'rating', - type: 'Int', - optional: true, + name: "rating", + type: "Int", + optional: true }, noShowHost: { - name: 'noShowHost', - type: 'Boolean', - optional: true, + name: "noShowHost", + type: "Boolean", + optional: true }, isTeamBooking: { - name: 'isTeamBooking', - type: 'Boolean', - }, + name: "isTeamBooking", + type: "Boolean" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, - isView: true, + isView: true }, BookingDenormalized: { - name: 'BookingDenormalized', + name: "BookingDenormalized", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, unique: true, - attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[] }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String" }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - optional: true, + name: "eventTypeId", + type: "Int", + optional: true }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, startTime: { - name: 'startTime', - type: 'DateTime', + name: "startTime", + type: "DateTime" }, endTime: { - name: 'endTime', - type: 'DateTime', + name: "endTime", + type: "DateTime" }, createdAt: { - name: 'createdAt', - type: 'DateTime', + name: "createdAt", + type: "DateTime" }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', - optional: true, + name: "updatedAt", + type: "DateTime", + optional: true }, location: { - name: 'location', - type: 'String', - optional: true, + name: "location", + type: "String", + optional: true }, paid: { - name: 'paid', - type: 'Boolean', + name: "paid", + type: "Boolean" }, status: { - name: 'status', - type: 'BookingStatus', + name: "status", + type: "BookingStatus" }, rescheduled: { - name: 'rescheduled', - type: 'Boolean', - optional: true, + name: "rescheduled", + type: "Boolean", + optional: true }, userId: { - name: 'userId', - type: 'Int', - optional: true, + name: "userId", + type: "Int", + optional: true }, teamId: { - name: 'teamId', - type: 'Int', - optional: true, + name: "teamId", + type: "Int", + optional: true }, eventLength: { - name: 'eventLength', - type: 'Int', - optional: true, + name: "eventLength", + type: "Int", + optional: true }, eventParentId: { - name: 'eventParentId', - type: 'Int', - optional: true, + name: "eventParentId", + type: "Int", + optional: true }, userEmail: { - name: 'userEmail', - type: 'String', - optional: true, + name: "userEmail", + type: "String", + optional: true }, userName: { - name: 'userName', - type: 'String', - optional: true, + name: "userName", + type: "String", + optional: true }, userUsername: { - name: 'userUsername', - type: 'String', - optional: true, + name: "userUsername", + type: "String", + optional: true }, ratingFeedback: { - name: 'ratingFeedback', - type: 'String', - optional: true, + name: "ratingFeedback", + type: "String", + optional: true }, rating: { - name: 'rating', - type: 'Int', - optional: true, + name: "rating", + type: "Int", + optional: true }, noShowHost: { - name: 'noShowHost', - type: 'Boolean', - optional: true, + name: "noShowHost", + type: "Boolean", + optional: true }, isTeamBooking: { - name: 'isTeamBooking', - type: 'Boolean', - }, + name: "isTeamBooking", + type: "Boolean" + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventParentId')]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('startTime')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('endTime')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('BookingStatus', [ExpressionUtils.field('status')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('isTeamBooking'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('isTeamBooking'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventParentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("startTime")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("endTime")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("BookingStatus", [ExpressionUtils.field("status")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("isTeamBooking")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("isTeamBooking")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, BookingTimeStatusDenormalized: { - name: 'BookingTimeStatusDenormalized', + name: "BookingTimeStatusDenormalized", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String" }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - optional: true, + name: "eventTypeId", + type: "Int", + optional: true }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, startTime: { - name: 'startTime', - type: 'DateTime', + name: "startTime", + type: "DateTime" }, endTime: { - name: 'endTime', - type: 'DateTime', + name: "endTime", + type: "DateTime" }, createdAt: { - name: 'createdAt', - type: 'DateTime', + name: "createdAt", + type: "DateTime" }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', - optional: true, + name: "updatedAt", + type: "DateTime", + optional: true }, location: { - name: 'location', - type: 'String', - optional: true, + name: "location", + type: "String", + optional: true }, paid: { - name: 'paid', - type: 'Boolean', + name: "paid", + type: "Boolean" }, status: { - name: 'status', - type: 'BookingStatus', + name: "status", + type: "BookingStatus" }, rescheduled: { - name: 'rescheduled', - type: 'Boolean', - optional: true, + name: "rescheduled", + type: "Boolean", + optional: true }, userId: { - name: 'userId', - type: 'Int', - optional: true, + name: "userId", + type: "Int", + optional: true }, teamId: { - name: 'teamId', - type: 'Int', - optional: true, + name: "teamId", + type: "Int", + optional: true }, eventLength: { - name: 'eventLength', - type: 'Int', - optional: true, + name: "eventLength", + type: "Int", + optional: true }, eventParentId: { - name: 'eventParentId', - type: 'Int', - optional: true, + name: "eventParentId", + type: "Int", + optional: true }, userEmail: { - name: 'userEmail', - type: 'String', - optional: true, + name: "userEmail", + type: "String", + optional: true }, userName: { - name: 'userName', - type: 'String', - optional: true, + name: "userName", + type: "String", + optional: true }, userUsername: { - name: 'userUsername', - type: 'String', - optional: true, + name: "userUsername", + type: "String", + optional: true }, ratingFeedback: { - name: 'ratingFeedback', - type: 'String', - optional: true, + name: "ratingFeedback", + type: "String", + optional: true }, rating: { - name: 'rating', - type: 'Int', - optional: true, + name: "rating", + type: "Int", + optional: true }, noShowHost: { - name: 'noShowHost', - type: 'Boolean', - optional: true, + name: "noShowHost", + type: "Boolean", + optional: true }, isTeamBooking: { - name: 'isTeamBooking', - type: 'Boolean', + name: "isTeamBooking", + type: "Boolean" }, timeStatus: { - name: 'timeStatus', - type: 'String', - optional: true, - }, + name: "timeStatus", + type: "String", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, - isView: true, + isView: true }, CalendarCache: { - name: 'CalendarCache', + name: "CalendarCache", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, key: { - name: 'key', - type: 'String', - id: true, + name: "key", + type: "String", + id: true }, value: { - name: 'value', - type: 'Json', + name: "value", + type: "Json" }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime" }, credentialId: { - name: 'credentialId', - type: 'Int', + name: "credentialId", + type: "Int", id: true, - foreignKeyFor: ['credential'] as readonly string[], + foreignKeyFor: [ + "credential" + ] as readonly string[] }, userId: { - name: 'userId', - type: 'Int', - optional: true, + name: "userId", + type: "Int", + optional: true }, credential: { - name: 'credential', - type: 'Credential', + name: "credential", + type: "Credential", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('credentialId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'CalendarCache', - fields: ['credentialId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "CalendarCache", fields: ["credentialId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('credentialId'), - ExpressionUtils.field('key'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('credentialId'), - ExpressionUtils.field('key'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('key'), - ]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId"), ExpressionUtils.field("key")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("credentialId"), ExpressionUtils.field("key")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("key")]) }] } ] as readonly AttributeApplication[], - idFields: ['key', 'credentialId'], + idFields: ["key", "credentialId"], uniqueFields: { - credentialId_key: { credentialId: { type: 'Int' }, key: { type: 'String' } }, - }, + credentialId_key: { credentialId: { type: "Int" }, key: { type: "String" } } + } }, TempOrgRedirect: { - name: 'TempOrgRedirect', + name: "TempOrgRedirect", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, from: { - name: 'from', - type: 'String', + name: "from", + type: "String" }, fromOrgId: { - name: 'fromOrgId', - type: 'Int', + name: "fromOrgId", + type: "Int" }, type: { - name: 'type', - type: 'RedirectType', + name: "type", + type: "RedirectType" }, toUrl: { - name: 'toUrl', - type: 'String', + name: "toUrl", + type: "String" }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('from'), - ExpressionUtils.field('type'), - ExpressionUtils.field('fromOrgId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("from"), ExpressionUtils.field("type"), ExpressionUtils.field("fromOrgId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - from_type_fromOrgId: { - from: { type: 'String' }, - type: { type: 'RedirectType' }, - fromOrgId: { type: 'Int' }, - }, - }, + id: { type: "Int" }, + from_type_fromOrgId: { from: { type: "String" }, type: { type: "RedirectType" }, fromOrgId: { type: "Int" } } + } }, Avatar: { - name: 'Avatar', + name: "Avatar", fields: { teamId: { - name: 'teamId', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "teamId", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, userId: { - name: 'userId', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "userId", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, data: { - name: 'data', - type: 'String', + name: "data", + type: "String" }, objectKey: { - name: 'objectKey', - type: 'String', + name: "objectKey", + type: "String", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, isBanner: { - name: 'isBanner', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "isBanner", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('userId'), - ExpressionUtils.field('isBanner'), - ]), - }, - ], - }, - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('avatars') }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("userId"), ExpressionUtils.field("isBanner")]) }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("avatars") }] } ] as readonly AttributeApplication[], - idFields: ['objectKey'], + idFields: ["objectKey"], uniqueFields: { - objectKey: { type: 'String' }, - teamId_userId_isBanner: { - teamId: { type: 'Int' }, - userId: { type: 'Int' }, - isBanner: { type: 'Boolean' }, - }, - }, + objectKey: { type: "String" }, + teamId_userId_isBanner: { teamId: { type: "Int" }, userId: { type: "Int" }, isBanner: { type: "Boolean" } } + } }, OutOfOfficeEntry: { - name: 'OutOfOfficeEntry', + name: "OutOfOfficeEntry", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, uuid: { - name: 'uuid', - type: 'String', + name: "uuid", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, start: { - name: 'start', - type: 'DateTime', + name: "start", + type: "DateTime" }, end: { - name: 'end', - type: 'DateTime', + name: "end", + type: "DateTime" }, notes: { - name: 'notes', - type: 'String', - optional: true, + name: "notes", + type: "String", + optional: true }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'bookingRedirects', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "bookingRedirects", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, toUserId: { - name: 'toUserId', - type: 'Int', + name: "toUserId", + type: "Int", optional: true, - foreignKeyFor: ['toUser'] as readonly string[], + foreignKeyFor: [ + "toUser" + ] as readonly string[] }, toUser: { - name: 'toUser', - type: 'User', + name: "toUser", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('toUser') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('toUserId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'bookingRedirectsTo', - name: 'toUser', - fields: ['toUserId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("toUser") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("toUserId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "bookingRedirectsTo", name: "toUser", fields: ["toUserId"], references: ["id"], onDelete: "Cascade" } }, reasonId: { - name: 'reasonId', - type: 'Int', + name: "reasonId", + type: "Int", optional: true, - foreignKeyFor: ['reason'] as readonly string[], + foreignKeyFor: [ + "reason" + ] as readonly string[] }, reason: { - name: 'reason', - type: 'OutOfOfficeReason', + name: "reason", + type: "OutOfOfficeReason", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('reasonId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'entries', fields: ['reasonId'], references: ['id'], onDelete: 'SetNull' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reasonId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "entries", fields: ["reasonId"], references: ["id"], onDelete: "SetNull" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('uuid')]) }], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('toUserId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ - ExpressionUtils.field('start'), - ExpressionUtils.field('end'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("uuid")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("toUserId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("start"), ExpressionUtils.field("end")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - uuid: { type: 'String' }, - }, + id: { type: "Int" }, + uuid: { type: "String" } + } }, OutOfOfficeReason: { - name: 'OutOfOfficeReason', + name: "OutOfOfficeReason", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, emoji: { - name: 'emoji', - type: 'String', + name: "emoji", + type: "String" }, reason: { - name: 'reason', - type: 'String', + name: "reason", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'OutOfOfficeReasons', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "OutOfOfficeReasons", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, entries: { - name: 'entries', - type: 'OutOfOfficeEntry', + name: "entries", + type: "OutOfOfficeEntry", array: true, - relation: { opposite: 'reason' }, - }, + relation: { opposite: "reason" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - reason: { type: 'String' }, - }, + id: { type: "Int" }, + reason: { type: "String" } + } }, PlatformOAuthClient: { - name: 'PlatformOAuthClient', + name: "PlatformOAuthClient", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, secret: { - name: 'secret', - type: 'String', + name: "secret", + type: "String" }, permissions: { - name: 'permissions', - type: 'Int', + name: "permissions", + type: "Int" }, users: { - name: 'users', - type: 'User', + name: "users", + type: "User", array: true, - relation: { opposite: 'platformOAuthClients' }, + relation: { opposite: "platformOAuthClients" } }, logo: { - name: 'logo', - type: 'String', - optional: true, + name: "logo", + type: "String", + optional: true }, redirectUris: { - name: 'redirectUris', - type: 'String', - array: true, + name: "redirectUris", + type: "String", + array: true }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'platformOAuthClient', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "platformOAuthClient", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, teams: { - name: 'teams', - type: 'Team', + name: "teams", + type: "Team", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CreatedByOAuthClient') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'createdByOAuthClient', name: 'CreatedByOAuthClient' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedByOAuthClient") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdByOAuthClient", name: "CreatedByOAuthClient" } }, accessTokens: { - name: 'accessTokens', - type: 'AccessToken', + name: "accessTokens", + type: "AccessToken", array: true, - relation: { opposite: 'client' }, + relation: { opposite: "client" } }, refreshToken: { - name: 'refreshToken', - type: 'RefreshToken', + name: "refreshToken", + type: "RefreshToken", array: true, - relation: { opposite: 'client' }, + relation: { opposite: "client" } }, authorizationTokens: { - name: 'authorizationTokens', - type: 'PlatformAuthorizationToken', + name: "authorizationTokens", + type: "PlatformAuthorizationToken", array: true, - relation: { opposite: 'client' }, + relation: { opposite: "client" } }, webhook: { - name: 'webhook', - type: 'Webhook', + name: "webhook", + type: "Webhook", array: true, - relation: { opposite: 'platformOAuthClient' }, + relation: { opposite: "platformOAuthClient" } }, bookingRedirectUri: { - name: 'bookingRedirectUri', - type: 'String', - optional: true, + name: "bookingRedirectUri", + type: "String", + optional: true }, bookingCancelRedirectUri: { - name: 'bookingCancelRedirectUri', - type: 'String', - optional: true, + name: "bookingCancelRedirectUri", + type: "String", + optional: true }, bookingRescheduleRedirectUri: { - name: 'bookingRescheduleRedirectUri', - type: 'String', - optional: true, + name: "bookingRescheduleRedirectUri", + type: "String", + optional: true }, areEmailsEnabled: { - name: 'areEmailsEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "areEmailsEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, areDefaultEventTypesEnabled: { - name: 'areDefaultEventTypesEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "areDefaultEventTypesEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, areCalendarEventsEnabled: { - name: 'areCalendarEventsEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "areCalendarEventsEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, PlatformAuthorizationToken: { - name: 'PlatformAuthorizationToken', + name: "PlatformAuthorizationToken", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, owner: { - name: 'owner', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'PlatformAuthorizationToken', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "owner", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "PlatformAuthorizationToken", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, client: { - name: 'client', - type: 'PlatformOAuthClient', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('platformOAuthClientId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'authorizationTokens', - fields: ['platformOAuthClientId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "client", + type: "PlatformOAuthClient", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "authorizationTokens", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } }, platformOAuthClientId: { - name: 'platformOAuthClientId', - type: 'String', - foreignKeyFor: ['client'] as readonly string[], + name: "platformOAuthClientId", + type: "String", + foreignKeyFor: [ + "client" + ] as readonly string[] }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['owner'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "owner" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('platformOAuthClientId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("platformOAuthClientId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - userId_platformOAuthClientId: { userId: { type: 'Int' }, platformOAuthClientId: { type: 'String' } }, - }, + id: { type: "String" }, + userId_platformOAuthClientId: { userId: { type: "Int" }, platformOAuthClientId: { type: "String" } } + } }, AccessToken: { - name: 'AccessToken', + name: "AccessToken", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, secret: { - name: 'secret', - type: 'String', + name: "secret", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime" }, owner: { - name: 'owner', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'AccessToken', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "owner", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "AccessToken", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, client: { - name: 'client', - type: 'PlatformOAuthClient', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('platformOAuthClientId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'accessTokens', - fields: ['platformOAuthClientId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "client", + type: "PlatformOAuthClient", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "accessTokens", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } }, platformOAuthClientId: { - name: 'platformOAuthClientId', - type: 'String', - foreignKeyFor: ['client'] as readonly string[], + name: "platformOAuthClientId", + type: "String", + foreignKeyFor: [ + "client" + ] as readonly string[] }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['owner'] as readonly string[], - }, - }, - idFields: ['id'], + name: "userId", + type: "Int", + foreignKeyFor: [ + "owner" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - secret: { type: 'String' }, - }, + id: { type: "Int" }, + secret: { type: "String" } + } }, RefreshToken: { - name: 'RefreshToken', + name: "RefreshToken", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, secret: { - name: 'secret', - type: 'String', + name: "secret", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime" }, owner: { - name: 'owner', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'RefreshToken', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "owner", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "RefreshToken", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, client: { - name: 'client', - type: 'PlatformOAuthClient', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('platformOAuthClientId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'refreshToken', - fields: ['platformOAuthClientId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "client", + type: "PlatformOAuthClient", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("platformOAuthClientId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "refreshToken", fields: ["platformOAuthClientId"], references: ["id"], onDelete: "Cascade" } }, platformOAuthClientId: { - name: 'platformOAuthClientId', - type: 'String', - foreignKeyFor: ['client'] as readonly string[], + name: "platformOAuthClientId", + type: "String", + foreignKeyFor: [ + "client" + ] as readonly string[] }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['owner'] as readonly string[], - }, - }, - idFields: ['id'], + name: "userId", + type: "Int", + foreignKeyFor: [ + "owner" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - secret: { type: 'String' }, - }, + id: { type: "Int" }, + secret: { type: "String" } + } }, DSyncData: { - name: 'DSyncData', + name: "DSyncData", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, directoryId: { - name: 'directoryId', - type: 'String', + name: "directoryId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, tenant: { - name: 'tenant', - type: 'String', + name: "tenant", + type: "String" }, organizationId: { - name: 'organizationId', - type: 'Int', + name: "organizationId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['org'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "org" + ] as readonly string[] }, org: { - name: 'org', - type: 'OrganizationSettings', + name: "org", + type: "OrganizationSettings", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'dSyncData', - fields: ['organizationId'], - references: ['organizationId'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "dSyncData", fields: ["organizationId"], references: ["organizationId"], onDelete: "Cascade" } }, teamGroupMapping: { - name: 'teamGroupMapping', - type: 'DSyncTeamGroupMapping', + name: "teamGroupMapping", + type: "DSyncTeamGroupMapping", array: true, - relation: { opposite: 'directory' }, + relation: { opposite: "directory" } }, createdAttributeToUsers: { - name: 'createdAttributeToUsers', - type: 'AttributeToUser', + name: "createdAttributeToUsers", + type: "AttributeToUser", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('createdByDSync') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'createdByDSync', name: 'createdByDSync' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdByDSync") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdByDSync", name: "createdByDSync" } }, updatedAttributeToUsers: { - name: 'updatedAttributeToUsers', - type: 'AttributeToUser', + name: "updatedAttributeToUsers", + type: "AttributeToUser", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('updatedByDSync') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'updatedByDSync', name: 'updatedByDSync' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedByDSync") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedByDSync", name: "updatedByDSync" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - directoryId: { type: 'String' }, - organizationId: { type: 'Int' }, - }, + id: { type: "Int" }, + directoryId: { type: "String" }, + organizationId: { type: "Int" } + } }, DSyncTeamGroupMapping: { - name: 'DSyncTeamGroupMapping', + name: "DSyncTeamGroupMapping", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, organizationId: { - name: 'organizationId', - type: 'Int', + name: "organizationId", + type: "Int" }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'dsyncTeamGroupMapping', - fields: ['teamId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "dsyncTeamGroupMapping", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, directoryId: { - name: 'directoryId', - type: 'String', - foreignKeyFor: ['directory'] as readonly string[], + name: "directoryId", + type: "String", + foreignKeyFor: [ + "directory" + ] as readonly string[] }, directory: { - name: 'directory', - type: 'DSyncData', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'teamGroupMapping', - fields: ['directoryId'], - references: ['directoryId'], - onDelete: 'Cascade', - }, + name: "directory", + type: "DSyncData", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "teamGroupMapping", fields: ["directoryId"], references: ["directoryId"], onDelete: "Cascade" } }, groupName: { - name: 'groupName', - type: 'String', - }, + name: "groupName", + type: "String" + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('groupName'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("groupName")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - teamId_groupName: { teamId: { type: 'Int' }, groupName: { type: 'String' } }, - }, + id: { type: "Int" }, + teamId_groupName: { teamId: { type: "Int" }, groupName: { type: "String" } } + } }, SecondaryEmail: { - name: 'SecondaryEmail', + name: "SecondaryEmail", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'secondaryEmails', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "secondaryEmails", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, emailVerified: { - name: 'emailVerified', - type: 'DateTime', - optional: true, + name: "emailVerified", + type: "DateTime", + optional: true }, verificationTokens: { - name: 'verificationTokens', - type: 'VerificationToken', + name: "verificationTokens", + type: "VerificationToken", array: true, - relation: { opposite: 'secondaryEmail' }, + relation: { opposite: "secondaryEmail" } }, eventTypes: { - name: 'eventTypes', - type: 'EventType', + name: "eventTypes", + type: "EventType", array: true, - relation: { opposite: 'secondaryEmail' }, - }, + relation: { opposite: "secondaryEmail" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('email'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("email")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - email: { type: 'String' }, - userId_email: { userId: { type: 'Int' }, email: { type: 'String' } }, - }, + id: { type: "Int" }, + email: { type: "String" }, + userId_email: { userId: { type: "Int" }, email: { type: "String" } } + } }, Task: { - name: 'Task', + name: "Task", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, unique: true, - attributes: [ - { name: '@id' }, - { name: '@unique' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, scheduledAt: { - name: 'scheduledAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "scheduledAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, succeededAt: { - name: 'succeededAt', - type: 'DateTime', - optional: true, + name: "succeededAt", + type: "DateTime", + optional: true }, type: { - name: 'type', - type: 'String', + name: "type", + type: "String" }, payload: { - name: 'payload', - type: 'String', + name: "payload", + type: "String" }, attempts: { - name: 'attempts', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "attempts", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, maxAttempts: { - name: 'maxAttempts', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(3) }] }, - ] as readonly AttributeApplication[], - default: 3 as FieldDefault, + name: "maxAttempts", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(3) }] }] as readonly AttributeApplication[], + default: 3 as FieldDefault }, lastError: { - name: 'lastError', - type: 'String', - optional: true, + name: "lastError", + type: "String", + optional: true }, lastFailedAttemptAt: { - name: 'lastFailedAttemptAt', - type: 'DateTime', - optional: true, + name: "lastFailedAttemptAt", + type: "DateTime", + optional: true }, referenceUid: { - name: 'referenceUid', - type: 'String', - optional: true, - }, + name: "referenceUid", + type: "String", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ManagedOrganization: { - name: 'ManagedOrganization', + name: "ManagedOrganization", fields: { managedOrganizationId: { - name: 'managedOrganizationId', - type: 'Int', + name: "managedOrganizationId", + type: "Int", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['managedOrganization'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "managedOrganization" + ] as readonly string[] }, managedOrganization: { - name: 'managedOrganization', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('ManagedOrganization') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('managedOrganizationId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'managedOrganization', - name: 'ManagedOrganization', - fields: ['managedOrganizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "managedOrganization", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagedOrganization") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managedOrganizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "managedOrganization", name: "ManagedOrganization", fields: ["managedOrganizationId"], references: ["id"], onDelete: "Cascade" } }, managerOrganizationId: { - name: 'managerOrganizationId', - type: 'Int', - foreignKeyFor: ['managerOrganization'] as readonly string[], + name: "managerOrganizationId", + type: "Int", + foreignKeyFor: [ + "managerOrganization" + ] as readonly string[] }, managerOrganization: { - name: 'managerOrganization', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('ManagerOrganization') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('managerOrganizationId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'managedOrganizations', - name: 'ManagerOrganization', - fields: ['managerOrganizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "managerOrganization", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ManagerOrganization") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerOrganizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "managedOrganizations", name: "ManagerOrganization", fields: ["managerOrganizationId"], references: ["id"], onDelete: "Cascade" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('managerOrganizationId'), - ExpressionUtils.field('managedOrganizationId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('managerOrganizationId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerOrganizationId"), ExpressionUtils.field("managedOrganizationId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerOrganizationId")]) }] } ] as readonly AttributeApplication[], - idFields: ['managedOrganizationId'], + idFields: ["managedOrganizationId"], uniqueFields: { - managedOrganizationId: { type: 'Int' }, - managerOrganizationId_managedOrganizationId: { - managerOrganizationId: { type: 'Int' }, - managedOrganizationId: { type: 'Int' }, - }, - }, + managedOrganizationId: { type: "Int" }, + managerOrganizationId_managedOrganizationId: { managerOrganizationId: { type: "Int" }, managedOrganizationId: { type: "Int" } } + } }, PlatformBilling: { - name: 'PlatformBilling', + name: "PlatformBilling", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, unique: true, - attributes: [{ name: '@id' }, { name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['team'] as readonly string[], + attributes: [{ name: "@id" }, { name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, customerId: { - name: 'customerId', - type: 'String', + name: "customerId", + type: "String" }, subscriptionId: { - name: 'subscriptionId', - type: 'String', - optional: true, + name: "subscriptionId", + type: "String", + optional: true }, priceId: { - name: 'priceId', - type: 'String', - optional: true, + name: "priceId", + type: "String", + optional: true }, plan: { - name: 'plan', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('none') }] }, - ] as readonly AttributeApplication[], - default: 'none' as FieldDefault, + name: "plan", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("none") }] }] as readonly AttributeApplication[], + default: "none" as FieldDefault }, billingCycleStart: { - name: 'billingCycleStart', - type: 'Int', - optional: true, + name: "billingCycleStart", + type: "Int", + optional: true }, billingCycleEnd: { - name: 'billingCycleEnd', - type: 'Int', - optional: true, + name: "billingCycleEnd", + type: "Int", + optional: true }, overdue: { - name: 'overdue', - type: 'Boolean', + name: "overdue", + type: "Boolean", optional: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, managerBillingId: { - name: 'managerBillingId', - type: 'Int', + name: "managerBillingId", + type: "Int", optional: true, - foreignKeyFor: ['managerBilling'] as readonly string[], + foreignKeyFor: [ + "managerBilling" + ] as readonly string[] }, managerBilling: { - name: 'managerBilling', - type: 'PlatformBilling', + name: "managerBilling", + type: "PlatformBilling", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('PlatformManagedBilling') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('managerBillingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'managedBillings', - name: 'PlatformManagedBilling', - fields: ['managerBillingId'], - references: ['id'], - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("PlatformManagedBilling") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("managerBillingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "managedBillings", name: "PlatformManagedBilling", fields: ["managerBillingId"], references: ["id"] } }, managedBillings: { - name: 'managedBillings', - type: 'PlatformBilling', + name: "managedBillings", + type: "PlatformBilling", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('PlatformManagedBilling') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'managerBilling', name: 'PlatformManagedBilling' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("PlatformManagedBilling") }] }] as readonly AttributeApplication[], + relation: { opposite: "managerBilling", name: "PlatformManagedBilling" } }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]) }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'platformBilling', fields: ['id'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "platformBilling", fields: ["id"], references: ["id"], onDelete: "Cascade" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, AttributeOption: { - name: 'AttributeOption', + name: "AttributeOption", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, attribute: { - name: 'attribute', - type: 'Attribute', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'options', fields: ['attributeId'], references: ['id'], onDelete: 'Cascade' }, + name: "attribute", + type: "Attribute", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "options", fields: ["attributeId"], references: ["id"], onDelete: "Cascade" } }, attributeId: { - name: 'attributeId', - type: 'String', - foreignKeyFor: ['attribute'] as readonly string[], + name: "attributeId", + type: "String", + foreignKeyFor: [ + "attribute" + ] as readonly string[] }, value: { - name: 'value', - type: 'String', + name: "value", + type: "String" }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String" }, isGroup: { - name: 'isGroup', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isGroup", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, contains: { - name: 'contains', - type: 'String', - array: true, + name: "contains", + type: "String", + array: true }, assignedUsers: { - name: 'assignedUsers', - type: 'AttributeToUser', + name: "assignedUsers", + type: "AttributeToUser", array: true, - relation: { opposite: 'attributeOption' }, - }, + relation: { opposite: "attributeOption" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Attribute: { - name: 'Attribute', + name: "Attribute", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'attributes', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attributes", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] }, type: { - name: 'type', - type: 'AttributeType', + name: "type", + type: "AttributeType" }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, usersCanEditRelation: { - name: 'usersCanEditRelation', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "usersCanEditRelation", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, options: { - name: 'options', - type: 'AttributeOption', + name: "options", + type: "AttributeOption", array: true, - relation: { opposite: 'attribute' }, + relation: { opposite: "attribute" } }, isWeightsEnabled: { - name: 'isWeightsEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isWeightsEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isLocked: { - name: 'isLocked', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "isLocked", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - slug: { type: 'String' }, - }, + id: { type: "String" }, + slug: { type: "String" } + } }, AttributeToUser: { - name: 'AttributeToUser', + name: "AttributeToUser", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, member: { - name: 'member', - type: 'Membership', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('memberId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'AttributeToUser', - fields: ['memberId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "member", + type: "Membership", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("memberId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "AttributeToUser", fields: ["memberId"], references: ["id"], onDelete: "Cascade" } }, memberId: { - name: 'memberId', - type: 'Int', - foreignKeyFor: ['member'] as readonly string[], + name: "memberId", + type: "Int", + foreignKeyFor: [ + "member" + ] as readonly string[] }, attributeOption: { - name: 'attributeOption', - type: 'AttributeOption', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('attributeOptionId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'assignedUsers', - fields: ['attributeOptionId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "attributeOption", + type: "AttributeOption", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeOptionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "assignedUsers", fields: ["attributeOptionId"], references: ["id"], onDelete: "Cascade" } }, attributeOptionId: { - name: 'attributeOptionId', - type: 'String', - foreignKeyFor: ['attributeOption'] as readonly string[], + name: "attributeOptionId", + type: "String", + foreignKeyFor: [ + "attributeOption" + ] as readonly string[] }, weight: { - name: 'weight', - type: 'Int', - optional: true, + name: "weight", + type: "Int", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, createdById: { - name: 'createdById', - type: 'Int', + name: "createdById", + type: "Int", optional: true, - foreignKeyFor: ['createdBy'] as readonly string[], + foreignKeyFor: [ + "createdBy" + ] as readonly string[] }, createdBy: { - name: 'createdBy', - type: 'User', + name: "createdBy", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('createdBy') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'createdAttributeToUsers', - name: 'createdBy', - fields: ['createdById'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdBy") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdAttributeToUsers", name: "createdBy", fields: ["createdById"], references: ["id"], onDelete: "SetNull" } }, createdByDSyncId: { - name: 'createdByDSyncId', - type: 'String', + name: "createdByDSyncId", + type: "String", optional: true, - foreignKeyFor: ['createdByDSync'] as readonly string[], + foreignKeyFor: [ + "createdByDSync" + ] as readonly string[] }, createdByDSync: { - name: 'createdByDSync', - type: 'DSyncData', + name: "createdByDSync", + type: "DSyncData", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('createdByDSync') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('createdByDSyncId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'createdAttributeToUsers', - name: 'createdByDSync', - fields: ['createdByDSyncId'], - references: ['directoryId'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("createdByDSync") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("createdByDSyncId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdAttributeToUsers", name: "createdByDSync", fields: ["createdByDSyncId"], references: ["directoryId"], onDelete: "SetNull" } }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", optional: true, updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, updatedBy: { - name: 'updatedBy', - type: 'User', + name: "updatedBy", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('updatedBy') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'updatedAttributeToUsers', - name: 'updatedBy', - fields: ['updatedById'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedBy") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedAttributeToUsers", name: "updatedBy", fields: ["updatedById"], references: ["id"], onDelete: "SetNull" } }, updatedById: { - name: 'updatedById', - type: 'Int', + name: "updatedById", + type: "Int", optional: true, - foreignKeyFor: ['updatedBy'] as readonly string[], + foreignKeyFor: [ + "updatedBy" + ] as readonly string[] }, updatedByDSyncId: { - name: 'updatedByDSyncId', - type: 'String', + name: "updatedByDSyncId", + type: "String", optional: true, - foreignKeyFor: ['updatedByDSync'] as readonly string[], + foreignKeyFor: [ + "updatedByDSync" + ] as readonly string[] }, updatedByDSync: { - name: 'updatedByDSync', - type: 'DSyncData', + name: "updatedByDSync", + type: "DSyncData", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('updatedByDSync') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('updatedByDSyncId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('directoryId')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'updatedAttributeToUsers', - name: 'updatedByDSync', - fields: ['updatedByDSyncId'], - references: ['directoryId'], - onDelete: 'SetNull', - }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("updatedByDSync") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("updatedByDSyncId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("directoryId")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedAttributeToUsers", name: "updatedByDSync", fields: ["updatedByDSyncId"], references: ["directoryId"], onDelete: "SetNull" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('memberId'), - ExpressionUtils.field('attributeOptionId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("memberId"), ExpressionUtils.field("attributeOptionId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - memberId_attributeOptionId: { memberId: { type: 'Int' }, attributeOptionId: { type: 'String' } }, - }, + id: { type: "String" }, + memberId_attributeOptionId: { memberId: { type: "Int" }, attributeOptionId: { type: "String" } } + } }, AssignmentReason: { - name: 'AssignmentReason', + name: "AssignmentReason", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, unique: true, - attributes: [ - { name: '@id' }, - { name: '@unique' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, bookingId: { - name: 'bookingId', - type: 'Int', - foreignKeyFor: ['booking'] as readonly string[], + name: "bookingId", + type: "Int", + foreignKeyFor: [ + "booking" + ] as readonly string[] }, booking: { - name: 'booking', - type: 'Booking', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'assignmentReason', - fields: ['bookingId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "booking", + type: "Booking", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "assignmentReason", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, reasonEnum: { - name: 'reasonEnum', - type: 'AssignmentReasonEnum', + name: "reasonEnum", + type: "AssignmentReasonEnum" }, reasonString: { - name: 'reasonString', - type: 'String', - }, + name: "reasonString", + type: "String" + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, DelegationCredential: { - name: 'DelegationCredential', + name: "DelegationCredential", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, workspacePlatform: { - name: 'workspacePlatform', - type: 'WorkspacePlatform', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('workspacePlatformId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'delegationCredentials', - fields: ['workspacePlatformId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "workspacePlatform", + type: "WorkspacePlatform", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workspacePlatformId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "delegationCredentials", fields: ["workspacePlatformId"], references: ["id"], onDelete: "Cascade" } }, workspacePlatformId: { - name: 'workspacePlatformId', - type: 'Int', - foreignKeyFor: ['workspacePlatform'] as readonly string[], + name: "workspacePlatformId", + type: "Int", + foreignKeyFor: [ + "workspacePlatform" + ] as readonly string[] }, serviceAccountKey: { - name: 'serviceAccountKey', - type: 'Json', + name: "serviceAccountKey", + type: "Json" }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, lastEnabledAt: { - name: 'lastEnabledAt', - type: 'DateTime', - optional: true, + name: "lastEnabledAt", + type: "DateTime", + optional: true }, lastDisabledAt: { - name: 'lastDisabledAt', - type: 'DateTime', - optional: true, + name: "lastDisabledAt", + type: "DateTime", + optional: true }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'delegationCredentials', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "delegationCredentials", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, domain: { - name: 'domain', - type: 'String', + name: "domain", + type: "String" }, selectedCalendars: { - name: 'selectedCalendars', - type: 'SelectedCalendar', + name: "selectedCalendars", + type: "SelectedCalendar", array: true, - relation: { opposite: 'delegationCredential' }, + relation: { opposite: "delegationCredential" } }, destinationCalendar: { - name: 'destinationCalendar', - type: 'DestinationCalendar', + name: "destinationCalendar", + type: "DestinationCalendar", array: true, - relation: { opposite: 'delegationCredential' }, + relation: { opposite: "delegationCredential" } }, bookingReferences: { - name: 'bookingReferences', - type: 'BookingReference', + name: "bookingReferences", + type: "BookingReference", array: true, - relation: { opposite: 'delegationCredential' }, + relation: { opposite: "delegationCredential" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, credentials: { - name: 'credentials', - type: 'Credential', + name: "credentials", + type: "Credential", array: true, - relation: { opposite: 'delegationCredential' }, - }, + relation: { opposite: "delegationCredential" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('domain'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Boolean', [ExpressionUtils.field('enabled')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("domain")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Boolean", [ExpressionUtils.field("enabled")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - organizationId_domain: { organizationId: { type: 'Int' }, domain: { type: 'String' } }, - }, + id: { type: "String" }, + organizationId_domain: { organizationId: { type: "Int" }, domain: { type: "String" } } + } }, DomainWideDelegation: { - name: 'DomainWideDelegation', + name: "DomainWideDelegation", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, workspacePlatform: { - name: 'workspacePlatform', - type: 'WorkspacePlatform', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('workspacePlatformId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'domainWideDelegations', - fields: ['workspacePlatformId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "workspacePlatform", + type: "WorkspacePlatform", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("workspacePlatformId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "domainWideDelegations", fields: ["workspacePlatformId"], references: ["id"], onDelete: "Cascade" } }, workspacePlatformId: { - name: 'workspacePlatformId', - type: 'Int', - foreignKeyFor: ['workspacePlatform'] as readonly string[], + name: "workspacePlatformId", + type: "Int", + foreignKeyFor: [ + "workspacePlatform" + ] as readonly string[] }, serviceAccountKey: { - name: 'serviceAccountKey', - type: 'Json', + name: "serviceAccountKey", + type: "Json" }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'domainWideDelegations', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "domainWideDelegations", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, domain: { - name: 'domain', - type: 'String', + name: "domain", + type: "String" }, selectedCalendars: { - name: 'selectedCalendars', - type: 'SelectedCalendar', + name: "selectedCalendars", + type: "SelectedCalendar", array: true, - relation: { opposite: 'domainWideDelegationCredential' }, + relation: { opposite: "domainWideDelegationCredential" } }, destinationCalendar: { - name: 'destinationCalendar', - type: 'DestinationCalendar', + name: "destinationCalendar", + type: "DestinationCalendar", array: true, - relation: { opposite: 'domainWideDelegation' }, + relation: { opposite: "domainWideDelegation" } }, bookingReferences: { - name: 'bookingReferences', - type: 'BookingReference', + name: "bookingReferences", + type: "BookingReference", array: true, - relation: { opposite: 'domainWideDelegation' }, + relation: { opposite: "domainWideDelegation" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('domain'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("domain")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - organizationId_domain: { organizationId: { type: 'Int' }, domain: { type: 'String' } }, - }, + id: { type: "String" }, + organizationId_domain: { organizationId: { type: "Int" }, domain: { type: "String" } } + } }, WorkspacePlatform: { - name: 'WorkspacePlatform', + name: "WorkspacePlatform", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String" }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, description: { - name: 'description', - type: 'String', + name: "description", + type: "String" }, defaultServiceAccountKey: { - name: 'defaultServiceAccountKey', - type: 'Json', + name: "defaultServiceAccountKey", + type: "Json" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, delegationCredentials: { - name: 'delegationCredentials', - type: 'DelegationCredential', + name: "delegationCredentials", + type: "DelegationCredential", array: true, - relation: { opposite: 'workspacePlatform' }, + relation: { opposite: "workspacePlatform" } }, domainWideDelegations: { - name: 'domainWideDelegations', - type: 'DomainWideDelegation', + name: "domainWideDelegations", + type: "DomainWideDelegation", array: true, - relation: { opposite: 'workspacePlatform' }, - }, + relation: { opposite: "workspacePlatform" } + } }, attributes: [ - { - name: '@@unique', - args: [{ name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('slug')]) }], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("slug")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - slug: { type: 'String' }, - }, + id: { type: "Int" }, + slug: { type: "String" } + } }, EventTypeTranslation: { - name: 'EventTypeTranslation', + name: "EventTypeTranslation", fields: { uid: { - name: 'uid', - type: 'String', + name: "uid", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, eventType: { - name: 'eventType', - type: 'EventType', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('eventTypeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'fieldTranslations', - fields: ['eventTypeId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "eventType", + type: "EventType", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "fieldTranslations", fields: ["eventTypeId"], references: ["id"], onDelete: "Cascade" } }, eventTypeId: { - name: 'eventTypeId', - type: 'Int', - foreignKeyFor: ['eventType'] as readonly string[], + name: "eventTypeId", + type: "Int", + foreignKeyFor: [ + "eventType" + ] as readonly string[] }, field: { - name: 'field', - type: 'EventTypeAutoTranslatedField', + name: "field", + type: "EventTypeAutoTranslatedField" }, sourceLocale: { - name: 'sourceLocale', - type: 'String', + name: "sourceLocale", + type: "String" }, targetLocale: { - name: 'targetLocale', - type: 'String', + name: "targetLocale", + type: "String" }, translatedText: { - name: 'translatedText', - type: 'String', - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + name: "translatedText", + type: "String", + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, createdBy: { - name: 'createdBy', - type: 'Int', - foreignKeyFor: ['creator'] as readonly string[], + name: "createdBy", + type: "Int", + foreignKeyFor: [ + "creator" + ] as readonly string[] }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, updatedBy: { - name: 'updatedBy', - type: 'Int', + name: "updatedBy", + type: "Int", optional: true, - foreignKeyFor: ['updater'] as readonly string[], + foreignKeyFor: [ + "updater" + ] as readonly string[] }, creator: { - name: 'creator', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CreatedEventTypeTranslations') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdBy')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'createdTranslations', - name: 'CreatedEventTypeTranslations', - fields: ['createdBy'], - references: ['id'], - }, + name: "creator", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedEventTypeTranslations") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdBy")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "createdTranslations", name: "CreatedEventTypeTranslations", fields: ["createdBy"], references: ["id"] } }, updater: { - name: 'updater', - type: 'User', + name: "updater", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('UpdatedEventTypeTranslations') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedBy')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'updatedTranslations', - name: 'UpdatedEventTypeTranslations', - fields: ['updatedBy'], - references: ['id'], - onDelete: 'SetNull', - }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedEventTypeTranslations") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedBy")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedTranslations", name: "UpdatedEventTypeTranslations", fields: ["updatedBy"], references: ["id"], onDelete: "SetNull" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('eventTypeId'), - ExpressionUtils.field('field'), - ExpressionUtils.field('targetLocale'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('eventTypeId'), - ExpressionUtils.field('field'), - ExpressionUtils.field('targetLocale'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId"), ExpressionUtils.field("field"), ExpressionUtils.field("targetLocale")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("eventTypeId"), ExpressionUtils.field("field"), ExpressionUtils.field("targetLocale")]) }] } ] as readonly AttributeApplication[], - idFields: ['uid'], + idFields: ["uid"], uniqueFields: { - uid: { type: 'String' }, - eventTypeId_field_targetLocale: { - eventTypeId: { type: 'Int' }, - field: { type: 'EventTypeAutoTranslatedField' }, - targetLocale: { type: 'String' }, - }, - }, + uid: { type: "String" }, + eventTypeId_field_targetLocale: { eventTypeId: { type: "Int" }, field: { type: "EventTypeAutoTranslatedField" }, targetLocale: { type: "String" } } + } }, Watchlist: { - name: 'Watchlist', + name: "Watchlist", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, unique: true, - attributes: [ - { name: '@id' }, - { name: '@unique' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, type: { - name: 'type', - type: 'WatchlistType', + name: "type", + type: "WatchlistType" }, value: { - name: 'value', - type: 'String', + name: "value", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, createdBy: { - name: 'createdBy', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CreatedWatchlists') }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'createdWatchlists', - name: 'CreatedWatchlists', - onDelete: 'Cascade', - fields: ['createdById'], - references: ['id'], - }, + name: "createdBy", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedWatchlists") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "createdWatchlists", name: "CreatedWatchlists", onDelete: "Cascade", fields: ["createdById"], references: ["id"] } }, createdById: { - name: 'createdById', - type: 'Int', - foreignKeyFor: ['createdBy'] as readonly string[], + name: "createdById", + type: "Int", + foreignKeyFor: [ + "createdBy" + ] as readonly string[] }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, updatedBy: { - name: 'updatedBy', - type: 'User', + name: "updatedBy", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('UpdatedWatchlists') }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('updatedById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'updatedWatchlists', - name: 'UpdatedWatchlists', - onDelete: 'SetNull', - fields: ['updatedById'], - references: ['id'], - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("UpdatedWatchlists") }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("updatedById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "updatedWatchlists", name: "UpdatedWatchlists", onDelete: "SetNull", fields: ["updatedById"], references: ["id"] } }, updatedById: { - name: 'updatedById', - type: 'Int', + name: "updatedById", + type: "Int", optional: true, - foreignKeyFor: ['updatedBy'] as readonly string[], + foreignKeyFor: [ + "updatedBy" + ] as readonly string[] }, severity: { - name: 'severity', - type: 'WatchlistSeverity', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('LOW') }] }, - ] as readonly AttributeApplication[], - default: 'LOW' as FieldDefault, - }, + name: "severity", + type: "WatchlistSeverity", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("LOW") }] }] as readonly AttributeApplication[], + default: "LOW" as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('WatchlistType', [ - ExpressionUtils.field('type'), - ExpressionUtils.field('value'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('WatchlistType', [ - ExpressionUtils.field('type'), - ExpressionUtils.field('value'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("WatchlistType", [ExpressionUtils.field("type"), ExpressionUtils.field("value")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("WatchlistType", [ExpressionUtils.field("type"), ExpressionUtils.field("value")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - type_value: { type: { type: 'WatchlistType' }, value: { type: 'String' } }, - }, + id: { type: "String" }, + type_value: { type: { type: "WatchlistType" }, value: { type: "String" } } + } }, OrganizationOnboarding: { - name: 'OrganizationOnboarding', + name: "OrganizationOnboarding", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, createdBy: { - name: 'createdBy', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CreatedOrganizationOnboardings') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'createdOrganizationOnboardings', - name: 'CreatedOrganizationOnboardings', - fields: ['createdById'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "createdBy", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CreatedOrganizationOnboardings") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "createdOrganizationOnboardings", name: "CreatedOrganizationOnboardings", fields: ["createdById"], references: ["id"], onDelete: "Cascade" } }, createdById: { - name: 'createdById', - type: 'Int', - foreignKeyFor: ['createdBy'] as readonly string[], + name: "createdById", + type: "Int", + foreignKeyFor: [ + "createdBy" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, orgOwnerEmail: { - name: 'orgOwnerEmail', - type: 'String', + name: "orgOwnerEmail", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, error: { - name: 'error', - type: 'String', - optional: true, + name: "error", + type: "String", + optional: true }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, organizationId: { - name: 'organizationId', - type: 'Int', + name: "organizationId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['organization'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Team', + name: "organization", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'organizationOnboarding', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "organizationOnboarding", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, billingPeriod: { - name: 'billingPeriod', - type: 'BillingPeriod', + name: "billingPeriod", + type: "BillingPeriod" }, pricePerSeat: { - name: 'pricePerSeat', - type: 'Float', + name: "pricePerSeat", + type: "Float" }, seats: { - name: 'seats', - type: 'Int', + name: "seats", + type: "Int" }, isPlatform: { - name: 'isPlatform', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isPlatform", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String" }, logo: { - name: 'logo', - type: 'String', - optional: true, + name: "logo", + type: "String", + optional: true }, bio: { - name: 'bio', - type: 'String', - optional: true, + name: "bio", + type: "String", + optional: true }, isDomainConfigured: { - name: 'isDomainConfigured', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isDomainConfigured", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, stripeCustomerId: { - name: 'stripeCustomerId', - type: 'String', + name: "stripeCustomerId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, stripeSubscriptionId: { - name: 'stripeSubscriptionId', - type: 'String', - optional: true, + name: "stripeSubscriptionId", + type: "String", + optional: true }, stripeSubscriptionItemId: { - name: 'stripeSubscriptionItemId', - type: 'String', - optional: true, + name: "stripeSubscriptionItemId", + type: "String", + optional: true }, invitedMembers: { - name: 'invitedMembers', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, - ] as readonly AttributeApplication[], - default: '[]' as FieldDefault, + name: "invitedMembers", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], + default: "[]" as FieldDefault }, teams: { - name: 'teams', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, - ] as readonly AttributeApplication[], - default: '[]' as FieldDefault, + name: "teams", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], + default: "[]" as FieldDefault }, isComplete: { - name: 'isComplete', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "isComplete", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('orgOwnerEmail')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('stripeCustomerId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("orgOwnerEmail")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("stripeCustomerId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - orgOwnerEmail: { type: 'String' }, - organizationId: { type: 'Int' }, - stripeCustomerId: { type: 'String' }, - }, + id: { type: "String" }, + orgOwnerEmail: { type: "String" }, + organizationId: { type: "Int" }, + stripeCustomerId: { type: "String" } + } }, App_RoutingForms_IncompleteBookingActions: { - name: 'App_RoutingForms_IncompleteBookingActions', + name: "App_RoutingForms_IncompleteBookingActions", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, form: { - name: 'form', - type: 'App_RoutingForms_Form', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('formId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'incompleteBookingActions', - fields: ['formId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "form", + type: "App_RoutingForms_Form", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("formId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "incompleteBookingActions", fields: ["formId"], references: ["id"], onDelete: "Cascade" } }, formId: { - name: 'formId', - type: 'String', - foreignKeyFor: ['form'] as readonly string[], + name: "formId", + type: "String", + foreignKeyFor: [ + "form" + ] as readonly string[] }, actionType: { - name: 'actionType', - type: 'IncompleteBookingActionType', + name: "actionType", + type: "IncompleteBookingActionType" }, data: { - name: 'data', - type: 'Json', + name: "data", + type: "Json" }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, credentialId: { - name: 'credentialId', - type: 'Int', - optional: true, - }, + name: "credentialId", + type: "Int", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, InternalNotePreset: { - name: 'InternalNotePreset', + name: "InternalNotePreset", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, cancellationReason: { - name: 'cancellationReason', - type: 'String', - optional: true, + name: "cancellationReason", + type: "String", + optional: true }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'internalNotePresets', fields: ['teamId'], references: ['id'] }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "internalNotePresets", fields: ["teamId"], references: ["id"] } }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, BookingInternalNote: { - name: 'BookingInternalNote', - type: 'BookingInternalNote', + name: "BookingInternalNote", + type: "BookingInternalNote", array: true, - relation: { opposite: 'notePreset' }, - }, + relation: { opposite: "notePreset" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("name")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - teamId_name: { teamId: { type: 'Int' }, name: { type: 'String' } }, - }, + id: { type: "Int" }, + teamId_name: { teamId: { type: "Int" }, name: { type: "String" } } + } }, FilterSegment: { - name: 'FilterSegment', + name: "FilterSegment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, tableIdentifier: { - name: 'tableIdentifier', - type: 'String', + name: "tableIdentifier", + type: "String" }, scope: { - name: 'scope', - type: 'FilterSegmentScope', + name: "scope", + type: "FilterSegmentScope" }, activeFilters: { - name: 'activeFilters', - type: 'Json', - optional: true, + name: "activeFilters", + type: "Json", + optional: true }, sorting: { - name: 'sorting', - type: 'Json', - optional: true, + name: "sorting", + type: "Json", + optional: true }, columnVisibility: { - name: 'columnVisibility', - type: 'Json', - optional: true, + name: "columnVisibility", + type: "Json", + optional: true }, columnSizing: { - name: 'columnSizing', - type: 'Json', - optional: true, + name: "columnSizing", + type: "Json", + optional: true }, perPage: { - name: 'perPage', - type: 'Int', + name: "perPage", + type: "Int" }, searchTerm: { - name: 'searchTerm', - type: 'String', + name: "searchTerm", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'filterSegments', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "filterSegments", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'filterSegments', - fields: ['teamId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "filterSegments", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, userPreferences: { - name: 'userPreferences', - type: 'UserFilterSegmentPreference', + name: "userPreferences", + type: "UserFilterSegmentPreference", array: true, - relation: { opposite: 'segment' }, - }, + relation: { opposite: "segment" } + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('FilterSegmentScope', [ - ExpressionUtils.field('scope'), - ExpressionUtils.field('userId'), - ExpressionUtils.field('tableIdentifier'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('FilterSegmentScope', [ - ExpressionUtils.field('scope'), - ExpressionUtils.field('teamId'), - ExpressionUtils.field('tableIdentifier'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("FilterSegmentScope", [ExpressionUtils.field("scope"), ExpressionUtils.field("userId"), ExpressionUtils.field("tableIdentifier")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("FilterSegmentScope", [ExpressionUtils.field("scope"), ExpressionUtils.field("teamId"), ExpressionUtils.field("tableIdentifier")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, UserFilterSegmentPreference: { - name: 'UserFilterSegmentPreference', + name: "UserFilterSegmentPreference", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, tableIdentifier: { - name: 'tableIdentifier', - type: 'String', + name: "tableIdentifier", + type: "String" }, segmentId: { - name: 'segmentId', - type: 'Int', - foreignKeyFor: ['segment'] as readonly string[], + name: "segmentId", + type: "Int", + foreignKeyFor: [ + "segment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'filterSegmentPreferences', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "filterSegmentPreferences", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, segment: { - name: 'segment', - type: 'FilterSegment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('segmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'userPreferences', - fields: ['segmentId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "segment", + type: "FilterSegment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("segmentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "userPreferences", fields: ["segmentId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('tableIdentifier'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]) }], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('segmentId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId"), ExpressionUtils.field("tableIdentifier")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("segmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId_tableIdentifier: { userId: { type: 'Int' }, tableIdentifier: { type: 'String' } }, - }, + id: { type: "Int" }, + userId_tableIdentifier: { userId: { type: "Int" }, tableIdentifier: { type: "String" } } + } }, BookingInternalNote: { - name: 'BookingInternalNote', + name: "BookingInternalNote", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, notePreset: { - name: 'notePreset', - type: 'InternalNotePreset', + name: "notePreset", + type: "InternalNotePreset", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('notePresetId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'BookingInternalNote', - fields: ['notePresetId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("notePresetId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "BookingInternalNote", fields: ["notePresetId"], references: ["id"], onDelete: "Cascade" } }, notePresetId: { - name: 'notePresetId', - type: 'Int', + name: "notePresetId", + type: "Int", optional: true, - foreignKeyFor: ['notePreset'] as readonly string[], + foreignKeyFor: [ + "notePreset" + ] as readonly string[] }, text: { - name: 'text', - type: 'String', - optional: true, + name: "text", + type: "String", + optional: true }, booking: { - name: 'booking', - type: 'Booking', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'internalNote', - fields: ['bookingId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "booking", + type: "Booking", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "internalNote", fields: ["bookingId"], references: ["id"], onDelete: "Cascade" } }, bookingId: { - name: 'bookingId', - type: 'Int', - foreignKeyFor: ['booking'] as readonly string[], + name: "bookingId", + type: "Int", + foreignKeyFor: [ + "booking" + ] as readonly string[] }, createdBy: { - name: 'createdBy', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('createdById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'BookingInternalNote', fields: ['createdById'], references: ['id'] }, + name: "createdBy", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("createdById")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "BookingInternalNote", fields: ["createdById"], references: ["id"] } }, createdById: { - name: 'createdById', - type: 'Int', - foreignKeyFor: ['createdBy'] as readonly string[], + name: "createdById", + type: "Int", + foreignKeyFor: [ + "createdBy" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('bookingId'), - ExpressionUtils.field('notePresetId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('bookingId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId"), ExpressionUtils.field("notePresetId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("bookingId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - bookingId_notePresetId: { bookingId: { type: 'Int' }, notePresetId: { type: 'Int' } }, - }, + id: { type: "Int" }, + bookingId_notePresetId: { bookingId: { type: "Int" }, notePresetId: { type: "Int" } } + } }, WorkflowOptOutContact: { - name: 'WorkflowOptOutContact', + name: "WorkflowOptOutContact", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, type: { - name: 'type', - type: 'WorkflowContactType', + name: "type", + type: "WorkflowContactType" }, value: { - name: 'value', - type: 'String', + name: "value", + type: "String" }, optedOut: { - name: 'optedOut', - type: 'Boolean', + name: "optedOut", + type: "Boolean" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('WorkflowContactType', [ - ExpressionUtils.field('type'), - ExpressionUtils.field('value'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("WorkflowContactType", [ExpressionUtils.field("type"), ExpressionUtils.field("value")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - type_value: { type: { type: 'WorkflowContactType' }, value: { type: 'String' } }, - }, + id: { type: "Int" }, + type_value: { type: { type: "WorkflowContactType" }, value: { type: "String" } } + } }, Role: { - name: 'Role', + name: "Role", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, teamId: { - name: 'teamId', - type: 'Int', + name: "teamId", + type: "Int", optional: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', + name: "team", + type: "Team", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'roles', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "roles", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, permissions: { - name: 'permissions', - type: 'RolePermission', + name: "permissions", + type: "RolePermission", array: true, - relation: { opposite: 'role' }, + relation: { opposite: "role" } }, memberships: { - name: 'memberships', - type: 'Membership', + name: "memberships", + type: "Membership", array: true, - relation: { opposite: 'customRole' }, + relation: { opposite: "customRole" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'RoleType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CUSTOM') }] }, - ] as readonly AttributeApplication[], - default: 'CUSTOM' as FieldDefault, - }, + name: "type", + type: "RoleType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CUSTOM") }] }] as readonly AttributeApplication[], + default: "CUSTOM" as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('name'), - ExpressionUtils.field('teamId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]) }], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("name"), ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - name_teamId: { name: { type: 'String' }, teamId: { type: 'Int' } }, - }, + id: { type: "String" }, + name_teamId: { name: { type: "String" }, teamId: { type: "Int" } } + } }, RolePermission: { - name: 'RolePermission', + name: "RolePermission", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, roleId: { - name: 'roleId', - type: 'String', - foreignKeyFor: ['role'] as readonly string[], + name: "roleId", + type: "String", + foreignKeyFor: [ + "role" + ] as readonly string[] }, role: { - name: 'role', - type: 'Role', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('roleId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'permissions', fields: ['roleId'], references: ['id'], onDelete: 'Cascade' }, + name: "role", + type: "Role", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("roleId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "permissions", fields: ["roleId"], references: ["id"], onDelete: "Cascade" } }, resource: { - name: 'resource', - type: 'String', + name: "resource", + type: "String" }, action: { - name: 'action', - type: 'String', + name: "action", + type: "String" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('roleId'), - ExpressionUtils.field('resource'), - ExpressionUtils.field('action'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('roleId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('action')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("roleId"), ExpressionUtils.field("resource"), ExpressionUtils.field("action")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("roleId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("action")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - roleId_resource_action: { - roleId: { type: 'String' }, - resource: { type: 'String' }, - action: { type: 'String' }, - }, - }, - }, + id: { type: "String" }, + roleId_resource_action: { roleId: { type: "String" }, resource: { type: "String" }, action: { type: "String" } } + } + } } as const; enums = { SchedulingType: { - name: 'SchedulingType', + name: "SchedulingType", values: { - ROUND_ROBIN: 'ROUND_ROBIN', - COLLECTIVE: 'COLLECTIVE', - MANAGED: 'MANAGED', + ROUND_ROBIN: "ROUND_ROBIN", + COLLECTIVE: "COLLECTIVE", + MANAGED: "MANAGED" }, fields: { ROUND_ROBIN: { - name: 'ROUND_ROBIN', + name: "ROUND_ROBIN", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('roundRobin') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("roundRobin") }] } + ] as readonly AttributeApplication[] }, COLLECTIVE: { - name: 'COLLECTIVE', + name: "COLLECTIVE", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('collective') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("collective") }] } + ] as readonly AttributeApplication[] }, MANAGED: { - name: 'MANAGED', + name: "MANAGED", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('managed') }] }, - ] as readonly AttributeApplication[], - }, - }, + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("managed") }] } + ] as readonly AttributeApplication[] + } + } }, PeriodType: { - name: 'PeriodType', + name: "PeriodType", values: { - UNLIMITED: 'UNLIMITED', - ROLLING: 'ROLLING', - ROLLING_WINDOW: 'ROLLING_WINDOW', - RANGE: 'RANGE', + UNLIMITED: "UNLIMITED", + ROLLING: "ROLLING", + ROLLING_WINDOW: "ROLLING_WINDOW", + RANGE: "RANGE" }, fields: { UNLIMITED: { - name: 'UNLIMITED', + name: "UNLIMITED", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('unlimited') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("unlimited") }] } + ] as readonly AttributeApplication[] }, ROLLING: { - name: 'ROLLING', + name: "ROLLING", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('rolling') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("rolling") }] } + ] as readonly AttributeApplication[] }, ROLLING_WINDOW: { - name: 'ROLLING_WINDOW', + name: "ROLLING_WINDOW", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('rolling_window') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("rolling_window") }] } + ] as readonly AttributeApplication[] }, RANGE: { - name: 'RANGE', + name: "RANGE", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('range') }] }, - ] as readonly AttributeApplication[], - }, - }, + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("range") }] } + ] as readonly AttributeApplication[] + } + } }, CreationSource: { - name: 'CreationSource', + name: "CreationSource", values: { - API_V1: 'API_V1', - API_V2: 'API_V2', - WEBAPP: 'WEBAPP', + API_V1: "API_V1", + API_V2: "API_V2", + WEBAPP: "WEBAPP" }, fields: { API_V1: { - name: 'API_V1', + name: "API_V1", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('api_v1') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("api_v1") }] } + ] as readonly AttributeApplication[] }, API_V2: { - name: 'API_V2', + name: "API_V2", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('api_v2') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("api_v2") }] } + ] as readonly AttributeApplication[] }, WEBAPP: { - name: 'WEBAPP', + name: "WEBAPP", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('webapp') }] }, - ] as readonly AttributeApplication[], - }, - }, + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("webapp") }] } + ] as readonly AttributeApplication[] + } + } }, IdentityProvider: { - name: 'IdentityProvider', + name: "IdentityProvider", values: { - CAL: 'CAL', - GOOGLE: 'GOOGLE', - SAML: 'SAML', - }, + CAL: "CAL", + GOOGLE: "GOOGLE", + SAML: "SAML" + } }, UserPermissionRole: { - name: 'UserPermissionRole', + name: "UserPermissionRole", values: { - USER: 'USER', - ADMIN: 'ADMIN', - }, + USER: "USER", + ADMIN: "ADMIN" + } }, CreditType: { - name: 'CreditType', + name: "CreditType", values: { - MONTHLY: 'MONTHLY', - ADDITIONAL: 'ADDITIONAL', - }, + MONTHLY: "MONTHLY", + ADDITIONAL: "ADDITIONAL" + } }, MembershipRole: { - name: 'MembershipRole', + name: "MembershipRole", values: { - MEMBER: 'MEMBER', - ADMIN: 'ADMIN', - OWNER: 'OWNER', - }, + MEMBER: "MEMBER", + ADMIN: "ADMIN", + OWNER: "OWNER" + } }, BookingStatus: { - name: 'BookingStatus', + name: "BookingStatus", values: { - CANCELLED: 'CANCELLED', - ACCEPTED: 'ACCEPTED', - REJECTED: 'REJECTED', - PENDING: 'PENDING', - AWAITING_HOST: 'AWAITING_HOST', + CANCELLED: "CANCELLED", + ACCEPTED: "ACCEPTED", + REJECTED: "REJECTED", + PENDING: "PENDING", + AWAITING_HOST: "AWAITING_HOST" }, fields: { CANCELLED: { - name: 'CANCELLED', + name: "CANCELLED", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('cancelled') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("cancelled") }] } + ] as readonly AttributeApplication[] }, ACCEPTED: { - name: 'ACCEPTED', + name: "ACCEPTED", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('accepted') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("accepted") }] } + ] as readonly AttributeApplication[] }, REJECTED: { - name: 'REJECTED', + name: "REJECTED", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('rejected') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("rejected") }] } + ] as readonly AttributeApplication[] }, PENDING: { - name: 'PENDING', + name: "PENDING", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('pending') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("pending") }] } + ] as readonly AttributeApplication[] }, AWAITING_HOST: { - name: 'AWAITING_HOST', + name: "AWAITING_HOST", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('awaiting_host') }] }, - ] as readonly AttributeApplication[], - }, - }, + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("awaiting_host") }] } + ] as readonly AttributeApplication[] + } + } }, EventTypeCustomInputType: { - name: 'EventTypeCustomInputType', + name: "EventTypeCustomInputType", values: { - TEXT: 'TEXT', - TEXTLONG: 'TEXTLONG', - NUMBER: 'NUMBER', - BOOL: 'BOOL', - RADIO: 'RADIO', - PHONE: 'PHONE', + TEXT: "TEXT", + TEXTLONG: "TEXTLONG", + NUMBER: "NUMBER", + BOOL: "BOOL", + RADIO: "RADIO", + PHONE: "PHONE" }, fields: { TEXT: { - name: 'TEXT', + name: "TEXT", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('text') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("text") }] } + ] as readonly AttributeApplication[] }, TEXTLONG: { - name: 'TEXTLONG', + name: "TEXTLONG", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('textLong') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("textLong") }] } + ] as readonly AttributeApplication[] }, NUMBER: { - name: 'NUMBER', + name: "NUMBER", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('number') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("number") }] } + ] as readonly AttributeApplication[] }, BOOL: { - name: 'BOOL', + name: "BOOL", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('bool') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("bool") }] } + ] as readonly AttributeApplication[] }, RADIO: { - name: 'RADIO', + name: "RADIO", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('radio') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("radio") }] } + ] as readonly AttributeApplication[] }, PHONE: { - name: 'PHONE', + name: "PHONE", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('phone') }] }, - ] as readonly AttributeApplication[], - }, - }, + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("phone") }] } + ] as readonly AttributeApplication[] + } + } }, ReminderType: { - name: 'ReminderType', + name: "ReminderType", values: { - PENDING_BOOKING_CONFIRMATION: 'PENDING_BOOKING_CONFIRMATION', - }, + PENDING_BOOKING_CONFIRMATION: "PENDING_BOOKING_CONFIRMATION" + } }, PaymentOption: { - name: 'PaymentOption', + name: "PaymentOption", values: { - ON_BOOKING: 'ON_BOOKING', - HOLD: 'HOLD', - }, + ON_BOOKING: "ON_BOOKING", + HOLD: "HOLD" + } }, WebhookTriggerEvents: { - name: 'WebhookTriggerEvents', + name: "WebhookTriggerEvents", values: { - BOOKING_CREATED: 'BOOKING_CREATED', - BOOKING_PAYMENT_INITIATED: 'BOOKING_PAYMENT_INITIATED', - BOOKING_PAID: 'BOOKING_PAID', - BOOKING_RESCHEDULED: 'BOOKING_RESCHEDULED', - BOOKING_REQUESTED: 'BOOKING_REQUESTED', - BOOKING_CANCELLED: 'BOOKING_CANCELLED', - BOOKING_REJECTED: 'BOOKING_REJECTED', - BOOKING_NO_SHOW_UPDATED: 'BOOKING_NO_SHOW_UPDATED', - FORM_SUBMITTED: 'FORM_SUBMITTED', - MEETING_ENDED: 'MEETING_ENDED', - MEETING_STARTED: 'MEETING_STARTED', - RECORDING_READY: 'RECORDING_READY', - INSTANT_MEETING: 'INSTANT_MEETING', - RECORDING_TRANSCRIPTION_GENERATED: 'RECORDING_TRANSCRIPTION_GENERATED', - OOO_CREATED: 'OOO_CREATED', - AFTER_HOSTS_CAL_VIDEO_NO_SHOW: 'AFTER_HOSTS_CAL_VIDEO_NO_SHOW', - AFTER_GUESTS_CAL_VIDEO_NO_SHOW: 'AFTER_GUESTS_CAL_VIDEO_NO_SHOW', - FORM_SUBMITTED_NO_EVENT: 'FORM_SUBMITTED_NO_EVENT', - }, + BOOKING_CREATED: "BOOKING_CREATED", + BOOKING_PAYMENT_INITIATED: "BOOKING_PAYMENT_INITIATED", + BOOKING_PAID: "BOOKING_PAID", + BOOKING_RESCHEDULED: "BOOKING_RESCHEDULED", + BOOKING_REQUESTED: "BOOKING_REQUESTED", + BOOKING_CANCELLED: "BOOKING_CANCELLED", + BOOKING_REJECTED: "BOOKING_REJECTED", + BOOKING_NO_SHOW_UPDATED: "BOOKING_NO_SHOW_UPDATED", + FORM_SUBMITTED: "FORM_SUBMITTED", + MEETING_ENDED: "MEETING_ENDED", + MEETING_STARTED: "MEETING_STARTED", + RECORDING_READY: "RECORDING_READY", + INSTANT_MEETING: "INSTANT_MEETING", + RECORDING_TRANSCRIPTION_GENERATED: "RECORDING_TRANSCRIPTION_GENERATED", + OOO_CREATED: "OOO_CREATED", + AFTER_HOSTS_CAL_VIDEO_NO_SHOW: "AFTER_HOSTS_CAL_VIDEO_NO_SHOW", + AFTER_GUESTS_CAL_VIDEO_NO_SHOW: "AFTER_GUESTS_CAL_VIDEO_NO_SHOW", + FORM_SUBMITTED_NO_EVENT: "FORM_SUBMITTED_NO_EVENT" + } }, AppCategories: { - name: 'AppCategories', + name: "AppCategories", values: { - calendar: 'calendar', - messaging: 'messaging', - other: 'other', - payment: 'payment', - video: 'video', - web3: 'web3', - automation: 'automation', - analytics: 'analytics', - conferencing: 'conferencing', - crm: 'crm', - }, + calendar: "calendar", + messaging: "messaging", + other: "other", + payment: "payment", + video: "video", + web3: "web3", + automation: "automation", + analytics: "analytics", + conferencing: "conferencing", + crm: "crm" + } }, WorkflowTriggerEvents: { - name: 'WorkflowTriggerEvents', + name: "WorkflowTriggerEvents", values: { - BEFORE_EVENT: 'BEFORE_EVENT', - EVENT_CANCELLED: 'EVENT_CANCELLED', - NEW_EVENT: 'NEW_EVENT', - AFTER_EVENT: 'AFTER_EVENT', - RESCHEDULE_EVENT: 'RESCHEDULE_EVENT', - AFTER_HOSTS_CAL_VIDEO_NO_SHOW: 'AFTER_HOSTS_CAL_VIDEO_NO_SHOW', - AFTER_GUESTS_CAL_VIDEO_NO_SHOW: 'AFTER_GUESTS_CAL_VIDEO_NO_SHOW', - }, + BEFORE_EVENT: "BEFORE_EVENT", + EVENT_CANCELLED: "EVENT_CANCELLED", + NEW_EVENT: "NEW_EVENT", + AFTER_EVENT: "AFTER_EVENT", + RESCHEDULE_EVENT: "RESCHEDULE_EVENT", + AFTER_HOSTS_CAL_VIDEO_NO_SHOW: "AFTER_HOSTS_CAL_VIDEO_NO_SHOW", + AFTER_GUESTS_CAL_VIDEO_NO_SHOW: "AFTER_GUESTS_CAL_VIDEO_NO_SHOW" + } }, WorkflowActions: { - name: 'WorkflowActions', + name: "WorkflowActions", values: { - EMAIL_HOST: 'EMAIL_HOST', - EMAIL_ATTENDEE: 'EMAIL_ATTENDEE', - SMS_ATTENDEE: 'SMS_ATTENDEE', - SMS_NUMBER: 'SMS_NUMBER', - EMAIL_ADDRESS: 'EMAIL_ADDRESS', - WHATSAPP_ATTENDEE: 'WHATSAPP_ATTENDEE', - WHATSAPP_NUMBER: 'WHATSAPP_NUMBER', - }, + EMAIL_HOST: "EMAIL_HOST", + EMAIL_ATTENDEE: "EMAIL_ATTENDEE", + SMS_ATTENDEE: "SMS_ATTENDEE", + SMS_NUMBER: "SMS_NUMBER", + EMAIL_ADDRESS: "EMAIL_ADDRESS", + WHATSAPP_ATTENDEE: "WHATSAPP_ATTENDEE", + WHATSAPP_NUMBER: "WHATSAPP_NUMBER" + } }, TimeUnit: { - name: 'TimeUnit', + name: "TimeUnit", values: { - DAY: 'DAY', - HOUR: 'HOUR', - MINUTE: 'MINUTE', + DAY: "DAY", + HOUR: "HOUR", + MINUTE: "MINUTE" }, fields: { DAY: { - name: 'DAY', + name: "DAY", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('day') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("day") }] } + ] as readonly AttributeApplication[] }, HOUR: { - name: 'HOUR', + name: "HOUR", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('hour') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("hour") }] } + ] as readonly AttributeApplication[] }, MINUTE: { - name: 'MINUTE', + name: "MINUTE", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('minute') }] }, - ] as readonly AttributeApplication[], - }, - }, + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("minute") }] } + ] as readonly AttributeApplication[] + } + } }, WorkflowTemplates: { - name: 'WorkflowTemplates', + name: "WorkflowTemplates", values: { - REMINDER: 'REMINDER', - CUSTOM: 'CUSTOM', - CANCELLED: 'CANCELLED', - RESCHEDULED: 'RESCHEDULED', - COMPLETED: 'COMPLETED', - RATING: 'RATING', - }, + REMINDER: "REMINDER", + CUSTOM: "CUSTOM", + CANCELLED: "CANCELLED", + RESCHEDULED: "RESCHEDULED", + COMPLETED: "COMPLETED", + RATING: "RATING" + } }, WorkflowMethods: { - name: 'WorkflowMethods', + name: "WorkflowMethods", values: { - EMAIL: 'EMAIL', - SMS: 'SMS', - WHATSAPP: 'WHATSAPP', - }, + EMAIL: "EMAIL", + SMS: "SMS", + WHATSAPP: "WHATSAPP" + } }, FeatureType: { - name: 'FeatureType', + name: "FeatureType", values: { - RELEASE: 'RELEASE', - EXPERIMENT: 'EXPERIMENT', - OPERATIONAL: 'OPERATIONAL', - KILL_SWITCH: 'KILL_SWITCH', - PERMISSION: 'PERMISSION', - }, + RELEASE: "RELEASE", + EXPERIMENT: "EXPERIMENT", + OPERATIONAL: "OPERATIONAL", + KILL_SWITCH: "KILL_SWITCH", + PERMISSION: "PERMISSION" + } }, RRResetInterval: { - name: 'RRResetInterval', + name: "RRResetInterval", values: { - MONTH: 'MONTH', - DAY: 'DAY', - }, + MONTH: "MONTH", + DAY: "DAY" + } }, RRTimestampBasis: { - name: 'RRTimestampBasis', + name: "RRTimestampBasis", values: { - CREATED_AT: 'CREATED_AT', - START_TIME: 'START_TIME', - }, + CREATED_AT: "CREATED_AT", + START_TIME: "START_TIME" + } }, AccessScope: { - name: 'AccessScope', + name: "AccessScope", values: { - READ_BOOKING: 'READ_BOOKING', - READ_PROFILE: 'READ_PROFILE', - }, + READ_BOOKING: "READ_BOOKING", + READ_PROFILE: "READ_PROFILE" + } }, RedirectType: { - name: 'RedirectType', + name: "RedirectType", values: { - UserEventType: 'UserEventType', - TeamEventType: 'TeamEventType', - User: 'User', - Team: 'Team', + UserEventType: "UserEventType", + TeamEventType: "TeamEventType", + User: "User", + Team: "Team" }, fields: { UserEventType: { - name: 'UserEventType', + name: "UserEventType", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user-event-type') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user-event-type") }] } + ] as readonly AttributeApplication[] }, TeamEventType: { - name: 'TeamEventType', + name: "TeamEventType", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('team-event-type') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("team-event-type") }] } + ] as readonly AttributeApplication[] }, User: { - name: 'User', + name: "User", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user") }] } + ] as readonly AttributeApplication[] }, Team: { - name: 'Team', + name: "Team", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('team') }] }, - ] as readonly AttributeApplication[], - }, - }, + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("team") }] } + ] as readonly AttributeApplication[] + } + } }, SMSLockState: { - name: 'SMSLockState', + name: "SMSLockState", values: { - LOCKED: 'LOCKED', - UNLOCKED: 'UNLOCKED', - REVIEW_NEEDED: 'REVIEW_NEEDED', - }, + LOCKED: "LOCKED", + UNLOCKED: "UNLOCKED", + REVIEW_NEEDED: "REVIEW_NEEDED" + } }, AttributeType: { - name: 'AttributeType', + name: "AttributeType", values: { - TEXT: 'TEXT', - NUMBER: 'NUMBER', - SINGLE_SELECT: 'SINGLE_SELECT', - MULTI_SELECT: 'MULTI_SELECT', - }, + TEXT: "TEXT", + NUMBER: "NUMBER", + SINGLE_SELECT: "SINGLE_SELECT", + MULTI_SELECT: "MULTI_SELECT" + } }, AssignmentReasonEnum: { - name: 'AssignmentReasonEnum', + name: "AssignmentReasonEnum", values: { - ROUTING_FORM_ROUTING: 'ROUTING_FORM_ROUTING', - ROUTING_FORM_ROUTING_FALLBACK: 'ROUTING_FORM_ROUTING_FALLBACK', - REASSIGNED: 'REASSIGNED', - RR_REASSIGNED: 'RR_REASSIGNED', - REROUTED: 'REROUTED', - SALESFORCE_ASSIGNMENT: 'SALESFORCE_ASSIGNMENT', - }, + ROUTING_FORM_ROUTING: "ROUTING_FORM_ROUTING", + ROUTING_FORM_ROUTING_FALLBACK: "ROUTING_FORM_ROUTING_FALLBACK", + REASSIGNED: "REASSIGNED", + RR_REASSIGNED: "RR_REASSIGNED", + REROUTED: "REROUTED", + SALESFORCE_ASSIGNMENT: "SALESFORCE_ASSIGNMENT" + } }, EventTypeAutoTranslatedField: { - name: 'EventTypeAutoTranslatedField', + name: "EventTypeAutoTranslatedField", values: { - DESCRIPTION: 'DESCRIPTION', - TITLE: 'TITLE', - }, + DESCRIPTION: "DESCRIPTION", + TITLE: "TITLE" + } }, WatchlistType: { - name: 'WatchlistType', + name: "WatchlistType", values: { - EMAIL: 'EMAIL', - DOMAIN: 'DOMAIN', - USERNAME: 'USERNAME', - }, + EMAIL: "EMAIL", + DOMAIN: "DOMAIN", + USERNAME: "USERNAME" + } }, WatchlistSeverity: { - name: 'WatchlistSeverity', + name: "WatchlistSeverity", values: { - LOW: 'LOW', - MEDIUM: 'MEDIUM', - HIGH: 'HIGH', - CRITICAL: 'CRITICAL', - }, + LOW: "LOW", + MEDIUM: "MEDIUM", + HIGH: "HIGH", + CRITICAL: "CRITICAL" + } }, BillingPeriod: { - name: 'BillingPeriod', + name: "BillingPeriod", values: { - MONTHLY: 'MONTHLY', - ANNUALLY: 'ANNUALLY', - }, + MONTHLY: "MONTHLY", + ANNUALLY: "ANNUALLY" + } }, IncompleteBookingActionType: { - name: 'IncompleteBookingActionType', + name: "IncompleteBookingActionType", values: { - SALESFORCE: 'SALESFORCE', - }, + SALESFORCE: "SALESFORCE" + } }, FilterSegmentScope: { - name: 'FilterSegmentScope', + name: "FilterSegmentScope", values: { - USER: 'USER', - TEAM: 'TEAM', - }, + USER: "USER", + TEAM: "TEAM" + } }, WorkflowContactType: { - name: 'WorkflowContactType', + name: "WorkflowContactType", values: { - PHONE: 'PHONE', - EMAIL: 'EMAIL', - }, + PHONE: "PHONE", + EMAIL: "EMAIL" + } }, RoleType: { - name: 'RoleType', + name: "RoleType", values: { - SYSTEM: 'SYSTEM', - CUSTOM: 'CUSTOM', - }, - }, + SYSTEM: "SYSTEM", + CUSTOM: "CUSTOM" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/github-repos/formbricks/schema.ts b/tests/e2e/github-repos/formbricks/schema.ts index a08a3d401..265fad364 100644 --- a/tests/e2e/github-repos/formbricks/schema.ts +++ b/tests/e2e/github-repos/formbricks/schema.ts @@ -5,4781 +5,3045 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { Webhook: { - name: 'Webhook', + name: "Webhook", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', - optional: true, + name: "name", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, url: { - name: 'url', - type: 'String', + name: "url", + type: "String" }, source: { - name: 'source', - type: 'WebhookSource', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('user') }] }, - ] as readonly AttributeApplication[], - default: 'user' as FieldDefault, + name: "source", + type: "WebhookSource", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("user") }] }] as readonly AttributeApplication[], + default: "user" as FieldDefault }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'webhooks', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "webhooks", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, triggers: { - name: 'triggers', - type: 'PipelineTriggers', - array: true, + name: "triggers", + type: "PipelineTriggers", + array: true }, surveyIds: { - name: 'surveyIds', - type: 'String', - array: true, - }, + name: "surveyIds", + type: "String", + array: true + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ContactAttribute: { - name: 'ContactAttribute', + name: "ContactAttribute", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, attributeKey: { - name: 'attributeKey', - type: 'ContactAttributeKey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeKeyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attributes', - fields: ['attributeKeyId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "attributeKey", + type: "ContactAttributeKey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attributes", fields: ["attributeKeyId"], references: ["id"], onDelete: "Cascade" } }, attributeKeyId: { - name: 'attributeKeyId', - type: 'String', - foreignKeyFor: ['attributeKey'] as readonly string[], + name: "attributeKeyId", + type: "String", + foreignKeyFor: [ + "attributeKey" + ] as readonly string[] }, contact: { - name: 'contact', - type: 'Contact', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('contactId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attributes', - fields: ['contactId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "contact", + type: "Contact", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attributes", fields: ["contactId"], references: ["id"], onDelete: "Cascade" } }, contactId: { - name: 'contactId', - type: 'String', - foreignKeyFor: ['contact'] as readonly string[], + name: "contactId", + type: "String", + foreignKeyFor: [ + "contact" + ] as readonly string[] }, value: { - name: 'value', - type: 'String', - }, + name: "value", + type: "String" + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('contactId'), - ExpressionUtils.field('attributeKeyId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('attributeKeyId'), - ExpressionUtils.field('value'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId"), ExpressionUtils.field("attributeKeyId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId"), ExpressionUtils.field("value")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - contactId_attributeKeyId: { contactId: { type: 'String' }, attributeKeyId: { type: 'String' } }, - }, + id: { type: "String" }, + contactId_attributeKeyId: { contactId: { type: "String" }, attributeKeyId: { type: "String" } } + } }, ContactAttributeKey: { - name: 'ContactAttributeKey', + name: "ContactAttributeKey", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, isUnique: { - name: 'isUnique', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isUnique", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, key: { - name: 'key', - type: 'String', + name: "key", + type: "String" }, name: { - name: 'name', - type: 'String', - optional: true, + name: "name", + type: "String", + optional: true }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, type: { - name: 'type', - type: 'ContactAttributeType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('custom') }] }, - ] as readonly AttributeApplication[], - default: 'custom' as FieldDefault, + name: "type", + type: "ContactAttributeType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("custom") }] }] as readonly AttributeApplication[], + default: "custom" as FieldDefault }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attributeKeys', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attributeKeys", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, attributes: { - name: 'attributes', - type: 'ContactAttribute', + name: "attributes", + type: "ContactAttribute", array: true, - relation: { opposite: 'attributeKey' }, + relation: { opposite: "attributeKey" } }, attributeFilters: { - name: 'attributeFilters', - type: 'SurveyAttributeFilter', + name: "attributeFilters", + type: "SurveyAttributeFilter", array: true, - relation: { opposite: 'attributeKey' }, - }, + relation: { opposite: "attributeKey" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('key'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("key"), ExpressionUtils.field("environmentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - key_environmentId: { key: { type: 'String' }, environmentId: { type: 'String' } }, - }, + id: { type: "String" }, + key_environmentId: { key: { type: "String" }, environmentId: { type: "String" } } + } }, Contact: { - name: 'Contact', + name: "Contact", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userId: { - name: 'userId', - type: 'String', - optional: true, + name: "userId", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'contacts', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "contacts", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, responses: { - name: 'responses', - type: 'Response', + name: "responses", + type: "Response", array: true, - relation: { opposite: 'contact' }, + relation: { opposite: "contact" } }, attributes: { - name: 'attributes', - type: 'ContactAttribute', + name: "attributes", + type: "ContactAttribute", array: true, - relation: { opposite: 'contact' }, + relation: { opposite: "contact" } }, displays: { - name: 'displays', - type: 'Display', + name: "displays", + type: "Display", array: true, - relation: { opposite: 'contact' }, - }, + relation: { opposite: "contact" } + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Response: { - name: 'Response', + name: "Response", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, finished: { - name: 'finished', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "finished", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, survey: { - name: 'survey', - type: 'Survey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'responses', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, + name: "survey", + type: "Survey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "responses", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } }, surveyId: { - name: 'surveyId', - type: 'String', - foreignKeyFor: ['survey'] as readonly string[], + name: "surveyId", + type: "String", + foreignKeyFor: [ + "survey" + ] as readonly string[] }, contact: { - name: 'contact', - type: 'Contact', + name: "contact", + type: "Contact", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('contactId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'responses', fields: ['contactId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "responses", fields: ["contactId"], references: ["id"], onDelete: "Cascade" } }, contactId: { - name: 'contactId', - type: 'String', + name: "contactId", + type: "String", optional: true, - foreignKeyFor: ['contact'] as readonly string[], + foreignKeyFor: [ + "contact" + ] as readonly string[] }, endingId: { - name: 'endingId', - type: 'String', - optional: true, + name: "endingId", + type: "String", + optional: true }, notes: { - name: 'notes', - type: 'ResponseNote', + name: "notes", + type: "ResponseNote", array: true, - relation: { opposite: 'response' }, + relation: { opposite: "response" } }, data: { - name: 'data', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, + name: "data", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault }, variables: { - name: 'variables', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, + name: "variables", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault }, ttc: { - name: 'ttc', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, + name: "ttc", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault }, meta: { - name: 'meta', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, + name: "meta", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault }, tags: { - name: 'tags', - type: 'TagsOnResponses', + name: "tags", + type: "TagsOnResponses", array: true, - relation: { opposite: 'response' }, + relation: { opposite: "response" } }, contactAttributes: { - name: 'contactAttributes', - type: 'Json', - optional: true, + name: "contactAttributes", + type: "Json", + optional: true }, singleUseId: { - name: 'singleUseId', - type: 'String', - optional: true, + name: "singleUseId", + type: "String", + optional: true }, language: { - name: 'language', - type: 'String', - optional: true, + name: "language", + type: "String", + optional: true }, documents: { - name: 'documents', - type: 'Document', + name: "documents", + type: "Document", array: true, - relation: { opposite: 'response' }, + relation: { opposite: "response" } }, displayId: { - name: 'displayId', - type: 'String', + name: "displayId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['display'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "display" + ] as readonly string[] }, display: { - name: 'display', - type: 'Display', + name: "display", + type: "Display", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('displayId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'response', fields: ['displayId'], references: ['id'] }, - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("displayId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "response", fields: ["displayId"], references: ["id"] } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('surveyId'), - ExpressionUtils.field('singleUseId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('surveyId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('contactId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("singleUseId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId"), ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - displayId: { type: 'String' }, - surveyId_singleUseId: { surveyId: { type: 'String' }, singleUseId: { type: 'String' } }, - }, + id: { type: "String" }, + displayId: { type: "String" }, + surveyId_singleUseId: { surveyId: { type: "String" }, singleUseId: { type: "String" } } + } }, ResponseNote: { - name: 'ResponseNote', + name: "ResponseNote", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, response: { - name: 'response', - type: 'Response', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notes', fields: ['responseId'], references: ['id'], onDelete: 'Cascade' }, + name: "response", + type: "Response", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "notes", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } }, responseId: { - name: 'responseId', - type: 'String', - foreignKeyFor: ['response'] as readonly string[], + name: "responseId", + type: "String", + foreignKeyFor: [ + "response" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'responseNotes', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "responseNotes", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'String', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + foreignKeyFor: [ + "user" + ] as readonly string[] }, text: { - name: 'text', - type: 'String', + name: "text", + type: "String" }, isResolved: { - name: 'isResolved', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isResolved", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isEdited: { - name: 'isEdited', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "isEdited", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Tag: { - name: 'Tag', + name: "Tag", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, responses: { - name: 'responses', - type: 'TagsOnResponses', + name: "responses", + type: "TagsOnResponses", array: true, - relation: { opposite: 'tag' }, + relation: { opposite: "tag" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'tags', fields: ['environmentId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "tags", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("name")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - environmentId_name: { environmentId: { type: 'String' }, name: { type: 'String' } }, - }, + id: { type: "String" }, + environmentId_name: { environmentId: { type: "String" }, name: { type: "String" } } + } }, TagsOnResponses: { - name: 'TagsOnResponses', + name: "TagsOnResponses", fields: { responseId: { - name: 'responseId', - type: 'String', + name: "responseId", + type: "String", id: true, - foreignKeyFor: ['response'] as readonly string[], + foreignKeyFor: [ + "response" + ] as readonly string[] }, response: { - name: 'response', - type: 'Response', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'tags', fields: ['responseId'], references: ['id'], onDelete: 'Cascade' }, + name: "response", + type: "Response", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "tags", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } }, tagId: { - name: 'tagId', - type: 'String', + name: "tagId", + type: "String", id: true, - foreignKeyFor: ['tag'] as readonly string[], + foreignKeyFor: [ + "tag" + ] as readonly string[] }, tag: { - name: 'tag', - type: 'Tag', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('tagId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'responses', fields: ['tagId'], references: ['id'], onDelete: 'Cascade' }, - }, + name: "tag", + type: "Tag", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("tagId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "responses", fields: ["tagId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('responseId'), - ExpressionUtils.field('tagId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId"), ExpressionUtils.field("tagId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }] } ] as readonly AttributeApplication[], - idFields: ['responseId', 'tagId'], + idFields: ["responseId", "tagId"], uniqueFields: { - responseId_tagId: { responseId: { type: 'String' }, tagId: { type: 'String' } }, - }, + responseId_tagId: { responseId: { type: "String" }, tagId: { type: "String" } } + } }, Display: { - name: 'Display', + name: "Display", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, survey: { - name: 'survey', - type: 'Survey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'displays', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, + name: "survey", + type: "Survey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "displays", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } }, surveyId: { - name: 'surveyId', - type: 'String', - foreignKeyFor: ['survey'] as readonly string[], + name: "surveyId", + type: "String", + foreignKeyFor: [ + "survey" + ] as readonly string[] }, contact: { - name: 'contact', - type: 'Contact', + name: "contact", + type: "Contact", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('contactId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'displays', fields: ['contactId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "displays", fields: ["contactId"], references: ["id"], onDelete: "Cascade" } }, contactId: { - name: 'contactId', - type: 'String', + name: "contactId", + type: "String", optional: true, - foreignKeyFor: ['contact'] as readonly string[], + foreignKeyFor: [ + "contact" + ] as readonly string[] }, responseId: { - name: 'responseId', - type: 'String', + name: "responseId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'DisplayStatus', - optional: true, + name: "status", + type: "DisplayStatus", + optional: true }, response: { - name: 'response', - type: 'Response', + name: "response", + type: "Response", optional: true, - relation: { opposite: 'display' }, - }, + relation: { opposite: "display" } + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('contactId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("contactId"), ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - responseId: { type: 'String' }, - }, + id: { type: "String" }, + responseId: { type: "String" } + } }, SurveyTrigger: { - name: 'SurveyTrigger', + name: "SurveyTrigger", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, survey: { - name: 'survey', - type: 'Survey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'triggers', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, + name: "survey", + type: "Survey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "triggers", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } }, surveyId: { - name: 'surveyId', - type: 'String', - foreignKeyFor: ['survey'] as readonly string[], + name: "surveyId", + type: "String", + foreignKeyFor: [ + "survey" + ] as readonly string[] }, actionClass: { - name: 'actionClass', - type: 'ActionClass', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('actionClassId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'surveyTriggers', - fields: ['actionClassId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "actionClass", + type: "ActionClass", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("actionClassId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "surveyTriggers", fields: ["actionClassId"], references: ["id"], onDelete: "Cascade" } }, actionClassId: { - name: 'actionClassId', - type: 'String', - foreignKeyFor: ['actionClass'] as readonly string[], - }, + name: "actionClassId", + type: "String", + foreignKeyFor: [ + "actionClass" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('surveyId'), - ExpressionUtils.field('actionClassId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("actionClassId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - surveyId_actionClassId: { surveyId: { type: 'String' }, actionClassId: { type: 'String' } }, - }, + id: { type: "String" }, + surveyId_actionClassId: { surveyId: { type: "String" }, actionClassId: { type: "String" } } + } }, SurveyAttributeFilter: { - name: 'SurveyAttributeFilter', + name: "SurveyAttributeFilter", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, attributeKey: { - name: 'attributeKey', - type: 'ContactAttributeKey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeKeyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attributeFilters', - fields: ['attributeKeyId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "attributeKey", + type: "ContactAttributeKey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attributeFilters", fields: ["attributeKeyId"], references: ["id"], onDelete: "Cascade" } }, attributeKeyId: { - name: 'attributeKeyId', - type: 'String', - foreignKeyFor: ['attributeKey'] as readonly string[], + name: "attributeKeyId", + type: "String", + foreignKeyFor: [ + "attributeKey" + ] as readonly string[] }, survey: { - name: 'survey', - type: 'Survey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attributeFilters', - fields: ['surveyId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "survey", + type: "Survey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attributeFilters", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } }, surveyId: { - name: 'surveyId', - type: 'String', - foreignKeyFor: ['survey'] as readonly string[], + name: "surveyId", + type: "String", + foreignKeyFor: [ + "survey" + ] as readonly string[] }, condition: { - name: 'condition', - type: 'SurveyAttributeFilterCondition', + name: "condition", + type: "SurveyAttributeFilterCondition" }, value: { - name: 'value', - type: 'String', - }, + name: "value", + type: "String" + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('surveyId'), - ExpressionUtils.field('attributeKeyId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('attributeKeyId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId"), ExpressionUtils.field("attributeKeyId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attributeKeyId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - surveyId_attributeKeyId: { surveyId: { type: 'String' }, attributeKeyId: { type: 'String' } }, - }, + id: { type: "String" }, + surveyId_attributeKeyId: { surveyId: { type: "String" }, attributeKeyId: { type: "String" } } + } }, Survey: { - name: 'Survey', + name: "Survey", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, redirectUrl: { - name: 'redirectUrl', - type: 'String', - optional: true, + name: "redirectUrl", + type: "String", + optional: true }, type: { - name: 'type', - type: 'SurveyType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('web') }] }, - ] as readonly AttributeApplication[], - default: 'web' as FieldDefault, + name: "type", + type: "SurveyType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("web") }] }] as readonly AttributeApplication[], + default: "web" as FieldDefault }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'surveys', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "surveys", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, creator: { - name: 'creator', - type: 'User', + name: "creator", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('createdBy')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'surveys', fields: ['createdBy'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("createdBy")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "surveys", fields: ["createdBy"], references: ["id"] } }, createdBy: { - name: 'createdBy', - type: 'String', + name: "createdBy", + type: "String", optional: true, - foreignKeyFor: ['creator'] as readonly string[], + foreignKeyFor: [ + "creator" + ] as readonly string[] }, status: { - name: 'status', - type: 'SurveyStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('draft') }] }, - ] as readonly AttributeApplication[], - default: 'draft' as FieldDefault, + name: "status", + type: "SurveyStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("draft") }] }] as readonly AttributeApplication[], + default: "draft" as FieldDefault }, welcomeCard: { - name: 'welcomeCard', - type: 'Json', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('{"enabled": false}') }], - }, - ] as readonly AttributeApplication[], - default: '{"enabled": false}' as FieldDefault, + name: "welcomeCard", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false}") }] }] as readonly AttributeApplication[], + default: "{\"enabled\": false}" as FieldDefault }, questions: { - name: 'questions', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, - ] as readonly AttributeApplication[], - default: '[]' as FieldDefault, + name: "questions", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], + default: "[]" as FieldDefault }, endings: { - name: 'endings', - type: 'Json', + name: "endings", + type: "Json", array: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.array('Any', []) }] }, - ] as readonly AttributeApplication[], - default: [] as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("Any", []) }] }] as readonly AttributeApplication[], + default: [] as FieldDefault }, thankYouCard: { - name: 'thankYouCard', - type: 'Json', - optional: true, + name: "thankYouCard", + type: "Json", + optional: true }, hiddenFields: { - name: 'hiddenFields', - type: 'Json', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('{"enabled": false}') }], - }, - ] as readonly AttributeApplication[], - default: '{"enabled": false}' as FieldDefault, + name: "hiddenFields", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false}") }] }] as readonly AttributeApplication[], + default: "{\"enabled\": false}" as FieldDefault }, variables: { - name: 'variables', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, - ] as readonly AttributeApplication[], - default: '[]' as FieldDefault, + name: "variables", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], + default: "[]" as FieldDefault }, responses: { - name: 'responses', - type: 'Response', + name: "responses", + type: "Response", array: true, - relation: { opposite: 'survey' }, + relation: { opposite: "survey" } }, displayOption: { - name: 'displayOption', - type: 'displayOptions', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('displayOnce') }] }, - ] as readonly AttributeApplication[], - default: 'displayOnce' as FieldDefault, + name: "displayOption", + type: "displayOptions", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("displayOnce") }] }] as readonly AttributeApplication[], + default: "displayOnce" as FieldDefault }, recontactDays: { - name: 'recontactDays', - type: 'Int', - optional: true, + name: "recontactDays", + type: "Int", + optional: true }, displayLimit: { - name: 'displayLimit', - type: 'Int', - optional: true, + name: "displayLimit", + type: "Int", + optional: true }, triggers: { - name: 'triggers', - type: 'SurveyTrigger', + name: "triggers", + type: "SurveyTrigger", array: true, - relation: { opposite: 'survey' }, + relation: { opposite: "survey" } }, inlineTriggers: { - name: 'inlineTriggers', - type: 'Json', - optional: true, + name: "inlineTriggers", + type: "Json", + optional: true }, attributeFilters: { - name: 'attributeFilters', - type: 'SurveyAttributeFilter', + name: "attributeFilters", + type: "SurveyAttributeFilter", array: true, - relation: { opposite: 'survey' }, + relation: { opposite: "survey" } }, displays: { - name: 'displays', - type: 'Display', + name: "displays", + type: "Display", array: true, - relation: { opposite: 'survey' }, + relation: { opposite: "survey" } }, autoClose: { - name: 'autoClose', - type: 'Int', - optional: true, + name: "autoClose", + type: "Int", + optional: true }, autoComplete: { - name: 'autoComplete', - type: 'Int', - optional: true, + name: "autoComplete", + type: "Int", + optional: true }, delay: { - name: 'delay', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "delay", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, runOnDate: { - name: 'runOnDate', - type: 'DateTime', - optional: true, + name: "runOnDate", + type: "DateTime", + optional: true }, closeOnDate: { - name: 'closeOnDate', - type: 'DateTime', - optional: true, + name: "closeOnDate", + type: "DateTime", + optional: true }, surveyClosedMessage: { - name: 'surveyClosedMessage', - type: 'Json', - optional: true, + name: "surveyClosedMessage", + type: "Json", + optional: true }, segmentId: { - name: 'segmentId', - type: 'String', + name: "segmentId", + type: "String", optional: true, - foreignKeyFor: ['segment'] as readonly string[], + foreignKeyFor: [ + "segment" + ] as readonly string[] }, segment: { - name: 'segment', - type: 'Segment', + name: "segment", + type: "Segment", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('segmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'surveys', fields: ['segmentId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("segmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "surveys", fields: ["segmentId"], references: ["id"] } }, projectOverwrites: { - name: 'projectOverwrites', - type: 'Json', - optional: true, + name: "projectOverwrites", + type: "Json", + optional: true }, styling: { - name: 'styling', - type: 'Json', - optional: true, + name: "styling", + type: "Json", + optional: true }, singleUse: { - name: 'singleUse', - type: 'Json', + name: "singleUse", + type: "Json", optional: true, - attributes: [ - { - name: '@default', - args: [ - { - name: 'value', - value: ExpressionUtils.literal('{"enabled": false, "isEncrypted": true}'), - }, - ], - }, - ] as readonly AttributeApplication[], - default: '{"enabled": false, "isEncrypted": true}' as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false, \"isEncrypted\": true}") }] }] as readonly AttributeApplication[], + default: "{\"enabled\": false, \"isEncrypted\": true}" as FieldDefault }, verifyEmail: { - name: 'verifyEmail', - type: 'Json', - optional: true, + name: "verifyEmail", + type: "Json", + optional: true }, isVerifyEmailEnabled: { - name: 'isVerifyEmailEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isVerifyEmailEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isSingleResponsePerEmailEnabled: { - name: 'isSingleResponsePerEmailEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isSingleResponsePerEmailEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isBackButtonHidden: { - name: 'isBackButtonHidden', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isBackButtonHidden", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, pin: { - name: 'pin', - type: 'String', - optional: true, + name: "pin", + type: "String", + optional: true }, resultShareKey: { - name: 'resultShareKey', - type: 'String', + name: "resultShareKey", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, displayPercentage: { - name: 'displayPercentage', - type: 'Decimal', - optional: true, + name: "displayPercentage", + type: "Decimal", + optional: true }, languages: { - name: 'languages', - type: 'SurveyLanguage', + name: "languages", + type: "SurveyLanguage", array: true, - relation: { opposite: 'survey' }, + relation: { opposite: "survey" } }, showLanguageSwitch: { - name: 'showLanguageSwitch', - type: 'Boolean', - optional: true, + name: "showLanguageSwitch", + type: "Boolean", + optional: true }, documents: { - name: 'documents', - type: 'Document', + name: "documents", + type: "Document", array: true, - relation: { opposite: 'survey' }, + relation: { opposite: "survey" } }, followUps: { - name: 'followUps', - type: 'SurveyFollowUp', + name: "followUps", + type: "SurveyFollowUp", array: true, - relation: { opposite: 'survey' }, + relation: { opposite: "survey" } }, recaptcha: { - name: 'recaptcha', - type: 'Json', + name: "recaptcha", + type: "Json", optional: true, - attributes: [ - { - name: '@default', - args: [ - { - name: 'value', - value: ExpressionUtils.literal('{"enabled": false, "threshold":0.1}'), - }, - ], - }, - ] as readonly AttributeApplication[], - default: '{"enabled": false, "threshold":0.1}' as FieldDefault, - }, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"enabled\": false, \"threshold\":0.1}") }] }] as readonly AttributeApplication[], + default: "{\"enabled\": false, \"threshold\":0.1}" as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('updatedAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('segmentId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("updatedAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("segmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - resultShareKey: { type: 'String' }, - }, + id: { type: "String" }, + resultShareKey: { type: "String" } + } }, SurveyFollowUp: { - name: 'SurveyFollowUp', + name: "SurveyFollowUp", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, survey: { - name: 'survey', - type: 'Survey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'followUps', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, + name: "survey", + type: "Survey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "followUps", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } }, surveyId: { - name: 'surveyId', - type: 'String', - foreignKeyFor: ['survey'] as readonly string[], + name: "surveyId", + type: "String", + foreignKeyFor: [ + "survey" + ] as readonly string[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, trigger: { - name: 'trigger', - type: 'Json', + name: "trigger", + type: "Json" }, action: { - name: 'action', - type: 'Json', - }, + name: "action", + type: "Json" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ActionClass: { - name: 'ActionClass', + name: "ActionClass", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, type: { - name: 'type', - type: 'ActionType', + name: "type", + type: "ActionType" }, key: { - name: 'key', - type: 'String', - optional: true, + name: "key", + type: "String", + optional: true }, noCodeConfig: { - name: 'noCodeConfig', - type: 'Json', - optional: true, + name: "noCodeConfig", + type: "Json", + optional: true }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'actionClasses', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "actionClasses", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, surveyTriggers: { - name: 'surveyTriggers', - type: 'SurveyTrigger', + name: "surveyTriggers", + type: "SurveyTrigger", array: true, - relation: { opposite: 'actionClass' }, - }, + relation: { opposite: "actionClass" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('key'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('name'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("key"), ExpressionUtils.field("environmentId")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("name"), ExpressionUtils.field("environmentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - key_environmentId: { key: { type: 'String' }, environmentId: { type: 'String' } }, - name_environmentId: { name: { type: 'String' }, environmentId: { type: 'String' } }, - }, + id: { type: "String" }, + key_environmentId: { key: { type: "String" }, environmentId: { type: "String" } }, + name_environmentId: { name: { type: "String" }, environmentId: { type: "String" } } + } }, Integration: { - name: 'Integration', + name: "Integration", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, type: { - name: 'type', - type: 'IntegrationType', + name: "type", + type: "IntegrationType" }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, config: { - name: 'config', - type: 'Json', + name: "config", + type: "Json" }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'integration', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "integration", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('IntegrationType', [ - ExpressionUtils.field('type'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("IntegrationType", [ExpressionUtils.field("type"), ExpressionUtils.field("environmentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - type_environmentId: { type: { type: 'IntegrationType' }, environmentId: { type: 'String' } }, - }, + id: { type: "String" }, + type_environmentId: { type: { type: "IntegrationType" }, environmentId: { type: "String" } } + } }, DataMigration: { - name: 'DataMigration', + name: "DataMigration", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, startedAt: { - name: 'startedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('started_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "startedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("started_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, finishedAt: { - name: 'finishedAt', - type: 'DateTime', + name: "finishedAt", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('finished_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("finished_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, status: { - name: 'status', - type: 'DataMigrationStatus', - }, + name: "status", + type: "DataMigrationStatus" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - name: { type: 'String' }, - }, + id: { type: "String" }, + name: { type: "String" } + } }, Environment: { - name: 'Environment', + name: "Environment", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'EnvironmentType', + name: "type", + type: "EnvironmentType" }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'environments', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "environments", fields: ["projectId"], references: ["id"], onDelete: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, widgetSetupCompleted: { - name: 'widgetSetupCompleted', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "widgetSetupCompleted", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, appSetupCompleted: { - name: 'appSetupCompleted', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "appSetupCompleted", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, surveys: { - name: 'surveys', - type: 'Survey', + name: "surveys", + type: "Survey", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, contacts: { - name: 'contacts', - type: 'Contact', + name: "contacts", + type: "Contact", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, actionClasses: { - name: 'actionClasses', - type: 'ActionClass', + name: "actionClasses", + type: "ActionClass", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, attributeKeys: { - name: 'attributeKeys', - type: 'ContactAttributeKey', + name: "attributeKeys", + type: "ContactAttributeKey", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, webhooks: { - name: 'webhooks', - type: 'Webhook', + name: "webhooks", + type: "Webhook", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, tags: { - name: 'tags', - type: 'Tag', + name: "tags", + type: "Tag", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, segments: { - name: 'segments', - type: 'Segment', + name: "segments", + type: "Segment", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, integration: { - name: 'integration', - type: 'Integration', + name: "integration", + type: "Integration", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, documents: { - name: 'documents', - type: 'Document', + name: "documents", + type: "Document", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, insights: { - name: 'insights', - type: 'Insight', + name: "insights", + type: "Insight", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, ApiKeyEnvironment: { - name: 'ApiKeyEnvironment', - type: 'ApiKeyEnvironment', + name: "ApiKeyEnvironment", + type: "ApiKeyEnvironment", array: true, - relation: { opposite: 'environment' }, - }, + relation: { opposite: "environment" } + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Project: { - name: 'Project', + name: "Project", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'projects', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "projects", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, environments: { - name: 'environments', - type: 'Environment', + name: "environments", + type: "Environment", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, brandColor: { - name: 'brandColor', - type: 'String', - optional: true, + name: "brandColor", + type: "String", + optional: true }, highlightBorderColor: { - name: 'highlightBorderColor', - type: 'String', - optional: true, + name: "highlightBorderColor", + type: "String", + optional: true }, styling: { - name: 'styling', - type: 'Json', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('{"allowStyleOverwrite":true}') }], - }, - ] as readonly AttributeApplication[], - default: '{"allowStyleOverwrite":true}' as FieldDefault, + name: "styling", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{\"allowStyleOverwrite\":true}") }] }] as readonly AttributeApplication[], + default: "{\"allowStyleOverwrite\":true}" as FieldDefault }, config: { - name: 'config', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, + name: "config", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault }, recontactDays: { - name: 'recontactDays', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(7) }] }, - ] as readonly AttributeApplication[], - default: 7 as FieldDefault, + name: "recontactDays", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(7) }] }] as readonly AttributeApplication[], + default: 7 as FieldDefault }, linkSurveyBranding: { - name: 'linkSurveyBranding', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "linkSurveyBranding", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, inAppSurveyBranding: { - name: 'inAppSurveyBranding', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "inAppSurveyBranding", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, placement: { - name: 'placement', - type: 'WidgetPlacement', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('bottomRight') }] }, - ] as readonly AttributeApplication[], - default: 'bottomRight' as FieldDefault, + name: "placement", + type: "WidgetPlacement", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("bottomRight") }] }] as readonly AttributeApplication[], + default: "bottomRight" as FieldDefault }, clickOutsideClose: { - name: 'clickOutsideClose', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "clickOutsideClose", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, darkOverlay: { - name: 'darkOverlay', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "darkOverlay", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, languages: { - name: 'languages', - type: 'Language', + name: "languages", + type: "Language", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, logo: { - name: 'logo', - type: 'Json', - optional: true, + name: "logo", + type: "Json", + optional: true }, projectTeams: { - name: 'projectTeams', - type: 'ProjectTeam', + name: "projectTeams", + type: "ProjectTeam", array: true, - relation: { opposite: 'project' }, - }, + relation: { opposite: "project" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("name")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - organizationId_name: { organizationId: { type: 'String' }, name: { type: 'String' } }, - }, + id: { type: "String" }, + organizationId_name: { organizationId: { type: "String" }, name: { type: "String" } } + } }, Organization: { - name: 'Organization', + name: "Organization", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, memberships: { - name: 'memberships', - type: 'Membership', + name: "memberships", + type: "Membership", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, projects: { - name: 'projects', - type: 'Project', + name: "projects", + type: "Project", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, billing: { - name: 'billing', - type: 'Json', + name: "billing", + type: "Json" }, whitelabel: { - name: 'whitelabel', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, + name: "whitelabel", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault }, invites: { - name: 'invites', - type: 'Invite', + name: "invites", + type: "Invite", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, isAIEnabled: { - name: 'isAIEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isAIEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, teams: { - name: 'teams', - type: 'Team', + name: "teams", + type: "Team", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, apiKeys: { - name: 'apiKeys', - type: 'ApiKey', + name: "apiKeys", + type: "ApiKey", array: true, - relation: { opposite: 'organization' }, - }, + relation: { opposite: "organization" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Membership: { - name: 'Membership', + name: "Membership", fields: { organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'memberships', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "memberships", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', + name: "organizationId", + type: "String", id: true, - foreignKeyFor: ['organization'] as readonly string[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'memberships', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "memberships", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'String', + name: "userId", + type: "String", id: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, accepted: { - name: 'accepted', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "accepted", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, deprecatedRole: { - name: 'deprecatedRole', - type: 'MembershipRole', - optional: true, + name: "deprecatedRole", + type: "MembershipRole", + optional: true }, role: { - name: 'role', - type: 'OrganizationRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('member') }] }, - ] as readonly AttributeApplication[], - default: 'member' as FieldDefault, - }, + name: "role", + type: "OrganizationRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("member") }] }] as readonly AttributeApplication[], + default: "member" as FieldDefault + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('organizationId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("organizationId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } ] as readonly AttributeApplication[], - idFields: ['organizationId', 'userId'], + idFields: ["organizationId", "userId"], uniqueFields: { - userId_organizationId: { userId: { type: 'String' }, organizationId: { type: 'String' } }, - }, + userId_organizationId: { userId: { type: "String" }, organizationId: { type: "String" } } + } }, Invite: { - name: 'Invite', + name: "Invite", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, name: { - name: 'name', - type: 'String', - optional: true, + name: "name", + type: "String", + optional: true }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'invites', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "invites", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, creator: { - name: 'creator', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('inviteCreatedBy') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('creatorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'invitesCreated', - name: 'inviteCreatedBy', - fields: ['creatorId'], - references: ['id'], - }, + name: "creator", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteCreatedBy") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("creatorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "invitesCreated", name: "inviteCreatedBy", fields: ["creatorId"], references: ["id"] } }, creatorId: { - name: 'creatorId', - type: 'String', - foreignKeyFor: ['creator'] as readonly string[], + name: "creatorId", + type: "String", + foreignKeyFor: [ + "creator" + ] as readonly string[] }, acceptor: { - name: 'acceptor', - type: 'User', + name: "acceptor", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('inviteAcceptedBy') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('acceptorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'invitesAccepted', - name: 'inviteAcceptedBy', - fields: ['acceptorId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteAcceptedBy") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("acceptorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "invitesAccepted", name: "inviteAcceptedBy", fields: ["acceptorId"], references: ["id"], onDelete: "Cascade" } }, acceptorId: { - name: 'acceptorId', - type: 'String', + name: "acceptorId", + type: "String", optional: true, - foreignKeyFor: ['acceptor'] as readonly string[], + foreignKeyFor: [ + "acceptor" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', + name: "expiresAt", + type: "DateTime" }, deprecatedRole: { - name: 'deprecatedRole', - type: 'MembershipRole', - optional: true, + name: "deprecatedRole", + type: "MembershipRole", + optional: true }, role: { - name: 'role', - type: 'OrganizationRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('member') }] }, - ] as readonly AttributeApplication[], - default: 'member' as FieldDefault, + name: "role", + type: "OrganizationRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("member") }] }] as readonly AttributeApplication[], + default: "member" as FieldDefault }, teamIds: { - name: 'teamIds', - type: 'String', + name: "teamIds", + type: "String", array: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.array('Any', []) }] }, - ] as readonly AttributeApplication[], - default: [] as FieldDefault, - }, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("Any", []) }] }] as readonly AttributeApplication[], + default: [] as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('email'), - ExpressionUtils.field('organizationId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email"), ExpressionUtils.field("organizationId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ApiKey: { - name: 'ApiKey', + name: "ApiKey", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, createdBy: { - name: 'createdBy', - type: 'String', - optional: true, + name: "createdBy", + type: "String", + optional: true }, lastUsedAt: { - name: 'lastUsedAt', - type: 'DateTime', - optional: true, + name: "lastUsedAt", + type: "DateTime", + optional: true }, label: { - name: 'label', - type: 'String', + name: "label", + type: "String" }, hashedKey: { - name: 'hashedKey', - type: 'String', + name: "hashedKey", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'apiKeys', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "apiKeys", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, apiKeyEnvironments: { - name: 'apiKeyEnvironments', - type: 'ApiKeyEnvironment', + name: "apiKeyEnvironments", + type: "ApiKeyEnvironment", array: true, - relation: { opposite: 'apiKey' }, + relation: { opposite: "apiKey" } }, organizationAccess: { - name: 'organizationAccess', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, - }, + name: "organizationAccess", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - hashedKey: { type: 'String' }, - }, + id: { type: "String" }, + hashedKey: { type: "String" } + } }, ApiKeyEnvironment: { - name: 'ApiKeyEnvironment', + name: "ApiKeyEnvironment", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, apiKeyId: { - name: 'apiKeyId', - type: 'String', - foreignKeyFor: ['apiKey'] as readonly string[], + name: "apiKeyId", + type: "String", + foreignKeyFor: [ + "apiKey" + ] as readonly string[] }, apiKey: { - name: 'apiKey', - type: 'ApiKey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('apiKeyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'apiKeyEnvironments', - fields: ['apiKeyId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "apiKey", + type: "ApiKey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "apiKeyEnvironments", fields: ["apiKeyId"], references: ["id"], onDelete: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'ApiKeyEnvironment', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "ApiKeyEnvironment", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, permission: { - name: 'permission', - type: 'ApiKeyPermission', - }, + name: "permission", + type: "ApiKeyPermission" + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('apiKeyId'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("apiKeyId"), ExpressionUtils.field("environmentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - apiKeyId_environmentId: { apiKeyId: { type: 'String' }, environmentId: { type: 'String' } }, - }, + id: { type: "String" }, + apiKeyId_environmentId: { apiKeyId: { type: "String" }, environmentId: { type: "String" } } + } }, Account: { - name: 'Account', + name: "Account", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'accounts', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "accounts", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'String', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + foreignKeyFor: [ + "user" + ] as readonly string[] }, type: { - name: 'type', - type: 'String', + name: "type", + type: "String" }, provider: { - name: 'provider', - type: 'String', + name: "provider", + type: "String" }, providerAccountId: { - name: 'providerAccountId', - type: 'String', + name: "providerAccountId", + type: "String" }, access_token: { - name: 'access_token', - type: 'String', + name: "access_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, refresh_token: { - name: 'refresh_token', - type: 'String', + name: "refresh_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, expires_at: { - name: 'expires_at', - type: 'Int', - optional: true, + name: "expires_at", + type: "Int", + optional: true }, ext_expires_in: { - name: 'ext_expires_in', - type: 'Int', - optional: true, + name: "ext_expires_in", + type: "Int", + optional: true }, token_type: { - name: 'token_type', - type: 'String', - optional: true, + name: "token_type", + type: "String", + optional: true }, scope: { - name: 'scope', - type: 'String', - optional: true, + name: "scope", + type: "String", + optional: true }, id_token: { - name: 'id_token', - type: 'String', + name: "id_token", + type: "String", optional: true, - attributes: [{ name: '@db.Text' }] as readonly AttributeApplication[], + attributes: [{ name: "@db.Text" }] as readonly AttributeApplication[] }, session_state: { - name: 'session_state', - type: 'String', - optional: true, - }, + name: "session_state", + type: "String", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('provider'), - ExpressionUtils.field('providerAccountId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("provider"), ExpressionUtils.field("providerAccountId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - provider_providerAccountId: { provider: { type: 'String' }, providerAccountId: { type: 'String' } }, - }, + id: { type: "String" }, + provider_providerAccountId: { provider: { type: "String" }, providerAccountId: { type: "String" } } + } }, User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, emailVerified: { - name: 'emailVerified', - type: 'DateTime', + name: "emailVerified", + type: "DateTime", optional: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('email_verified') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("email_verified") }] }] as readonly AttributeApplication[] }, imageUrl: { - name: 'imageUrl', - type: 'String', - optional: true, + name: "imageUrl", + type: "String", + optional: true }, twoFactorSecret: { - name: 'twoFactorSecret', - type: 'String', - optional: true, + name: "twoFactorSecret", + type: "String", + optional: true }, twoFactorEnabled: { - name: 'twoFactorEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "twoFactorEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, backupCodes: { - name: 'backupCodes', - type: 'String', - optional: true, + name: "backupCodes", + type: "String", + optional: true }, password: { - name: 'password', - type: 'String', - optional: true, + name: "password", + type: "String", + optional: true }, identityProvider: { - name: 'identityProvider', - type: 'IdentityProvider', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('email') }] }, - ] as readonly AttributeApplication[], - default: 'email' as FieldDefault, + name: "identityProvider", + type: "IdentityProvider", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("email") }] }] as readonly AttributeApplication[], + default: "email" as FieldDefault }, identityProviderAccountId: { - name: 'identityProviderAccountId', - type: 'String', - optional: true, + name: "identityProviderAccountId", + type: "String", + optional: true }, memberships: { - name: 'memberships', - type: 'Membership', + name: "memberships", + type: "Membership", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, accounts: { - name: 'accounts', - type: 'Account', + name: "accounts", + type: "Account", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, responseNotes: { - name: 'responseNotes', - type: 'ResponseNote', + name: "responseNotes", + type: "ResponseNote", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, groupId: { - name: 'groupId', - type: 'String', - optional: true, + name: "groupId", + type: "String", + optional: true }, invitesCreated: { - name: 'invitesCreated', - type: 'Invite', + name: "invitesCreated", + type: "Invite", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('inviteCreatedBy') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'creator', name: 'inviteCreatedBy' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteCreatedBy") }] }] as readonly AttributeApplication[], + relation: { opposite: "creator", name: "inviteCreatedBy" } }, invitesAccepted: { - name: 'invitesAccepted', - type: 'Invite', + name: "invitesAccepted", + type: "Invite", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('inviteAcceptedBy') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'acceptor', name: 'inviteAcceptedBy' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("inviteAcceptedBy") }] }] as readonly AttributeApplication[], + relation: { opposite: "acceptor", name: "inviteAcceptedBy" } }, role: { - name: 'role', - type: 'Role', - optional: true, + name: "role", + type: "Role", + optional: true }, objective: { - name: 'objective', - type: 'Objective', - optional: true, + name: "objective", + type: "Objective", + optional: true }, notificationSettings: { - name: 'notificationSettings', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('{}') }] }, - ] as readonly AttributeApplication[], - default: '{}' as FieldDefault, + name: "notificationSettings", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("{}") }] }] as readonly AttributeApplication[], + default: "{}" as FieldDefault }, locale: { - name: 'locale', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('en-US') }] }, - ] as readonly AttributeApplication[], - default: 'en-US' as FieldDefault, + name: "locale", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("en-US") }] }] as readonly AttributeApplication[], + default: "en-US" as FieldDefault }, surveys: { - name: 'surveys', - type: 'Survey', + name: "surveys", + type: "Survey", array: true, - relation: { opposite: 'creator' }, + relation: { opposite: "creator" } }, teamUsers: { - name: 'teamUsers', - type: 'TeamUser', + name: "teamUsers", + type: "TeamUser", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, lastLoginAt: { - name: 'lastLoginAt', - type: 'DateTime', - optional: true, + name: "lastLoginAt", + type: "DateTime", + optional: true }, isActive: { - name: 'isActive', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, - }, + name: "isActive", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('email')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("email")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - email: { type: 'String' }, - }, + id: { type: "String" }, + email: { type: "String" } + } }, ShortUrl: { - name: 'ShortUrl', + name: "ShortUrl", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, url: { - name: 'url', - type: 'String', + name: "url", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - url: { type: 'String' }, - }, + id: { type: "String" }, + url: { type: "String" } + } }, Segment: { - name: 'Segment', + name: "Segment", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, isPrivate: { - name: 'isPrivate', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "isPrivate", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, filters: { - name: 'filters', - type: 'Json', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('[]') }] }, - ] as readonly AttributeApplication[], - default: '[]' as FieldDefault, + name: "filters", + type: "Json", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("[]") }] }] as readonly AttributeApplication[], + default: "[]" as FieldDefault }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'segments', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "segments", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, surveys: { - name: 'surveys', - type: 'Survey', + name: "surveys", + type: "Survey", array: true, - relation: { opposite: 'segment' }, - }, + relation: { opposite: "segment" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('title'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("title")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - environmentId_title: { environmentId: { type: 'String' }, title: { type: 'String' } }, - }, + id: { type: "String" }, + environmentId_title: { environmentId: { type: "String" }, title: { type: "String" } } + } }, Language: { - name: 'Language', + name: "Language", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, code: { - name: 'code', - type: 'String', + name: "code", + type: "String" }, alias: { - name: 'alias', - type: 'String', - optional: true, + name: "alias", + type: "String", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'languages', fields: ['projectId'], references: ['id'], onDelete: 'Cascade' }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "languages", fields: ["projectId"], references: ["id"], onDelete: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, surveyLanguages: { - name: 'surveyLanguages', - type: 'SurveyLanguage', + name: "surveyLanguages", + type: "SurveyLanguage", array: true, - relation: { opposite: 'language' }, - }, + relation: { opposite: "language" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('code'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("code")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - projectId_code: { projectId: { type: 'String' }, code: { type: 'String' } }, - }, + id: { type: "String" }, + projectId_code: { projectId: { type: "String" }, code: { type: "String" } } + } }, SurveyLanguage: { - name: 'SurveyLanguage', + name: "SurveyLanguage", fields: { language: { - name: 'language', - type: 'Language', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('languageId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'surveyLanguages', - fields: ['languageId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "language", + type: "Language", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("languageId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "surveyLanguages", fields: ["languageId"], references: ["id"], onDelete: "Cascade" } }, languageId: { - name: 'languageId', - type: 'String', + name: "languageId", + type: "String", id: true, - foreignKeyFor: ['language'] as readonly string[], + foreignKeyFor: [ + "language" + ] as readonly string[] }, surveyId: { - name: 'surveyId', - type: 'String', + name: "surveyId", + type: "String", id: true, - foreignKeyFor: ['survey'] as readonly string[], + foreignKeyFor: [ + "survey" + ] as readonly string[] }, survey: { - name: 'survey', - type: 'Survey', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'languages', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, + name: "survey", + type: "Survey", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "languages", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } }, default: { - name: 'default', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "default", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, - }, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('languageId'), - ExpressionUtils.field('surveyId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('languageId')]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("languageId"), ExpressionUtils.field("surveyId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("languageId")]) }] } ] as readonly AttributeApplication[], - idFields: ['languageId', 'surveyId'], + idFields: ["languageId", "surveyId"], uniqueFields: { - languageId_surveyId: { languageId: { type: 'String' }, surveyId: { type: 'String' } }, - }, + languageId_surveyId: { languageId: { type: "String" }, surveyId: { type: "String" } } + } }, Insight: { - name: 'Insight', + name: "Insight", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'insights', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "insights", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, category: { - name: 'category', - type: 'InsightCategory', + name: "category", + type: "InsightCategory" }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', + name: "description", + type: "String" }, vector: { - name: 'vector', - type: 'Unsupported', - optional: true, + name: "vector", + type: "Unsupported", + optional: true }, documentInsights: { - name: 'documentInsights', - type: 'DocumentInsight', + name: "documentInsights", + type: "DocumentInsight", array: true, - relation: { opposite: 'insight' }, - }, + relation: { opposite: "insight" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, DocumentInsight: { - name: 'DocumentInsight', + name: "DocumentInsight", fields: { documentId: { - name: 'documentId', - type: 'String', + name: "documentId", + type: "String", id: true, - foreignKeyFor: ['document'] as readonly string[], + foreignKeyFor: [ + "document" + ] as readonly string[] }, document: { - name: 'document', - type: 'Document', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('documentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'documentInsights', - fields: ['documentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "document", + type: "Document", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("documentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "documentInsights", fields: ["documentId"], references: ["id"], onDelete: "Cascade" } }, insightId: { - name: 'insightId', - type: 'String', + name: "insightId", + type: "String", id: true, - foreignKeyFor: ['insight'] as readonly string[], + foreignKeyFor: [ + "insight" + ] as readonly string[] }, insight: { - name: 'insight', - type: 'Insight', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('insightId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'documentInsights', - fields: ['insightId'], - references: ['id'], - onDelete: 'Cascade', - }, - }, + name: "insight", + type: "Insight", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("insightId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "documentInsights", fields: ["insightId"], references: ["id"], onDelete: "Cascade" } + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('documentId'), - ExpressionUtils.field('insightId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('insightId')]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("documentId"), ExpressionUtils.field("insightId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("insightId")]) }] } ] as readonly AttributeApplication[], - idFields: ['documentId', 'insightId'], + idFields: ["documentId", "insightId"], uniqueFields: { - documentId_insightId: { documentId: { type: 'String' }, insightId: { type: 'String' } }, - }, + documentId_insightId: { documentId: { type: "String" }, insightId: { type: "String" } } + } }, Document: { - name: 'Document', + name: "Document", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'Environment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'documents', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "environment", + type: "Environment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "documents", fields: ["environmentId"], references: ["id"], onDelete: "Cascade" } }, surveyId: { - name: 'surveyId', - type: 'String', + name: "surveyId", + type: "String", optional: true, - foreignKeyFor: ['survey'] as readonly string[], + foreignKeyFor: [ + "survey" + ] as readonly string[] }, survey: { - name: 'survey', - type: 'Survey', + name: "survey", + type: "Survey", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('surveyId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'documents', fields: ['surveyId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("surveyId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "documents", fields: ["surveyId"], references: ["id"], onDelete: "Cascade" } }, responseId: { - name: 'responseId', - type: 'String', + name: "responseId", + type: "String", optional: true, - foreignKeyFor: ['response'] as readonly string[], + foreignKeyFor: [ + "response" + ] as readonly string[] }, response: { - name: 'response', - type: 'Response', + name: "response", + type: "Response", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('responseId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'documents', - fields: ['responseId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "documents", fields: ["responseId"], references: ["id"], onDelete: "Cascade" } }, questionId: { - name: 'questionId', - type: 'String', - optional: true, + name: "questionId", + type: "String", + optional: true }, sentiment: { - name: 'sentiment', - type: 'Sentiment', + name: "sentiment", + type: "Sentiment" }, isSpam: { - name: 'isSpam', - type: 'Boolean', + name: "isSpam", + type: "Boolean" }, text: { - name: 'text', - type: 'String', + name: "text", + type: "String" }, vector: { - name: 'vector', - type: 'Unsupported', - optional: true, + name: "vector", + type: "Unsupported", + optional: true }, documentInsights: { - name: 'documentInsights', - type: 'DocumentInsight', + name: "documentInsights", + type: "DocumentInsight", array: true, - relation: { opposite: 'document' }, - }, + relation: { opposite: "document" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('responseId'), - ExpressionUtils.field('questionId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("responseId"), ExpressionUtils.field("questionId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - responseId_questionId: { responseId: { type: 'String' }, questionId: { type: 'String' } }, - }, + id: { type: "String" }, + responseId_questionId: { responseId: { type: "String" }, questionId: { type: "String" } } + } }, Team: { - name: 'Team', + name: "Team", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'teams', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "teams", fields: ["organizationId"], references: ["id"], onDelete: "Cascade" } }, teamUsers: { - name: 'teamUsers', - type: 'TeamUser', + name: "teamUsers", + type: "TeamUser", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, projectTeams: { - name: 'projectTeams', - type: 'ProjectTeam', + name: "projectTeams", + type: "ProjectTeam", array: true, - relation: { opposite: 'team' }, - }, + relation: { opposite: "team" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("name")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - organizationId_name: { organizationId: { type: 'String' }, name: { type: 'String' } }, - }, + id: { type: "String" }, + organizationId_name: { organizationId: { type: "String" }, name: { type: "String" } } + } }, TeamUser: { - name: 'TeamUser', + name: "TeamUser", fields: { createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, teamId: { - name: 'teamId', - type: 'String', + name: "teamId", + type: "String", id: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'teamUsers', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "teamUsers", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'String', + name: "userId", + type: "String", id: true, - foreignKeyFor: ['user'] as readonly string[], + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'teamUsers', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "teamUsers", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, role: { - name: 'role', - type: 'TeamUserRole', - }, + name: "role", + type: "TeamUserRole" + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('userId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]) }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId"), ExpressionUtils.field("userId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['teamId', 'userId'], + idFields: ["teamId", "userId"], uniqueFields: { - teamId_userId: { teamId: { type: 'String' }, userId: { type: 'String' } }, - }, + teamId_userId: { teamId: { type: "String" }, userId: { type: "String" } } + } }, ProjectTeam: { - name: 'ProjectTeam', + name: "ProjectTeam", fields: { createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('created_at') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("created_at") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [ - { name: '@updatedAt' }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('updated_at') }] }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("updated_at") }] }] as readonly AttributeApplication[] }, projectId: { - name: 'projectId', - type: 'String', + name: "projectId", + type: "String", id: true, - foreignKeyFor: ['project'] as readonly string[], + foreignKeyFor: [ + "project" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'projectTeams', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "projectTeams", fields: ["projectId"], references: ["id"], onDelete: "Cascade" } }, teamId: { - name: 'teamId', - type: 'String', + name: "teamId", + type: "String", id: true, - foreignKeyFor: ['team'] as readonly string[], + foreignKeyFor: [ + "team" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'projectTeams', fields: ['teamId'], references: ['id'], onDelete: 'Cascade' }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "projectTeams", fields: ["teamId"], references: ["id"], onDelete: "Cascade" } }, permission: { - name: 'permission', - type: 'ProjectTeamPermission', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('read') }] }, - ] as readonly AttributeApplication[], - default: 'read' as FieldDefault, - }, + name: "permission", + type: "ProjectTeamPermission", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("read") }] }] as readonly AttributeApplication[], + default: "read" as FieldDefault + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('teamId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('teamId')]) }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("teamId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['projectId', 'teamId'], + idFields: ["projectId", "teamId"], uniqueFields: { - projectId_teamId: { projectId: { type: 'String' }, teamId: { type: 'String' } }, - }, - }, + projectId_teamId: { projectId: { type: "String" }, teamId: { type: "String" } } + } + } } as const; enums = { PipelineTriggers: { - name: 'PipelineTriggers', + name: "PipelineTriggers", values: { - responseCreated: 'responseCreated', - responseUpdated: 'responseUpdated', - responseFinished: 'responseFinished', - }, + responseCreated: "responseCreated", + responseUpdated: "responseUpdated", + responseFinished: "responseFinished" + } }, WebhookSource: { - name: 'WebhookSource', + name: "WebhookSource", values: { - user: 'user', - zapier: 'zapier', - make: 'make', - n8n: 'n8n', - activepieces: 'activepieces', - }, + user: "user", + zapier: "zapier", + make: "make", + n8n: "n8n", + activepieces: "activepieces" + } }, ContactAttributeType: { - name: 'ContactAttributeType', + name: "ContactAttributeType", values: { - default: 'default', - custom: 'custom', - }, + default: "default", + custom: "custom" + } }, SurveyStatus: { - name: 'SurveyStatus', + name: "SurveyStatus", values: { - draft: 'draft', - scheduled: 'scheduled', - inProgress: 'inProgress', - paused: 'paused', - completed: 'completed', - }, + draft: "draft", + scheduled: "scheduled", + inProgress: "inProgress", + paused: "paused", + completed: "completed" + } }, DisplayStatus: { - name: 'DisplayStatus', + name: "DisplayStatus", values: { - seen: 'seen', - responded: 'responded', - }, + seen: "seen", + responded: "responded" + } }, SurveyAttributeFilterCondition: { - name: 'SurveyAttributeFilterCondition', + name: "SurveyAttributeFilterCondition", values: { - equals: 'equals', - notEquals: 'notEquals', - }, + equals: "equals", + notEquals: "notEquals" + } }, SurveyType: { - name: 'SurveyType', + name: "SurveyType", values: { - link: 'link', - web: 'web', - website: 'website', - app: 'app', - }, + link: "link", + web: "web", + website: "website", + app: "app" + } }, displayOptions: { - name: 'displayOptions', + name: "displayOptions", values: { - displayOnce: 'displayOnce', - displayMultiple: 'displayMultiple', - displaySome: 'displaySome', - respondMultiple: 'respondMultiple', - }, + displayOnce: "displayOnce", + displayMultiple: "displayMultiple", + displaySome: "displaySome", + respondMultiple: "respondMultiple" + } }, ActionType: { - name: 'ActionType', + name: "ActionType", values: { - code: 'code', - noCode: 'noCode', - }, + code: "code", + noCode: "noCode" + } }, EnvironmentType: { - name: 'EnvironmentType', + name: "EnvironmentType", values: { - production: 'production', - development: 'development', - }, + production: "production", + development: "development" + } }, IntegrationType: { - name: 'IntegrationType', + name: "IntegrationType", values: { - googleSheets: 'googleSheets', - notion: 'notion', - airtable: 'airtable', - slack: 'slack', - }, + googleSheets: "googleSheets", + notion: "notion", + airtable: "airtable", + slack: "slack" + } }, DataMigrationStatus: { - name: 'DataMigrationStatus', + name: "DataMigrationStatus", values: { - pending: 'pending', - applied: 'applied', - failed: 'failed', - }, + pending: "pending", + applied: "applied", + failed: "failed" + } }, WidgetPlacement: { - name: 'WidgetPlacement', + name: "WidgetPlacement", values: { - bottomLeft: 'bottomLeft', - bottomRight: 'bottomRight', - topLeft: 'topLeft', - topRight: 'topRight', - center: 'center', - }, + bottomLeft: "bottomLeft", + bottomRight: "bottomRight", + topLeft: "topLeft", + topRight: "topRight", + center: "center" + } }, OrganizationRole: { - name: 'OrganizationRole', + name: "OrganizationRole", values: { - owner: 'owner', - manager: 'manager', - member: 'member', - billing: 'billing', - }, + owner: "owner", + manager: "manager", + member: "member", + billing: "billing" + } }, MembershipRole: { - name: 'MembershipRole', + name: "MembershipRole", values: { - owner: 'owner', - admin: 'admin', - editor: 'editor', - developer: 'developer', - viewer: 'viewer', - }, + owner: "owner", + admin: "admin", + editor: "editor", + developer: "developer", + viewer: "viewer" + } }, ApiKeyPermission: { - name: 'ApiKeyPermission', + name: "ApiKeyPermission", values: { - read: 'read', - write: 'write', - manage: 'manage', - }, + read: "read", + write: "write", + manage: "manage" + } }, IdentityProvider: { - name: 'IdentityProvider', + name: "IdentityProvider", values: { - email: 'email', - github: 'github', - google: 'google', - azuread: 'azuread', - openid: 'openid', - saml: 'saml', - }, + email: "email", + github: "github", + google: "google", + azuread: "azuread", + openid: "openid", + saml: "saml" + } }, Role: { - name: 'Role', + name: "Role", values: { - project_manager: 'project_manager', - engineer: 'engineer', - founder: 'founder', - marketing_specialist: 'marketing_specialist', - other: 'other', - }, + project_manager: "project_manager", + engineer: "engineer", + founder: "founder", + marketing_specialist: "marketing_specialist", + other: "other" + } }, Objective: { - name: 'Objective', + name: "Objective", values: { - increase_conversion: 'increase_conversion', - improve_user_retention: 'improve_user_retention', - increase_user_adoption: 'increase_user_adoption', - sharpen_marketing_messaging: 'sharpen_marketing_messaging', - support_sales: 'support_sales', - other: 'other', - }, + increase_conversion: "increase_conversion", + improve_user_retention: "improve_user_retention", + increase_user_adoption: "increase_user_adoption", + sharpen_marketing_messaging: "sharpen_marketing_messaging", + support_sales: "support_sales", + other: "other" + } }, Intention: { - name: 'Intention', + name: "Intention", values: { - survey_user_segments: 'survey_user_segments', - survey_at_specific_point_in_user_journey: 'survey_at_specific_point_in_user_journey', - enrich_customer_profiles: 'enrich_customer_profiles', - collect_all_user_feedback_on_one_platform: 'collect_all_user_feedback_on_one_platform', - other: 'other', - }, + survey_user_segments: "survey_user_segments", + survey_at_specific_point_in_user_journey: "survey_at_specific_point_in_user_journey", + enrich_customer_profiles: "enrich_customer_profiles", + collect_all_user_feedback_on_one_platform: "collect_all_user_feedback_on_one_platform", + other: "other" + } }, InsightCategory: { - name: 'InsightCategory', + name: "InsightCategory", values: { - featureRequest: 'featureRequest', - complaint: 'complaint', - praise: 'praise', - other: 'other', - }, + featureRequest: "featureRequest", + complaint: "complaint", + praise: "praise", + other: "other" + } }, Sentiment: { - name: 'Sentiment', + name: "Sentiment", values: { - positive: 'positive', - negative: 'negative', - neutral: 'neutral', - }, + positive: "positive", + negative: "negative", + neutral: "neutral" + } }, TeamUserRole: { - name: 'TeamUserRole', + name: "TeamUserRole", values: { - admin: 'admin', - contributor: 'contributor', - }, + admin: "admin", + contributor: "contributor" + } }, ProjectTeamPermission: { - name: 'ProjectTeamPermission', + name: "ProjectTeamPermission", values: { - read: 'read', - readWrite: 'readWrite', - manage: 'manage', - }, - }, + read: "read", + readWrite: "readWrite", + manage: "manage" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/github-repos/trigger.dev/schema.ts b/tests/e2e/github-repos/trigger.dev/schema.ts index 556484fa1..35ae95145 100644 --- a/tests/e2e/github-repos/trigger.dev/schema.ts +++ b/tests/e2e/github-repos/trigger.dev/schema.ts @@ -5,9917 +5,6374 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, authenticationMethod: { - name: 'authenticationMethod', - type: 'AuthenticationMethod', + name: "authenticationMethod", + type: "AuthenticationMethod" }, authenticationProfile: { - name: 'authenticationProfile', - type: 'Json', - optional: true, + name: "authenticationProfile", + type: "Json", + optional: true }, authenticationExtraParams: { - name: 'authenticationExtraParams', - type: 'Json', - optional: true, + name: "authenticationExtraParams", + type: "Json", + optional: true }, authIdentifier: { - name: 'authIdentifier', - type: 'String', + name: "authIdentifier", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, displayName: { - name: 'displayName', - type: 'String', - optional: true, + name: "displayName", + type: "String", + optional: true }, name: { - name: 'name', - type: 'String', - optional: true, + name: "name", + type: "String", + optional: true }, avatarUrl: { - name: 'avatarUrl', - type: 'String', - optional: true, + name: "avatarUrl", + type: "String", + optional: true }, admin: { - name: 'admin', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "admin", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, dashboardPreferences: { - name: 'dashboardPreferences', - type: 'Json', - optional: true, + name: "dashboardPreferences", + type: "Json", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, isOnCloudWaitlist: { - name: 'isOnCloudWaitlist', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isOnCloudWaitlist", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, featureCloud: { - name: 'featureCloud', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "featureCloud", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isOnHostedRepoWaitlist: { - name: 'isOnHostedRepoWaitlist', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isOnHostedRepoWaitlist", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, marketingEmails: { - name: 'marketingEmails', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "marketingEmails", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, confirmedBasicDetails: { - name: 'confirmedBasicDetails', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "confirmedBasicDetails", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, referralSource: { - name: 'referralSource', - type: 'String', - optional: true, + name: "referralSource", + type: "String", + optional: true }, orgMemberships: { - name: 'orgMemberships', - type: 'OrgMember', + name: "orgMemberships", + type: "OrgMember", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, sentInvites: { - name: 'sentInvites', - type: 'OrgMemberInvite', + name: "sentInvites", + type: "OrgMemberInvite", array: true, - relation: { opposite: 'inviter' }, + relation: { opposite: "inviter" } }, invitationCode: { - name: 'invitationCode', - type: 'InvitationCode', + name: "invitationCode", + type: "InvitationCode", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('invitationCodeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'users', fields: ['invitationCodeId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("invitationCodeId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "users", fields: ["invitationCodeId"], references: ["id"] } }, invitationCodeId: { - name: 'invitationCodeId', - type: 'String', + name: "invitationCodeId", + type: "String", optional: true, - foreignKeyFor: ['invitationCode'] as readonly string[], + foreignKeyFor: [ + "invitationCode" + ] as readonly string[] }, personalAccessTokens: { - name: 'personalAccessTokens', - type: 'PersonalAccessToken', + name: "personalAccessTokens", + type: "PersonalAccessToken", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, deployments: { - name: 'deployments', - type: 'WorkerDeployment', + name: "deployments", + type: "WorkerDeployment", array: true, - relation: { opposite: 'triggeredBy' }, - }, + relation: { opposite: "triggeredBy" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - email: { type: 'String' }, - authIdentifier: { type: 'String' }, - }, + id: { type: "String" }, + email: { type: "String" }, + authIdentifier: { type: "String" } + } }, InvitationCode: { - name: 'InvitationCode', + name: "InvitationCode", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, code: { - name: 'code', - type: 'String', + name: "code", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, users: { - name: 'users', - type: 'User', + name: "users", + type: "User", array: true, - relation: { opposite: 'invitationCode' }, + relation: { opposite: "invitationCode" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - code: { type: 'String' }, - }, + id: { type: "String" }, + code: { type: "String" } + } }, AuthorizationCode: { - name: 'AuthorizationCode', + name: "AuthorizationCode", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, code: { - name: 'code', - type: 'String', + name: "code", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, personalAccessToken: { - name: 'personalAccessToken', - type: 'PersonalAccessToken', + name: "personalAccessToken", + type: "PersonalAccessToken", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('personalAccessTokenId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'authorizationCodes', - fields: ['personalAccessTokenId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("personalAccessTokenId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "authorizationCodes", fields: ["personalAccessTokenId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, personalAccessTokenId: { - name: 'personalAccessTokenId', - type: 'String', + name: "personalAccessTokenId", + type: "String", optional: true, - foreignKeyFor: ['personalAccessToken'] as readonly string[], + foreignKeyFor: [ + "personalAccessToken" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - code: { type: 'String' }, - }, + id: { type: "String" }, + code: { type: "String" } + } }, PersonalAccessToken: { - name: 'PersonalAccessToken', + name: "PersonalAccessToken", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, encryptedToken: { - name: 'encryptedToken', - type: 'Json', + name: "encryptedToken", + type: "Json" }, obfuscatedToken: { - name: 'obfuscatedToken', - type: 'String', + name: "obfuscatedToken", + type: "String" }, hashedToken: { - name: 'hashedToken', - type: 'String', + name: "hashedToken", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'personalAccessTokens', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "personalAccessTokens", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'String', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + foreignKeyFor: [ + "user" + ] as readonly string[] }, revokedAt: { - name: 'revokedAt', - type: 'DateTime', - optional: true, + name: "revokedAt", + type: "DateTime", + optional: true }, lastAccessedAt: { - name: 'lastAccessedAt', - type: 'DateTime', - optional: true, + name: "lastAccessedAt", + type: "DateTime", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, authorizationCodes: { - name: 'authorizationCodes', - type: 'AuthorizationCode', + name: "authorizationCodes", + type: "AuthorizationCode", array: true, - relation: { opposite: 'personalAccessToken' }, - }, + relation: { opposite: "personalAccessToken" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - hashedToken: { type: 'String' }, - }, + id: { type: "String" }, + hashedToken: { type: "String" } + } }, Organization: { - name: 'Organization', + name: "Organization", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, maximumExecutionTimePerRunInMs: { - name: 'maximumExecutionTimePerRunInMs', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(900000) }] }, - ] as readonly AttributeApplication[], - default: 900000 as FieldDefault, + name: "maximumExecutionTimePerRunInMs", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(900000) }] }] as readonly AttributeApplication[], + default: 900000 as FieldDefault }, maximumConcurrencyLimit: { - name: 'maximumConcurrencyLimit', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(10) }] }, - ] as readonly AttributeApplication[], - default: 10 as FieldDefault, + name: "maximumConcurrencyLimit", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(10) }] }] as readonly AttributeApplication[], + default: 10 as FieldDefault }, maximumSchedulesLimit: { - name: 'maximumSchedulesLimit', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(5) }] }, - ] as readonly AttributeApplication[], - default: 5 as FieldDefault, + name: "maximumSchedulesLimit", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(5) }] }] as readonly AttributeApplication[], + default: 5 as FieldDefault }, maximumDevQueueSize: { - name: 'maximumDevQueueSize', - type: 'Int', - optional: true, + name: "maximumDevQueueSize", + type: "Int", + optional: true }, maximumDeployedQueueSize: { - name: 'maximumDeployedQueueSize', - type: 'Int', - optional: true, + name: "maximumDeployedQueueSize", + type: "Int", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, deletedAt: { - name: 'deletedAt', - type: 'DateTime', - optional: true, + name: "deletedAt", + type: "DateTime", + optional: true }, companySize: { - name: 'companySize', - type: 'String', - optional: true, + name: "companySize", + type: "String", + optional: true }, avatar: { - name: 'avatar', - type: 'Json', - optional: true, + name: "avatar", + type: "Json", + optional: true }, runsEnabled: { - name: 'runsEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "runsEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, v3Enabled: { - name: 'v3Enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "v3Enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, v2Enabled: { - name: 'v2Enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "v2Enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, v2MarqsEnabled: { - name: 'v2MarqsEnabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "v2MarqsEnabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, hasRequestedV3: { - name: 'hasRequestedV3', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hasRequestedV3", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, environments: { - name: 'environments', - type: 'RuntimeEnvironment', + name: "environments", + type: "RuntimeEnvironment", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, apiRateLimiterConfig: { - name: 'apiRateLimiterConfig', - type: 'Json', - optional: true, + name: "apiRateLimiterConfig", + type: "Json", + optional: true }, realtimeRateLimiterConfig: { - name: 'realtimeRateLimiterConfig', - type: 'Json', - optional: true, + name: "realtimeRateLimiterConfig", + type: "Json", + optional: true }, projects: { - name: 'projects', - type: 'Project', + name: "projects", + type: "Project", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, members: { - name: 'members', - type: 'OrgMember', + name: "members", + type: "OrgMember", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, invites: { - name: 'invites', - type: 'OrgMemberInvite', + name: "invites", + type: "OrgMemberInvite", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, organizationIntegrations: { - name: 'organizationIntegrations', - type: 'OrganizationIntegration', + name: "organizationIntegrations", + type: "OrganizationIntegration", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, workerGroups: { - name: 'workerGroups', - type: 'WorkerInstanceGroup', + name: "workerGroups", + type: "WorkerInstanceGroup", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, workerInstances: { - name: 'workerInstances', - type: 'WorkerInstance', + name: "workerInstances", + type: "WorkerInstance", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, executionSnapshots: { - name: 'executionSnapshots', - type: 'TaskRunExecutionSnapshot', + name: "executionSnapshots", + type: "TaskRunExecutionSnapshot", array: true, - relation: { opposite: 'organization' }, - }, + relation: { opposite: "organization" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - slug: { type: 'String' }, - }, + id: { type: "String" }, + slug: { type: "String" } + } }, OrgMember: { - name: 'OrgMember', + name: "OrgMember", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'members', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "members", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'orgMemberships', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "orgMemberships", fields: ["userId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, userId: { - name: 'userId', - type: 'String', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + foreignKeyFor: [ + "user" + ] as readonly string[] }, role: { - name: 'role', - type: 'OrgMemberRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, - ] as readonly AttributeApplication[], - default: 'MEMBER' as FieldDefault, + name: "role", + type: "OrgMemberRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], + default: "MEMBER" as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, environments: { - name: 'environments', - type: 'RuntimeEnvironment', + name: "environments", + type: "RuntimeEnvironment", array: true, - relation: { opposite: 'orgMember' }, - }, + relation: { opposite: "orgMember" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('userId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - organizationId_userId: { organizationId: { type: 'String' }, userId: { type: 'String' } }, - }, + id: { type: "String" }, + organizationId_userId: { organizationId: { type: "String" }, userId: { type: "String" } } + } }, OrgMemberInvite: { - name: 'OrgMemberInvite', + name: "OrgMemberInvite", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, token: { - name: 'token', - type: 'String', + name: "token", + type: "String", unique: true, - attributes: [ - { name: '@unique' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String" }, role: { - name: 'role', - type: 'OrgMemberRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, - ] as readonly AttributeApplication[], - default: 'MEMBER' as FieldDefault, + name: "role", + type: "OrgMemberRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], + default: "MEMBER" as FieldDefault }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'invites', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "invites", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, inviter: { - name: 'inviter', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('inviterId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'sentInvites', - fields: ['inviterId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "inviter", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("inviterId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "sentInvites", fields: ["inviterId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, inviterId: { - name: 'inviterId', - type: 'String', - foreignKeyFor: ['inviter'] as readonly string[], + name: "inviterId", + type: "String", + foreignKeyFor: [ + "inviter" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('email'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("email")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - token: { type: 'String' }, - organizationId_email: { organizationId: { type: 'String' }, email: { type: 'String' } }, - }, + id: { type: "String" }, + token: { type: "String" }, + organizationId_email: { organizationId: { type: "String" }, email: { type: "String" } } + } }, RuntimeEnvironment: { - name: 'RuntimeEnvironment', + name: "RuntimeEnvironment", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String" }, apiKey: { - name: 'apiKey', - type: 'String', + name: "apiKey", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, pkApiKey: { - name: 'pkApiKey', - type: 'String', + name: "pkApiKey", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'RuntimeEnvironmentType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('DEVELOPMENT') }] }, - ] as readonly AttributeApplication[], - default: 'DEVELOPMENT' as FieldDefault, + name: "type", + type: "RuntimeEnvironmentType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("DEVELOPMENT") }] }] as readonly AttributeApplication[], + default: "DEVELOPMENT" as FieldDefault }, isBranchableEnvironment: { - name: 'isBranchableEnvironment', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isBranchableEnvironment", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, branchName: { - name: 'branchName', - type: 'String', - optional: true, + name: "branchName", + type: "String", + optional: true }, parentEnvironment: { - name: 'parentEnvironment', - type: 'RuntimeEnvironment', + name: "parentEnvironment", + type: "RuntimeEnvironment", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('parentEnvironment') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('parentEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'childEnvironments', - name: 'parentEnvironment', - fields: ['parentEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("parentEnvironment") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "childEnvironments", name: "parentEnvironment", fields: ["parentEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, parentEnvironmentId: { - name: 'parentEnvironmentId', - type: 'String', + name: "parentEnvironmentId", + type: "String", optional: true, - foreignKeyFor: ['parentEnvironment'] as readonly string[], + foreignKeyFor: [ + "parentEnvironment" + ] as readonly string[] }, childEnvironments: { - name: 'childEnvironments', - type: 'RuntimeEnvironment', + name: "childEnvironments", + type: "RuntimeEnvironment", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('parentEnvironment') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parentEnvironment', name: 'parentEnvironment' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("parentEnvironment") }] }] as readonly AttributeApplication[], + relation: { opposite: "parentEnvironment", name: "parentEnvironment" } }, git: { - name: 'git', - type: 'Json', - optional: true, + name: "git", + type: "Json", + optional: true }, archivedAt: { - name: 'archivedAt', - type: 'DateTime', - optional: true, + name: "archivedAt", + type: "DateTime", + optional: true }, shortcode: { - name: 'shortcode', - type: 'String', + name: "shortcode", + type: "String" }, maximumConcurrencyLimit: { - name: 'maximumConcurrencyLimit', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(5) }] }, - ] as readonly AttributeApplication[], - default: 5 as FieldDefault, + name: "maximumConcurrencyLimit", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(5) }] }] as readonly AttributeApplication[], + default: 5 as FieldDefault }, paused: { - name: 'paused', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "paused", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, autoEnableInternalSources: { - name: 'autoEnableInternalSources', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "autoEnableInternalSources", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'environments', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "environments", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'environments', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "environments", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, orgMember: { - name: 'orgMember', - type: 'OrgMember', + name: "orgMember", + type: "OrgMember", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('orgMemberId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'environments', - fields: ['orgMemberId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("orgMemberId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "environments", fields: ["orgMemberId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, orgMemberId: { - name: 'orgMemberId', - type: 'String', + name: "orgMemberId", + type: "String", optional: true, - foreignKeyFor: ['orgMember'] as readonly string[], + foreignKeyFor: [ + "orgMember" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, tunnelId: { - name: 'tunnelId', - type: 'String', - optional: true, + name: "tunnelId", + type: "String", + optional: true }, backgroundWorkers: { - name: 'backgroundWorkers', - type: 'BackgroundWorker', + name: "backgroundWorkers", + type: "BackgroundWorker", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, backgroundWorkerTasks: { - name: 'backgroundWorkerTasks', - type: 'BackgroundWorkerTask', + name: "backgroundWorkerTasks", + type: "BackgroundWorkerTask", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, taskRuns: { - name: 'taskRuns', - type: 'TaskRun', + name: "taskRuns", + type: "TaskRun", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, taskQueues: { - name: 'taskQueues', - type: 'TaskQueue', + name: "taskQueues", + type: "TaskQueue", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, batchTaskRuns: { - name: 'batchTaskRuns', - type: 'BatchTaskRun', + name: "batchTaskRuns", + type: "BatchTaskRun", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, environmentVariableValues: { - name: 'environmentVariableValues', - type: 'EnvironmentVariableValue', + name: "environmentVariableValues", + type: "EnvironmentVariableValue", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, checkpoints: { - name: 'checkpoints', - type: 'Checkpoint', + name: "checkpoints", + type: "Checkpoint", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, workerDeployments: { - name: 'workerDeployments', - type: 'WorkerDeployment', + name: "workerDeployments", + type: "WorkerDeployment", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, workerDeploymentPromotions: { - name: 'workerDeploymentPromotions', - type: 'WorkerDeploymentPromotion', + name: "workerDeploymentPromotions", + type: "WorkerDeploymentPromotion", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, taskRunAttempts: { - name: 'taskRunAttempts', - type: 'TaskRunAttempt', + name: "taskRunAttempts", + type: "TaskRunAttempt", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, CheckpointRestoreEvent: { - name: 'CheckpointRestoreEvent', - type: 'CheckpointRestoreEvent', + name: "CheckpointRestoreEvent", + type: "CheckpointRestoreEvent", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, taskScheduleInstances: { - name: 'taskScheduleInstances', - type: 'TaskScheduleInstance', + name: "taskScheduleInstances", + type: "TaskScheduleInstance", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, alerts: { - name: 'alerts', - type: 'ProjectAlert', + name: "alerts", + type: "ProjectAlert", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, sessions: { - name: 'sessions', - type: 'RuntimeEnvironmentSession', + name: "sessions", + type: "RuntimeEnvironmentSession", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, currentSession: { - name: 'currentSession', - type: 'RuntimeEnvironmentSession', + name: "currentSession", + type: "RuntimeEnvironmentSession", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('currentSession') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('currentSessionId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'currentEnvironments', - name: 'currentSession', - fields: ['currentSessionId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("currentSession") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("currentSessionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "currentEnvironments", name: "currentSession", fields: ["currentSessionId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, currentSessionId: { - name: 'currentSessionId', - type: 'String', + name: "currentSessionId", + type: "String", optional: true, - foreignKeyFor: ['currentSession'] as readonly string[], + foreignKeyFor: [ + "currentSession" + ] as readonly string[] }, taskRunNumberCounter: { - name: 'taskRunNumberCounter', - type: 'TaskRunNumberCounter', + name: "taskRunNumberCounter", + type: "TaskRunNumberCounter", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, taskRunCheckpoints: { - name: 'taskRunCheckpoints', - type: 'TaskRunCheckpoint', + name: "taskRunCheckpoints", + type: "TaskRunCheckpoint", array: true, - relation: { opposite: 'runtimeEnvironment' }, + relation: { opposite: "runtimeEnvironment" } }, waitpoints: { - name: 'waitpoints', - type: 'Waitpoint', + name: "waitpoints", + type: "Waitpoint", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, workerInstances: { - name: 'workerInstances', - type: 'WorkerInstance', + name: "workerInstances", + type: "WorkerInstance", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, executionSnapshots: { - name: 'executionSnapshots', - type: 'TaskRunExecutionSnapshot', + name: "executionSnapshots", + type: "TaskRunExecutionSnapshot", array: true, - relation: { opposite: 'environment' }, + relation: { opposite: "environment" } }, waitpointTags: { - name: 'waitpointTags', - type: 'WaitpointTag', + name: "waitpointTags", + type: "WaitpointTag", array: true, - relation: { opposite: 'environment' }, - }, + relation: { opposite: "environment" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('slug'), - ExpressionUtils.field('orgMemberId'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('shortcode'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('parentEnvironmentId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("slug"), ExpressionUtils.field("orgMemberId")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("shortcode")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentEnvironmentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - apiKey: { type: 'String' }, - pkApiKey: { type: 'String' }, - projectId_slug_orgMemberId: { - projectId: { type: 'String' }, - slug: { type: 'String' }, - orgMemberId: { type: 'String' }, - }, - projectId_shortcode: { projectId: { type: 'String' }, shortcode: { type: 'String' } }, - }, + id: { type: "String" }, + apiKey: { type: "String" }, + pkApiKey: { type: "String" }, + projectId_slug_orgMemberId: { projectId: { type: "String" }, slug: { type: "String" }, orgMemberId: { type: "String" } }, + projectId_shortcode: { projectId: { type: "String" }, shortcode: { type: "String" } } + } }, Project: { - name: 'Project', + name: "Project", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, externalRef: { - name: 'externalRef', - type: 'String', + name: "externalRef", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'projects', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "projects", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, deletedAt: { - name: 'deletedAt', - type: 'DateTime', - optional: true, + name: "deletedAt", + type: "DateTime", + optional: true }, version: { - name: 'version', - type: 'ProjectVersion', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V2') }] }, - ] as readonly AttributeApplication[], - default: 'V2' as FieldDefault, + name: "version", + type: "ProjectVersion", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V2") }] }] as readonly AttributeApplication[], + default: "V2" as FieldDefault }, engine: { - name: 'engine', - type: 'RunEngineVersion', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, - ] as readonly AttributeApplication[], - default: 'V1' as FieldDefault, + name: "engine", + type: "RunEngineVersion", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], + default: "V1" as FieldDefault }, builderProjectId: { - name: 'builderProjectId', - type: 'String', - optional: true, + name: "builderProjectId", + type: "String", + optional: true }, workerGroups: { - name: 'workerGroups', - type: 'WorkerInstanceGroup', + name: "workerGroups", + type: "WorkerInstanceGroup", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, workers: { - name: 'workers', - type: 'WorkerInstance', + name: "workers", + type: "WorkerInstance", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, defaultWorkerGroup: { - name: 'defaultWorkerGroup', - type: 'WorkerInstanceGroup', + name: "defaultWorkerGroup", + type: "WorkerInstanceGroup", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('ProjectDefaultWorkerGroup') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('defaultWorkerGroupId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'defaultForProjects', - name: 'ProjectDefaultWorkerGroup', - fields: ['defaultWorkerGroupId'], - references: ['id'], - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectDefaultWorkerGroup") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("defaultWorkerGroupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "defaultForProjects", name: "ProjectDefaultWorkerGroup", fields: ["defaultWorkerGroupId"], references: ["id"] } }, defaultWorkerGroupId: { - name: 'defaultWorkerGroupId', - type: 'String', + name: "defaultWorkerGroupId", + type: "String", optional: true, - foreignKeyFor: ['defaultWorkerGroup'] as readonly string[], + foreignKeyFor: [ + "defaultWorkerGroup" + ] as readonly string[] }, environments: { - name: 'environments', - type: 'RuntimeEnvironment', + name: "environments", + type: "RuntimeEnvironment", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, backgroundWorkers: { - name: 'backgroundWorkers', - type: 'BackgroundWorker', + name: "backgroundWorkers", + type: "BackgroundWorker", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, backgroundWorkerTasks: { - name: 'backgroundWorkerTasks', - type: 'BackgroundWorkerTask', + name: "backgroundWorkerTasks", + type: "BackgroundWorkerTask", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, taskRuns: { - name: 'taskRuns', - type: 'TaskRun', + name: "taskRuns", + type: "TaskRun", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, runTags: { - name: 'runTags', - type: 'TaskRunTag', + name: "runTags", + type: "TaskRunTag", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, taskQueues: { - name: 'taskQueues', - type: 'TaskQueue', + name: "taskQueues", + type: "TaskQueue", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, environmentVariables: { - name: 'environmentVariables', - type: 'EnvironmentVariable', + name: "environmentVariables", + type: "EnvironmentVariable", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, checkpoints: { - name: 'checkpoints', - type: 'Checkpoint', + name: "checkpoints", + type: "Checkpoint", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, WorkerDeployment: { - name: 'WorkerDeployment', - type: 'WorkerDeployment', + name: "WorkerDeployment", + type: "WorkerDeployment", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, CheckpointRestoreEvent: { - name: 'CheckpointRestoreEvent', - type: 'CheckpointRestoreEvent', + name: "CheckpointRestoreEvent", + type: "CheckpointRestoreEvent", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, taskSchedules: { - name: 'taskSchedules', - type: 'TaskSchedule', + name: "taskSchedules", + type: "TaskSchedule", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, alertChannels: { - name: 'alertChannels', - type: 'ProjectAlertChannel', + name: "alertChannels", + type: "ProjectAlertChannel", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, alerts: { - name: 'alerts', - type: 'ProjectAlert', + name: "alerts", + type: "ProjectAlert", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, alertStorages: { - name: 'alertStorages', - type: 'ProjectAlertStorage', + name: "alertStorages", + type: "ProjectAlertStorage", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, bulkActionGroups: { - name: 'bulkActionGroups', - type: 'BulkActionGroup', + name: "bulkActionGroups", + type: "BulkActionGroup", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, BackgroundWorkerFile: { - name: 'BackgroundWorkerFile', - type: 'BackgroundWorkerFile', + name: "BackgroundWorkerFile", + type: "BackgroundWorkerFile", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, waitpoints: { - name: 'waitpoints', - type: 'Waitpoint', + name: "waitpoints", + type: "Waitpoint", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, taskRunWaitpoints: { - name: 'taskRunWaitpoints', - type: 'TaskRunWaitpoint', + name: "taskRunWaitpoints", + type: "TaskRunWaitpoint", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, taskRunCheckpoints: { - name: 'taskRunCheckpoints', - type: 'TaskRunCheckpoint', + name: "taskRunCheckpoints", + type: "TaskRunCheckpoint", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, executionSnapshots: { - name: 'executionSnapshots', - type: 'TaskRunExecutionSnapshot', + name: "executionSnapshots", + type: "TaskRunExecutionSnapshot", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, waitpointTags: { - name: 'waitpointTags', - type: 'WaitpointTag', + name: "waitpointTags", + type: "WaitpointTag", array: true, - relation: { opposite: 'project' }, - }, + relation: { opposite: "project" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - slug: { type: 'String' }, - externalRef: { type: 'String' }, - }, + id: { type: "String" }, + slug: { type: "String" }, + externalRef: { type: "String" } + } }, SecretReference: { - name: 'SecretReference', + name: "SecretReference", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, key: { - name: 'key', - type: 'String', + name: "key", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, provider: { - name: 'provider', - type: 'SecretStoreProvider', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('DATABASE') }] }, - ] as readonly AttributeApplication[], - default: 'DATABASE' as FieldDefault, + name: "provider", + type: "SecretStoreProvider", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("DATABASE") }] }] as readonly AttributeApplication[], + default: "DATABASE" as FieldDefault }, environmentVariableValues: { - name: 'environmentVariableValues', - type: 'EnvironmentVariableValue', + name: "environmentVariableValues", + type: "EnvironmentVariableValue", array: true, - relation: { opposite: 'valueReference' }, + relation: { opposite: "valueReference" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, OrganizationIntegration: { - name: 'OrganizationIntegration', - type: 'OrganizationIntegration', + name: "OrganizationIntegration", + type: "OrganizationIntegration", array: true, - relation: { opposite: 'tokenReference' }, - }, + relation: { opposite: "tokenReference" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - key: { type: 'String' }, - }, + id: { type: "String" }, + key: { type: "String" } + } }, SecretStore: { - name: 'SecretStore', + name: "SecretStore", fields: { key: { - name: 'key', - type: 'String', + name: "key", + type: "String", id: true, unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, value: { - name: 'value', - type: 'Json', + name: "value", + type: "Json" }, version: { - name: 'version', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('1') }] }, - ] as readonly AttributeApplication[], - default: '1' as FieldDefault, + name: "version", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("1") }] }] as readonly AttributeApplication[], + default: "1" as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('key')]) }, - { name: 'type', value: ExpressionUtils.literal('BTree') }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("key")]) }, { name: "type", value: ExpressionUtils.literal("BTree") }] } ] as readonly AttributeApplication[], - idFields: ['key'], + idFields: ["key"], uniqueFields: { - key: { type: 'String' }, - }, + key: { type: "String" } + } }, DataMigration: { - name: 'DataMigration', + name: "DataMigration", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, - }, + name: "completedAt", + type: "DateTime", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - name: { type: 'String' }, - }, + id: { type: "String" }, + name: { type: "String" } + } }, BackgroundWorker: { - name: 'BackgroundWorker', + name: "BackgroundWorker", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, engine: { - name: 'engine', - type: 'RunEngineVersion', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, - ] as readonly AttributeApplication[], - default: 'V1' as FieldDefault, + name: "engine", + type: "RunEngineVersion", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], + default: "V1" as FieldDefault }, contentHash: { - name: 'contentHash', - type: 'String', + name: "contentHash", + type: "String" }, sdkVersion: { - name: 'sdkVersion', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('unknown') }] }, - ] as readonly AttributeApplication[], - default: 'unknown' as FieldDefault, + name: "sdkVersion", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("unknown") }] }] as readonly AttributeApplication[], + default: "unknown" as FieldDefault }, cliVersion: { - name: 'cliVersion', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('unknown') }] }, - ] as readonly AttributeApplication[], - default: 'unknown' as FieldDefault, + name: "cliVersion", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("unknown") }] }] as readonly AttributeApplication[], + default: "unknown" as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'backgroundWorkers', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "backgroundWorkers", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'backgroundWorkers', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "backgroundWorkers", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, version: { - name: 'version', - type: 'String', + name: "version", + type: "String" }, metadata: { - name: 'metadata', - type: 'Json', + name: "metadata", + type: "Json" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, tasks: { - name: 'tasks', - type: 'BackgroundWorkerTask', + name: "tasks", + type: "BackgroundWorkerTask", array: true, - relation: { opposite: 'worker' }, + relation: { opposite: "worker" } }, attempts: { - name: 'attempts', - type: 'TaskRunAttempt', + name: "attempts", + type: "TaskRunAttempt", array: true, - relation: { opposite: 'backgroundWorker' }, + relation: { opposite: "backgroundWorker" } }, lockedRuns: { - name: 'lockedRuns', - type: 'TaskRun', + name: "lockedRuns", + type: "TaskRun", array: true, - relation: { opposite: 'lockedToVersion' }, + relation: { opposite: "lockedToVersion" } }, files: { - name: 'files', - type: 'BackgroundWorkerFile', + name: "files", + type: "BackgroundWorkerFile", array: true, - relation: { opposite: 'backgroundWorkers' }, + relation: { opposite: "backgroundWorkers" } }, queues: { - name: 'queues', - type: 'TaskQueue', + name: "queues", + type: "TaskQueue", array: true, - relation: { opposite: 'workers' }, + relation: { opposite: "workers" } }, deployment: { - name: 'deployment', - type: 'WorkerDeployment', + name: "deployment", + type: "WorkerDeployment", optional: true, - relation: { opposite: 'worker' }, + relation: { opposite: "worker" } }, workerGroup: { - name: 'workerGroup', - type: 'WorkerInstanceGroup', + name: "workerGroup", + type: "WorkerInstanceGroup", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('workerGroupId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'backgroundWorkers', - fields: ['workerGroupId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerGroupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "backgroundWorkers", fields: ["workerGroupId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, workerGroupId: { - name: 'workerGroupId', - type: 'String', + name: "workerGroupId", + type: "String", optional: true, - foreignKeyFor: ['workerGroup'] as readonly string[], + foreignKeyFor: [ + "workerGroup" + ] as readonly string[] }, supportsLazyAttempts: { - name: 'supportsLazyAttempts', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, - }, + name: "supportsLazyAttempts", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('version'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('runtimeEnvironmentId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("version")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - projectId_runtimeEnvironmentId_version: { - projectId: { type: 'String' }, - runtimeEnvironmentId: { type: 'String' }, - version: { type: 'String' }, - }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + projectId_runtimeEnvironmentId_version: { projectId: { type: "String" }, runtimeEnvironmentId: { type: "String" }, version: { type: "String" } } + } }, BackgroundWorkerFile: { - name: 'BackgroundWorkerFile', + name: "BackgroundWorkerFile", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, filePath: { - name: 'filePath', - type: 'String', + name: "filePath", + type: "String" }, contentHash: { - name: 'contentHash', - type: 'String', + name: "contentHash", + type: "String" }, contents: { - name: 'contents', - type: 'Bytes', + name: "contents", + type: "Bytes" }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'BackgroundWorkerFile', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "BackgroundWorkerFile", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, backgroundWorkers: { - name: 'backgroundWorkers', - type: 'BackgroundWorker', + name: "backgroundWorkers", + type: "BackgroundWorker", array: true, - relation: { opposite: 'files' }, + relation: { opposite: "files" } }, tasks: { - name: 'tasks', - type: 'BackgroundWorkerTask', + name: "tasks", + type: "BackgroundWorkerTask", array: true, - relation: { opposite: 'file' }, + relation: { opposite: "file" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('contentHash'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("contentHash")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - projectId_contentHash: { projectId: { type: 'String' }, contentHash: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + projectId_contentHash: { projectId: { type: "String" }, contentHash: { type: "String" } } + } }, BackgroundWorkerTask: { - name: 'BackgroundWorkerTask', + name: "BackgroundWorkerTask", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, filePath: { - name: 'filePath', - type: 'String', + name: "filePath", + type: "String" }, exportName: { - name: 'exportName', - type: 'String', - optional: true, + name: "exportName", + type: "String", + optional: true }, worker: { - name: 'worker', - type: 'BackgroundWorker', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('workerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'tasks', - fields: ['workerId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "worker", + type: "BackgroundWorker", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "tasks", fields: ["workerId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, workerId: { - name: 'workerId', - type: 'String', - foreignKeyFor: ['worker'] as readonly string[], + name: "workerId", + type: "String", + foreignKeyFor: [ + "worker" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'backgroundWorkerTasks', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "backgroundWorkerTasks", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, file: { - name: 'file', - type: 'BackgroundWorkerFile', + name: "file", + type: "BackgroundWorkerFile", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('fileId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'tasks', - fields: ['fileId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("fileId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "tasks", fields: ["fileId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, fileId: { - name: 'fileId', - type: 'String', + name: "fileId", + type: "String", optional: true, - foreignKeyFor: ['file'] as readonly string[], + foreignKeyFor: [ + "file" + ] as readonly string[] }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'backgroundWorkerTasks', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "backgroundWorkerTasks", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, attempts: { - name: 'attempts', - type: 'TaskRunAttempt', + name: "attempts", + type: "TaskRunAttempt", array: true, - relation: { opposite: 'backgroundWorkerTask' }, + relation: { opposite: "backgroundWorkerTask" } }, runs: { - name: 'runs', - type: 'TaskRun', + name: "runs", + type: "TaskRun", array: true, - relation: { opposite: 'lockedBy' }, + relation: { opposite: "lockedBy" } }, queueConfig: { - name: 'queueConfig', - type: 'Json', - optional: true, + name: "queueConfig", + type: "Json", + optional: true }, retryConfig: { - name: 'retryConfig', - type: 'Json', - optional: true, + name: "retryConfig", + type: "Json", + optional: true }, machineConfig: { - name: 'machineConfig', - type: 'Json', - optional: true, + name: "machineConfig", + type: "Json", + optional: true }, queueId: { - name: 'queueId', - type: 'String', + name: "queueId", + type: "String", optional: true, - foreignKeyFor: ['queue'] as readonly string[], + foreignKeyFor: [ + "queue" + ] as readonly string[] }, queue: { - name: 'queue', - type: 'TaskQueue', + name: "queue", + type: "TaskQueue", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('queueId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'tasks', - fields: ['queueId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("queueId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "tasks", fields: ["queueId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, maxDurationInSeconds: { - name: 'maxDurationInSeconds', - type: 'Int', - optional: true, + name: "maxDurationInSeconds", + type: "Int", + optional: true }, triggerSource: { - name: 'triggerSource', - type: 'TaskTriggerSource', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('STANDARD') }] }, - ] as readonly AttributeApplication[], - default: 'STANDARD' as FieldDefault, - }, + name: "triggerSource", + type: "TaskTriggerSource", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("STANDARD") }] }] as readonly AttributeApplication[], + default: "STANDARD" as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('workerId'), - ExpressionUtils.field('slug'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('slug'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('projectId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId"), ExpressionUtils.field("slug")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("slug")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("projectId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - workerId_slug: { workerId: { type: 'String' }, slug: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + workerId_slug: { workerId: { type: "String" }, slug: { type: "String" } } + } }, TaskRun: { - name: 'TaskRun', + name: "TaskRun", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, number: { - name: 'number', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "number", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, engine: { - name: 'engine', - type: 'RunEngineVersion', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, - ] as readonly AttributeApplication[], - default: 'V1' as FieldDefault, + name: "engine", + type: "RunEngineVersion", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], + default: "V1" as FieldDefault }, status: { - name: 'status', - type: 'TaskRunStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "TaskRunStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, statusReason: { - name: 'statusReason', - type: 'String', - optional: true, + name: "statusReason", + type: "String", + optional: true }, idempotencyKey: { - name: 'idempotencyKey', - type: 'String', - optional: true, + name: "idempotencyKey", + type: "String", + optional: true }, idempotencyKeyExpiresAt: { - name: 'idempotencyKeyExpiresAt', - type: 'DateTime', - optional: true, + name: "idempotencyKeyExpiresAt", + type: "DateTime", + optional: true }, taskIdentifier: { - name: 'taskIdentifier', - type: 'String', + name: "taskIdentifier", + type: "String" }, isTest: { - name: 'isTest', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isTest", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, payload: { - name: 'payload', - type: 'String', + name: "payload", + type: "String" }, payloadType: { - name: 'payloadType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], - }, - ] as readonly AttributeApplication[], - default: 'application/json' as FieldDefault, + name: "payloadType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], + default: "application/json" as FieldDefault }, context: { - name: 'context', - type: 'Json', - optional: true, + name: "context", + type: "Json", + optional: true }, traceContext: { - name: 'traceContext', - type: 'Json', - optional: true, + name: "traceContext", + type: "Json", + optional: true }, traceId: { - name: 'traceId', - type: 'String', + name: "traceId", + type: "String" }, spanId: { - name: 'spanId', - type: 'String', + name: "spanId", + type: "String" }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRuns', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRuns", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, environmentType: { - name: 'environmentType', - type: 'RuntimeEnvironmentType', - optional: true, + name: "environmentType", + type: "RuntimeEnvironmentType", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRuns', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRuns", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, organizationId: { - name: 'organizationId', - type: 'String', - optional: true, + name: "organizationId", + type: "String", + optional: true }, queue: { - name: 'queue', - type: 'String', + name: "queue", + type: "String" }, lockedQueueId: { - name: 'lockedQueueId', - type: 'String', - optional: true, + name: "lockedQueueId", + type: "String", + optional: true }, workerQueue: { - name: 'workerQueue', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('main') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('masterQueue') }] }, - ] as readonly AttributeApplication[], - default: 'main' as FieldDefault, + name: "workerQueue", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("main") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("masterQueue") }] }] as readonly AttributeApplication[], + default: "main" as FieldDefault }, secondaryMasterQueue: { - name: 'secondaryMasterQueue', - type: 'String', - optional: true, + name: "secondaryMasterQueue", + type: "String", + optional: true }, attemptNumber: { - name: 'attemptNumber', - type: 'Int', - optional: true, + name: "attemptNumber", + type: "Int", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, attempts: { - name: 'attempts', - type: 'TaskRunAttempt', + name: "attempts", + type: "TaskRunAttempt", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('attempts') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'taskRun', name: 'attempts' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("attempts") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRun", name: "attempts" } }, tags: { - name: 'tags', - type: 'TaskRunTag', + name: "tags", + type: "TaskRunTag", array: true, - relation: { opposite: 'runs' }, + relation: { opposite: "runs" } }, runTags: { - name: 'runTags', - type: 'String', - array: true, + name: "runTags", + type: "String", + array: true }, taskVersion: { - name: 'taskVersion', - type: 'String', - optional: true, + name: "taskVersion", + type: "String", + optional: true }, sdkVersion: { - name: 'sdkVersion', - type: 'String', - optional: true, + name: "sdkVersion", + type: "String", + optional: true }, cliVersion: { - name: 'cliVersion', - type: 'String', - optional: true, + name: "cliVersion", + type: "String", + optional: true }, checkpoints: { - name: 'checkpoints', - type: 'Checkpoint', + name: "checkpoints", + type: "Checkpoint", array: true, - relation: { opposite: 'run' }, + relation: { opposite: "run" } }, startedAt: { - name: 'startedAt', - type: 'DateTime', - optional: true, + name: "startedAt", + type: "DateTime", + optional: true }, executedAt: { - name: 'executedAt', - type: 'DateTime', - optional: true, + name: "executedAt", + type: "DateTime", + optional: true }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, + name: "completedAt", + type: "DateTime", + optional: true }, machinePreset: { - name: 'machinePreset', - type: 'String', - optional: true, + name: "machinePreset", + type: "String", + optional: true }, usageDurationMs: { - name: 'usageDurationMs', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "usageDurationMs", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, costInCents: { - name: 'costInCents', - type: 'Float', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "costInCents", + type: "Float", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, baseCostInCents: { - name: 'baseCostInCents', - type: 'Float', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "baseCostInCents", + type: "Float", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, lockedAt: { - name: 'lockedAt', - type: 'DateTime', - optional: true, + name: "lockedAt", + type: "DateTime", + optional: true }, lockedBy: { - name: 'lockedBy', - type: 'BackgroundWorkerTask', + name: "lockedBy", + type: "BackgroundWorkerTask", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('lockedById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'runs', fields: ['lockedById'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("lockedById")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "runs", fields: ["lockedById"], references: ["id"] } }, lockedById: { - name: 'lockedById', - type: 'String', + name: "lockedById", + type: "String", optional: true, - foreignKeyFor: ['lockedBy'] as readonly string[], + foreignKeyFor: [ + "lockedBy" + ] as readonly string[] }, lockedToVersion: { - name: 'lockedToVersion', - type: 'BackgroundWorker', + name: "lockedToVersion", + type: "BackgroundWorker", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('lockedToVersionId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'lockedRuns', fields: ['lockedToVersionId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("lockedToVersionId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "lockedRuns", fields: ["lockedToVersionId"], references: ["id"] } }, lockedToVersionId: { - name: 'lockedToVersionId', - type: 'String', + name: "lockedToVersionId", + type: "String", optional: true, - foreignKeyFor: ['lockedToVersion'] as readonly string[], + foreignKeyFor: [ + "lockedToVersion" + ] as readonly string[] }, priorityMs: { - name: 'priorityMs', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "priorityMs", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, concurrencyKey: { - name: 'concurrencyKey', - type: 'String', - optional: true, + name: "concurrencyKey", + type: "String", + optional: true }, delayUntil: { - name: 'delayUntil', - type: 'DateTime', - optional: true, + name: "delayUntil", + type: "DateTime", + optional: true }, queuedAt: { - name: 'queuedAt', - type: 'DateTime', - optional: true, + name: "queuedAt", + type: "DateTime", + optional: true }, ttl: { - name: 'ttl', - type: 'String', - optional: true, + name: "ttl", + type: "String", + optional: true }, expiredAt: { - name: 'expiredAt', - type: 'DateTime', - optional: true, + name: "expiredAt", + type: "DateTime", + optional: true }, maxAttempts: { - name: 'maxAttempts', - type: 'Int', - optional: true, + name: "maxAttempts", + type: "Int", + optional: true }, oneTimeUseToken: { - name: 'oneTimeUseToken', - type: 'String', - optional: true, + name: "oneTimeUseToken", + type: "String", + optional: true }, associatedWaitpoint: { - name: 'associatedWaitpoint', - type: 'Waitpoint', + name: "associatedWaitpoint", + type: "Waitpoint", optional: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CompletingRun') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'completedByTaskRun', name: 'CompletingRun' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CompletingRun") }] }] as readonly AttributeApplication[], + relation: { opposite: "completedByTaskRun", name: "CompletingRun" } }, blockedByWaitpoints: { - name: 'blockedByWaitpoints', - type: 'TaskRunWaitpoint', + name: "blockedByWaitpoints", + type: "TaskRunWaitpoint", array: true, - relation: { opposite: 'taskRun' }, + relation: { opposite: "taskRun" } }, connectedWaitpoints: { - name: 'connectedWaitpoints', - type: 'Waitpoint', + name: "connectedWaitpoints", + type: "Waitpoint", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('WaitpointRunConnections') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'connectedRuns', name: 'WaitpointRunConnections' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("WaitpointRunConnections") }] }] as readonly AttributeApplication[], + relation: { opposite: "connectedRuns", name: "WaitpointRunConnections" } }, taskEventStore: { - name: 'taskEventStore', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('taskEvent') }] }, - ] as readonly AttributeApplication[], - default: 'taskEvent' as FieldDefault, + name: "taskEventStore", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("taskEvent") }] }] as readonly AttributeApplication[], + default: "taskEvent" as FieldDefault }, queueTimestamp: { - name: 'queueTimestamp', - type: 'DateTime', - optional: true, + name: "queueTimestamp", + type: "DateTime", + optional: true }, batchItems: { - name: 'batchItems', - type: 'BatchTaskRunItem', + name: "batchItems", + type: "BatchTaskRunItem", array: true, - relation: { opposite: 'taskRun' }, + relation: { opposite: "taskRun" } }, dependency: { - name: 'dependency', - type: 'TaskRunDependency', + name: "dependency", + type: "TaskRunDependency", optional: true, - relation: { opposite: 'taskRun' }, + relation: { opposite: "taskRun" } }, CheckpointRestoreEvent: { - name: 'CheckpointRestoreEvent', - type: 'CheckpointRestoreEvent', + name: "CheckpointRestoreEvent", + type: "CheckpointRestoreEvent", array: true, - relation: { opposite: 'run' }, + relation: { opposite: "run" } }, executionSnapshots: { - name: 'executionSnapshots', - type: 'TaskRunExecutionSnapshot', + name: "executionSnapshots", + type: "TaskRunExecutionSnapshot", array: true, - relation: { opposite: 'run' }, + relation: { opposite: "run" } }, alerts: { - name: 'alerts', - type: 'ProjectAlert', + name: "alerts", + type: "ProjectAlert", array: true, - relation: { opposite: 'taskRun' }, + relation: { opposite: "taskRun" } }, scheduleInstanceId: { - name: 'scheduleInstanceId', - type: 'String', - optional: true, + name: "scheduleInstanceId", + type: "String", + optional: true }, scheduleId: { - name: 'scheduleId', - type: 'String', - optional: true, + name: "scheduleId", + type: "String", + optional: true }, sourceBulkActionItems: { - name: 'sourceBulkActionItems', - type: 'BulkActionItem', + name: "sourceBulkActionItems", + type: "BulkActionItem", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('SourceActionItemRun') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'sourceRun', name: 'SourceActionItemRun' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SourceActionItemRun") }] }] as readonly AttributeApplication[], + relation: { opposite: "sourceRun", name: "SourceActionItemRun" } }, destinationBulkActionItems: { - name: 'destinationBulkActionItems', - type: 'BulkActionItem', + name: "destinationBulkActionItems", + type: "BulkActionItem", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('DestinationActionItemRun') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'destinationRun', name: 'DestinationActionItemRun' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DestinationActionItemRun") }] }] as readonly AttributeApplication[], + relation: { opposite: "destinationRun", name: "DestinationActionItemRun" } }, logsDeletedAt: { - name: 'logsDeletedAt', - type: 'DateTime', - optional: true, + name: "logsDeletedAt", + type: "DateTime", + optional: true }, rootTaskRun: { - name: 'rootTaskRun', - type: 'TaskRun', + name: "rootTaskRun", + type: "TaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('TaskRootRun') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('rootTaskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'descendantRuns', - name: 'TaskRootRun', - fields: ['rootTaskRunId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'NoAction', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskRootRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("rootTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], + relation: { opposite: "descendantRuns", name: "TaskRootRun", fields: ["rootTaskRunId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } }, rootTaskRunId: { - name: 'rootTaskRunId', - type: 'String', + name: "rootTaskRunId", + type: "String", optional: true, - foreignKeyFor: ['rootTaskRun'] as readonly string[], + foreignKeyFor: [ + "rootTaskRun" + ] as readonly string[] }, descendantRuns: { - name: 'descendantRuns', - type: 'TaskRun', + name: "descendantRuns", + type: "TaskRun", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskRootRun') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'rootTaskRun', name: 'TaskRootRun' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskRootRun") }] }] as readonly AttributeApplication[], + relation: { opposite: "rootTaskRun", name: "TaskRootRun" } }, parentTaskRun: { - name: 'parentTaskRun', - type: 'TaskRun', + name: "parentTaskRun", + type: "TaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('TaskParentRun') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('parentTaskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'childRuns', - name: 'TaskParentRun', - fields: ['parentTaskRunId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'NoAction', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], + relation: { opposite: "childRuns", name: "TaskParentRun", fields: ["parentTaskRunId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } }, parentTaskRunId: { - name: 'parentTaskRunId', - type: 'String', + name: "parentTaskRunId", + type: "String", optional: true, - foreignKeyFor: ['parentTaskRun'] as readonly string[], + foreignKeyFor: [ + "parentTaskRun" + ] as readonly string[] }, childRuns: { - name: 'childRuns', - type: 'TaskRun', + name: "childRuns", + type: "TaskRun", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('TaskParentRun') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parentTaskRun', name: 'TaskParentRun' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRun") }] }] as readonly AttributeApplication[], + relation: { opposite: "parentTaskRun", name: "TaskParentRun" } }, parentTaskRunAttempt: { - name: 'parentTaskRunAttempt', - type: 'TaskRunAttempt', + name: "parentTaskRunAttempt", + type: "TaskRunAttempt", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('TaskParentRunAttempt') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('parentTaskRunAttemptId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'childRuns', - name: 'TaskParentRunAttempt', - fields: ['parentTaskRunAttemptId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'NoAction', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRunAttempt") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentTaskRunAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], + relation: { opposite: "childRuns", name: "TaskParentRunAttempt", fields: ["parentTaskRunAttemptId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } }, parentTaskRunAttemptId: { - name: 'parentTaskRunAttemptId', - type: 'String', + name: "parentTaskRunAttemptId", + type: "String", optional: true, - foreignKeyFor: ['parentTaskRunAttempt'] as readonly string[], + foreignKeyFor: [ + "parentTaskRunAttempt" + ] as readonly string[] }, batch: { - name: 'batch', - type: 'BatchTaskRun', + name: "batch", + type: "BatchTaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('batchId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('NoAction') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'runs', - fields: ['batchId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'NoAction', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("NoAction") }] }] as readonly AttributeApplication[], + relation: { opposite: "runs", fields: ["batchId"], references: ["id"], onDelete: "SetNull", onUpdate: "NoAction" } }, batchId: { - name: 'batchId', - type: 'String', + name: "batchId", + type: "String", optional: true, - foreignKeyFor: ['batch'] as readonly string[], + foreignKeyFor: [ + "batch" + ] as readonly string[] }, resumeParentOnCompletion: { - name: 'resumeParentOnCompletion', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "resumeParentOnCompletion", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, depth: { - name: 'depth', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "depth", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, parentSpanId: { - name: 'parentSpanId', - type: 'String', - optional: true, + name: "parentSpanId", + type: "String", + optional: true }, runChainState: { - name: 'runChainState', - type: 'Json', - optional: true, + name: "runChainState", + type: "Json", + optional: true }, seedMetadata: { - name: 'seedMetadata', - type: 'String', - optional: true, + name: "seedMetadata", + type: "String", + optional: true }, seedMetadataType: { - name: 'seedMetadataType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], - }, - ] as readonly AttributeApplication[], - default: 'application/json' as FieldDefault, + name: "seedMetadataType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], + default: "application/json" as FieldDefault }, metadata: { - name: 'metadata', - type: 'String', - optional: true, + name: "metadata", + type: "String", + optional: true }, metadataType: { - name: 'metadataType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], - }, - ] as readonly AttributeApplication[], - default: 'application/json' as FieldDefault, + name: "metadataType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], + default: "application/json" as FieldDefault }, metadataVersion: { - name: 'metadataVersion', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, - ] as readonly AttributeApplication[], - default: 1 as FieldDefault, + name: "metadataVersion", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], + default: 1 as FieldDefault }, output: { - name: 'output', - type: 'String', - optional: true, + name: "output", + type: "String", + optional: true }, outputType: { - name: 'outputType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], - }, - ] as readonly AttributeApplication[], - default: 'application/json' as FieldDefault, + name: "outputType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], + default: "application/json" as FieldDefault }, error: { - name: 'error', - type: 'Json', - optional: true, + name: "error", + type: "Json", + optional: true }, maxDurationInSeconds: { - name: 'maxDurationInSeconds', - type: 'Int', - optional: true, - }, + name: "maxDurationInSeconds", + type: "Int", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('oneTimeUseToken')]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('taskIdentifier'), - ExpressionUtils.field('idempotencyKey'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('parentTaskRunId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('rootTaskRunId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('scheduleId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spanId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('parentSpanId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('scheduleId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runTags')]) }, - { name: 'type', value: ExpressionUtils.literal('Gin') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('batchId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('id'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), - }, - { name: 'type', value: ExpressionUtils.literal('Brin') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('TaskRunStatus', [ - ExpressionUtils.field('status'), - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('createdAt'), - ExpressionUtils.field('id'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("oneTimeUseToken")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("taskIdentifier"), ExpressionUtils.field("idempotencyKey")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentTaskRunId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("rootTaskRunId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduleId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spanId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("parentSpanId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("scheduleId"), ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runTags")]) }, { name: "type", value: ExpressionUtils.literal("Gin") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("batchId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("id")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }, { name: "type", value: ExpressionUtils.literal("Brin") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("TaskRunStatus", [ExpressionUtils.field("status"), ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("createdAt"), ExpressionUtils.field("id")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - oneTimeUseToken: { type: 'String' }, - runtimeEnvironmentId_taskIdentifier_idempotencyKey: { - runtimeEnvironmentId: { type: 'String' }, - taskIdentifier: { type: 'String' }, - idempotencyKey: { type: 'String' }, - }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + oneTimeUseToken: { type: "String" }, + runtimeEnvironmentId_taskIdentifier_idempotencyKey: { runtimeEnvironmentId: { type: "String" }, taskIdentifier: { type: "String" }, idempotencyKey: { type: "String" } } + } }, TaskRunExecutionSnapshot: { - name: 'TaskRunExecutionSnapshot', + name: "TaskRunExecutionSnapshot", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, engine: { - name: 'engine', - type: 'RunEngineVersion', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V2') }] }, - ] as readonly AttributeApplication[], - default: 'V2' as FieldDefault, + name: "engine", + type: "RunEngineVersion", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V2") }] }] as readonly AttributeApplication[], + default: "V2" as FieldDefault }, executionStatus: { - name: 'executionStatus', - type: 'TaskRunExecutionStatus', + name: "executionStatus", + type: "TaskRunExecutionStatus" }, description: { - name: 'description', - type: 'String', + name: "description", + type: "String" }, isValid: { - name: 'isValid', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "isValid", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, error: { - name: 'error', - type: 'String', - optional: true, + name: "error", + type: "String", + optional: true }, previousSnapshotId: { - name: 'previousSnapshotId', - type: 'String', - optional: true, + name: "previousSnapshotId", + type: "String", + optional: true }, runId: { - name: 'runId', - type: 'String', - foreignKeyFor: ['run'] as readonly string[], + name: "runId", + type: "String", + foreignKeyFor: [ + "run" + ] as readonly string[] }, run: { - name: 'run', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'executionSnapshots', fields: ['runId'], references: ['id'] }, + name: "run", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "executionSnapshots", fields: ["runId"], references: ["id"] } }, runStatus: { - name: 'runStatus', - type: 'TaskRunStatus', + name: "runStatus", + type: "TaskRunStatus" }, batchId: { - name: 'batchId', - type: 'String', + name: "batchId", + type: "String", optional: true, - foreignKeyFor: ['batch'] as readonly string[], + foreignKeyFor: [ + "batch" + ] as readonly string[] }, batch: { - name: 'batch', - type: 'BatchTaskRun', + name: "batch", + type: "BatchTaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('batchId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'executionSnapshots', fields: ['batchId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "executionSnapshots", fields: ["batchId"], references: ["id"] } }, attemptNumber: { - name: 'attemptNumber', - type: 'Int', - optional: true, + name: "attemptNumber", + type: "Int", + optional: true }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'executionSnapshots', fields: ['environmentId'], references: ['id'] }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "executionSnapshots", fields: ["environmentId"], references: ["id"] } }, environmentType: { - name: 'environmentType', - type: 'RuntimeEnvironmentType', + name: "environmentType", + type: "RuntimeEnvironmentType" }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'executionSnapshots', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "executionSnapshots", fields: ["projectId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'executionSnapshots', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "executionSnapshots", fields: ["organizationId"], references: ["id"] } }, completedWaitpoints: { - name: 'completedWaitpoints', - type: 'Waitpoint', + name: "completedWaitpoints", + type: "Waitpoint", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('completedWaitpoints') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'completedExecutionSnapshots', name: 'completedWaitpoints' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("completedWaitpoints") }] }] as readonly AttributeApplication[], + relation: { opposite: "completedExecutionSnapshots", name: "completedWaitpoints" } }, completedWaitpointOrder: { - name: 'completedWaitpointOrder', - type: 'String', - array: true, + name: "completedWaitpointOrder", + type: "String", + array: true }, checkpointId: { - name: 'checkpointId', - type: 'String', + name: "checkpointId", + type: "String", optional: true, - foreignKeyFor: ['checkpoint'] as readonly string[], + foreignKeyFor: [ + "checkpoint" + ] as readonly string[] }, checkpoint: { - name: 'checkpoint', - type: 'TaskRunCheckpoint', + name: "checkpoint", + type: "TaskRunCheckpoint", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('checkpointId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'executionSnapshot', fields: ['checkpointId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "executionSnapshot", fields: ["checkpointId"], references: ["id"] } }, workerId: { - name: 'workerId', - type: 'String', + name: "workerId", + type: "String", optional: true, - foreignKeyFor: ['worker'] as readonly string[], + foreignKeyFor: [ + "worker" + ] as readonly string[] }, worker: { - name: 'worker', - type: 'WorkerInstance', + name: "worker", + type: "WorkerInstance", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('workerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'TaskRunExecutionSnapshot', fields: ['workerId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "TaskRunExecutionSnapshot", fields: ["workerId"], references: ["id"] } }, runnerId: { - name: 'runnerId', - type: 'String', - optional: true, + name: "runnerId", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, lastHeartbeatAt: { - name: 'lastHeartbeatAt', - type: 'DateTime', - optional: true, + name: "lastHeartbeatAt", + type: "DateTime", + optional: true }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, - }, + name: "metadata", + type: "Json", + optional: true + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runId'), - ExpressionUtils.field('isValid'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId"), ExpressionUtils.field("isValid"), ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, TaskRunCheckpoint: { - name: 'TaskRunCheckpoint', + name: "TaskRunCheckpoint", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'TaskRunCheckpointType', + name: "type", + type: "TaskRunCheckpointType" }, location: { - name: 'location', - type: 'String', + name: "location", + type: "String" }, imageRef: { - name: 'imageRef', - type: 'String', - optional: true, + name: "imageRef", + type: "String", + optional: true }, reason: { - name: 'reason', - type: 'String', - optional: true, + name: "reason", + type: "String", + optional: true }, metadata: { - name: 'metadata', - type: 'String', - optional: true, + name: "metadata", + type: "String", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRunCheckpoints', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRunCheckpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRunCheckpoints', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRunCheckpoints", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, executionSnapshot: { - name: 'executionSnapshot', - type: 'TaskRunExecutionSnapshot', + name: "executionSnapshot", + type: "TaskRunExecutionSnapshot", array: true, - relation: { opposite: 'checkpoint' }, + relation: { opposite: "checkpoint" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - }, + id: { type: "String" }, + friendlyId: { type: "String" } + } }, Waitpoint: { - name: 'Waitpoint', + name: "Waitpoint", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'WaitpointType', + name: "type", + type: "WaitpointType" }, status: { - name: 'status', - type: 'WaitpointStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "WaitpointStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, + name: "completedAt", + type: "DateTime", + optional: true }, idempotencyKey: { - name: 'idempotencyKey', - type: 'String', + name: "idempotencyKey", + type: "String" }, userProvidedIdempotencyKey: { - name: 'userProvidedIdempotencyKey', - type: 'Boolean', + name: "userProvidedIdempotencyKey", + type: "Boolean" }, idempotencyKeyExpiresAt: { - name: 'idempotencyKeyExpiresAt', - type: 'DateTime', - optional: true, + name: "idempotencyKeyExpiresAt", + type: "DateTime", + optional: true }, inactiveIdempotencyKey: { - name: 'inactiveIdempotencyKey', - type: 'String', - optional: true, + name: "inactiveIdempotencyKey", + type: "String", + optional: true }, completedByTaskRunId: { - name: 'completedByTaskRunId', - type: 'String', + name: "completedByTaskRunId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['completedByTaskRun'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "completedByTaskRun" + ] as readonly string[] }, completedByTaskRun: { - name: 'completedByTaskRun', - type: 'TaskRun', + name: "completedByTaskRun", + type: "TaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CompletingRun') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('completedByTaskRunId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'associatedWaitpoint', - name: 'CompletingRun', - fields: ['completedByTaskRunId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CompletingRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("completedByTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "associatedWaitpoint", name: "CompletingRun", fields: ["completedByTaskRunId"], references: ["id"], onDelete: "SetNull" } }, completedAfter: { - name: 'completedAfter', - type: 'DateTime', - optional: true, + name: "completedAfter", + type: "DateTime", + optional: true }, completedByBatchId: { - name: 'completedByBatchId', - type: 'String', + name: "completedByBatchId", + type: "String", optional: true, - foreignKeyFor: ['completedByBatch'] as readonly string[], + foreignKeyFor: [ + "completedByBatch" + ] as readonly string[] }, completedByBatch: { - name: 'completedByBatch', - type: 'BatchTaskRun', + name: "completedByBatch", + type: "BatchTaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('completedByBatchId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'waitpoints', - fields: ['completedByBatchId'], - references: ['id'], - onDelete: 'SetNull', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("completedByBatchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }] }] as readonly AttributeApplication[], + relation: { opposite: "waitpoints", fields: ["completedByBatchId"], references: ["id"], onDelete: "SetNull" } }, blockingTaskRuns: { - name: 'blockingTaskRuns', - type: 'TaskRunWaitpoint', + name: "blockingTaskRuns", + type: "TaskRunWaitpoint", array: true, - relation: { opposite: 'waitpoint' }, + relation: { opposite: "waitpoint" } }, connectedRuns: { - name: 'connectedRuns', - type: 'TaskRun', + name: "connectedRuns", + type: "TaskRun", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('WaitpointRunConnections') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'connectedWaitpoints', name: 'WaitpointRunConnections' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("WaitpointRunConnections") }] }] as readonly AttributeApplication[], + relation: { opposite: "connectedWaitpoints", name: "WaitpointRunConnections" } }, completedExecutionSnapshots: { - name: 'completedExecutionSnapshots', - type: 'TaskRunExecutionSnapshot', + name: "completedExecutionSnapshots", + type: "TaskRunExecutionSnapshot", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('completedWaitpoints') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'completedWaitpoints', name: 'completedWaitpoints' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("completedWaitpoints") }] }] as readonly AttributeApplication[], + relation: { opposite: "completedWaitpoints", name: "completedWaitpoints" } }, output: { - name: 'output', - type: 'String', - optional: true, + name: "output", + type: "String", + optional: true }, outputType: { - name: 'outputType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], - }, - ] as readonly AttributeApplication[], - default: 'application/json' as FieldDefault, + name: "outputType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], + default: "application/json" as FieldDefault }, outputIsError: { - name: 'outputIsError', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "outputIsError", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'waitpoints', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "waitpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'waitpoints', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "waitpoints", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, tags: { - name: 'tags', - type: 'String', - array: true, - }, + name: "tags", + type: "String", + array: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('idempotencyKey'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('completedByBatchId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('type'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('type'), - ExpressionUtils.field('status'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("idempotencyKey")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("completedByBatchId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("type"), ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("type"), ExpressionUtils.field("status")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - completedByTaskRunId: { type: 'String' }, - environmentId_idempotencyKey: { environmentId: { type: 'String' }, idempotencyKey: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + completedByTaskRunId: { type: "String" }, + environmentId_idempotencyKey: { environmentId: { type: "String" }, idempotencyKey: { type: "String" } } + } }, TaskRunWaitpoint: { - name: 'TaskRunWaitpoint', + name: "TaskRunWaitpoint", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, taskRun: { - name: 'taskRun', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'blockedByWaitpoints', fields: ['taskRunId'], references: ['id'] }, + name: "taskRun", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "blockedByWaitpoints", fields: ["taskRunId"], references: ["id"] } }, taskRunId: { - name: 'taskRunId', - type: 'String', - foreignKeyFor: ['taskRun'] as readonly string[], + name: "taskRunId", + type: "String", + foreignKeyFor: [ + "taskRun" + ] as readonly string[] }, waitpoint: { - name: 'waitpoint', - type: 'Waitpoint', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('waitpointId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'blockingTaskRuns', fields: ['waitpointId'], references: ['id'] }, + name: "waitpoint", + type: "Waitpoint", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("waitpointId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "blockingTaskRuns", fields: ["waitpointId"], references: ["id"] } }, waitpointId: { - name: 'waitpointId', - type: 'String', - foreignKeyFor: ['waitpoint'] as readonly string[], + name: "waitpointId", + type: "String", + foreignKeyFor: [ + "waitpoint" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRunWaitpoints', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRunWaitpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, spanIdToComplete: { - name: 'spanIdToComplete', - type: 'String', - optional: true, + name: "spanIdToComplete", + type: "String", + optional: true }, batchId: { - name: 'batchId', - type: 'String', + name: "batchId", + type: "String", optional: true, - foreignKeyFor: ['batch'] as readonly string[], + foreignKeyFor: [ + "batch" + ] as readonly string[] }, batch: { - name: 'batch', - type: 'BatchTaskRun', + name: "batch", + type: "BatchTaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('batchId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'runsBlocked', fields: ['batchId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "runsBlocked", fields: ["batchId"], references: ["id"] } }, batchIndex: { - name: 'batchIndex', - type: 'Int', - optional: true, + name: "batchIndex", + type: "Int", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('taskRunId'), - ExpressionUtils.field('waitpointId'), - ExpressionUtils.field('batchIndex'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('waitpointId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId"), ExpressionUtils.field("waitpointId"), ExpressionUtils.field("batchIndex")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("waitpointId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - taskRunId_waitpointId_batchIndex: { - taskRunId: { type: 'String' }, - waitpointId: { type: 'String' }, - batchIndex: { type: 'Int' }, - }, - }, + id: { type: "String" }, + taskRunId_waitpointId_batchIndex: { taskRunId: { type: "String" }, waitpointId: { type: "String" }, batchIndex: { type: "Int" } } + } }, WaitpointTag: { - name: 'WaitpointTag', + name: "WaitpointTag", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'waitpointTags', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "waitpointTags", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'waitpointTags', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "waitpointTags", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("name")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - environmentId_name: { environmentId: { type: 'String' }, name: { type: 'String' } }, - }, + id: { type: "String" }, + environmentId_name: { environmentId: { type: "String" }, name: { type: "String" } } + } }, FeatureFlag: { - name: 'FeatureFlag', + name: "FeatureFlag", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, key: { - name: 'key', - type: 'String', + name: "key", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, value: { - name: 'value', - type: 'Json', - optional: true, - }, + name: "value", + type: "Json", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - key: { type: 'String' }, - }, + id: { type: "String" }, + key: { type: "String" } + } }, WorkerInstance: { - name: 'WorkerInstance', + name: "WorkerInstance", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, resourceIdentifier: { - name: 'resourceIdentifier', - type: 'String', + name: "resourceIdentifier", + type: "String" }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, + name: "metadata", + type: "Json", + optional: true }, workerGroup: { - name: 'workerGroup', - type: 'WorkerInstanceGroup', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('workerGroupId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'workers', fields: ['workerGroupId'], references: ['id'] }, + name: "workerGroup", + type: "WorkerInstanceGroup", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerGroupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "workers", fields: ["workerGroupId"], references: ["id"] } }, workerGroupId: { - name: 'workerGroupId', - type: 'String', - foreignKeyFor: ['workerGroup'] as readonly string[], + name: "workerGroupId", + type: "String", + foreignKeyFor: [ + "workerGroup" + ] as readonly string[] }, TaskRunExecutionSnapshot: { - name: 'TaskRunExecutionSnapshot', - type: 'TaskRunExecutionSnapshot', + name: "TaskRunExecutionSnapshot", + type: "TaskRunExecutionSnapshot", array: true, - relation: { opposite: 'worker' }, + relation: { opposite: "worker" } }, organization: { - name: 'organization', - type: 'Organization', + name: "organization", + type: "Organization", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerInstances', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerInstances", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', + name: "organizationId", + type: "String", optional: true, - foreignKeyFor: ['organization'] as readonly string[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', + name: "project", + type: "Project", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workers', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workers", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', + name: "projectId", + type: "String", optional: true, - foreignKeyFor: ['project'] as readonly string[], + foreignKeyFor: [ + "project" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', + name: "environment", + type: "RuntimeEnvironment", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerInstances', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerInstances", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', + name: "environmentId", + type: "String", optional: true, - foreignKeyFor: ['environment'] as readonly string[], + foreignKeyFor: [ + "environment" + ] as readonly string[] }, deployment: { - name: 'deployment', - type: 'WorkerDeployment', + name: "deployment", + type: "WorkerDeployment", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('deploymentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerInstance', - fields: ['deploymentId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("deploymentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerInstance", fields: ["deploymentId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, deploymentId: { - name: 'deploymentId', - type: 'String', + name: "deploymentId", + type: "String", optional: true, - foreignKeyFor: ['deployment'] as readonly string[], + foreignKeyFor: [ + "deployment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, lastDequeueAt: { - name: 'lastDequeueAt', - type: 'DateTime', - optional: true, + name: "lastDequeueAt", + type: "DateTime", + optional: true }, lastHeartbeatAt: { - name: 'lastHeartbeatAt', - type: 'DateTime', - optional: true, - }, + name: "lastHeartbeatAt", + type: "DateTime", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('workerGroupId'), - ExpressionUtils.field('resourceIdentifier'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerGroupId"), ExpressionUtils.field("resourceIdentifier")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - workerGroupId_resourceIdentifier: { - workerGroupId: { type: 'String' }, - resourceIdentifier: { type: 'String' }, - }, - }, + id: { type: "String" }, + workerGroupId_resourceIdentifier: { workerGroupId: { type: "String" }, resourceIdentifier: { type: "String" } } + } }, WorkerInstanceGroup: { - name: 'WorkerInstanceGroup', + name: "WorkerInstanceGroup", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, type: { - name: 'type', - type: 'WorkerInstanceGroupType', + name: "type", + type: "WorkerInstanceGroupType" }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, masterQueue: { - name: 'masterQueue', - type: 'String', + name: "masterQueue", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, hidden: { - name: 'hidden', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "hidden", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, token: { - name: 'token', - type: 'WorkerGroupToken', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('tokenId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerGroup', - fields: ['tokenId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "token", + type: "WorkerGroupToken", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("tokenId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerGroup", fields: ["tokenId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, tokenId: { - name: 'tokenId', - type: 'String', + name: "tokenId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['token'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "token" + ] as readonly string[] }, workers: { - name: 'workers', - type: 'WorkerInstance', + name: "workers", + type: "WorkerInstance", array: true, - relation: { opposite: 'workerGroup' }, + relation: { opposite: "workerGroup" } }, backgroundWorkers: { - name: 'backgroundWorkers', - type: 'BackgroundWorker', + name: "backgroundWorkers", + type: "BackgroundWorker", array: true, - relation: { opposite: 'workerGroup' }, + relation: { opposite: "workerGroup" } }, defaultForProjects: { - name: 'defaultForProjects', - type: 'Project', + name: "defaultForProjects", + type: "Project", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('ProjectDefaultWorkerGroup') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'defaultWorkerGroup', name: 'ProjectDefaultWorkerGroup' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectDefaultWorkerGroup") }] }] as readonly AttributeApplication[], + relation: { opposite: "defaultWorkerGroup", name: "ProjectDefaultWorkerGroup" } }, organization: { - name: 'organization', - type: 'Organization', + name: "organization", + type: "Organization", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerGroups', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerGroups", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', + name: "organizationId", + type: "String", optional: true, - foreignKeyFor: ['organization'] as readonly string[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', + name: "project", + type: "Project", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerGroups', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerGroups", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', + name: "projectId", + type: "String", optional: true, - foreignKeyFor: ['project'] as readonly string[], + foreignKeyFor: [ + "project" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - masterQueue: { type: 'String' }, - tokenId: { type: 'String' }, - }, + id: { type: "String" }, + masterQueue: { type: "String" }, + tokenId: { type: "String" } + } }, WorkerGroupToken: { - name: 'WorkerGroupToken', + name: "WorkerGroupToken", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, tokenHash: { - name: 'tokenHash', - type: 'String', + name: "tokenHash", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, workerGroup: { - name: 'workerGroup', - type: 'WorkerInstanceGroup', + name: "workerGroup", + type: "WorkerInstanceGroup", optional: true, - relation: { opposite: 'token' }, - }, + relation: { opposite: "token" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - tokenHash: { type: 'String' }, - }, + id: { type: "String" }, + tokenHash: { type: "String" } + } }, TaskRunTag: { - name: 'TaskRunTag', + name: "TaskRunTag", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, runs: { - name: 'runs', - type: 'TaskRun', + name: "runs", + type: "TaskRun", array: true, - relation: { opposite: 'tags' }, + relation: { opposite: "tags" } }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'runTags', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "runTags", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('name'), - ExpressionUtils.field('id'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("name")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("name"), ExpressionUtils.field("id")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - projectId_name: { projectId: { type: 'String' }, name: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + projectId_name: { projectId: { type: "String" }, name: { type: "String" } } + } }, TaskRunDependency: { - name: 'TaskRunDependency', + name: "TaskRunDependency", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, taskRun: { - name: 'taskRun', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'dependency', - fields: ['taskRunId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "taskRun", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "dependency", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, taskRunId: { - name: 'taskRunId', - type: 'String', + name: "taskRunId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['taskRun'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "taskRun" + ] as readonly string[] }, checkpointEvent: { - name: 'checkpointEvent', - type: 'CheckpointRestoreEvent', + name: "checkpointEvent", + type: "CheckpointRestoreEvent", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('checkpointEventId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRunDependency', - fields: ['checkpointEventId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRunDependency", fields: ["checkpointEventId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, checkpointEventId: { - name: 'checkpointEventId', - type: 'String', + name: "checkpointEventId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['checkpointEvent'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "checkpointEvent" + ] as readonly string[] }, dependentAttempt: { - name: 'dependentAttempt', - type: 'TaskRunAttempt', + name: "dependentAttempt", + type: "TaskRunAttempt", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('dependentAttemptId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'dependencies', fields: ['dependentAttemptId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "dependencies", fields: ["dependentAttemptId"], references: ["id"] } }, dependentAttemptId: { - name: 'dependentAttemptId', - type: 'String', + name: "dependentAttemptId", + type: "String", optional: true, - foreignKeyFor: ['dependentAttempt'] as readonly string[], + foreignKeyFor: [ + "dependentAttempt" + ] as readonly string[] }, dependentBatchRun: { - name: 'dependentBatchRun', - type: 'BatchTaskRun', + name: "dependentBatchRun", + type: "BatchTaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('dependentBatchRun') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('dependentBatchRunId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'runDependencies', - name: 'dependentBatchRun', - fields: ['dependentBatchRunId'], - references: ['id'], - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("dependentBatchRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentBatchRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "runDependencies", name: "dependentBatchRun", fields: ["dependentBatchRunId"], references: ["id"] } }, dependentBatchRunId: { - name: 'dependentBatchRunId', - type: 'String', + name: "dependentBatchRunId", + type: "String", optional: true, - foreignKeyFor: ['dependentBatchRun'] as readonly string[], + foreignKeyFor: [ + "dependentBatchRun" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, resumedAt: { - name: 'resumedAt', - type: 'DateTime', - optional: true, - }, + name: "resumedAt", + type: "DateTime", + optional: true + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('dependentAttemptId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('dependentBatchRunId')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentAttemptId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentBatchRunId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - taskRunId: { type: 'String' }, - checkpointEventId: { type: 'String' }, - }, + id: { type: "String" }, + taskRunId: { type: "String" }, + checkpointEventId: { type: "String" } + } }, TaskRunCounter: { - name: 'TaskRunCounter', + name: "TaskRunCounter", fields: { taskIdentifier: { - name: 'taskIdentifier', - type: 'String', + name: "taskIdentifier", + type: "String", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, lastNumber: { - name: 'lastNumber', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, - }, + name: "lastNumber", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault + } }, - idFields: ['taskIdentifier'], + idFields: ["taskIdentifier"], uniqueFields: { - taskIdentifier: { type: 'String' }, - }, + taskIdentifier: { type: "String" } + } }, TaskRunNumberCounter: { - name: 'TaskRunNumberCounter', + name: "TaskRunNumberCounter", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, taskIdentifier: { - name: 'taskIdentifier', - type: 'String', + name: "taskIdentifier", + type: "String" }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRunNumberCounter', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRunNumberCounter", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, lastNumber: { - name: 'lastNumber', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, - }, + name: "lastNumber", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('taskIdentifier'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskIdentifier"), ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - taskIdentifier_environmentId: { taskIdentifier: { type: 'String' }, environmentId: { type: 'String' } }, - }, + id: { type: "String" }, + taskIdentifier_environmentId: { taskIdentifier: { type: "String" }, environmentId: { type: "String" } } + } }, TaskRunAttempt: { - name: 'TaskRunAttempt', + name: "TaskRunAttempt", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, number: { - name: 'number', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "number", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, taskRun: { - name: 'taskRun', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('attempts') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attempts', - name: 'attempts', - fields: ['taskRunId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "taskRun", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("attempts") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attempts", name: "attempts", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, taskRunId: { - name: 'taskRunId', - type: 'String', - foreignKeyFor: ['taskRun'] as readonly string[], + name: "taskRunId", + type: "String", + foreignKeyFor: [ + "taskRun" + ] as readonly string[] }, backgroundWorker: { - name: 'backgroundWorker', - type: 'BackgroundWorker', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('backgroundWorkerId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attempts', - fields: ['backgroundWorkerId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "backgroundWorker", + type: "BackgroundWorker", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("backgroundWorkerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attempts", fields: ["backgroundWorkerId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, backgroundWorkerId: { - name: 'backgroundWorkerId', - type: 'String', - foreignKeyFor: ['backgroundWorker'] as readonly string[], + name: "backgroundWorkerId", + type: "String", + foreignKeyFor: [ + "backgroundWorker" + ] as readonly string[] }, backgroundWorkerTask: { - name: 'backgroundWorkerTask', - type: 'BackgroundWorkerTask', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('backgroundWorkerTaskId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attempts', - fields: ['backgroundWorkerTaskId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "backgroundWorkerTask", + type: "BackgroundWorkerTask", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("backgroundWorkerTaskId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attempts", fields: ["backgroundWorkerTaskId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, backgroundWorkerTaskId: { - name: 'backgroundWorkerTaskId', - type: 'String', - foreignKeyFor: ['backgroundWorkerTask'] as readonly string[], + name: "backgroundWorkerTaskId", + type: "String", + foreignKeyFor: [ + "backgroundWorkerTask" + ] as readonly string[] }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskRunAttempts', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskRunAttempts", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, queue: { - name: 'queue', - type: 'TaskQueue', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('queueId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'attempts', - fields: ['queueId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "queue", + type: "TaskQueue", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("queueId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "attempts", fields: ["queueId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, queueId: { - name: 'queueId', - type: 'String', - foreignKeyFor: ['queue'] as readonly string[], + name: "queueId", + type: "String", + foreignKeyFor: [ + "queue" + ] as readonly string[] }, status: { - name: 'status', - type: 'TaskRunAttemptStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "TaskRunAttemptStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, startedAt: { - name: 'startedAt', - type: 'DateTime', - optional: true, + name: "startedAt", + type: "DateTime", + optional: true }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, + name: "completedAt", + type: "DateTime", + optional: true }, usageDurationMs: { - name: 'usageDurationMs', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "usageDurationMs", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, error: { - name: 'error', - type: 'Json', - optional: true, + name: "error", + type: "Json", + optional: true }, output: { - name: 'output', - type: 'String', - optional: true, + name: "output", + type: "String", + optional: true }, outputType: { - name: 'outputType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], - }, - ] as readonly AttributeApplication[], - default: 'application/json' as FieldDefault, + name: "outputType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], + default: "application/json" as FieldDefault }, dependencies: { - name: 'dependencies', - type: 'TaskRunDependency', + name: "dependencies", + type: "TaskRunDependency", array: true, - relation: { opposite: 'dependentAttempt' }, + relation: { opposite: "dependentAttempt" } }, batchDependencies: { - name: 'batchDependencies', - type: 'BatchTaskRun', + name: "batchDependencies", + type: "BatchTaskRun", array: true, - relation: { opposite: 'dependentTaskAttempt' }, + relation: { opposite: "dependentTaskAttempt" } }, checkpoints: { - name: 'checkpoints', - type: 'Checkpoint', + name: "checkpoints", + type: "Checkpoint", array: true, - relation: { opposite: 'attempt' }, + relation: { opposite: "attempt" } }, batchTaskRunItems: { - name: 'batchTaskRunItems', - type: 'BatchTaskRunItem', + name: "batchTaskRunItems", + type: "BatchTaskRunItem", array: true, - relation: { opposite: 'taskRunAttempt' }, + relation: { opposite: "taskRunAttempt" } }, CheckpointRestoreEvent: { - name: 'CheckpointRestoreEvent', - type: 'CheckpointRestoreEvent', + name: "CheckpointRestoreEvent", + type: "CheckpointRestoreEvent", array: true, - relation: { opposite: 'attempt' }, + relation: { opposite: "attempt" } }, alerts: { - name: 'alerts', - type: 'ProjectAlert', + name: "alerts", + type: "ProjectAlert", array: true, - relation: { opposite: 'taskRunAttempt' }, + relation: { opposite: "taskRunAttempt" } }, childRuns: { - name: 'childRuns', - type: 'TaskRun', + name: "childRuns", + type: "TaskRun", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('TaskParentRunAttempt') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parentTaskRunAttempt', name: 'TaskParentRunAttempt' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskParentRunAttempt") }] }] as readonly AttributeApplication[], + relation: { opposite: "parentTaskRunAttempt", name: "TaskParentRunAttempt" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('taskRunId'), - ExpressionUtils.field('number'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId"), ExpressionUtils.field("number")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - taskRunId_number: { taskRunId: { type: 'String' }, number: { type: 'Int' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + taskRunId_number: { taskRunId: { type: "String" }, number: { type: "Int" } } + } }, TaskEvent: { - name: 'TaskEvent', + name: "TaskEvent", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, message: { - name: 'message', - type: 'String', + name: "message", + type: "String" }, traceId: { - name: 'traceId', - type: 'String', + name: "traceId", + type: "String" }, spanId: { - name: 'spanId', - type: 'String', + name: "spanId", + type: "String" }, parentId: { - name: 'parentId', - type: 'String', - optional: true, + name: "parentId", + type: "String", + optional: true }, tracestate: { - name: 'tracestate', - type: 'String', - optional: true, + name: "tracestate", + type: "String", + optional: true }, isError: { - name: 'isError', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isError", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isPartial: { - name: 'isPartial', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isPartial", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isCancelled: { - name: 'isCancelled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isCancelled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isDebug: { - name: 'isDebug', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isDebug", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, serviceName: { - name: 'serviceName', - type: 'String', + name: "serviceName", + type: "String" }, serviceNamespace: { - name: 'serviceNamespace', - type: 'String', + name: "serviceNamespace", + type: "String" }, level: { - name: 'level', - type: 'TaskEventLevel', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('TRACE') }] }, - ] as readonly AttributeApplication[], - default: 'TRACE' as FieldDefault, + name: "level", + type: "TaskEventLevel", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("TRACE") }] }] as readonly AttributeApplication[], + default: "TRACE" as FieldDefault }, kind: { - name: 'kind', - type: 'TaskEventKind', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('INTERNAL') }] }, - ] as readonly AttributeApplication[], - default: 'INTERNAL' as FieldDefault, + name: "kind", + type: "TaskEventKind", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("INTERNAL") }] }] as readonly AttributeApplication[], + default: "INTERNAL" as FieldDefault }, status: { - name: 'status', - type: 'TaskEventStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNSET') }] }, - ] as readonly AttributeApplication[], - default: 'UNSET' as FieldDefault, + name: "status", + type: "TaskEventStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNSET") }] }] as readonly AttributeApplication[], + default: "UNSET" as FieldDefault }, links: { - name: 'links', - type: 'Json', - optional: true, + name: "links", + type: "Json", + optional: true }, events: { - name: 'events', - type: 'Json', - optional: true, + name: "events", + type: "Json", + optional: true }, startTime: { - name: 'startTime', - type: 'BigInt', + name: "startTime", + type: "BigInt" }, duration: { - name: 'duration', - type: 'BigInt', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "duration", + type: "BigInt", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, attemptId: { - name: 'attemptId', - type: 'String', - optional: true, + name: "attemptId", + type: "String", + optional: true }, attemptNumber: { - name: 'attemptNumber', - type: 'Int', - optional: true, + name: "attemptNumber", + type: "Int", + optional: true }, environmentId: { - name: 'environmentId', - type: 'String', + name: "environmentId", + type: "String" }, environmentType: { - name: 'environmentType', - type: 'RuntimeEnvironmentType', + name: "environmentType", + type: "RuntimeEnvironmentType" }, organizationId: { - name: 'organizationId', - type: 'String', + name: "organizationId", + type: "String" }, projectId: { - name: 'projectId', - type: 'String', + name: "projectId", + type: "String" }, projectRef: { - name: 'projectRef', - type: 'String', + name: "projectRef", + type: "String" }, runId: { - name: 'runId', - type: 'String', + name: "runId", + type: "String" }, runIsTest: { - name: 'runIsTest', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "runIsTest", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, idempotencyKey: { - name: 'idempotencyKey', - type: 'String', - optional: true, + name: "idempotencyKey", + type: "String", + optional: true }, taskSlug: { - name: 'taskSlug', - type: 'String', + name: "taskSlug", + type: "String" }, taskPath: { - name: 'taskPath', - type: 'String', - optional: true, + name: "taskPath", + type: "String", + optional: true }, taskExportName: { - name: 'taskExportName', - type: 'String', - optional: true, + name: "taskExportName", + type: "String", + optional: true }, workerId: { - name: 'workerId', - type: 'String', - optional: true, + name: "workerId", + type: "String", + optional: true }, workerVersion: { - name: 'workerVersion', - type: 'String', - optional: true, + name: "workerVersion", + type: "String", + optional: true }, queueId: { - name: 'queueId', - type: 'String', - optional: true, + name: "queueId", + type: "String", + optional: true }, queueName: { - name: 'queueName', - type: 'String', - optional: true, + name: "queueName", + type: "String", + optional: true }, batchId: { - name: 'batchId', - type: 'String', - optional: true, + name: "batchId", + type: "String", + optional: true }, properties: { - name: 'properties', - type: 'Json', + name: "properties", + type: "Json" }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, + name: "metadata", + type: "Json", + optional: true }, style: { - name: 'style', - type: 'Json', - optional: true, + name: "style", + type: "Json", + optional: true }, output: { - name: 'output', - type: 'Json', - optional: true, + name: "output", + type: "Json", + optional: true }, outputType: { - name: 'outputType', - type: 'String', - optional: true, + name: "outputType", + type: "String", + optional: true }, payload: { - name: 'payload', - type: 'Json', - optional: true, + name: "payload", + type: "Json", + optional: true }, payloadType: { - name: 'payloadType', - type: 'String', - optional: true, + name: "payloadType", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, usageDurationMs: { - name: 'usageDurationMs', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "usageDurationMs", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, usageCostInCents: { - name: 'usageCostInCents', - type: 'Float', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "usageCostInCents", + type: "Float", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, machinePreset: { - name: 'machinePreset', - type: 'String', - optional: true, + name: "machinePreset", + type: "String", + optional: true }, machinePresetCpu: { - name: 'machinePresetCpu', - type: 'Float', - optional: true, + name: "machinePresetCpu", + type: "Float", + optional: true }, machinePresetMemory: { - name: 'machinePresetMemory', - type: 'Float', - optional: true, + name: "machinePresetMemory", + type: "Float", + optional: true }, machinePresetCentsPerMs: { - name: 'machinePresetCentsPerMs', - type: 'Float', - optional: true, - }, + name: "machinePresetCentsPerMs", + type: "Float", + optional: true + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('traceId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spanId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("traceId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spanId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, TaskQueue: { - name: 'TaskQueue', + name: "TaskQueue", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, type: { - name: 'type', - type: 'TaskQueueType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('VIRTUAL') }] }, - ] as readonly AttributeApplication[], - default: 'VIRTUAL' as FieldDefault, + name: "type", + type: "TaskQueueType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("VIRTUAL") }] }] as readonly AttributeApplication[], + default: "VIRTUAL" as FieldDefault }, version: { - name: 'version', - type: 'TaskQueueVersion', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, - ] as readonly AttributeApplication[], - default: 'V1' as FieldDefault, + name: "version", + type: "TaskQueueVersion", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], + default: "V1" as FieldDefault }, orderableName: { - name: 'orderableName', - type: 'String', - optional: true, + name: "orderableName", + type: "String", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskQueues', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskQueues", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskQueues', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskQueues", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, concurrencyLimit: { - name: 'concurrencyLimit', - type: 'Int', - optional: true, + name: "concurrencyLimit", + type: "Int", + optional: true }, rateLimit: { - name: 'rateLimit', - type: 'Json', - optional: true, + name: "rateLimit", + type: "Json", + optional: true }, paused: { - name: 'paused', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "paused", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, releaseConcurrencyOnWaitpoint: { - name: 'releaseConcurrencyOnWaitpoint', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "releaseConcurrencyOnWaitpoint", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, attempts: { - name: 'attempts', - type: 'TaskRunAttempt', + name: "attempts", + type: "TaskRunAttempt", array: true, - relation: { opposite: 'queue' }, + relation: { opposite: "queue" } }, tasks: { - name: 'tasks', - type: 'BackgroundWorkerTask', + name: "tasks", + type: "BackgroundWorkerTask", array: true, - relation: { opposite: 'queue' }, + relation: { opposite: "queue" } }, workers: { - name: 'workers', - type: 'BackgroundWorker', + name: "workers", + type: "BackgroundWorker", array: true, - relation: { opposite: 'queues' }, - }, + relation: { opposite: "queues" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("name")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - runtimeEnvironmentId_name: { runtimeEnvironmentId: { type: 'String' }, name: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + runtimeEnvironmentId_name: { runtimeEnvironmentId: { type: "String" }, name: { type: "String" } } + } }, BatchTaskRun: { - name: 'BatchTaskRun', + name: "BatchTaskRun", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, idempotencyKey: { - name: 'idempotencyKey', - type: 'String', - optional: true, + name: "idempotencyKey", + type: "String", + optional: true }, idempotencyKeyExpiresAt: { - name: 'idempotencyKeyExpiresAt', - type: 'DateTime', - optional: true, + name: "idempotencyKeyExpiresAt", + type: "DateTime", + optional: true }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'batchTaskRuns', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "batchTaskRuns", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, status: { - name: 'status', - type: 'BatchTaskRunStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "BatchTaskRunStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, runs: { - name: 'runs', - type: 'TaskRun', + name: "runs", + type: "TaskRun", array: true, - relation: { opposite: 'batch' }, + relation: { opposite: "batch" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, runIds: { - name: 'runIds', - type: 'String', + name: "runIds", + type: "String", array: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.array('Any', []) }] }, - ] as readonly AttributeApplication[], - default: [] as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("Any", []) }] }] as readonly AttributeApplication[], + default: [] as FieldDefault }, runCount: { - name: 'runCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "runCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, payload: { - name: 'payload', - type: 'String', - optional: true, + name: "payload", + type: "String", + optional: true }, payloadType: { - name: 'payloadType', - type: 'String', - attributes: [ - { - name: '@default', - args: [{ name: 'value', value: ExpressionUtils.literal('application/json') }], - }, - ] as readonly AttributeApplication[], - default: 'application/json' as FieldDefault, + name: "payloadType", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("application/json") }] }] as readonly AttributeApplication[], + default: "application/json" as FieldDefault }, options: { - name: 'options', - type: 'Json', - optional: true, + name: "options", + type: "Json", + optional: true }, batchVersion: { - name: 'batchVersion', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('v1') }] }, - ] as readonly AttributeApplication[], - default: 'v1' as FieldDefault, + name: "batchVersion", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("v1") }] }] as readonly AttributeApplication[], + default: "v1" as FieldDefault }, executionSnapshots: { - name: 'executionSnapshots', - type: 'TaskRunExecutionSnapshot', + name: "executionSnapshots", + type: "TaskRunExecutionSnapshot", array: true, - relation: { opposite: 'batch' }, + relation: { opposite: "batch" } }, runsBlocked: { - name: 'runsBlocked', - type: 'TaskRunWaitpoint', + name: "runsBlocked", + type: "TaskRunWaitpoint", array: true, - relation: { opposite: 'batch' }, + relation: { opposite: "batch" } }, waitpoints: { - name: 'waitpoints', - type: 'Waitpoint', + name: "waitpoints", + type: "Waitpoint", array: true, - relation: { opposite: 'completedByBatch' }, + relation: { opposite: "completedByBatch" } }, sealed: { - name: 'sealed', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "sealed", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, sealedAt: { - name: 'sealedAt', - type: 'DateTime', - optional: true, + name: "sealedAt", + type: "DateTime", + optional: true }, expectedCount: { - name: 'expectedCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "expectedCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, completedCount: { - name: 'completedCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "completedCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, + name: "completedAt", + type: "DateTime", + optional: true }, resumedAt: { - name: 'resumedAt', - type: 'DateTime', - optional: true, + name: "resumedAt", + type: "DateTime", + optional: true }, processingJobsCount: { - name: 'processingJobsCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "processingJobsCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, processingJobsExpectedCount: { - name: 'processingJobsExpectedCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "processingJobsExpectedCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, oneTimeUseToken: { - name: 'oneTimeUseToken', - type: 'String', - optional: true, + name: "oneTimeUseToken", + type: "String", + optional: true }, items: { - name: 'items', - type: 'BatchTaskRunItem', + name: "items", + type: "BatchTaskRunItem", array: true, - relation: { opposite: 'batchTaskRun' }, + relation: { opposite: "batchTaskRun" } }, taskIdentifier: { - name: 'taskIdentifier', - type: 'String', - optional: true, + name: "taskIdentifier", + type: "String", + optional: true }, checkpointEvent: { - name: 'checkpointEvent', - type: 'CheckpointRestoreEvent', + name: "checkpointEvent", + type: "CheckpointRestoreEvent", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('checkpointEventId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'batchTaskRunDependency', - fields: ['checkpointEventId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointEventId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "batchTaskRunDependency", fields: ["checkpointEventId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, checkpointEventId: { - name: 'checkpointEventId', - type: 'String', + name: "checkpointEventId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['checkpointEvent'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "checkpointEvent" + ] as readonly string[] }, dependentTaskAttempt: { - name: 'dependentTaskAttempt', - type: 'TaskRunAttempt', + name: "dependentTaskAttempt", + type: "TaskRunAttempt", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('dependentTaskAttemptId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'batchDependencies', - fields: ['dependentTaskAttemptId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentTaskAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "batchDependencies", fields: ["dependentTaskAttemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, dependentTaskAttemptId: { - name: 'dependentTaskAttemptId', - type: 'String', + name: "dependentTaskAttemptId", + type: "String", optional: true, - foreignKeyFor: ['dependentTaskAttempt'] as readonly string[], + foreignKeyFor: [ + "dependentTaskAttempt" + ] as readonly string[] }, runDependencies: { - name: 'runDependencies', - type: 'TaskRunDependency', + name: "runDependencies", + type: "TaskRunDependency", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('dependentBatchRun') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'dependentBatchRun', name: 'dependentBatchRun' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("dependentBatchRun") }] }] as readonly AttributeApplication[], + relation: { opposite: "dependentBatchRun", name: "dependentBatchRun" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('oneTimeUseToken')]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ExpressionUtils.field('idempotencyKey'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('dependentTaskAttemptId')]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("oneTimeUseToken")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId"), ExpressionUtils.field("idempotencyKey")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("dependentTaskAttemptId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - checkpointEventId: { type: 'String' }, - oneTimeUseToken: { type: 'String' }, - runtimeEnvironmentId_idempotencyKey: { - runtimeEnvironmentId: { type: 'String' }, - idempotencyKey: { type: 'String' }, - }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + checkpointEventId: { type: "String" }, + oneTimeUseToken: { type: "String" }, + runtimeEnvironmentId_idempotencyKey: { runtimeEnvironmentId: { type: "String" }, idempotencyKey: { type: "String" } } + } }, BatchTaskRunItem: { - name: 'BatchTaskRunItem', + name: "BatchTaskRunItem", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, status: { - name: 'status', - type: 'BatchTaskRunItemStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "BatchTaskRunItemStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, batchTaskRun: { - name: 'batchTaskRun', - type: 'BatchTaskRun', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('batchTaskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'items', - fields: ['batchTaskRunId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "batchTaskRun", + type: "BatchTaskRun", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchTaskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "items", fields: ["batchTaskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, batchTaskRunId: { - name: 'batchTaskRunId', - type: 'String', - foreignKeyFor: ['batchTaskRun'] as readonly string[], + name: "batchTaskRunId", + type: "String", + foreignKeyFor: [ + "batchTaskRun" + ] as readonly string[] }, taskRun: { - name: 'taskRun', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'batchItems', - fields: ['taskRunId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "taskRun", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "batchItems", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, taskRunId: { - name: 'taskRunId', - type: 'String', - foreignKeyFor: ['taskRun'] as readonly string[], + name: "taskRunId", + type: "String", + foreignKeyFor: [ + "taskRun" + ] as readonly string[] }, taskRunAttempt: { - name: 'taskRunAttempt', - type: 'TaskRunAttempt', + name: "taskRunAttempt", + type: "TaskRunAttempt", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunAttemptId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'batchTaskRunItems', - fields: ['taskRunAttemptId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "batchTaskRunItems", fields: ["taskRunAttemptId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, taskRunAttemptId: { - name: 'taskRunAttemptId', - type: 'String', + name: "taskRunAttemptId", + type: "String", optional: true, - foreignKeyFor: ['taskRunAttempt'] as readonly string[], + foreignKeyFor: [ + "taskRunAttempt" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, - }, + name: "completedAt", + type: "DateTime", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('batchTaskRunId'), - ExpressionUtils.field('taskRunId'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunAttemptId')]), - }, - { name: 'map', value: ExpressionUtils.literal('idx_batchtaskrunitem_taskrunattempt') }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - { name: 'map', value: ExpressionUtils.literal('idx_batchtaskrunitem_taskrun') }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("batchTaskRunId"), ExpressionUtils.field("taskRunId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunAttemptId")]) }, { name: "map", value: ExpressionUtils.literal("idx_batchtaskrunitem_taskrunattempt") }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "map", value: ExpressionUtils.literal("idx_batchtaskrunitem_taskrun") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - batchTaskRunId_taskRunId: { batchTaskRunId: { type: 'String' }, taskRunId: { type: 'String' } }, - }, + id: { type: "String" }, + batchTaskRunId_taskRunId: { batchTaskRunId: { type: "String" }, taskRunId: { type: "String" } } + } }, EnvironmentVariable: { - name: 'EnvironmentVariable', + name: "EnvironmentVariable", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, key: { - name: 'key', - type: 'String', + name: "key", + type: "String" }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'environmentVariables', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "environmentVariables", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, values: { - name: 'values', - type: 'EnvironmentVariableValue', + name: "values", + type: "EnvironmentVariableValue", array: true, - relation: { opposite: 'variable' }, - }, + relation: { opposite: "variable" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('key'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("key")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - projectId_key: { projectId: { type: 'String' }, key: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + projectId_key: { projectId: { type: "String" }, key: { type: "String" } } + } }, EnvironmentVariableValue: { - name: 'EnvironmentVariableValue', + name: "EnvironmentVariableValue", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, valueReference: { - name: 'valueReference', - type: 'SecretReference', + name: "valueReference", + type: "SecretReference", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('valueReferenceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'environmentVariableValues', - fields: ['valueReferenceId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("valueReferenceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "environmentVariableValues", fields: ["valueReferenceId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, valueReferenceId: { - name: 'valueReferenceId', - type: 'String', + name: "valueReferenceId", + type: "String", optional: true, - foreignKeyFor: ['valueReference'] as readonly string[], + foreignKeyFor: [ + "valueReference" + ] as readonly string[] }, variable: { - name: 'variable', - type: 'EnvironmentVariable', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('variableId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'values', - fields: ['variableId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "variable", + type: "EnvironmentVariable", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("variableId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "values", fields: ["variableId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, variableId: { - name: 'variableId', - type: 'String', - foreignKeyFor: ['variable'] as readonly string[], + name: "variableId", + type: "String", + foreignKeyFor: [ + "variable" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'environmentVariableValues', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "environmentVariableValues", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, isSecret: { - name: 'isSecret', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isSecret", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('variableId'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("variableId"), ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - variableId_environmentId: { variableId: { type: 'String' }, environmentId: { type: 'String' } }, - }, + id: { type: "String" }, + variableId_environmentId: { variableId: { type: "String" }, environmentId: { type: "String" } } + } }, Checkpoint: { - name: 'Checkpoint', + name: "Checkpoint", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'CheckpointType', + name: "type", + type: "CheckpointType" }, location: { - name: 'location', - type: 'String', + name: "location", + type: "String" }, imageRef: { - name: 'imageRef', - type: 'String', + name: "imageRef", + type: "String" }, reason: { - name: 'reason', - type: 'String', - optional: true, + name: "reason", + type: "String", + optional: true }, metadata: { - name: 'metadata', - type: 'String', - optional: true, + name: "metadata", + type: "String", + optional: true }, events: { - name: 'events', - type: 'CheckpointRestoreEvent', + name: "events", + type: "CheckpointRestoreEvent", array: true, - relation: { opposite: 'checkpoint' }, + relation: { opposite: "checkpoint" } }, run: { - name: 'run', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'checkpoints', - fields: ['runId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "run", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "checkpoints", fields: ["runId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runId: { - name: 'runId', - type: 'String', - foreignKeyFor: ['run'] as readonly string[], + name: "runId", + type: "String", + foreignKeyFor: [ + "run" + ] as readonly string[] }, attempt: { - name: 'attempt', - type: 'TaskRunAttempt', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('attemptId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'checkpoints', - fields: ['attemptId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "attempt", + type: "TaskRunAttempt", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "checkpoints", fields: ["attemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, attemptId: { - name: 'attemptId', - type: 'String', - foreignKeyFor: ['attempt'] as readonly string[], + name: "attemptId", + type: "String", + foreignKeyFor: [ + "attempt" + ] as readonly string[] }, attemptNumber: { - name: 'attemptNumber', - type: 'Int', - optional: true, + name: "attemptNumber", + type: "Int", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'checkpoints', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "checkpoints", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'checkpoints', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "checkpoints", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('attemptId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attemptId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - }, + id: { type: "String" }, + friendlyId: { type: "String" } + } }, CheckpointRestoreEvent: { - name: 'CheckpointRestoreEvent', + name: "CheckpointRestoreEvent", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, type: { - name: 'type', - type: 'CheckpointRestoreEventType', + name: "type", + type: "CheckpointRestoreEventType" }, reason: { - name: 'reason', - type: 'String', - optional: true, + name: "reason", + type: "String", + optional: true }, metadata: { - name: 'metadata', - type: 'String', - optional: true, + name: "metadata", + type: "String", + optional: true }, checkpoint: { - name: 'checkpoint', - type: 'Checkpoint', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('checkpointId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'events', - fields: ['checkpointId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "checkpoint", + type: "Checkpoint", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "events", fields: ["checkpointId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, checkpointId: { - name: 'checkpointId', - type: 'String', - foreignKeyFor: ['checkpoint'] as readonly string[], + name: "checkpointId", + type: "String", + foreignKeyFor: [ + "checkpoint" + ] as readonly string[] }, run: { - name: 'run', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'CheckpointRestoreEvent', - fields: ['runId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "run", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "CheckpointRestoreEvent", fields: ["runId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runId: { - name: 'runId', - type: 'String', - foreignKeyFor: ['run'] as readonly string[], + name: "runId", + type: "String", + foreignKeyFor: [ + "run" + ] as readonly string[] }, attempt: { - name: 'attempt', - type: 'TaskRunAttempt', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('attemptId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'CheckpointRestoreEvent', - fields: ['attemptId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "attempt", + type: "TaskRunAttempt", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("attemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "CheckpointRestoreEvent", fields: ["attemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, attemptId: { - name: 'attemptId', - type: 'String', - foreignKeyFor: ['attempt'] as readonly string[], + name: "attemptId", + type: "String", + foreignKeyFor: [ + "attempt" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'CheckpointRestoreEvent', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "CheckpointRestoreEvent", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, runtimeEnvironment: { - name: 'runtimeEnvironment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('runtimeEnvironmentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'CheckpointRestoreEvent', - fields: ['runtimeEnvironmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "runtimeEnvironment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runtimeEnvironmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "CheckpointRestoreEvent", fields: ["runtimeEnvironmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, runtimeEnvironmentId: { - name: 'runtimeEnvironmentId', - type: 'String', - foreignKeyFor: ['runtimeEnvironment'] as readonly string[], + name: "runtimeEnvironmentId", + type: "String", + foreignKeyFor: [ + "runtimeEnvironment" + ] as readonly string[] }, taskRunDependency: { - name: 'taskRunDependency', - type: 'TaskRunDependency', + name: "taskRunDependency", + type: "TaskRunDependency", optional: true, - relation: { opposite: 'checkpointEvent' }, + relation: { opposite: "checkpointEvent" } }, batchTaskRunDependency: { - name: 'batchTaskRunDependency', - type: 'BatchTaskRun', + name: "batchTaskRunDependency", + type: "BatchTaskRun", optional: true, - relation: { opposite: 'checkpointEvent' }, + relation: { opposite: "checkpointEvent" } }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, attributes: [ - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('checkpointId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("checkpointId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, WorkerDeployment: { - name: 'WorkerDeployment', + name: "WorkerDeployment", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, contentHash: { - name: 'contentHash', - type: 'String', + name: "contentHash", + type: "String" }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, shortCode: { - name: 'shortCode', - type: 'String', + name: "shortCode", + type: "String" }, version: { - name: 'version', - type: 'String', + name: "version", + type: "String" }, imageReference: { - name: 'imageReference', - type: 'String', - optional: true, + name: "imageReference", + type: "String", + optional: true }, imagePlatform: { - name: 'imagePlatform', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('linux/amd64') }] }, - ] as readonly AttributeApplication[], - default: 'linux/amd64' as FieldDefault, + name: "imagePlatform", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("linux/amd64") }] }] as readonly AttributeApplication[], + default: "linux/amd64" as FieldDefault }, externalBuildData: { - name: 'externalBuildData', - type: 'Json', - optional: true, + name: "externalBuildData", + type: "Json", + optional: true }, status: { - name: 'status', - type: 'WorkerDeploymentStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "WorkerDeploymentStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, type: { - name: 'type', - type: 'WorkerDeploymentType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('V1') }] }, - ] as readonly AttributeApplication[], - default: 'V1' as FieldDefault, + name: "type", + type: "WorkerDeploymentType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("V1") }] }] as readonly AttributeApplication[], + default: "V1" as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'WorkerDeployment', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "WorkerDeployment", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerDeployments', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerDeployments", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, worker: { - name: 'worker', - type: 'BackgroundWorker', + name: "worker", + type: "BackgroundWorker", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('workerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'deployment', - fields: ['workerId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "deployment", fields: ["workerId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, workerId: { - name: 'workerId', - type: 'String', + name: "workerId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['worker'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "worker" + ] as readonly string[] }, triggeredBy: { - name: 'triggeredBy', - type: 'User', + name: "triggeredBy", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('triggeredById')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'deployments', - fields: ['triggeredById'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("triggeredById")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "deployments", fields: ["triggeredById"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, triggeredById: { - name: 'triggeredById', - type: 'String', + name: "triggeredById", + type: "String", optional: true, - foreignKeyFor: ['triggeredBy'] as readonly string[], + foreignKeyFor: [ + "triggeredBy" + ] as readonly string[] }, builtAt: { - name: 'builtAt', - type: 'DateTime', - optional: true, + name: "builtAt", + type: "DateTime", + optional: true }, deployedAt: { - name: 'deployedAt', - type: 'DateTime', - optional: true, + name: "deployedAt", + type: "DateTime", + optional: true }, failedAt: { - name: 'failedAt', - type: 'DateTime', - optional: true, + name: "failedAt", + type: "DateTime", + optional: true }, errorData: { - name: 'errorData', - type: 'Json', - optional: true, + name: "errorData", + type: "Json", + optional: true }, git: { - name: 'git', - type: 'Json', - optional: true, + name: "git", + type: "Json", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, promotions: { - name: 'promotions', - type: 'WorkerDeploymentPromotion', + name: "promotions", + type: "WorkerDeploymentPromotion", array: true, - relation: { opposite: 'deployment' }, + relation: { opposite: "deployment" } }, alerts: { - name: 'alerts', - type: 'ProjectAlert', + name: "alerts", + type: "ProjectAlert", array: true, - relation: { opposite: 'workerDeployment' }, + relation: { opposite: "workerDeployment" } }, workerInstance: { - name: 'workerInstance', - type: 'WorkerInstance', + name: "workerInstance", + type: "WorkerInstance", array: true, - relation: { opposite: 'deployment' }, - }, + relation: { opposite: "deployment" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('shortCode'), - ]), - }, - ], - }, - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('version'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("shortCode")]) }] }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("version")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - workerId: { type: 'String' }, - projectId_shortCode: { projectId: { type: 'String' }, shortCode: { type: 'String' } }, - environmentId_version: { environmentId: { type: 'String' }, version: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + workerId: { type: "String" }, + projectId_shortCode: { projectId: { type: "String" }, shortCode: { type: "String" } }, + environmentId_version: { environmentId: { type: "String" }, version: { type: "String" } } + } }, WorkerDeploymentPromotion: { - name: 'WorkerDeploymentPromotion', + name: "WorkerDeploymentPromotion", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, label: { - name: 'label', - type: 'String', + name: "label", + type: "String" }, deployment: { - name: 'deployment', - type: 'WorkerDeployment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('deploymentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'promotions', - fields: ['deploymentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "deployment", + type: "WorkerDeployment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("deploymentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "promotions", fields: ["deploymentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, deploymentId: { - name: 'deploymentId', - type: 'String', - foreignKeyFor: ['deployment'] as readonly string[], + name: "deploymentId", + type: "String", + foreignKeyFor: [ + "deployment" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'workerDeploymentPromotions', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "workerDeploymentPromotions", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], - }, + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('environmentId'), - ExpressionUtils.field('label'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId"), ExpressionUtils.field("label")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - environmentId_label: { environmentId: { type: 'String' }, label: { type: 'String' } }, - }, + id: { type: "String" }, + environmentId_label: { environmentId: { type: "String" }, label: { type: "String" } } + } }, TaskSchedule: { - name: 'TaskSchedule', + name: "TaskSchedule", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, type: { - name: 'type', - type: 'ScheduleType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('IMPERATIVE') }] }, - ] as readonly AttributeApplication[], - default: 'IMPERATIVE' as FieldDefault, + name: "type", + type: "ScheduleType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("IMPERATIVE") }] }] as readonly AttributeApplication[], + default: "IMPERATIVE" as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, taskIdentifier: { - name: 'taskIdentifier', - type: 'String', + name: "taskIdentifier", + type: "String" }, deduplicationKey: { - name: 'deduplicationKey', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + name: "deduplicationKey", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userProvidedDeduplicationKey: { - name: 'userProvidedDeduplicationKey', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "userProvidedDeduplicationKey", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, generatorExpression: { - name: 'generatorExpression', - type: 'String', + name: "generatorExpression", + type: "String" }, generatorDescription: { - name: 'generatorDescription', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('') }] }, - ] as readonly AttributeApplication[], - default: '' as FieldDefault, + name: "generatorDescription", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("") }] }] as readonly AttributeApplication[], + default: "" as FieldDefault }, generatorType: { - name: 'generatorType', - type: 'ScheduleGeneratorType', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('CRON') }] }, - ] as readonly AttributeApplication[], - default: 'CRON' as FieldDefault, + name: "generatorType", + type: "ScheduleGeneratorType", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("CRON") }] }] as readonly AttributeApplication[], + default: "CRON" as FieldDefault }, timezone: { - name: 'timezone', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UTC') }] }, - ] as readonly AttributeApplication[], - default: 'UTC' as FieldDefault, + name: "timezone", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UTC") }] }] as readonly AttributeApplication[], + default: "UTC" as FieldDefault }, externalId: { - name: 'externalId', - type: 'String', - optional: true, + name: "externalId", + type: "String", + optional: true }, instances: { - name: 'instances', - type: 'TaskScheduleInstance', + name: "instances", + type: "TaskScheduleInstance", array: true, - relation: { opposite: 'taskSchedule' }, + relation: { opposite: "taskSchedule" } }, lastRunTriggeredAt: { - name: 'lastRunTriggeredAt', - type: 'DateTime', - optional: true, + name: "lastRunTriggeredAt", + type: "DateTime", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskSchedules', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskSchedules", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, active: { - name: 'active', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, - }, + name: "active", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('deduplicationKey'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("deduplicationKey")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - projectId_deduplicationKey: { projectId: { type: 'String' }, deduplicationKey: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + projectId_deduplicationKey: { projectId: { type: "String" }, deduplicationKey: { type: "String" } } + } }, TaskScheduleInstance: { - name: 'TaskScheduleInstance', + name: "TaskScheduleInstance", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, taskSchedule: { - name: 'taskSchedule', - type: 'TaskSchedule', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskScheduleId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'instances', - fields: ['taskScheduleId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "taskSchedule", + type: "TaskSchedule", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskScheduleId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "instances", fields: ["taskScheduleId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, taskScheduleId: { - name: 'taskScheduleId', - type: 'String', - foreignKeyFor: ['taskSchedule'] as readonly string[], + name: "taskScheduleId", + type: "String", + foreignKeyFor: [ + "taskSchedule" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'taskScheduleInstances', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "taskScheduleInstances", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, active: { - name: 'active', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "active", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, lastScheduledTimestamp: { - name: 'lastScheduledTimestamp', - type: 'DateTime', - optional: true, + name: "lastScheduledTimestamp", + type: "DateTime", + optional: true }, nextScheduledTimestamp: { - name: 'nextScheduledTimestamp', - type: 'DateTime', - optional: true, - }, + name: "nextScheduledTimestamp", + type: "DateTime", + optional: true + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('taskScheduleId'), - ExpressionUtils.field('environmentId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskScheduleId"), ExpressionUtils.field("environmentId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - taskScheduleId_environmentId: { taskScheduleId: { type: 'String' }, environmentId: { type: 'String' } }, - }, + id: { type: "String" }, + taskScheduleId_environmentId: { taskScheduleId: { type: "String" }, environmentId: { type: "String" } } + } }, RuntimeEnvironmentSession: { - name: 'RuntimeEnvironmentSession', + name: "RuntimeEnvironmentSession", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, ipAddress: { - name: 'ipAddress', - type: 'String', + name: "ipAddress", + type: "String" }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'sessions', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "sessions", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, disconnectedAt: { - name: 'disconnectedAt', - type: 'DateTime', - optional: true, + name: "disconnectedAt", + type: "DateTime", + optional: true }, currentEnvironments: { - name: 'currentEnvironments', - type: 'RuntimeEnvironment', + name: "currentEnvironments", + type: "RuntimeEnvironment", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('currentSession') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'currentSession', name: 'currentSession' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("currentSession") }] }] as readonly AttributeApplication[], + relation: { opposite: "currentSession", name: "currentSession" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, ProjectAlertChannel: { - name: 'ProjectAlertChannel', + name: "ProjectAlertChannel", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, deduplicationKey: { - name: 'deduplicationKey', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + name: "deduplicationKey", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, userProvidedDeduplicationKey: { - name: 'userProvidedDeduplicationKey', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "userProvidedDeduplicationKey", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, integration: { - name: 'integration', - type: 'OrganizationIntegration', + name: "integration", + type: "OrganizationIntegration", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('integrationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('SetNull') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alertChannels', - fields: ['integrationId'], - references: ['id'], - onDelete: 'SetNull', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("integrationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("SetNull") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alertChannels", fields: ["integrationId"], references: ["id"], onDelete: "SetNull", onUpdate: "Cascade" } }, integrationId: { - name: 'integrationId', - type: 'String', + name: "integrationId", + type: "String", optional: true, - foreignKeyFor: ['integration'] as readonly string[], + foreignKeyFor: [ + "integration" + ] as readonly string[] }, enabled: { - name: 'enabled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "enabled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, type: { - name: 'type', - type: 'ProjectAlertChannelType', + name: "type", + type: "ProjectAlertChannelType" }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, properties: { - name: 'properties', - type: 'Json', + name: "properties", + type: "Json" }, alertTypes: { - name: 'alertTypes', - type: 'ProjectAlertType', - array: true, + name: "alertTypes", + type: "ProjectAlertType", + array: true }, environmentTypes: { - name: 'environmentTypes', - type: 'RuntimeEnvironmentType', + name: "environmentTypes", + type: "RuntimeEnvironmentType", array: true, - attributes: [ - { - name: '@default', - args: [ - { - name: 'value', - value: ExpressionUtils.array('RuntimeEnvironmentType', [ - ExpressionUtils.literal('STAGING'), - ExpressionUtils.literal('PRODUCTION'), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], - default: ['STAGING', 'PRODUCTION'] as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.array("RuntimeEnvironmentType", [ExpressionUtils.literal("STAGING"), ExpressionUtils.literal("PRODUCTION")]) }] }] as readonly AttributeApplication[], + default: ["STAGING", "PRODUCTION"] as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alertChannels', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alertChannels", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, alerts: { - name: 'alerts', - type: 'ProjectAlert', + name: "alerts", + type: "ProjectAlert", array: true, - relation: { opposite: 'channel' }, + relation: { opposite: "channel" } }, alertStorages: { - name: 'alertStorages', - type: 'ProjectAlertStorage', + name: "alertStorages", + type: "ProjectAlertStorage", array: true, - relation: { opposite: 'alertChannel' }, - }, + relation: { opposite: "alertChannel" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('deduplicationKey'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId"), ExpressionUtils.field("deduplicationKey")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - projectId_deduplicationKey: { projectId: { type: 'String' }, deduplicationKey: { type: 'String' } }, - }, + id: { type: "String" }, + friendlyId: { type: "String" }, + projectId_deduplicationKey: { projectId: { type: "String" }, deduplicationKey: { type: "String" } } + } }, ProjectAlert: { - name: 'ProjectAlert', + name: "ProjectAlert", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alerts', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alerts", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, environment: { - name: 'environment', - type: 'RuntimeEnvironment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('environmentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alerts', - fields: ['environmentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "environment", + type: "RuntimeEnvironment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("environmentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alerts", fields: ["environmentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, environmentId: { - name: 'environmentId', - type: 'String', - foreignKeyFor: ['environment'] as readonly string[], + name: "environmentId", + type: "String", + foreignKeyFor: [ + "environment" + ] as readonly string[] }, channel: { - name: 'channel', - type: 'ProjectAlertChannel', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('channelId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alerts', - fields: ['channelId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "channel", + type: "ProjectAlertChannel", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("channelId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alerts", fields: ["channelId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, channelId: { - name: 'channelId', - type: 'String', - foreignKeyFor: ['channel'] as readonly string[], + name: "channelId", + type: "String", + foreignKeyFor: [ + "channel" + ] as readonly string[] }, status: { - name: 'status', - type: 'ProjectAlertStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "ProjectAlertStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, type: { - name: 'type', - type: 'ProjectAlertType', + name: "type", + type: "ProjectAlertType" }, taskRunAttempt: { - name: 'taskRunAttempt', - type: 'TaskRunAttempt', + name: "taskRunAttempt", + type: "TaskRunAttempt", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunAttemptId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alerts', - fields: ['taskRunAttemptId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunAttemptId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alerts", fields: ["taskRunAttemptId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, taskRunAttemptId: { - name: 'taskRunAttemptId', - type: 'String', + name: "taskRunAttemptId", + type: "String", optional: true, - foreignKeyFor: ['taskRunAttempt'] as readonly string[], + foreignKeyFor: [ + "taskRunAttempt" + ] as readonly string[] }, taskRun: { - name: 'taskRun', - type: 'TaskRun', + name: "taskRun", + type: "TaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('taskRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alerts', - fields: ['taskRunId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("taskRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alerts", fields: ["taskRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, taskRunId: { - name: 'taskRunId', - type: 'String', + name: "taskRunId", + type: "String", optional: true, - foreignKeyFor: ['taskRun'] as readonly string[], + foreignKeyFor: [ + "taskRun" + ] as readonly string[] }, workerDeployment: { - name: 'workerDeployment', - type: 'WorkerDeployment', + name: "workerDeployment", + type: "WorkerDeployment", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('workerDeploymentId'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alerts', - fields: ['workerDeploymentId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("workerDeploymentId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alerts", fields: ["workerDeploymentId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, workerDeploymentId: { - name: 'workerDeploymentId', - type: 'String', + name: "workerDeploymentId", + type: "String", optional: true, - foreignKeyFor: ['workerDeployment'] as readonly string[], + foreignKeyFor: [ + "workerDeployment" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - }, + id: { type: "String" }, + friendlyId: { type: "String" } + } }, ProjectAlertStorage: { - name: 'ProjectAlertStorage', + name: "ProjectAlertStorage", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alertStorages', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alertStorages", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, alertChannel: { - name: 'alertChannel', - type: 'ProjectAlertChannel', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('alertChannelId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'alertStorages', - fields: ['alertChannelId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "alertChannel", + type: "ProjectAlertChannel", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("alertChannelId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "alertStorages", fields: ["alertChannelId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, alertChannelId: { - name: 'alertChannelId', - type: 'String', - foreignKeyFor: ['alertChannel'] as readonly string[], + name: "alertChannelId", + type: "String", + foreignKeyFor: [ + "alertChannel" + ] as readonly string[] }, alertType: { - name: 'alertType', - type: 'ProjectAlertType', + name: "alertType", + type: "ProjectAlertType" }, storageId: { - name: 'storageId', - type: 'String', + name: "storageId", + type: "String" }, storageData: { - name: 'storageData', - type: 'Json', + name: "storageData", + type: "Json" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, OrganizationIntegration: { - name: 'OrganizationIntegration', + name: "OrganizationIntegration", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, service: { - name: 'service', - type: 'IntegrationService', + name: "service", + type: "IntegrationService" }, integrationData: { - name: 'integrationData', - type: 'Json', + name: "integrationData", + type: "Json" }, tokenReference: { - name: 'tokenReference', - type: 'SecretReference', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('tokenReferenceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'OrganizationIntegration', - fields: ['tokenReferenceId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "tokenReference", + type: "SecretReference", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("tokenReferenceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "OrganizationIntegration", fields: ["tokenReferenceId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, tokenReferenceId: { - name: 'tokenReferenceId', - type: 'String', - foreignKeyFor: ['tokenReference'] as readonly string[], + name: "tokenReferenceId", + type: "String", + foreignKeyFor: [ + "tokenReference" + ] as readonly string[] }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'organizationIntegrations', - fields: ['organizationId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "organizationIntegrations", fields: ["organizationId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, organizationId: { - name: 'organizationId', - type: 'String', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "String", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, alertChannels: { - name: 'alertChannels', - type: 'ProjectAlertChannel', + name: "alertChannels", + type: "ProjectAlertChannel", array: true, - relation: { opposite: 'integration' }, - }, + relation: { opposite: "integration" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - }, + id: { type: "String" }, + friendlyId: { type: "String" } + } }, BulkActionGroup: { - name: 'BulkActionGroup', + name: "BulkActionGroup", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'bulkActionGroups', - fields: ['projectId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "bulkActionGroups", fields: ["projectId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, projectId: { - name: 'projectId', - type: 'String', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "String", + foreignKeyFor: [ + "project" + ] as readonly string[] }, type: { - name: 'type', - type: 'BulkActionType', + name: "type", + type: "BulkActionType" }, items: { - name: 'items', - type: 'BulkActionItem', + name: "items", + type: "BulkActionItem", array: true, - relation: { opposite: 'group' }, + relation: { opposite: "group" } }, status: { - name: 'status', - type: 'BulkActionStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "BulkActionStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - }, + id: { type: "String" }, + friendlyId: { type: "String" } + } }, BulkActionItem: { - name: 'BulkActionItem', + name: "BulkActionItem", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, friendlyId: { - name: 'friendlyId', - type: 'String', + name: "friendlyId", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, group: { - name: 'group', - type: 'BulkActionGroup', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('groupId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'items', - fields: ['groupId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "group", + type: "BulkActionGroup", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("groupId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "items", fields: ["groupId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, groupId: { - name: 'groupId', - type: 'String', - foreignKeyFor: ['group'] as readonly string[], + name: "groupId", + type: "String", + foreignKeyFor: [ + "group" + ] as readonly string[] }, type: { - name: 'type', - type: 'BulkActionType', + name: "type", + type: "BulkActionType" }, status: { - name: 'status', - type: 'BulkActionItemStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "status", + type: "BulkActionItemStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, sourceRun: { - name: 'sourceRun', - type: 'TaskRun', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('SourceActionItemRun') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('sourceRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'sourceBulkActionItems', - name: 'SourceActionItemRun', - fields: ['sourceRunId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + name: "sourceRun", + type: "TaskRun", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("SourceActionItemRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("sourceRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "sourceBulkActionItems", name: "SourceActionItemRun", fields: ["sourceRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, sourceRunId: { - name: 'sourceRunId', - type: 'String', - foreignKeyFor: ['sourceRun'] as readonly string[], + name: "sourceRunId", + type: "String", + foreignKeyFor: [ + "sourceRun" + ] as readonly string[] }, destinationRun: { - name: 'destinationRun', - type: 'TaskRun', + name: "destinationRun", + type: "TaskRun", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('DestinationActionItemRun') }, - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('destinationRunId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'destinationBulkActionItems', - name: 'DestinationActionItemRun', - fields: ['destinationRunId'], - references: ['id'], - onDelete: 'Cascade', - onUpdate: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("DestinationActionItemRun") }, { name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("destinationRunId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "destinationBulkActionItems", name: "DestinationActionItemRun", fields: ["destinationRunId"], references: ["id"], onDelete: "Cascade", onUpdate: "Cascade" } }, destinationRunId: { - name: 'destinationRunId', - type: 'String', + name: "destinationRunId", + type: "String", optional: true, - foreignKeyFor: ['destinationRun'] as readonly string[], + foreignKeyFor: [ + "destinationRun" + ] as readonly string[] }, error: { - name: 'error', - type: 'String', - optional: true, + name: "error", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - friendlyId: { type: 'String' }, - }, + id: { type: "String" }, + friendlyId: { type: "String" } + } }, RealtimeStreamChunk: { - name: 'RealtimeStreamChunk', + name: "RealtimeStreamChunk", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, key: { - name: 'key', - type: 'String', + name: "key", + type: "String" }, value: { - name: 'value', - type: 'String', + name: "value", + type: "String" }, sequence: { - name: 'sequence', - type: 'Int', + name: "sequence", + type: "Int" }, runId: { - name: 'runId', - type: 'String', + name: "runId", + type: "String" }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, - }, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault + } }, attributes: [ - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, - ], - }, - { - name: '@@index', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('DateTime', [ExpressionUtils.field('createdAt')]), - }, - ], - }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("DateTime", [ExpressionUtils.field("createdAt")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, TaskEventPartitioned: { - name: 'TaskEventPartitioned', + name: "TaskEventPartitioned", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, message: { - name: 'message', - type: 'String', + name: "message", + type: "String" }, traceId: { - name: 'traceId', - type: 'String', + name: "traceId", + type: "String" }, spanId: { - name: 'spanId', - type: 'String', + name: "spanId", + type: "String" }, parentId: { - name: 'parentId', - type: 'String', - optional: true, + name: "parentId", + type: "String", + optional: true }, tracestate: { - name: 'tracestate', - type: 'String', - optional: true, + name: "tracestate", + type: "String", + optional: true }, isError: { - name: 'isError', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isError", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isPartial: { - name: 'isPartial', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isPartial", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, isCancelled: { - name: 'isCancelled', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "isCancelled", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, serviceName: { - name: 'serviceName', - type: 'String', + name: "serviceName", + type: "String" }, serviceNamespace: { - name: 'serviceNamespace', - type: 'String', + name: "serviceNamespace", + type: "String" }, level: { - name: 'level', - type: 'TaskEventLevel', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('TRACE') }] }, - ] as readonly AttributeApplication[], - default: 'TRACE' as FieldDefault, + name: "level", + type: "TaskEventLevel", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("TRACE") }] }] as readonly AttributeApplication[], + default: "TRACE" as FieldDefault }, kind: { - name: 'kind', - type: 'TaskEventKind', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('INTERNAL') }] }, - ] as readonly AttributeApplication[], - default: 'INTERNAL' as FieldDefault, + name: "kind", + type: "TaskEventKind", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("INTERNAL") }] }] as readonly AttributeApplication[], + default: "INTERNAL" as FieldDefault }, status: { - name: 'status', - type: 'TaskEventStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UNSET') }] }, - ] as readonly AttributeApplication[], - default: 'UNSET' as FieldDefault, + name: "status", + type: "TaskEventStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UNSET") }] }] as readonly AttributeApplication[], + default: "UNSET" as FieldDefault }, links: { - name: 'links', - type: 'Json', - optional: true, + name: "links", + type: "Json", + optional: true }, events: { - name: 'events', - type: 'Json', - optional: true, + name: "events", + type: "Json", + optional: true }, startTime: { - name: 'startTime', - type: 'BigInt', + name: "startTime", + type: "BigInt" }, duration: { - name: 'duration', - type: 'BigInt', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "duration", + type: "BigInt", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, attemptId: { - name: 'attemptId', - type: 'String', - optional: true, + name: "attemptId", + type: "String", + optional: true }, attemptNumber: { - name: 'attemptNumber', - type: 'Int', - optional: true, + name: "attemptNumber", + type: "Int", + optional: true }, environmentId: { - name: 'environmentId', - type: 'String', + name: "environmentId", + type: "String" }, environmentType: { - name: 'environmentType', - type: 'RuntimeEnvironmentType', + name: "environmentType", + type: "RuntimeEnvironmentType" }, organizationId: { - name: 'organizationId', - type: 'String', + name: "organizationId", + type: "String" }, projectId: { - name: 'projectId', - type: 'String', + name: "projectId", + type: "String" }, projectRef: { - name: 'projectRef', - type: 'String', + name: "projectRef", + type: "String" }, runId: { - name: 'runId', - type: 'String', + name: "runId", + type: "String" }, runIsTest: { - name: 'runIsTest', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "runIsTest", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, idempotencyKey: { - name: 'idempotencyKey', - type: 'String', - optional: true, + name: "idempotencyKey", + type: "String", + optional: true }, taskSlug: { - name: 'taskSlug', - type: 'String', + name: "taskSlug", + type: "String" }, taskPath: { - name: 'taskPath', - type: 'String', - optional: true, + name: "taskPath", + type: "String", + optional: true }, taskExportName: { - name: 'taskExportName', - type: 'String', - optional: true, + name: "taskExportName", + type: "String", + optional: true }, workerId: { - name: 'workerId', - type: 'String', - optional: true, + name: "workerId", + type: "String", + optional: true }, workerVersion: { - name: 'workerVersion', - type: 'String', - optional: true, + name: "workerVersion", + type: "String", + optional: true }, queueId: { - name: 'queueId', - type: 'String', - optional: true, + name: "queueId", + type: "String", + optional: true }, queueName: { - name: 'queueName', - type: 'String', - optional: true, + name: "queueName", + type: "String", + optional: true }, batchId: { - name: 'batchId', - type: 'String', - optional: true, + name: "batchId", + type: "String", + optional: true }, properties: { - name: 'properties', - type: 'Json', + name: "properties", + type: "Json" }, metadata: { - name: 'metadata', - type: 'Json', - optional: true, + name: "metadata", + type: "Json", + optional: true }, style: { - name: 'style', - type: 'Json', - optional: true, + name: "style", + type: "Json", + optional: true }, output: { - name: 'output', - type: 'Json', - optional: true, + name: "output", + type: "Json", + optional: true }, outputType: { - name: 'outputType', - type: 'String', - optional: true, + name: "outputType", + type: "String", + optional: true }, payload: { - name: 'payload', - type: 'Json', - optional: true, + name: "payload", + type: "Json", + optional: true }, payloadType: { - name: 'payloadType', - type: 'String', - optional: true, + name: "payloadType", + type: "String", + optional: true }, createdAt: { - name: 'createdAt', - type: 'DateTime', + name: "createdAt", + type: "DateTime", id: true, - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, usageDurationMs: { - name: 'usageDurationMs', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "usageDurationMs", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, usageCostInCents: { - name: 'usageCostInCents', - type: 'Float', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "usageCostInCents", + type: "Float", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, machinePreset: { - name: 'machinePreset', - type: 'String', - optional: true, + name: "machinePreset", + type: "String", + optional: true }, machinePresetCpu: { - name: 'machinePresetCpu', - type: 'Float', - optional: true, + name: "machinePresetCpu", + type: "Float", + optional: true }, machinePresetMemory: { - name: 'machinePresetMemory', - type: 'Float', - optional: true, + name: "machinePresetMemory", + type: "Float", + optional: true }, machinePresetCentsPerMs: { - name: 'machinePresetCentsPerMs', - type: 'Float', - optional: true, - }, + name: "machinePresetCentsPerMs", + type: "Float", + optional: true + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('id'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('traceId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('spanId')]) }, - ], - }, - { - name: '@@index', - args: [ - { name: 'fields', value: ExpressionUtils.array('String', [ExpressionUtils.field('runId')]) }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("traceId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spanId")]) }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("runId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id', 'createdAt'], + idFields: ["id", "createdAt"], uniqueFields: { - id_createdAt: { id: { type: 'String' }, createdAt: { type: 'DateTime' } }, - }, - }, + id_createdAt: { id: { type: "String" }, createdAt: { type: "DateTime" } } + } + } } as const; enums = { AuthenticationMethod: { - name: 'AuthenticationMethod', + name: "AuthenticationMethod", values: { - GITHUB: 'GITHUB', - MAGIC_LINK: 'MAGIC_LINK', - }, + GITHUB: "GITHUB", + MAGIC_LINK: "MAGIC_LINK" + } }, OrgMemberRole: { - name: 'OrgMemberRole', + name: "OrgMemberRole", values: { - ADMIN: 'ADMIN', - MEMBER: 'MEMBER', - }, + ADMIN: "ADMIN", + MEMBER: "MEMBER" + } }, RuntimeEnvironmentType: { - name: 'RuntimeEnvironmentType', + name: "RuntimeEnvironmentType", values: { - PRODUCTION: 'PRODUCTION', - STAGING: 'STAGING', - DEVELOPMENT: 'DEVELOPMENT', - PREVIEW: 'PREVIEW', - }, + PRODUCTION: "PRODUCTION", + STAGING: "STAGING", + DEVELOPMENT: "DEVELOPMENT", + PREVIEW: "PREVIEW" + } }, ProjectVersion: { - name: 'ProjectVersion', + name: "ProjectVersion", values: { - V2: 'V2', - V3: 'V3', - }, + V2: "V2", + V3: "V3" + } }, SecretStoreProvider: { - name: 'SecretStoreProvider', + name: "SecretStoreProvider", values: { - DATABASE: 'DATABASE', - AWS_PARAM_STORE: 'AWS_PARAM_STORE', - }, + DATABASE: "DATABASE", + AWS_PARAM_STORE: "AWS_PARAM_STORE" + } }, TaskTriggerSource: { - name: 'TaskTriggerSource', + name: "TaskTriggerSource", values: { - STANDARD: 'STANDARD', - SCHEDULED: 'SCHEDULED', - }, + STANDARD: "STANDARD", + SCHEDULED: "SCHEDULED" + } }, TaskRunStatus: { - name: 'TaskRunStatus', + name: "TaskRunStatus", values: { - DELAYED: 'DELAYED', - PENDING: 'PENDING', - PENDING_VERSION: 'PENDING_VERSION', - WAITING_FOR_DEPLOY: 'WAITING_FOR_DEPLOY', - EXECUTING: 'EXECUTING', - WAITING_TO_RESUME: 'WAITING_TO_RESUME', - RETRYING_AFTER_FAILURE: 'RETRYING_AFTER_FAILURE', - PAUSED: 'PAUSED', - CANCELED: 'CANCELED', - INTERRUPTED: 'INTERRUPTED', - COMPLETED_SUCCESSFULLY: 'COMPLETED_SUCCESSFULLY', - COMPLETED_WITH_ERRORS: 'COMPLETED_WITH_ERRORS', - SYSTEM_FAILURE: 'SYSTEM_FAILURE', - CRASHED: 'CRASHED', - EXPIRED: 'EXPIRED', - TIMED_OUT: 'TIMED_OUT', - }, + DELAYED: "DELAYED", + PENDING: "PENDING", + PENDING_VERSION: "PENDING_VERSION", + WAITING_FOR_DEPLOY: "WAITING_FOR_DEPLOY", + EXECUTING: "EXECUTING", + WAITING_TO_RESUME: "WAITING_TO_RESUME", + RETRYING_AFTER_FAILURE: "RETRYING_AFTER_FAILURE", + PAUSED: "PAUSED", + CANCELED: "CANCELED", + INTERRUPTED: "INTERRUPTED", + COMPLETED_SUCCESSFULLY: "COMPLETED_SUCCESSFULLY", + COMPLETED_WITH_ERRORS: "COMPLETED_WITH_ERRORS", + SYSTEM_FAILURE: "SYSTEM_FAILURE", + CRASHED: "CRASHED", + EXPIRED: "EXPIRED", + TIMED_OUT: "TIMED_OUT" + } }, RunEngineVersion: { - name: 'RunEngineVersion', + name: "RunEngineVersion", values: { - V1: 'V1', - V2: 'V2', - }, + V1: "V1", + V2: "V2" + } }, TaskRunExecutionStatus: { - name: 'TaskRunExecutionStatus', + name: "TaskRunExecutionStatus", values: { - RUN_CREATED: 'RUN_CREATED', - QUEUED: 'QUEUED', - QUEUED_EXECUTING: 'QUEUED_EXECUTING', - PENDING_EXECUTING: 'PENDING_EXECUTING', - EXECUTING: 'EXECUTING', - EXECUTING_WITH_WAITPOINTS: 'EXECUTING_WITH_WAITPOINTS', - SUSPENDED: 'SUSPENDED', - PENDING_CANCEL: 'PENDING_CANCEL', - FINISHED: 'FINISHED', - }, + RUN_CREATED: "RUN_CREATED", + QUEUED: "QUEUED", + QUEUED_EXECUTING: "QUEUED_EXECUTING", + PENDING_EXECUTING: "PENDING_EXECUTING", + EXECUTING: "EXECUTING", + EXECUTING_WITH_WAITPOINTS: "EXECUTING_WITH_WAITPOINTS", + SUSPENDED: "SUSPENDED", + PENDING_CANCEL: "PENDING_CANCEL", + FINISHED: "FINISHED" + } }, TaskRunCheckpointType: { - name: 'TaskRunCheckpointType', + name: "TaskRunCheckpointType", values: { - DOCKER: 'DOCKER', - KUBERNETES: 'KUBERNETES', - }, + DOCKER: "DOCKER", + KUBERNETES: "KUBERNETES" + } }, WaitpointType: { - name: 'WaitpointType', + name: "WaitpointType", values: { - RUN: 'RUN', - DATETIME: 'DATETIME', - MANUAL: 'MANUAL', - BATCH: 'BATCH', - }, + RUN: "RUN", + DATETIME: "DATETIME", + MANUAL: "MANUAL", + BATCH: "BATCH" + } }, WaitpointStatus: { - name: 'WaitpointStatus', + name: "WaitpointStatus", values: { - PENDING: 'PENDING', - COMPLETED: 'COMPLETED', - }, + PENDING: "PENDING", + COMPLETED: "COMPLETED" + } }, WorkerInstanceGroupType: { - name: 'WorkerInstanceGroupType', + name: "WorkerInstanceGroupType", values: { - MANAGED: 'MANAGED', - UNMANAGED: 'UNMANAGED', - }, + MANAGED: "MANAGED", + UNMANAGED: "UNMANAGED" + } }, TaskRunAttemptStatus: { - name: 'TaskRunAttemptStatus', + name: "TaskRunAttemptStatus", values: { - PENDING: 'PENDING', - EXECUTING: 'EXECUTING', - PAUSED: 'PAUSED', - FAILED: 'FAILED', - CANCELED: 'CANCELED', - COMPLETED: 'COMPLETED', - }, + PENDING: "PENDING", + EXECUTING: "EXECUTING", + PAUSED: "PAUSED", + FAILED: "FAILED", + CANCELED: "CANCELED", + COMPLETED: "COMPLETED" + } }, TaskEventLevel: { - name: 'TaskEventLevel', + name: "TaskEventLevel", values: { - TRACE: 'TRACE', - DEBUG: 'DEBUG', - LOG: 'LOG', - INFO: 'INFO', - WARN: 'WARN', - ERROR: 'ERROR', - }, + TRACE: "TRACE", + DEBUG: "DEBUG", + LOG: "LOG", + INFO: "INFO", + WARN: "WARN", + ERROR: "ERROR" + } }, TaskEventKind: { - name: 'TaskEventKind', + name: "TaskEventKind", values: { - UNSPECIFIED: 'UNSPECIFIED', - INTERNAL: 'INTERNAL', - SERVER: 'SERVER', - CLIENT: 'CLIENT', - PRODUCER: 'PRODUCER', - CONSUMER: 'CONSUMER', - UNRECOGNIZED: 'UNRECOGNIZED', - LOG: 'LOG', - }, + UNSPECIFIED: "UNSPECIFIED", + INTERNAL: "INTERNAL", + SERVER: "SERVER", + CLIENT: "CLIENT", + PRODUCER: "PRODUCER", + CONSUMER: "CONSUMER", + UNRECOGNIZED: "UNRECOGNIZED", + LOG: "LOG" + } }, TaskEventStatus: { - name: 'TaskEventStatus', + name: "TaskEventStatus", values: { - UNSET: 'UNSET', - OK: 'OK', - ERROR: 'ERROR', - UNRECOGNIZED: 'UNRECOGNIZED', - }, + UNSET: "UNSET", + OK: "OK", + ERROR: "ERROR", + UNRECOGNIZED: "UNRECOGNIZED" + } }, TaskQueueType: { - name: 'TaskQueueType', + name: "TaskQueueType", values: { - VIRTUAL: 'VIRTUAL', - NAMED: 'NAMED', - }, + VIRTUAL: "VIRTUAL", + NAMED: "NAMED" + } }, TaskQueueVersion: { - name: 'TaskQueueVersion', + name: "TaskQueueVersion", values: { - V1: 'V1', - V2: 'V2', - }, + V1: "V1", + V2: "V2" + } }, BatchTaskRunStatus: { - name: 'BatchTaskRunStatus', + name: "BatchTaskRunStatus", values: { - PENDING: 'PENDING', - COMPLETED: 'COMPLETED', - ABORTED: 'ABORTED', - }, + PENDING: "PENDING", + COMPLETED: "COMPLETED", + ABORTED: "ABORTED" + } }, BatchTaskRunItemStatus: { - name: 'BatchTaskRunItemStatus', + name: "BatchTaskRunItemStatus", values: { - PENDING: 'PENDING', - FAILED: 'FAILED', - CANCELED: 'CANCELED', - COMPLETED: 'COMPLETED', - }, + PENDING: "PENDING", + FAILED: "FAILED", + CANCELED: "CANCELED", + COMPLETED: "COMPLETED" + } }, CheckpointType: { - name: 'CheckpointType', + name: "CheckpointType", values: { - DOCKER: 'DOCKER', - KUBERNETES: 'KUBERNETES', - }, + DOCKER: "DOCKER", + KUBERNETES: "KUBERNETES" + } }, CheckpointRestoreEventType: { - name: 'CheckpointRestoreEventType', + name: "CheckpointRestoreEventType", values: { - CHECKPOINT: 'CHECKPOINT', - RESTORE: 'RESTORE', - }, + CHECKPOINT: "CHECKPOINT", + RESTORE: "RESTORE" + } }, WorkerDeploymentType: { - name: 'WorkerDeploymentType', + name: "WorkerDeploymentType", values: { - MANAGED: 'MANAGED', - UNMANAGED: 'UNMANAGED', - V1: 'V1', - }, + MANAGED: "MANAGED", + UNMANAGED: "UNMANAGED", + V1: "V1" + } }, WorkerDeploymentStatus: { - name: 'WorkerDeploymentStatus', + name: "WorkerDeploymentStatus", values: { - PENDING: 'PENDING', - BUILDING: 'BUILDING', - DEPLOYING: 'DEPLOYING', - DEPLOYED: 'DEPLOYED', - FAILED: 'FAILED', - CANCELED: 'CANCELED', - TIMED_OUT: 'TIMED_OUT', - }, + PENDING: "PENDING", + BUILDING: "BUILDING", + DEPLOYING: "DEPLOYING", + DEPLOYED: "DEPLOYED", + FAILED: "FAILED", + CANCELED: "CANCELED", + TIMED_OUT: "TIMED_OUT" + } }, ScheduleType: { - name: 'ScheduleType', + name: "ScheduleType", values: { - DECLARATIVE: 'DECLARATIVE', - IMPERATIVE: 'IMPERATIVE', - }, + DECLARATIVE: "DECLARATIVE", + IMPERATIVE: "IMPERATIVE" + } }, ScheduleGeneratorType: { - name: 'ScheduleGeneratorType', + name: "ScheduleGeneratorType", values: { - CRON: 'CRON', - }, + CRON: "CRON" + } }, ProjectAlertChannelType: { - name: 'ProjectAlertChannelType', + name: "ProjectAlertChannelType", values: { - EMAIL: 'EMAIL', - SLACK: 'SLACK', - WEBHOOK: 'WEBHOOK', - }, + EMAIL: "EMAIL", + SLACK: "SLACK", + WEBHOOK: "WEBHOOK" + } }, ProjectAlertType: { - name: 'ProjectAlertType', + name: "ProjectAlertType", values: { - TASK_RUN: 'TASK_RUN', - TASK_RUN_ATTEMPT: 'TASK_RUN_ATTEMPT', - DEPLOYMENT_FAILURE: 'DEPLOYMENT_FAILURE', - DEPLOYMENT_SUCCESS: 'DEPLOYMENT_SUCCESS', - }, + TASK_RUN: "TASK_RUN", + TASK_RUN_ATTEMPT: "TASK_RUN_ATTEMPT", + DEPLOYMENT_FAILURE: "DEPLOYMENT_FAILURE", + DEPLOYMENT_SUCCESS: "DEPLOYMENT_SUCCESS" + } }, ProjectAlertStatus: { - name: 'ProjectAlertStatus', + name: "ProjectAlertStatus", values: { - PENDING: 'PENDING', - SENT: 'SENT', - FAILED: 'FAILED', - }, + PENDING: "PENDING", + SENT: "SENT", + FAILED: "FAILED" + } }, IntegrationService: { - name: 'IntegrationService', + name: "IntegrationService", values: { - SLACK: 'SLACK', - }, + SLACK: "SLACK" + } }, BulkActionType: { - name: 'BulkActionType', + name: "BulkActionType", values: { - CANCEL: 'CANCEL', - REPLAY: 'REPLAY', - }, + CANCEL: "CANCEL", + REPLAY: "REPLAY" + } }, BulkActionStatus: { - name: 'BulkActionStatus', + name: "BulkActionStatus", values: { - PENDING: 'PENDING', - COMPLETED: 'COMPLETED', - }, + PENDING: "PENDING", + COMPLETED: "COMPLETED" + } }, BulkActionItemStatus: { - name: 'BulkActionItemStatus', + name: "BulkActionItemStatus", values: { - PENDING: 'PENDING', - COMPLETED: 'COMPLETED', - FAILED: 'FAILED', - }, - }, + PENDING: "PENDING", + COMPLETED: "COMPLETED", + FAILED: "FAILED" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts b/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts index 36c487200..df4de3859 100644 --- a/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts +++ b/tests/e2e/orm/plugin-infra/ext-query-args/schema.ts @@ -5,37 +5,34 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', - }, + name: "name", + type: "String" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/plugin-infra/ext-result/schema.ts b/tests/e2e/orm/plugin-infra/ext-result/schema.ts index df1530304..563532b99 100644 --- a/tests/e2e/orm/plugin-infra/ext-result/schema.ts +++ b/tests/e2e/orm/plugin-infra/ext-result/schema.ts @@ -5,96 +5,78 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, posts: { - name: 'posts', - type: 'Post', + name: "posts", + type: "Post", array: true, - relation: { opposite: 'author' }, - }, + relation: { opposite: "author" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Post: { - name: 'Post', + name: "Post", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, content: { - name: 'content', - type: 'String', - optional: true, + name: "content", + type: "String", + optional: true }, author: { - name: 'author', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'posts', fields: ['authorId'], references: ['id'] }, + name: "author", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "posts", fields: ["authorId"], references: ["id"] } }, authorId: { - name: 'authorId', - type: 'Int', - foreignKeyFor: ['author'] as readonly string[], - }, + name: "authorId", + type: "Int", + foreignKeyFor: [ + "author" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/auth-type/schema.ts b/tests/e2e/orm/schemas/auth-type/schema.ts index dd373697b..2730775ed 100644 --- a/tests/e2e/orm/schemas/auth-type/schema.ts +++ b/tests/e2e/orm/schemas/auth-type/schema.ts @@ -5,64 +5,66 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { Foo: { - name: 'Foo', + name: "Foo", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@id" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; typeDefs = { Permission: { - name: 'Permission', + name: "Permission", fields: { actionCode: { - name: 'actionCode', - type: 'String', - }, - }, + name: "actionCode", + type: "String" + } + } }, Auth: { - name: 'Auth', + name: "Auth", fields: { id: { - name: 'id', - type: 'Int', - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + name: "id", + type: "Int", + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, permissions: { - name: 'permissions', - type: 'Permission', - array: true, + name: "permissions", + type: "Permission", + array: true }, role: { - name: 'role', - type: 'String', - }, + name: "role", + type: "String" + } }, - attributes: [{ name: '@@auth' }] as readonly AttributeApplication[], - }, + attributes: [ + { name: "@@auth" } + ] as readonly AttributeApplication[] + } } as const; - authType = 'Auth' as const; + authType = "Auth" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/basic/schema.ts b/tests/e2e/orm/schemas/basic/schema.ts index ed05ad4bb..39f85eef7 100644 --- a/tests/e2e/orm/schemas/basic/schema.ts +++ b/tests/e2e/orm/schemas/basic/schema.ts @@ -5,516 +5,309 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', - updatedAt: { ignore: ['id', 'createdAt'] }, - attributes: [ - { - name: '@updatedAt', - args: [ - { - name: 'ignore', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('id'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], + name: "updatedAt", + type: "DateTime", + updatedAt: { ignore: ["id", "createdAt"] }, + attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', - optional: true, + name: "name", + type: "String", + optional: true }, age: { - name: 'age', - type: 'Int', - optional: true, + name: "age", + type: "Int", + optional: true }, role: { - name: 'role', - type: 'Role', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, - ] as readonly AttributeApplication[], - default: 'USER' as FieldDefault, + name: "role", + type: "Role", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], + default: "USER" as FieldDefault }, posts: { - name: 'posts', - type: 'Post', + name: "posts", + type: "Post", array: true, - relation: { opposite: 'author' }, + relation: { opposite: "author" } }, profile: { - name: 'profile', - type: 'Profile', + name: "profile", + type: "Profile", optional: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, meta: { - name: 'meta', - type: 'Json', - optional: true, - }, + name: "meta", + type: "Json", + optional: true + } }, attributes: [ - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - '==', - ExpressionUtils.field('id'), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { - name: 'condition', - value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '!=', ExpressionUtils._null()), - }, - ], - }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("id")) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "!=", ExpressionUtils._null()) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - email: { type: 'String' }, - }, + id: { type: "String" }, + email: { type: "String" } + } }, Post: { - name: 'Post', + name: "Post", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', - updatedAt: { ignore: ['id', 'createdAt'] }, - attributes: [ - { - name: '@updatedAt', - args: [ - { - name: 'ignore', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('id'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], + name: "updatedAt", + type: "DateTime", + updatedAt: { ignore: ["id", "createdAt"] }, + attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, content: { - name: 'content', - type: 'String', - optional: true, + name: "content", + type: "String", + optional: true }, published: { - name: 'published', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "published", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, author: { - name: 'author', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'posts', - fields: ['authorId'], - references: ['id'], - onUpdate: 'Cascade', - onDelete: 'Cascade', - }, + name: "author", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } }, authorId: { - name: 'authorId', - type: 'String', - foreignKeyFor: ['author'] as readonly string[], + name: "authorId", + type: "String", + foreignKeyFor: [ + "author" + ] as readonly string[] }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - relation: { opposite: 'post' }, - }, + relation: { opposite: "post" } + } }, attributes: [ - { - name: '@@deny', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - '==', - ExpressionUtils.field('authorId'), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { name: 'condition', value: ExpressionUtils.field('published') }, - ], - }, + { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("authorId")) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.field("published") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Comment: { - name: 'Comment', + name: "Comment", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', - updatedAt: { ignore: ['id', 'createdAt'] }, - attributes: [ - { - name: '@updatedAt', - args: [ - { - name: 'ignore', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('id'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], + name: "updatedAt", + type: "DateTime", + updatedAt: { ignore: ["id", "createdAt"] }, + attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] }, content: { - name: 'content', - type: 'String', + name: "content", + type: "String" }, post: { - name: 'post', - type: 'Post', + name: "post", + type: "Post", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('postId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'comments', - fields: ['postId'], - references: ['id'], - onUpdate: 'Cascade', - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("postId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["postId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } }, postId: { - name: 'postId', - type: 'String', + name: "postId", + type: "String", optional: true, - foreignKeyFor: ['post'] as readonly string[], - }, + foreignKeyFor: [ + "post" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Profile: { - name: 'Profile', + name: "Profile", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', - updatedAt: { ignore: ['id', 'createdAt'] }, - attributes: [ - { - name: '@updatedAt', - args: [ - { - name: 'ignore', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('id'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], + name: "updatedAt", + type: "DateTime", + updatedAt: { ignore: ["id", "createdAt"] }, + attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] }, bio: { - name: 'bio', - type: 'String', + name: "bio", + type: "String" }, age: { - name: 'age', - type: 'Int', - optional: true, + name: "age", + type: "Int", + optional: true }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onUpdate', value: ExpressionUtils.literal('Cascade') }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'profile', - fields: ['userId'], - references: ['id'], - onUpdate: 'Cascade', - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onUpdate", value: ExpressionUtils.literal("Cascade") }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "profile", fields: ["userId"], references: ["id"], onUpdate: "Cascade", onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'String', + name: "userId", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], - }, + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - userId: { type: 'String' }, - }, + id: { type: "String" }, + userId: { type: "String" } + } }, Plain: { - name: 'Plain', + name: "Plain", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, value: { - name: 'value', - type: 'Int', - }, + name: "value", + type: "Int" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; typeDefs = { CommonFields: { - name: 'CommonFields', + name: "CommonFields", fields: { id: { - name: 'id', - type: 'String', - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + name: "id", + type: "String", + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', - updatedAt: { ignore: ['id', 'createdAt'] }, - attributes: [ - { - name: '@updatedAt', - args: [ - { - name: 'ignore', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('id'), - ExpressionUtils.field('createdAt'), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], - }, - }, - }, + name: "updatedAt", + type: "DateTime", + updatedAt: { ignore: ["id", "createdAt"] }, + attributes: [{ name: "@updatedAt", args: [{ name: "ignore", value: ExpressionUtils.array("String", [ExpressionUtils.field("id"), ExpressionUtils.field("createdAt")]) }] }] as readonly AttributeApplication[] + } + } + } } as const; enums = { Role: { - name: 'Role', + name: "Role", values: { - ADMIN: 'ADMIN', - USER: 'USER', - }, - }, + ADMIN: "ADMIN", + USER: "USER" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/default-auth/schema.ts b/tests/e2e/orm/schemas/default-auth/schema.ts index a9466b4c9..1deba2463 100644 --- a/tests/e2e/orm/schemas/default-auth/schema.ts +++ b/tests/e2e/orm/schemas/default-auth/schema.ts @@ -5,159 +5,118 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, profile: { - name: 'profile', - type: 'Profile', + name: "profile", + type: "Profile", optional: true, - relation: { opposite: 'user' }, - }, + relation: { opposite: "user" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Profile: { - name: 'Profile', + name: "Profile", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, bio: { - name: 'bio', - type: 'String', - optional: true, + name: "bio", + type: "String", + optional: true }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", unique: true, - attributes: [ - { name: '@unique' }, - { - name: '@default', - args: [ - { name: 'value', value: ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']) }, - ], - }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']) as FieldDefault, - foreignKeyFor: ['user'] as readonly string[], + attributes: [{ name: "@unique" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]) }] }] as readonly AttributeApplication[], + default: ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]) as FieldDefault, + foreignKeyFor: [ + "user" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'profile', fields: ['userId'], references: ['id'], hasDefault: true }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "profile", fields: ["userId"], references: ["id"], hasDefault: true } }, address: { - name: 'address', - type: 'Address', + name: "address", + type: "Address", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('addressId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'profile', fields: ['addressId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("addressId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "profile", fields: ["addressId"], references: ["id"] } }, addressId: { - name: 'addressId', - type: 'Int', + name: "addressId", + type: "Int", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['address'] as readonly string[], - }, + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "address" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId: { type: 'Int' }, - addressId: { type: 'Int' }, - }, + id: { type: "Int" }, + userId: { type: "Int" }, + addressId: { type: "Int" } + } }, Address: { - name: 'Address', + name: "Address", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, city: { - name: 'city', - type: 'String', + name: "city", + type: "String" }, profile: { - name: 'profile', - type: 'Profile', + name: "profile", + type: "Profile", optional: true, - relation: { opposite: 'address' }, - }, + relation: { opposite: "address" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/delegate/schema.ts b/tests/e2e/orm/schemas/delegate/schema.ts index 91ba3880f..2b560462e 100644 --- a/tests/e2e/orm/schemas/delegate/schema.ts +++ b/tests/e2e/orm/schemas/delegate/schema.ts @@ -5,642 +5,488 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, optional: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, level: { - name: 'level', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "level", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, assets: { - name: 'assets', - type: 'Asset', + name: "assets", + type: "Asset", array: true, - relation: { opposite: 'owner' }, + relation: { opposite: "owner" } }, ratedVideos: { - name: 'ratedVideos', - type: 'RatedVideo', + name: "ratedVideos", + type: "RatedVideo", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('direct') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'user', name: 'direct' }, - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("direct") }] }] as readonly AttributeApplication[], + relation: { opposite: "user", name: "direct" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - email: { type: 'String' }, - }, + id: { type: "Int" }, + email: { type: "String" } + } }, Comment: { - name: 'Comment', + name: "Comment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, content: { - name: 'content', - type: 'String', + name: "content", + type: "String" }, asset: { - name: 'asset', - type: 'Asset', + name: "asset", + type: "Asset", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('assetId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['assetId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("assetId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["assetId"], references: ["id"], onDelete: "Cascade" } }, assetId: { - name: 'assetId', - type: 'Int', + name: "assetId", + type: "Int", optional: true, - foreignKeyFor: ['asset'] as readonly string[], - }, + foreignKeyFor: [ + "asset" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Asset: { - name: 'Asset', + name: "Asset", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, viewCount: { - name: 'viewCount', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "viewCount", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, owner: { - name: 'owner', - type: 'User', + name: "owner", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, ownerId: { - name: 'ownerId', - type: 'Int', + name: "ownerId", + type: "Int", optional: true, - foreignKeyFor: ['owner'] as readonly string[], + foreignKeyFor: [ + "owner" + ] as readonly string[] }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - relation: { opposite: 'asset' }, + relation: { opposite: "asset" } }, assetType: { - name: 'assetType', - type: 'AssetKind', - isDiscriminator: true, - }, + name: "assetType", + type: "AssetKind", + isDiscriminator: true + } }, attributes: [ - { - name: '@@index', - args: [{ name: 'fields', value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]) }], - }, - { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('assetType') }] }, + { name: "@@index", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }] }, + { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("assetType") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, isDelegate: true, - subModels: ['Video', 'Image'], + subModels: ["Video", "Image"] }, Video: { - name: 'Video', - baseModel: 'Asset', + name: "Video", + baseModel: "Asset", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Asset', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Asset", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - originModel: 'Asset', - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + originModel: "Asset", + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, viewCount: { - name: 'viewCount', - type: 'Int', - originModel: 'Asset', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "viewCount", + type: "Int", + originModel: "Asset", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, owner: { - name: 'owner', - type: 'User', + name: "owner", + type: "User", optional: true, - originModel: 'Asset', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, + originModel: "Asset", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, ownerId: { - name: 'ownerId', - type: 'Int', + name: "ownerId", + type: "Int", optional: true, - originModel: 'Asset', - foreignKeyFor: ['owner'] as readonly string[], + originModel: "Asset", + foreignKeyFor: [ + "owner" + ] as readonly string[] }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - originModel: 'Asset', - relation: { opposite: 'asset' }, + originModel: "Asset", + relation: { opposite: "asset" } }, assetType: { - name: 'assetType', - type: 'AssetKind', - originModel: 'Asset', - isDiscriminator: true, + name: "assetType", + type: "AssetKind", + originModel: "Asset", + isDiscriminator: true }, duration: { - name: 'duration', - type: 'Int', + name: "duration", + type: "Int" }, url: { - name: 'url', - type: 'String', + name: "url", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, videoType: { - name: 'videoType', - type: 'VideoKind', - isDiscriminator: true, - }, + name: "videoType", + type: "VideoKind", + isDiscriminator: true + } }, attributes: [ - { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('videoType') }] }, - { - name: '@@delegateMap', - args: [{ name: 'value', value: ExpressionUtils.literal('ASSET_KIND_VIDEO') }], - }, + { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("videoType") }] }, + { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("ASSET_KIND_VIDEO") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - url: { type: 'String' }, + id: { type: "Int" }, + url: { type: "String" } }, isDelegate: true, - delegateMap: 'ASSET_KIND_VIDEO', - subModels: ['RatedVideo'], + delegateMap: "ASSET_KIND_VIDEO", + subModels: ["RatedVideo"] }, RatedVideo: { - name: 'RatedVideo', - baseModel: 'Video', + name: "RatedVideo", + baseModel: "Video", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Asset', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Asset", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - originModel: 'Asset', - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + originModel: "Asset", + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, viewCount: { - name: 'viewCount', - type: 'Int', - originModel: 'Asset', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "viewCount", + type: "Int", + originModel: "Asset", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, owner: { - name: 'owner', - type: 'User', + name: "owner", + type: "User", optional: true, - originModel: 'Asset', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, + originModel: "Asset", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, ownerId: { - name: 'ownerId', - type: 'Int', + name: "ownerId", + type: "Int", optional: true, - originModel: 'Asset', - foreignKeyFor: ['owner'] as readonly string[], + originModel: "Asset", + foreignKeyFor: [ + "owner" + ] as readonly string[] }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - originModel: 'Asset', - relation: { opposite: 'asset' }, + originModel: "Asset", + relation: { opposite: "asset" } }, assetType: { - name: 'assetType', - type: 'AssetKind', - originModel: 'Asset', - isDiscriminator: true, + name: "assetType", + type: "AssetKind", + originModel: "Asset", + isDiscriminator: true }, duration: { - name: 'duration', - type: 'Int', - originModel: 'Video', + name: "duration", + type: "Int", + originModel: "Video" }, url: { - name: 'url', - type: 'String', + name: "url", + type: "String", unique: true, - originModel: 'Video', - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + originModel: "Video", + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, videoType: { - name: 'videoType', - type: 'VideoKind', - originModel: 'Video', - isDiscriminator: true, + name: "videoType", + type: "VideoKind", + originModel: "Video", + isDiscriminator: true }, rating: { - name: 'rating', - type: 'Int', + name: "rating", + type: "Int" }, user: { - name: 'user', - type: 'User', + name: "user", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('direct') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'ratedVideos', - name: 'direct', - fields: ['userId'], - references: ['id'], - onDelete: 'Cascade', - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("direct") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "ratedVideos", name: "direct", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", optional: true, - foreignKeyFor: ['user'] as readonly string[], - }, + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, attributes: [ - { - name: '@@delegateMap', - args: [{ name: 'value', value: ExpressionUtils.literal('ASSET_KIND_VIDEO') }], - }, - { - name: '@@delegateMap', - args: [{ name: 'value', value: ExpressionUtils.literal('VIDEO_KIND_RATED') }], - }, + { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("ASSET_KIND_VIDEO") }] }, + { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("VIDEO_KIND_RATED") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - url: { type: 'String' }, + id: { type: "Int" }, + url: { type: "String" } }, - delegateMap: 'VIDEO_KIND_RATED', + delegateMap: "VIDEO_KIND_RATED" }, Image: { - name: 'Image', - baseModel: 'Asset', + name: "Image", + baseModel: "Asset", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Asset', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Asset", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - originModel: 'Asset', - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + originModel: "Asset", + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, viewCount: { - name: 'viewCount', - type: 'Int', - originModel: 'Asset', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "viewCount", + type: "Int", + originModel: "Asset", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, owner: { - name: 'owner', - type: 'User', + name: "owner", + type: "User", optional: true, - originModel: 'Asset', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'assets', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, + originModel: "Asset", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "assets", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, ownerId: { - name: 'ownerId', - type: 'Int', + name: "ownerId", + type: "Int", optional: true, - originModel: 'Asset', - foreignKeyFor: ['owner'] as readonly string[], + originModel: "Asset", + foreignKeyFor: [ + "owner" + ] as readonly string[] }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - originModel: 'Asset', - relation: { opposite: 'asset' }, + originModel: "Asset", + relation: { opposite: "asset" } }, assetType: { - name: 'assetType', - type: 'AssetKind', - originModel: 'Asset', - isDiscriminator: true, + name: "assetType", + type: "AssetKind", + originModel: "Asset", + isDiscriminator: true }, format: { - name: 'format', - type: 'String', + name: "format", + type: "String" }, gallery: { - name: 'gallery', - type: 'Gallery', + name: "gallery", + type: "Gallery", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('galleryId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'images', fields: ['galleryId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("galleryId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "images", fields: ["galleryId"], references: ["id"], onDelete: "Cascade" } }, galleryId: { - name: 'galleryId', - type: 'Int', + name: "galleryId", + type: "Int", optional: true, - foreignKeyFor: ['gallery'] as readonly string[], - }, + foreignKeyFor: [ + "gallery" + ] as readonly string[] + } }, attributes: [ - { - name: '@@delegateMap', - args: [{ name: 'value', value: ExpressionUtils.literal('ASSET_KIND_IMAGE') }], - }, + { name: "@@delegateMap", args: [{ name: "value", value: ExpressionUtils.literal("ASSET_KIND_IMAGE") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, - delegateMap: 'ASSET_KIND_IMAGE', + delegateMap: "ASSET_KIND_IMAGE" }, Gallery: { - name: 'Gallery', + name: "Gallery", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, images: { - name: 'images', - type: 'Image', + name: "images", + type: "Image", array: true, - relation: { opposite: 'gallery' }, - }, + relation: { opposite: "gallery" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; enums = { AssetKind: { - name: 'AssetKind', + name: "AssetKind", values: { - ASSET_KIND_VIDEO: 'ASSET_KIND_VIDEO', - ASSET_KIND_IMAGE: 'ASSET_KIND_IMAGE', - }, + ASSET_KIND_VIDEO: "ASSET_KIND_VIDEO", + ASSET_KIND_IMAGE: "ASSET_KIND_IMAGE" + } }, VideoKind: { - name: 'VideoKind', + name: "VideoKind", values: { - VIDEO_KIND_RATED: 'VIDEO_KIND_RATED', - }, - }, + VIDEO_KIND_RATED: "VIDEO_KIND_RATED" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/delegate/typecheck.ts b/tests/e2e/orm/schemas/delegate/typecheck.ts index 32d3df0ad..eb3aa5008 100644 --- a/tests/e2e/orm/schemas/delegate/typecheck.ts +++ b/tests/e2e/orm/schemas/delegate/typecheck.ts @@ -88,8 +88,9 @@ async function create() { // nested creation is not allowed either // @ts-expect-error client.user.create({ data: { assets: { create: { assetType: 'ASSET_KIND_VIDEO' } } } }); - // @ts-expect-error + client.user.create({ + // @ts-expect-error data: { assets: { connectOrCreate: { where: { id: 1 }, create: { assetType: 'ASSET_KIND_VIDEO' } } } }, }); // @ts-expect-error @@ -102,8 +103,8 @@ async function create() { client.user.update({ where: { id: 1 }, data: { - // @ts-expect-error assets: { + // @ts-expect-error upsert: { where: { id: 1 }, create: { assetType: 'ASSET_KIND_VIDEO' }, diff --git a/tests/e2e/orm/schemas/full-text-search/schema.ts b/tests/e2e/orm/schemas/full-text-search/schema.ts index 4a4615aac..1c23af701 100644 --- a/tests/e2e/orm/schemas/full-text-search/schema.ts +++ b/tests/e2e/orm/schemas/full-text-search/schema.ts @@ -5,55 +5,52 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { Article: { - name: 'Article', + name: "Article", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String", fullText: true, - attributes: [{ name: '@fullText' }] as readonly AttributeApplication[], + attributes: [{ name: "@fullText" }] as readonly AttributeApplication[] }, body: { - name: 'body', - type: 'String', + name: "body", + type: "String", fullText: true, - attributes: [{ name: '@fullText' }] as readonly AttributeApplication[], + attributes: [{ name: "@fullText" }] as readonly AttributeApplication[] }, subtitle: { - name: 'subtitle', - type: 'String', + name: "subtitle", + type: "String", optional: true, fullText: true, - attributes: [{ name: '@fullText' }] as readonly AttributeApplication[], + attributes: [{ name: "@fullText" }] as readonly AttributeApplication[] }, notes: { - name: 'notes', - type: 'String', - optional: true, - }, + name: "notes", + type: "String", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/fuzzy-search/schema.ts b/tests/e2e/orm/schemas/fuzzy-search/schema.ts index 847fd4d09..b9b7bbe98 100644 --- a/tests/e2e/orm/schemas/fuzzy-search/schema.ts +++ b/tests/e2e/orm/schemas/fuzzy-search/schema.ts @@ -5,49 +5,46 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { Flavor: { - name: 'Flavor', + name: "Flavor", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String", optional: true, fuzzy: true, - attributes: [{ name: '@fuzzy' }] as readonly AttributeApplication[], + attributes: [{ name: "@fuzzy" }] as readonly AttributeApplication[] }, description: { - name: 'description', - type: 'String', + name: "description", + type: "String", fuzzy: true, - attributes: [{ name: '@fuzzy' }] as readonly AttributeApplication[], + attributes: [{ name: "@fuzzy" }] as readonly AttributeApplication[] }, notes: { - name: 'notes', - type: 'String', - optional: true, - }, + name: "notes", + type: "String", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/json/schema.ts b/tests/e2e/orm/schemas/json/schema.ts index 4b7aba3a0..85621a23f 100644 --- a/tests/e2e/orm/schemas/json/schema.ts +++ b/tests/e2e/orm/schemas/json/schema.ts @@ -5,40 +5,37 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { Foo: { - name: 'Foo', + name: "Foo", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, data: { - name: 'data', - type: 'Json', + name: "data", + type: "Json" }, data1: { - name: 'data1', - type: 'Json', - optional: true, - }, + name: "data1", + type: "Json", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/name-mapping/schema.ts b/tests/e2e/orm/schemas/name-mapping/schema.ts index c4974d8a5..b7b1b7e5b 100644 --- a/tests/e2e/orm/schemas/name-mapping/schema.ts +++ b/tests/e2e/orm/schemas/name-mapping/schema.ts @@ -5,150 +5,120 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_id') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_id") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_email') }] }, - { name: '@unique' }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_email") }] }, { name: "@unique" }] as readonly AttributeApplication[] }, role: { - name: 'role', - type: 'Role', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_role') }] }, - ] as readonly AttributeApplication[], - default: 'USER' as FieldDefault, + name: "role", + type: "Role", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("user_role") }] }] as readonly AttributeApplication[], + default: "USER" as FieldDefault }, posts: { - name: 'posts', - type: 'Post', + name: "posts", + type: "Post", array: true, - relation: { opposite: 'author' }, - }, + relation: { opposite: "author" } + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('users') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("users") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - email: { type: 'String' }, - }, + id: { type: "Int" }, + email: { type: "String" } + } }, Post: { - name: 'Post', + name: "Post", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('post_id') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }, { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("post_id") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, title: { - name: 'title', - type: 'String', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('post_title') }] }, - ] as readonly AttributeApplication[], + name: "title", + type: "String", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("post_title") }] }] as readonly AttributeApplication[] }, author: { - name: 'author', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'posts', fields: ['authorId'], references: ['id'] }, + name: "author", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "posts", fields: ["authorId"], references: ["id"] } }, authorId: { - name: 'authorId', - type: 'Int', - attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('author_id') }] }, - ] as readonly AttributeApplication[], - foreignKeyFor: ['author'] as readonly string[], - }, + name: "authorId", + type: "Int", + attributes: [{ name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("author_id") }] }] as readonly AttributeApplication[], + foreignKeyFor: [ + "author" + ] as readonly string[] + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('posts') }] }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("posts") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; enums = { Role: { - name: 'Role', + name: "Role", values: { - USER: 'USER', - ADMIN: 'ADMIN', - MODERATOR: 'MODERATOR', + USER: "USER", + ADMIN: "ADMIN", + MODERATOR: "MODERATOR" }, fields: { USER: { - name: 'USER', + name: "USER", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('role_user') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("role_user") }] } + ] as readonly AttributeApplication[] }, ADMIN: { - name: 'ADMIN', + name: "ADMIN", attributes: [ - { name: '@map', args: [{ name: 'name', value: ExpressionUtils.literal('role_admin') }] }, - ] as readonly AttributeApplication[], + { name: "@map", args: [{ name: "name", value: ExpressionUtils.literal("role_admin") }] } + ] as readonly AttributeApplication[] }, MODERATOR: { - name: 'MODERATOR', - }, + name: "MODERATOR" + } }, attributes: [ - { name: '@@map', args: [{ name: 'name', value: ExpressionUtils.literal('user_role') }] }, - ] as readonly AttributeApplication[], - }, + { name: "@@map", args: [{ name: "name", value: ExpressionUtils.literal("user_role") }] } + ] as readonly AttributeApplication[] + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/omit/schema.ts b/tests/e2e/orm/schemas/omit/schema.ts index 9a7c86a92..02da796fe 100644 --- a/tests/e2e/orm/schemas/omit/schema.ts +++ b/tests/e2e/orm/schemas/omit/schema.ts @@ -5,147 +5,134 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, password: { - name: 'password', - type: 'String', + name: "password", + type: "String", omit: true, - attributes: [{ name: '@omit' }] as readonly AttributeApplication[], + attributes: [{ name: "@omit" }] as readonly AttributeApplication[] }, posts: { - name: 'posts', - type: 'Post', + name: "posts", + type: "Post", array: true, - relation: { opposite: 'author' }, - }, + relation: { opposite: "author" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Post: { - name: 'Post', + name: "Post", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, author: { - name: 'author', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'posts', fields: ['authorId'], references: ['id'], onDelete: 'Cascade' }, + name: "author", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "posts", fields: ["authorId"], references: ["id"], onDelete: "Cascade" } }, authorId: { - name: 'authorId', - type: 'Int', - foreignKeyFor: ['author'] as readonly string[], - }, + name: "authorId", + type: "Int", + foreignKeyFor: [ + "author" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Base: { - name: 'Base', + name: "Base", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'String', - isDiscriminator: true, - }, + name: "type", + type: "String", + isDiscriminator: true + } }, attributes: [ - { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('type') }] }, + { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("type") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, isDelegate: true, - subModels: ['Sub'], + subModels: ["Sub"] }, Sub: { - name: 'Sub', - baseModel: 'Base', + name: "Sub", + baseModel: "Base", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [{ name: '@id' }] as readonly AttributeApplication[], + attributes: [{ name: "@id" }] as readonly AttributeApplication[] }, type: { - name: 'type', - type: 'String', - originModel: 'Base', - isDiscriminator: true, + name: "type", + type: "String", + originModel: "Base", + isDiscriminator: true }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, content: { - name: 'content', - type: 'String', + name: "content", + type: "String", omit: true, - attributes: [{ name: '@omit' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@omit" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/petstore/schema.ts b/tests/e2e/orm/schemas/petstore/schema.ts index c864882f9..113596a6b 100644 --- a/tests/e2e/orm/schemas/petstore/schema.ts +++ b/tests/e2e/orm/schemas/petstore/schema.ts @@ -5,270 +5,153 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, orders: { - name: 'orders', - type: 'Order', + name: "orders", + type: "Order", array: true, - relation: { opposite: 'user' }, - }, + relation: { opposite: "user" } + } }, attributes: [ - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('create') }, - { name: 'condition', value: ExpressionUtils.literal(true) }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { name: 'condition', value: ExpressionUtils.literal(true) }, - ], - }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.literal(true) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.literal(true) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - email: { type: 'String' }, - }, + id: { type: "String" }, + email: { type: "String" } + } }, Pet: { - name: 'Pet', + name: "Pet", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, category: { - name: 'category', - type: 'String', + name: "category", + type: "String" }, order: { - name: 'order', - type: 'Order', + name: "order", + type: "Order", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('orderId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'pets', fields: ['orderId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("orderId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "pets", fields: ["orderId"], references: ["id"] } }, orderId: { - name: 'orderId', - type: 'String', + name: "orderId", + type: "String", optional: true, - foreignKeyFor: ['order'] as readonly string[], - }, + foreignKeyFor: [ + "order" + ] as readonly string[] + } }, attributes: [ - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.binary(ExpressionUtils.field('orderId'), '==', ExpressionUtils._null()), - '||', - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('order'), ['user']), - '==', - ExpressionUtils.call('auth'), - ), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('update') }, - { - name: 'condition', - value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '!=', ExpressionUtils._null()), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('post-update') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('before'), ['name']), - '==', - ExpressionUtils.field('name'), - ), - '&&', - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('before'), ['category']), - '==', - ExpressionUtils.field('category'), - ), - ), - '&&', - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('before'), ['orderId']), - '==', - ExpressionUtils._null(), - ), - ), - }, - ], - }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("orderId"), "==", ExpressionUtils._null()), "||", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("order"), ["user"]), "==", ExpressionUtils.call("auth"))) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "!=", ExpressionUtils._null()) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("post-update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["name"]), "==", ExpressionUtils.field("name")), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["category"]), "==", ExpressionUtils.field("category"))), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["orderId"]), "==", ExpressionUtils._null())) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Order: { - name: 'Order', + name: "Order", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('cuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('cuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("cuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("cuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, pets: { - name: 'pets', - type: 'Pet', + name: "pets", + type: "Pet", array: true, - relation: { opposite: 'order' }, + relation: { opposite: "order" } }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'orders', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "orders", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'String', - foreignKeyFor: ['user'] as readonly string[], - }, + name: "userId", + type: "String", + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, attributes: [ - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read,create') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.call('auth'), - '==', - ExpressionUtils.field('user'), - ), - }, - ], - }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read,create") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils.field("user")) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, - }, + id: { type: "String" } + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/procedures/schema.ts b/tests/e2e/orm/schemas/procedures/schema.ts index a4b5f360f..b8261afe2 100644 --- a/tests/e2e/orm/schemas/procedures/schema.ts +++ b/tests/e2e/orm/schemas/procedures/schema.ts @@ -5,122 +5,117 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, role: { - name: 'role', - type: 'Role', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, - ] as readonly AttributeApplication[], - default: 'USER' as FieldDefault, - }, + name: "role", + type: "Role", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], + default: "USER" as FieldDefault + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - name: { type: 'String' }, - }, - }, + id: { type: "Int" }, + name: { type: "String" } + } + } } as const; typeDefs = { Overview: { - name: 'Overview', + name: "Overview", fields: { userIds: { - name: 'userIds', - type: 'Int', - array: true, + name: "userIds", + type: "Int", + array: true }, total: { - name: 'total', - type: 'Int', + name: "total", + type: "Int" }, roles: { - name: 'roles', - type: 'Role', - array: true, + name: "roles", + type: "Role", + array: true }, meta: { - name: 'meta', - type: 'Json', - optional: true, - }, - }, - }, + name: "meta", + type: "Json", + optional: true + } + } + } } as const; enums = { Role: { - name: 'Role', + name: "Role", values: { - ADMIN: 'ADMIN', - USER: 'USER', - }, - }, + ADMIN: "ADMIN", + USER: "USER" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; procedures = { getUser: { params: { - id: { name: 'id', type: 'Int' }, + id: { name: "id", type: "Int" } }, - returnType: 'User', + returnType: "User" }, listUsers: { params: {}, - returnType: 'User', - returnArray: true, + returnType: "User", + returnArray: true }, signUp: { params: { - name: { name: 'name', type: 'String' }, - role: { name: 'role', optional: true, type: 'Role' }, + name: { name: "name", type: "String" }, + role: { name: "role", optional: true, type: "Role" } }, - returnType: 'User', - mutation: true, + returnType: "User", + mutation: true }, setAdmin: { params: { - userId: { name: 'userId', type: 'Int' }, + userId: { name: "userId", type: "Int" } }, - returnType: 'Void', - mutation: true, + returnType: "Void", + mutation: true }, getOverview: { params: {}, - returnType: 'Overview', + returnType: "Overview" }, createMultiple: { params: { - names: { name: 'names', array: true, type: 'String' }, + names: { name: "names", array: true, type: "String" } }, - returnType: 'User', + returnType: "User", returnArray: true, - mutation: true, - }, + mutation: true + } } as const; plugins = {}; } diff --git a/tests/e2e/orm/schemas/todo/schema.ts b/tests/e2e/orm/schemas/todo/schema.ts index 01214072e..901cdc5c8 100644 --- a/tests/e2e/orm/schemas/todo/schema.ts +++ b/tests/e2e/orm/schemas/todo/schema.ts @@ -5,885 +5,392 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { Space: { - name: 'Space', + name: "Space", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', - attributes: [ - { - name: '@length', - args: [ - { name: 'min', value: ExpressionUtils.literal(4) }, - { name: 'max', value: ExpressionUtils.literal(50) }, - ], - }, - ] as readonly AttributeApplication[], + name: "name", + type: "String", + attributes: [{ name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(4) }, { name: "max", value: ExpressionUtils.literal(50) }] }] as readonly AttributeApplication[] }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String", unique: true, - attributes: [ - { name: '@unique' }, - { - name: '@length', - args: [ - { name: 'min', value: ExpressionUtils.literal(4) }, - { name: 'max', value: ExpressionUtils.literal(16) }, - ], - }, - ] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(4) }, { name: "max", value: ExpressionUtils.literal(16) }] }] as readonly AttributeApplication[] }, owner: { - name: 'owner', - type: 'User', + name: "owner", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'ownedSpaces', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "ownedSpaces", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, ownerId: { - name: 'ownerId', - type: 'String', + name: "ownerId", + type: "String", optional: true, - foreignKeyFor: ['owner'] as readonly string[], + foreignKeyFor: [ + "owner" + ] as readonly string[] }, members: { - name: 'members', - type: 'SpaceUser', + name: "members", + type: "SpaceUser", array: true, - relation: { opposite: 'space' }, + relation: { opposite: "space" } }, lists: { - name: 'lists', - type: 'List', + name: "lists", + type: "List", array: true, - relation: { opposite: 'space' }, - }, + relation: { opposite: "space" } + } }, attributes: [ - { - name: '@@deny', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('create') }, - { name: 'condition', value: ExpressionUtils.literal(true) }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.field('members'), - '?', - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('update,delete') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.field('members'), - '?', - ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - '&&', - ExpressionUtils.binary( - ExpressionUtils.field('role'), - '==', - ExpressionUtils.literal('ADMIN'), - ), - ), - ), - }, - ], - }, + { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.literal(true) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("members"), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("update,delete") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("members"), "?", ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.field("role"), "==", ExpressionUtils.literal("ADMIN")))) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - slug: { type: 'String' }, - }, + id: { type: "String" }, + slug: { type: "String" } + } }, SpaceUser: { - name: 'SpaceUser', + name: "SpaceUser", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, space: { - name: 'space', - type: 'Space', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'members', fields: ['spaceId'], references: ['id'], onDelete: 'Cascade' }, + name: "space", + type: "Space", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "members", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } }, spaceId: { - name: 'spaceId', - type: 'String', - foreignKeyFor: ['space'] as readonly string[], + name: "spaceId", + type: "String", + foreignKeyFor: [ + "space" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'spaces', fields: ['userId'], references: ['id'], onDelete: 'Cascade' }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "spaces", fields: ["userId"], references: ["id"], onDelete: "Cascade" } }, userId: { - name: 'userId', - type: 'String', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "String", + foreignKeyFor: [ + "user" + ] as readonly string[] }, role: { - name: 'role', - type: 'String', - }, + name: "role", + type: "String" + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('userId'), - ExpressionUtils.field('spaceId'), - ]), - }, - ], - }, - { - name: '@@deny', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('create,update,delete') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('space'), ['ownerId']), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - '||', - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), - '?', - ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - '&&', - ExpressionUtils.binary( - ExpressionUtils.field('role'), - '==', - ExpressionUtils.literal('ADMIN'), - ), - ), - ), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), - '?', - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - ), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("userId"), ExpressionUtils.field("spaceId")]) }] }, + { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create,update,delete") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["ownerId"]), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "||", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.field("role"), "==", ExpressionUtils.literal("ADMIN"))))) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - userId_spaceId: { userId: { type: 'String' }, spaceId: { type: 'String' } }, - }, + id: { type: "String" }, + userId_spaceId: { userId: { type: "String" }, spaceId: { type: "String" } } + } }, User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }, { name: '@email' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }, { name: "@email" }] as readonly AttributeApplication[] }, password: { - name: 'password', - type: 'String', - optional: true, + name: "password", + type: "String", + optional: true }, emailVerified: { - name: 'emailVerified', - type: 'DateTime', - optional: true, + name: "emailVerified", + type: "DateTime", + optional: true }, name: { - name: 'name', - type: 'String', - optional: true, + name: "name", + type: "String", + optional: true }, ownedSpaces: { - name: 'ownedSpaces', - type: 'Space', + name: "ownedSpaces", + type: "Space", array: true, - relation: { opposite: 'owner' }, + relation: { opposite: "owner" } }, spaces: { - name: 'spaces', - type: 'SpaceUser', + name: "spaces", + type: "SpaceUser", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, image: { - name: 'image', - type: 'String', + name: "image", + type: "String", optional: true, - attributes: [{ name: '@url' }] as readonly AttributeApplication[], + attributes: [{ name: "@url" }] as readonly AttributeApplication[] }, lists: { - name: 'lists', - type: 'List', + name: "lists", + type: "List", array: true, - relation: { opposite: 'owner' }, + relation: { opposite: "owner" } }, todos: { - name: 'todos', - type: 'Todo', + name: "todos", + type: "Todo", array: true, - relation: { opposite: 'owner' }, - }, + relation: { opposite: "owner" } + } }, attributes: [ - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('create') }, - { name: 'condition', value: ExpressionUtils.literal(true) }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.field('spaces'), - '?', - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), - '?', - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - ), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - '==', - ExpressionUtils.field('id'), - ), - }, - ], - }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.literal(true) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("spaces"), "?", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])))) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]), "==", ExpressionUtils.field("id")) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - email: { type: 'String' }, - }, + id: { type: "String" }, + email: { type: "String" } + } }, List: { - name: 'List', + name: "List", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, space: { - name: 'space', - type: 'Space', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('spaceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'lists', fields: ['spaceId'], references: ['id'], onDelete: 'Cascade' }, + name: "space", + type: "Space", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("spaceId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "lists", fields: ["spaceId"], references: ["id"], onDelete: "Cascade" } }, spaceId: { - name: 'spaceId', - type: 'String', - foreignKeyFor: ['space'] as readonly string[], + name: "spaceId", + type: "String", + foreignKeyFor: [ + "space" + ] as readonly string[] }, owner: { - name: 'owner', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'lists', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, + name: "owner", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "lists", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, ownerId: { - name: 'ownerId', - type: 'String', - foreignKeyFor: ['owner'] as readonly string[], + name: "ownerId", + type: "String", + foreignKeyFor: [ + "owner" + ] as readonly string[] }, title: { - name: 'title', - type: 'String', - attributes: [ - { - name: '@length', - args: [ - { name: 'min', value: ExpressionUtils.literal(1) }, - { name: 'max', value: ExpressionUtils.literal(100) }, - ], - }, - ] as readonly AttributeApplication[], + name: "title", + type: "String", + attributes: [{ name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(1) }, { name: "max", value: ExpressionUtils.literal(100) }] }] as readonly AttributeApplication[] }, private: { - name: 'private', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "private", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, todos: { - name: 'todos', - type: 'Todo', + name: "todos", + type: "Todo", array: true, - relation: { opposite: 'list' }, + relation: { opposite: "list" } }, revision: { - name: 'revision', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, - }, + name: "revision", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault + } }, attributes: [ - { - name: '@@deny', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('read') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.field('ownerId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - '||', - ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), - '?', - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - ), - '&&', - ExpressionUtils.unary('!', ExpressionUtils.field('private')), - ), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('create') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.field('ownerId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - '&&', - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), - '?', - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - ), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('update') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.field('ownerId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - '&&', - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('space'), ['members']), - '?', - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - ), - ), - }, - ], - }, - { - name: '@@deny', - args: [ - { name: 'operation', value: ExpressionUtils.literal('post-update') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('before'), ['ownerId']), - '!=', - ExpressionUtils.field('ownerId'), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('delete') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.field('ownerId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - }, - ], - }, + { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("read") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "||", ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))), "&&", ExpressionUtils.unary("!", ExpressionUtils.field("private")))) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("create") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])))) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])), "&&", ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("space"), ["members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])))) }] }, + { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("post-update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["ownerId"]), "!=", ExpressionUtils.field("ownerId")) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("delete") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.field("ownerId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, + id: { type: "String" } + } }, Todo: { - name: 'Todo', + name: "Todo", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('uuid') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('uuid') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("uuid") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("uuid") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, owner: { - name: 'owner', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'todos', fields: ['ownerId'], references: ['id'], onDelete: 'Cascade' }, + name: "owner", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "todos", fields: ["ownerId"], references: ["id"], onDelete: "Cascade" } }, ownerId: { - name: 'ownerId', - type: 'String', - foreignKeyFor: ['owner'] as readonly string[], + name: "ownerId", + type: "String", + foreignKeyFor: [ + "owner" + ] as readonly string[] }, list: { - name: 'list', - type: 'List', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ExpressionUtils.field('listId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ExpressionUtils.field('id')]), - }, - { name: 'onDelete', value: ExpressionUtils.literal('Cascade') }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'todos', fields: ['listId'], references: ['id'], onDelete: 'Cascade' }, + name: "list", + type: "List", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("listId")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("id")]) }, { name: "onDelete", value: ExpressionUtils.literal("Cascade") }] }] as readonly AttributeApplication[], + relation: { opposite: "todos", fields: ["listId"], references: ["id"], onDelete: "Cascade" } }, listId: { - name: 'listId', - type: 'String', - foreignKeyFor: ['list'] as readonly string[], + name: "listId", + type: "String", + foreignKeyFor: [ + "list" + ] as readonly string[] }, title: { - name: 'title', - type: 'String', - attributes: [ - { - name: '@length', - args: [ - { name: 'min', value: ExpressionUtils.literal(1) }, - { name: 'max', value: ExpressionUtils.literal(100) }, - ], - }, - ] as readonly AttributeApplication[], + name: "title", + type: "String", + attributes: [{ name: "@length", args: [{ name: "min", value: ExpressionUtils.literal(1) }, { name: "max", value: ExpressionUtils.literal(100) }] }] as readonly AttributeApplication[] }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, - }, + name: "completedAt", + type: "DateTime", + optional: true + } }, attributes: [ - { - name: '@@deny', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary(ExpressionUtils.call('auth'), '==', ExpressionUtils._null()), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('list'), ['ownerId']), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - }, - ], - }, - { - name: '@@allow', - args: [ - { name: 'operation', value: ExpressionUtils.literal('all') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.field('list'), ['space', 'members']), - '?', - ExpressionUtils.binary( - ExpressionUtils.field('userId'), - '==', - ExpressionUtils.member(ExpressionUtils.call('auth'), ['id']), - ), - ), - '&&', - ExpressionUtils.unary( - '!', - ExpressionUtils.member(ExpressionUtils.field('list'), ['private']), - ), - ), - }, - ], - }, - { - name: '@@deny', - args: [ - { name: 'operation', value: ExpressionUtils.literal('post-update') }, - { - name: 'condition', - value: ExpressionUtils.binary( - ExpressionUtils.member(ExpressionUtils.call('before'), ['ownerId']), - '!=', - ExpressionUtils.field('ownerId'), - ), - }, - ], - }, + { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.call("auth"), "==", ExpressionUtils._null()) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("list"), ["ownerId"]), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"])) }] }, + { name: "@@allow", args: [{ name: "operation", value: ExpressionUtils.literal("all") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.field("list"), ["space", "members"]), "?", ExpressionUtils.binary(ExpressionUtils.field("userId"), "==", ExpressionUtils.member(ExpressionUtils.call("auth"), ["id"]))), "&&", ExpressionUtils.unary("!", ExpressionUtils.member(ExpressionUtils.field("list"), ["private"]))) }] }, + { name: "@@deny", args: [{ name: "operation", value: ExpressionUtils.literal("post-update") }, { name: "condition", value: ExpressionUtils.binary(ExpressionUtils.member(ExpressionUtils.call("before"), ["ownerId"]), "!=", ExpressionUtils.field("ownerId")) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'String' }, - }, - }, + id: { type: "String" } + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/typed-json/schema.ts b/tests/e2e/orm/schemas/typed-json/schema.ts index 86523ab75..7bb3cc55c 100644 --- a/tests/e2e/orm/schemas/typed-json/schema.ts +++ b/tests/e2e/orm/schemas/typed-json/schema.ts @@ -5,106 +5,103 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, profile: { - name: 'profile', - type: 'Profile', - attributes: [{ name: '@json' }] as readonly AttributeApplication[], - }, + name: "profile", + type: "Profile", + attributes: [{ name: "@json" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; typeDefs = { Profile: { - name: 'Profile', + name: "Profile", fields: { age: { - name: 'age', - type: 'Int', + name: "age", + type: "Int" }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, gender: { - name: 'gender', - type: 'Gender', - optional: true, + name: "gender", + type: "Gender", + optional: true }, jobs: { - name: 'jobs', - type: 'Job', - array: true, + name: "jobs", + type: "Job", + array: true }, address: { - name: 'address', - type: 'Address', - optional: true, + name: "address", + type: "Address", + optional: true }, tags: { - name: 'tags', - type: 'String', + name: "tags", + type: "String", optional: true, - array: true, - }, - }, + array: true + } + } }, Address: { - name: 'Address', + name: "Address", fields: { country: { - name: 'country', - type: 'String', + name: "country", + type: "String" }, zip: { - name: 'zip', - type: 'String', - optional: true, - }, - }, + name: "zip", + type: "String", + optional: true + } + } }, Job: { - name: 'Job', + name: "Job", fields: { title: { - name: 'title', - type: 'String', - }, - }, - }, + name: "title", + type: "String" + } + } + } } as const; enums = { Gender: { - name: 'Gender', + name: "Gender", values: { - MALE: 'MALE', - FEMALE: 'FEMALE', - }, - }, + MALE: "MALE", + FEMALE: "FEMALE" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/typing/schema.ts b/tests/e2e/orm/schemas/typing/schema.ts index fac1b9f5a..4c01c01b1 100644 --- a/tests/e2e/orm/schemas/typing/schema.ts +++ b/tests/e2e/orm/schemas/typing/schema.ts @@ -5,429 +5,345 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, role: { - name: 'role', - type: 'Role', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USER') }] }, - ] as readonly AttributeApplication[], - default: 'USER' as FieldDefault, + name: "role", + type: "Role", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USER") }] }] as readonly AttributeApplication[], + default: "USER" as FieldDefault }, status: { - name: 'status', - type: 'Status', - array: true, + name: "status", + type: "Status", + array: true }, posts: { - name: 'posts', - type: 'Post', + name: "posts", + type: "Post", array: true, - relation: { opposite: 'author' }, + relation: { opposite: "author" } }, profile: { - name: 'profile', - type: 'Profile', + name: "profile", + type: "Profile", optional: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, postCount: { - name: 'postCount', - type: 'Int', - attributes: [{ name: '@computed' }] as readonly AttributeApplication[], - computed: true, + name: "postCount", + type: "Int", + attributes: [{ name: "@computed" }] as readonly AttributeApplication[], + computed: true }, identity: { - name: 'identity', - type: 'Identity', + name: "identity", + type: "Identity", optional: true, - attributes: [{ name: '@json' }] as readonly AttributeApplication[], - }, + attributes: [{ name: "@json" }] as readonly AttributeApplication[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - email: { type: 'String' }, + id: { type: "Int" }, + email: { type: "String" } }, computedFields: { - postCount(_context: { modelAlias: string }): number { - throw new Error('This is a stub for computed field'); - }, - }, + postCount(_context: { + modelAlias: string; + }): number { + throw new Error("This is a stub for computed field"); + } + } }, Post: { - name: 'Post', + name: "Post", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, content: { - name: 'content', - type: 'String', + name: "content", + type: "String" }, author: { - name: 'author', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'posts', fields: ['authorId'], references: ['id'] }, + name: "author", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "posts", fields: ["authorId"], references: ["id"] } }, authorId: { - name: 'authorId', - type: 'Int', - foreignKeyFor: ['author'] as readonly string[], + name: "authorId", + type: "Int", + foreignKeyFor: [ + "author" + ] as readonly string[] }, tags: { - name: 'tags', - type: 'Tag', + name: "tags", + type: "Tag", array: true, - relation: { opposite: 'posts' }, + relation: { opposite: "posts" } }, meta: { - name: 'meta', - type: 'Meta', + name: "meta", + type: "Meta", optional: true, - relation: { opposite: 'post' }, - }, + relation: { opposite: "post" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Profile: { - name: 'Profile', + name: "Profile", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, age: { - name: 'age', - type: 'Int', + name: "age", + type: "Int" }, region: { - name: 'region', - type: 'Region', + name: "region", + type: "Region", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('regionCountry'), - ExpressionUtils.field('regionCity'), - ]), - }, - { - name: 'references', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('country'), - ExpressionUtils.field('city'), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'profiles', - fields: ['regionCountry', 'regionCity'], - references: ['country', 'city'], - }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("regionCountry"), ExpressionUtils.field("regionCity")]) }, { name: "references", value: ExpressionUtils.array("String", [ExpressionUtils.field("country"), ExpressionUtils.field("city")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "profiles", fields: ["regionCountry", "regionCity"], references: ["country", "city"] } }, regionCountry: { - name: 'regionCountry', - type: 'String', + name: "regionCountry", + type: "String", optional: true, - foreignKeyFor: ['region'] as readonly string[], + foreignKeyFor: [ + "region" + ] as readonly string[] }, regionCity: { - name: 'regionCity', - type: 'String', + name: "regionCity", + type: "String", optional: true, - foreignKeyFor: ['region'] as readonly string[], + foreignKeyFor: [ + "region" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'profile', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "profile", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], - }, + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId: { type: 'Int' }, - }, + id: { type: "Int" }, + userId: { type: "Int" } + } }, Tag: { - name: 'Tag', + name: "Tag", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, posts: { - name: 'posts', - type: 'Post', + name: "posts", + type: "Post", array: true, - relation: { opposite: 'tags' }, - }, + relation: { opposite: "tags" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Region: { - name: 'Region', + name: "Region", fields: { country: { - name: 'country', - type: 'String', - id: true, + name: "country", + type: "String", + id: true }, city: { - name: 'city', - type: 'String', - id: true, + name: "city", + type: "String", + id: true }, zip: { - name: 'zip', - type: 'String', - optional: true, + name: "zip", + type: "String", + optional: true }, profiles: { - name: 'profiles', - type: 'Profile', + name: "profiles", + type: "Profile", array: true, - relation: { opposite: 'region' }, - }, + relation: { opposite: "region" } + } }, attributes: [ - { - name: '@@id', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('String', [ - ExpressionUtils.field('country'), - ExpressionUtils.field('city'), - ]), - }, - ], - }, + { name: "@@id", args: [{ name: "fields", value: ExpressionUtils.array("String", [ExpressionUtils.field("country"), ExpressionUtils.field("city")]) }] } ] as readonly AttributeApplication[], - idFields: ['country', 'city'], + idFields: ["country", "city"], uniqueFields: { - country_city: { country: { type: 'String' }, city: { type: 'String' } }, - }, + country_city: { country: { type: "String" }, city: { type: "String" } } + } }, Meta: { - name: 'Meta', + name: "Meta", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, reviewed: { - name: 'reviewed', - type: 'Boolean', + name: "reviewed", + type: "Boolean" }, published: { - name: 'published', - type: 'Boolean', + name: "published", + type: "Boolean" }, post: { - name: 'post', - type: 'Post', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('postId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'meta', fields: ['postId'], references: ['id'] }, + name: "post", + type: "Post", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("postId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "meta", fields: ["postId"], references: ["id"] } }, postId: { - name: 'postId', - type: 'Int', + name: "postId", + type: "Int", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['post'] as readonly string[], - }, + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "post" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - postId: { type: 'Int' }, - }, - }, + id: { type: "Int" }, + postId: { type: "Int" } + } + } } as const; typeDefs = { Identity: { - name: 'Identity', + name: "Identity", fields: { providers: { - name: 'providers', - type: 'IdentityProvider', - array: true, - }, - }, + name: "providers", + type: "IdentityProvider", + array: true + } + } }, IdentityProvider: { - name: 'IdentityProvider', + name: "IdentityProvider", fields: { id: { - name: 'id', - type: 'String', + name: "id", + type: "String" }, name: { - name: 'name', - type: 'String', - optional: true, - }, - }, - }, + name: "name", + type: "String", + optional: true + } + } + } } as const; enums = { Role: { - name: 'Role', + name: "Role", values: { - ADMIN: 'ADMIN', - USER: 'USER', - }, + ADMIN: "ADMIN", + USER: "USER" + } }, Status: { - name: 'Status', + name: "Status", values: { - ACTIVE: 'ACTIVE', - INACTIVE: 'INACTIVE', - BANNED: 'BANNED', - }, - }, + ACTIVE: "ACTIVE", + INACTIVE: "INACTIVE", + BANNED: "BANNED" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType(); diff --git a/tests/e2e/orm/schemas/unsupported/schema.ts b/tests/e2e/orm/schemas/unsupported/schema.ts index ef527872e..ec6524a95 100644 --- a/tests/e2e/orm/schemas/unsupported/schema.ts +++ b/tests/e2e/orm/schemas/unsupported/schema.ts @@ -5,166 +5,128 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'postgresql', + type: "postgresql" } as const; models = { Item: { - name: 'Item', + name: "Item", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, data: { - name: 'data', - type: 'Unsupported', - optional: true, - }, + name: "data", + type: "Unsupported", + optional: true + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, GeoRecord: { - name: 'GeoRecord', + name: "GeoRecord", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, extra: { - name: 'extra', - type: 'Unsupported', + name: "extra", + type: "Unsupported" }, parent: { - name: 'parent', - type: 'GeoParent', + name: "parent", + type: "GeoParent", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'records', fields: ['parentId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "records", fields: ["parentId"], references: ["id"] } }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - foreignKeyFor: ['parent'] as readonly string[], - }, + foreignKeyFor: [ + "parent" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, GeoParent: { - name: 'GeoParent', + name: "GeoParent", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, records: { - name: 'records', - type: 'GeoRecord', + name: "records", + type: "GeoRecord", array: true, - relation: { opposite: 'parent' }, - }, + relation: { opposite: "parent" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, GeoRecordWithDefault: { - name: 'GeoRecordWithDefault', + name: "GeoRecordWithDefault", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, label: { - name: 'label', - type: 'String', + name: "label", + type: "String" }, area: { - name: 'area', - type: 'Unsupported', - attributes: [ - { - name: '@default', - args: [ - { - name: 'value', - value: ExpressionUtils.call('dbgenerated', [ - ExpressionUtils.literal("''::xml"), - ]), - }, - ], - }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('dbgenerated', [ - ExpressionUtils.literal("''::xml"), - ]) as FieldDefault, - }, + name: "area", + type: "Unsupported", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("dbgenerated", [ExpressionUtils.literal("''::xml")]) }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("dbgenerated", [ExpressionUtils.literal("''::xml")]) as FieldDefault + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, - }, + id: { type: "Int" } + } + } } as const; plugins = {}; } diff --git a/tests/e2e/performance/tsc-torture/zenstack/schema.ts b/tests/e2e/performance/tsc-torture/zenstack/schema.ts index 7f2ea4618..37e56a71f 100644 --- a/tests/e2e/performance/tsc-torture/zenstack/schema.ts +++ b/tests/e2e/performance/tsc-torture/zenstack/schema.ts @@ -5,4277 +5,3106 @@ /* eslint-disable */ -import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from '@zenstackhq/schema'; +import { type SchemaDef, type AttributeApplication, type FieldDefault, ExpressionUtils } from "@zenstackhq/schema"; export class SchemaType implements SchemaDef { provider = { - type: 'sqlite', + type: "sqlite" } as const; models = { Organization: { - name: 'Organization', + name: "Organization", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, logoUrl: { - name: 'logoUrl', - type: 'String', - optional: true, + name: "logoUrl", + type: "String", + optional: true }, website: { - name: 'website', - type: 'String', - optional: true, + name: "website", + type: "String", + optional: true }, teams: { - name: 'teams', - type: 'Team', + name: "teams", + type: "Team", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, members: { - name: 'members', - type: 'OrganizationMember', + name: "members", + type: "OrganizationMember", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, projects: { - name: 'projects', - type: 'Project', + name: "projects", + type: "Project", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, billingInfo: { - name: 'billingInfo', - type: 'BillingInfo', + name: "billingInfo", + type: "BillingInfo", optional: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, auditLogs: { - name: 'auditLogs', - type: 'AuditLog', + name: "auditLogs", + type: "AuditLog", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, activityLog: { - name: 'activityLog', - type: 'ActivityLogEntry', + name: "activityLog", + type: "ActivityLogEntry", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, integrations: { - name: 'integrations', - type: 'Integration', + name: "integrations", + type: "Integration", array: true, - relation: { opposite: 'organization' }, + relation: { opposite: "organization" } }, customFields: { - name: 'customFields', - type: 'CustomFieldDefinition', + name: "customFields", + type: "CustomFieldDefinition", array: true, - relation: { opposite: 'organization' }, - }, + relation: { opposite: "organization" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - slug: { type: 'String' }, - }, + id: { type: "Int" }, + slug: { type: "String" } + } }, BillingInfo: { - name: 'BillingInfo', + name: "BillingInfo", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, planName: { - name: 'planName', - type: 'String', + name: "planName", + type: "String" }, billingEmail: { - name: 'billingEmail', - type: 'String', + name: "billingEmail", + type: "String" }, paymentMethod: { - name: 'paymentMethod', - type: 'PaymentMethod', + name: "paymentMethod", + type: "PaymentMethod" }, stripeCustomerId: { - name: 'stripeCustomerId', - type: 'String', - optional: true, + name: "stripeCustomerId", + type: "String", + optional: true }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'billingInfo', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "billingInfo", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', + name: "organizationId", + type: "Int", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['organization'] as readonly string[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, invoices: { - name: 'invoices', - type: 'Invoice', + name: "invoices", + type: "Invoice", array: true, - relation: { opposite: 'billingInfo' }, - }, + relation: { opposite: "billingInfo" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - organizationId: { type: 'Int' }, - }, + id: { type: "Int" }, + organizationId: { type: "Int" } + } }, Invoice: { - name: 'Invoice', + name: "Invoice", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, number: { - name: 'number', - type: 'String', + name: "number", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, amountCents: { - name: 'amountCents', - type: 'Int', + name: "amountCents", + type: "Int" }, currency: { - name: 'currency', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('USD') }] }, - ] as readonly AttributeApplication[], - default: 'USD' as FieldDefault, + name: "currency", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("USD") }] }] as readonly AttributeApplication[], + default: "USD" as FieldDefault }, status: { - name: 'status', - type: 'InvoiceStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('DRAFT') }] }, - ] as readonly AttributeApplication[], - default: 'DRAFT' as FieldDefault, + name: "status", + type: "InvoiceStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("DRAFT") }] }] as readonly AttributeApplication[], + default: "DRAFT" as FieldDefault }, dueDate: { - name: 'dueDate', - type: 'DateTime', + name: "dueDate", + type: "DateTime" }, paidAt: { - name: 'paidAt', - type: 'DateTime', - optional: true, + name: "paidAt", + type: "DateTime", + optional: true }, billingInfo: { - name: 'billingInfo', - type: 'BillingInfo', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('billingInfoId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'invoices', fields: ['billingInfoId'], references: ['id'] }, + name: "billingInfo", + type: "BillingInfo", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("billingInfoId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "invoices", fields: ["billingInfoId"], references: ["id"] } }, billingInfoId: { - name: 'billingInfoId', - type: 'Int', - foreignKeyFor: ['billingInfo'] as readonly string[], + name: "billingInfoId", + type: "Int", + foreignKeyFor: [ + "billingInfo" + ] as readonly string[] }, lineItems: { - name: 'lineItems', - type: 'InvoiceLineItem', + name: "lineItems", + type: "InvoiceLineItem", array: true, - relation: { opposite: 'invoice' }, - }, + relation: { opposite: "invoice" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - number: { type: 'String' }, - }, + id: { type: "Int" }, + number: { type: "String" } + } }, InvoiceLineItem: { - name: 'InvoiceLineItem', + name: "InvoiceLineItem", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, description: { - name: 'description', - type: 'String', + name: "description", + type: "String" }, quantity: { - name: 'quantity', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(1) }] }, - ] as readonly AttributeApplication[], - default: 1 as FieldDefault, + name: "quantity", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(1) }] }] as readonly AttributeApplication[], + default: 1 as FieldDefault }, unitCents: { - name: 'unitCents', - type: 'Int', + name: "unitCents", + type: "Int" }, invoice: { - name: 'invoice', - type: 'Invoice', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('invoiceId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'lineItems', fields: ['invoiceId'], references: ['id'] }, + name: "invoice", + type: "Invoice", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("invoiceId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "lineItems", fields: ["invoiceId"], references: ["id"] } }, invoiceId: { - name: 'invoiceId', - type: 'Int', - foreignKeyFor: ['invoice'] as readonly string[], - }, - }, - idFields: ['id'], + name: "invoiceId", + type: "Int", + foreignKeyFor: [ + "invoice" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, User: { - name: 'User', + name: "User", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, email: { - name: 'email', - type: 'String', + name: "email", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, username: { - name: 'username', - type: 'String', + name: "username", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, displayName: { - name: 'displayName', - type: 'String', + name: "displayName", + type: "String" }, avatarUrl: { - name: 'avatarUrl', - type: 'String', - optional: true, + name: "avatarUrl", + type: "String", + optional: true }, timezone: { - name: 'timezone', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('UTC') }] }, - ] as readonly AttributeApplication[], - default: 'UTC' as FieldDefault, + name: "timezone", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("UTC") }] }] as readonly AttributeApplication[], + default: "UTC" as FieldDefault }, locale: { - name: 'locale', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('en') }] }, - ] as readonly AttributeApplication[], - default: 'en' as FieldDefault, + name: "locale", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("en") }] }] as readonly AttributeApplication[], + default: "en" as FieldDefault }, orgMemberships: { - name: 'orgMemberships', - type: 'OrganizationMember', + name: "orgMemberships", + type: "OrganizationMember", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, teamMemberships: { - name: 'teamMemberships', - type: 'TeamMember', + name: "teamMemberships", + type: "TeamMember", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, ownedProjects: { - name: 'ownedProjects', - type: 'Project', + name: "ownedProjects", + type: "Project", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('ProjectOwner') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'owner', name: 'ProjectOwner' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectOwner") }] }] as readonly AttributeApplication[], + relation: { opposite: "owner", name: "ProjectOwner" } }, assignedTasks: { - name: 'assignedTasks', - type: 'Task', + name: "assignedTasks", + type: "Task", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskAssignee') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'assignee', name: 'TaskAssignee' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskAssignee") }] }] as readonly AttributeApplication[], + relation: { opposite: "assignee", name: "TaskAssignee" } }, reportedTasks: { - name: 'reportedTasks', - type: 'Task', + name: "reportedTasks", + type: "Task", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskReporter') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'reporter', name: 'TaskReporter' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskReporter") }] }] as readonly AttributeApplication[], + relation: { opposite: "reporter", name: "TaskReporter" } }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - relation: { opposite: 'author' }, + relation: { opposite: "author" } }, notifications: { - name: 'notifications', - type: 'Notification', + name: "notifications", + type: "Notification", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, reviews: { - name: 'reviews', - type: 'Review', + name: "reviews", + type: "Review", array: true, - relation: { opposite: 'reviewer' }, + relation: { opposite: "reviewer" } }, auditLogs: { - name: 'auditLogs', - type: 'AuditLog', + name: "auditLogs", + type: "AuditLog", array: true, - relation: { opposite: 'actor' }, + relation: { opposite: "actor" } }, userPreferences: { - name: 'userPreferences', - type: 'UserPreferences', + name: "userPreferences", + type: "UserPreferences", optional: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, activityLog: { - name: 'activityLog', - type: 'ActivityLogEntry', + name: "activityLog", + type: "ActivityLogEntry", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, timeEntries: { - name: 'timeEntries', - type: 'TimeEntry', + name: "timeEntries", + type: "TimeEntry", array: true, - relation: { opposite: 'user' }, + relation: { opposite: "user" } }, apiTokens: { - name: 'apiTokens', - type: 'ApiToken', + name: "apiTokens", + type: "ApiToken", array: true, - relation: { opposite: 'user' }, - }, + relation: { opposite: "user" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - email: { type: 'String' }, - username: { type: 'String' }, - }, + id: { type: "Int" }, + email: { type: "String" }, + username: { type: "String" } + } }, UserPreferences: { - name: 'UserPreferences', + name: "UserPreferences", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, emailNotifications: { - name: 'emailNotifications', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(true) }] }, - ] as readonly AttributeApplication[], - default: true as FieldDefault, + name: "emailNotifications", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(true) }] }] as readonly AttributeApplication[], + default: true as FieldDefault }, slackNotifications: { - name: 'slackNotifications', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "slackNotifications", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, theme: { - name: 'theme', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('light') }] }, - ] as readonly AttributeApplication[], - default: 'light' as FieldDefault, + name: "theme", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("light") }] }] as readonly AttributeApplication[], + default: "light" as FieldDefault }, defaultProjectId: { - name: 'defaultProjectId', - type: 'Int', - optional: true, + name: "defaultProjectId", + type: "Int", + optional: true }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'userPreferences', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "userPreferences", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', + name: "userId", + type: "Int", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], - foreignKeyFor: ['user'] as readonly string[], - }, + attributes: [{ name: "@unique" }] as readonly AttributeApplication[], + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - userId: { type: 'Int' }, - }, + id: { type: "Int" }, + userId: { type: "Int" } + } }, ApiToken: { - name: 'ApiToken', + name: "ApiToken", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, lastUsedAt: { - name: 'lastUsedAt', - type: 'DateTime', - optional: true, + name: "lastUsedAt", + type: "DateTime", + optional: true }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, tokenHash: { - name: 'tokenHash', - type: 'String', + name: "tokenHash", + type: "String", unique: true, - attributes: [{ name: '@unique' }] as readonly AttributeApplication[], + attributes: [{ name: "@unique" }] as readonly AttributeApplication[] }, expiresAt: { - name: 'expiresAt', - type: 'DateTime', - optional: true, + name: "expiresAt", + type: "DateTime", + optional: true }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'apiTokens', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "apiTokens", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], - }, - }, - idFields: ['id'], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - tokenHash: { type: 'String' }, - }, + id: { type: "Int" }, + tokenHash: { type: "String" } + } }, OrganizationMember: { - name: 'OrganizationMember', + name: "OrganizationMember", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, joinedAt: { - name: 'joinedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "joinedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, role: { - name: 'role', - type: 'UserRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, - ] as readonly AttributeApplication[], - default: 'MEMBER' as FieldDefault, + name: "role", + type: "UserRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], + default: "MEMBER" as FieldDefault }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'members', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "members", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'orgMemberships', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "orgMemberships", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], - }, + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('userId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - organizationId_userId: { organizationId: { type: 'Int' }, userId: { type: 'Int' } }, - }, + id: { type: "Int" }, + organizationId_userId: { organizationId: { type: "Int" }, userId: { type: "Int" } } + } }, Team: { - name: 'Team', + name: "Team", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, color: { - name: 'color', - type: 'String', - optional: true, + name: "color", + type: "String", + optional: true }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'teams', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "teams", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, members: { - name: 'members', - type: 'TeamMember', + name: "members", + type: "TeamMember", array: true, - relation: { opposite: 'team' }, + relation: { opposite: "team" } }, projects: { - name: 'projects', - type: 'ProjectTeamAssignment', + name: "projects", + type: "ProjectTeamAssignment", array: true, - relation: { opposite: 'team' }, - }, + relation: { opposite: "team" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, TeamMember: { - name: 'TeamMember', + name: "TeamMember", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, joinedAt: { - name: 'joinedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "joinedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, role: { - name: 'role', - type: 'UserRole', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEMBER') }] }, - ] as readonly AttributeApplication[], - default: 'MEMBER' as FieldDefault, + name: "role", + type: "UserRole", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEMBER") }] }] as readonly AttributeApplication[], + default: "MEMBER" as FieldDefault }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'members', fields: ['teamId'], references: ['id'] }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "members", fields: ["teamId"], references: ["id"] } }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'teamMemberships', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "teamMemberships", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], - }, + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('teamId'), - ExpressionUtils.field('userId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId"), ExpressionUtils.field("userId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - teamId_userId: { teamId: { type: 'Int' }, userId: { type: 'Int' } }, - }, + id: { type: "Int" }, + teamId_userId: { teamId: { type: "Int" }, userId: { type: "Int" } } + } }, Project: { - name: 'Project', + name: "Project", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, slug: { - name: 'slug', - type: 'String', + name: "slug", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, status: { - name: 'status', - type: 'ProjectStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('ACTIVE') }] }, - ] as readonly AttributeApplication[], - default: 'ACTIVE' as FieldDefault, + name: "status", + type: "ProjectStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("ACTIVE") }] }] as readonly AttributeApplication[], + default: "ACTIVE" as FieldDefault }, startDate: { - name: 'startDate', - type: 'DateTime', - optional: true, + name: "startDate", + type: "DateTime", + optional: true }, endDate: { - name: 'endDate', - type: 'DateTime', - optional: true, + name: "endDate", + type: "DateTime", + optional: true }, budget: { - name: 'budget', - type: 'Int', - optional: true, + name: "budget", + type: "Int", + optional: true }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'projects', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "projects", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, owner: { - name: 'owner', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('ProjectOwner') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('ownerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'ownedProjects', - name: 'ProjectOwner', - fields: ['ownerId'], - references: ['id'], - }, + name: "owner", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("ProjectOwner") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("ownerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "ownedProjects", name: "ProjectOwner", fields: ["ownerId"], references: ["id"] } }, ownerId: { - name: 'ownerId', - type: 'Int', - foreignKeyFor: ['owner'] as readonly string[], + name: "ownerId", + type: "Int", + foreignKeyFor: [ + "owner" + ] as readonly string[] }, teamAssignments: { - name: 'teamAssignments', - type: 'ProjectTeamAssignment', + name: "teamAssignments", + type: "ProjectTeamAssignment", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, milestones: { - name: 'milestones', - type: 'Milestone', + name: "milestones", + type: "Milestone", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, tasks: { - name: 'tasks', - type: 'Task', + name: "tasks", + type: "Task", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, labels: { - name: 'labels', - type: 'Label', + name: "labels", + type: "Label", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, sprints: { - name: 'sprints', - type: 'Sprint', + name: "sprints", + type: "Sprint", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, documents: { - name: 'documents', - type: 'Document', + name: "documents", + type: "Document", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, customFieldValues: { - name: 'customFieldValues', - type: 'CustomFieldValue', + name: "customFieldValues", + type: "CustomFieldValue", array: true, - relation: { opposite: 'project' }, + relation: { opposite: "project" } }, integrationLinks: { - name: 'integrationLinks', - type: 'IntegrationLink', + name: "integrationLinks", + type: "IntegrationLink", array: true, - relation: { opposite: 'project' }, - }, + relation: { opposite: "project" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('slug'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("slug")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - organizationId_slug: { organizationId: { type: 'Int' }, slug: { type: 'String' } }, - }, + id: { type: "Int" }, + organizationId_slug: { organizationId: { type: "Int" }, slug: { type: "String" } } + } }, ProjectTeamAssignment: { - name: 'ProjectTeamAssignment', + name: "ProjectTeamAssignment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, assignedAt: { - name: 'assignedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "assignedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'teamAssignments', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "teamAssignments", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "Int", + foreignKeyFor: [ + "project" + ] as readonly string[] }, team: { - name: 'team', - type: 'Team', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('teamId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'projects', fields: ['teamId'], references: ['id'] }, + name: "team", + type: "Team", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("teamId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "projects", fields: ["teamId"], references: ["id"] } }, teamId: { - name: 'teamId', - type: 'Int', - foreignKeyFor: ['team'] as readonly string[], - }, + name: "teamId", + type: "Int", + foreignKeyFor: [ + "team" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('teamId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId"), ExpressionUtils.field("teamId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - projectId_teamId: { projectId: { type: 'Int' }, teamId: { type: 'Int' } }, - }, + id: { type: "Int" }, + projectId_teamId: { projectId: { type: "Int" }, teamId: { type: "Int" } } + } }, Milestone: { - name: 'Milestone', + name: "Milestone", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, dueDate: { - name: 'dueDate', - type: 'DateTime', - optional: true, + name: "dueDate", + type: "DateTime", + optional: true }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, + name: "completedAt", + type: "DateTime", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'milestones', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "milestones", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "Int", + foreignKeyFor: [ + "project" + ] as readonly string[] }, tasks: { - name: 'tasks', - type: 'Task', + name: "tasks", + type: "Task", array: true, - relation: { opposite: 'milestone' }, - }, + relation: { opposite: "milestone" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Sprint: { - name: 'Sprint', + name: "Sprint", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, goal: { - name: 'goal', - type: 'String', - optional: true, + name: "goal", + type: "String", + optional: true }, startDate: { - name: 'startDate', - type: 'DateTime', + name: "startDate", + type: "DateTime" }, endDate: { - name: 'endDate', - type: 'DateTime', + name: "endDate", + type: "DateTime" }, closedAt: { - name: 'closedAt', - type: 'DateTime', - optional: true, + name: "closedAt", + type: "DateTime", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'sprints', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "sprints", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "Int", + foreignKeyFor: [ + "project" + ] as readonly string[] }, tasks: { - name: 'tasks', - type: 'Task', + name: "tasks", + type: "Task", array: true, - relation: { opposite: 'sprint' }, - }, + relation: { opposite: "sprint" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Task: { - name: 'Task', + name: "Task", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, status: { - name: 'status', - type: 'TaskStatus', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('BACKLOG') }] }, - ] as readonly AttributeApplication[], - default: 'BACKLOG' as FieldDefault, + name: "status", + type: "TaskStatus", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("BACKLOG") }] }] as readonly AttributeApplication[], + default: "BACKLOG" as FieldDefault }, priority: { - name: 'priority', - type: 'TaskPriority', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('MEDIUM') }] }, - ] as readonly AttributeApplication[], - default: 'MEDIUM' as FieldDefault, + name: "priority", + type: "TaskPriority", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("MEDIUM") }] }] as readonly AttributeApplication[], + default: "MEDIUM" as FieldDefault }, storyPoints: { - name: 'storyPoints', - type: 'Int', - optional: true, + name: "storyPoints", + type: "Int", + optional: true }, dueDate: { - name: 'dueDate', - type: 'DateTime', - optional: true, + name: "dueDate", + type: "DateTime", + optional: true }, completedAt: { - name: 'completedAt', - type: 'DateTime', - optional: true, + name: "completedAt", + type: "DateTime", + optional: true }, position: { - name: 'position', - type: 'Int', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(0) }] }, - ] as readonly AttributeApplication[], - default: 0 as FieldDefault, + name: "position", + type: "Int", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(0) }] }] as readonly AttributeApplication[], + default: 0 as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'tasks', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "tasks", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "Int", + foreignKeyFor: [ + "project" + ] as readonly string[] }, assignee: { - name: 'assignee', - type: 'User', + name: "assignee", + type: "User", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('TaskAssignee') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('assigneeId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'assignedTasks', - name: 'TaskAssignee', - fields: ['assigneeId'], - references: ['id'], - }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskAssignee") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("assigneeId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "assignedTasks", name: "TaskAssignee", fields: ["assigneeId"], references: ["id"] } }, assigneeId: { - name: 'assigneeId', - type: 'Int', + name: "assigneeId", + type: "Int", optional: true, - foreignKeyFor: ['assignee'] as readonly string[], + foreignKeyFor: [ + "assignee" + ] as readonly string[] }, reporter: { - name: 'reporter', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('TaskReporter') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('reporterId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { - opposite: 'reportedTasks', - name: 'TaskReporter', - fields: ['reporterId'], - references: ['id'], - }, + name: "reporter", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskReporter") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reporterId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "reportedTasks", name: "TaskReporter", fields: ["reporterId"], references: ["id"] } }, reporterId: { - name: 'reporterId', - type: 'Int', - foreignKeyFor: ['reporter'] as readonly string[], + name: "reporterId", + type: "Int", + foreignKeyFor: [ + "reporter" + ] as readonly string[] }, milestone: { - name: 'milestone', - type: 'Milestone', + name: "milestone", + type: "Milestone", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('milestoneId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'tasks', fields: ['milestoneId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("milestoneId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "tasks", fields: ["milestoneId"], references: ["id"] } }, milestoneId: { - name: 'milestoneId', - type: 'Int', + name: "milestoneId", + type: "Int", optional: true, - foreignKeyFor: ['milestone'] as readonly string[], + foreignKeyFor: [ + "milestone" + ] as readonly string[] }, sprint: { - name: 'sprint', - type: 'Sprint', + name: "sprint", + type: "Sprint", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('sprintId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'tasks', fields: ['sprintId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("sprintId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "tasks", fields: ["sprintId"], references: ["id"] } }, sprintId: { - name: 'sprintId', - type: 'Int', + name: "sprintId", + type: "Int", optional: true, - foreignKeyFor: ['sprint'] as readonly string[], + foreignKeyFor: [ + "sprint" + ] as readonly string[] }, parent: { - name: 'parent', - type: 'Task', + name: "parent", + type: "Task", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('TaskSubtasks') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'subtasks', name: 'TaskSubtasks', fields: ['parentId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskSubtasks") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "subtasks", name: "TaskSubtasks", fields: ["parentId"], references: ["id"] } }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - foreignKeyFor: ['parent'] as readonly string[], + foreignKeyFor: [ + "parent" + ] as readonly string[] }, subtasks: { - name: 'subtasks', - type: 'Task', + name: "subtasks", + type: "Task", array: true, - attributes: [ - { name: '@relation', args: [{ name: 'name', value: ExpressionUtils.literal('TaskSubtasks') }] }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parent', name: 'TaskSubtasks' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("TaskSubtasks") }] }] as readonly AttributeApplication[], + relation: { opposite: "parent", name: "TaskSubtasks" } }, labels: { - name: 'labels', - type: 'TaskLabel', + name: "labels", + type: "TaskLabel", array: true, - relation: { opposite: 'task' }, + relation: { opposite: "task" } }, comments: { - name: 'comments', - type: 'Comment', + name: "comments", + type: "Comment", array: true, - relation: { opposite: 'task' }, + relation: { opposite: "task" } }, attachments: { - name: 'attachments', - type: 'Attachment', + name: "attachments", + type: "Attachment", array: true, - relation: { opposite: 'task' }, + relation: { opposite: "task" } }, reviews: { - name: 'reviews', - type: 'Review', + name: "reviews", + type: "Review", array: true, - relation: { opposite: 'task' }, + relation: { opposite: "task" } }, timeEntries: { - name: 'timeEntries', - type: 'TimeEntry', + name: "timeEntries", + type: "TimeEntry", array: true, - relation: { opposite: 'task' }, + relation: { opposite: "task" } }, customFieldValues: { - name: 'customFieldValues', - type: 'CustomFieldValue', + name: "customFieldValues", + type: "CustomFieldValue", array: true, - relation: { opposite: 'task' }, + relation: { opposite: "task" } }, activityLog: { - name: 'activityLog', - type: 'ActivityLogEntry', + name: "activityLog", + type: "ActivityLogEntry", array: true, - relation: { opposite: 'task' }, - }, + relation: { opposite: "task" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Label: { - name: 'Label', + name: "Label", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, color: { - name: 'color', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('#888888') }] }, - ] as readonly AttributeApplication[], - default: '#888888' as FieldDefault, + name: "color", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("#888888") }] }] as readonly AttributeApplication[], + default: "#888888" as FieldDefault }, description: { - name: 'description', - type: 'String', - optional: true, + name: "description", + type: "String", + optional: true }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'labels', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "labels", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "Int", + foreignKeyFor: [ + "project" + ] as readonly string[] }, tasks: { - name: 'tasks', - type: 'TaskLabel', + name: "tasks", + type: "TaskLabel", array: true, - relation: { opposite: 'label' }, - }, + relation: { opposite: "label" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('projectId'), - ExpressionUtils.field('name'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId"), ExpressionUtils.field("name")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - projectId_name: { projectId: { type: 'Int' }, name: { type: 'String' } }, - }, + id: { type: "Int" }, + projectId_name: { projectId: { type: "Int" }, name: { type: "String" } } + } }, TaskLabel: { - name: 'TaskLabel', + name: "TaskLabel", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, appliedAt: { - name: 'appliedAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "appliedAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, task: { - name: 'task', - type: 'Task', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'labels', fields: ['taskId'], references: ['id'] }, + name: "task", + type: "Task", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "labels", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', - foreignKeyFor: ['task'] as readonly string[], + name: "taskId", + type: "Int", + foreignKeyFor: [ + "task" + ] as readonly string[] }, label: { - name: 'label', - type: 'Label', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('labelId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'tasks', fields: ['labelId'], references: ['id'] }, + name: "label", + type: "Label", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("labelId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "tasks", fields: ["labelId"], references: ["id"] } }, labelId: { - name: 'labelId', - type: 'Int', - foreignKeyFor: ['label'] as readonly string[], - }, + name: "labelId", + type: "Int", + foreignKeyFor: [ + "label" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('taskId'), - ExpressionUtils.field('labelId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId"), ExpressionUtils.field("labelId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - taskId_labelId: { taskId: { type: 'Int' }, labelId: { type: 'Int' } }, - }, + id: { type: "Int" }, + taskId_labelId: { taskId: { type: "Int" }, labelId: { type: "Int" } } + } }, Comment: { - name: 'Comment', + name: "Comment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, body: { - name: 'body', - type: 'String', + name: "body", + type: "String" }, kind: { - name: 'kind', - type: 'CommentKind', - isDiscriminator: true, + name: "kind", + type: "CommentKind", + isDiscriminator: true }, edited: { - name: 'edited', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "edited", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, resolved: { - name: 'resolved', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "resolved", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, task: { - name: 'task', - type: 'Task', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, + name: "task", + type: "Task", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', - foreignKeyFor: ['task'] as readonly string[], + name: "taskId", + type: "Int", + foreignKeyFor: [ + "task" + ] as readonly string[] }, author: { - name: 'author', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, + name: "author", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } }, authorId: { - name: 'authorId', - type: 'Int', - foreignKeyFor: ['author'] as readonly string[], + name: "authorId", + type: "Int", + foreignKeyFor: [ + "author" + ] as readonly string[] }, parent: { - name: 'parent', - type: 'Comment', + name: "parent", + type: "Comment", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - foreignKeyFor: ['parent'] as readonly string[], + foreignKeyFor: [ + "parent" + ] as readonly string[] }, replies: { - name: 'replies', - type: 'Comment', + name: "replies", + type: "Comment", array: true, - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parent', name: 'CommentReplies' }, + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], + relation: { opposite: "parent", name: "CommentReplies" } }, reactions: { - name: 'reactions', - type: 'CommentReaction', + name: "reactions", + type: "CommentReaction", array: true, - relation: { opposite: 'comment' }, - }, + relation: { opposite: "comment" } + } }, attributes: [ - { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('kind') }] }, + { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("kind") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, isDelegate: true, - subModels: ['TextComment', 'CodeSnippetComment', 'AttachmentComment'], + subModels: ["TextComment", "CodeSnippetComment", "AttachmentComment"] }, TextComment: { - name: 'TextComment', - baseModel: 'Comment', + name: "TextComment", + baseModel: "Comment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - originModel: 'Comment', - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + originModel: "Comment", + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, body: { - name: 'body', - type: 'String', - originModel: 'Comment', + name: "body", + type: "String", + originModel: "Comment" }, kind: { - name: 'kind', - type: 'CommentKind', - originModel: 'Comment', - isDiscriminator: true, + name: "kind", + type: "CommentKind", + originModel: "Comment", + isDiscriminator: true }, edited: { - name: 'edited', - type: 'Boolean', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "edited", + type: "Boolean", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, resolved: { - name: 'resolved', - type: 'Boolean', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "resolved", + type: "Boolean", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, task: { - name: 'task', - type: 'Task', - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, + name: "task", + type: "Task", + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', - originModel: 'Comment', - foreignKeyFor: ['task'] as readonly string[], + name: "taskId", + type: "Int", + originModel: "Comment", + foreignKeyFor: [ + "task" + ] as readonly string[] }, author: { - name: 'author', - type: 'User', - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, + name: "author", + type: "User", + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } }, authorId: { - name: 'authorId', - type: 'Int', - originModel: 'Comment', - foreignKeyFor: ['author'] as readonly string[], + name: "authorId", + type: "Int", + originModel: "Comment", + foreignKeyFor: [ + "author" + ] as readonly string[] }, parent: { - name: 'parent', - type: 'Comment', + name: "parent", + type: "Comment", optional: true, - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - originModel: 'Comment', - foreignKeyFor: ['parent'] as readonly string[], + originModel: "Comment", + foreignKeyFor: [ + "parent" + ] as readonly string[] }, replies: { - name: 'replies', - type: 'Comment', + name: "replies", + type: "Comment", array: true, - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parent', name: 'CommentReplies' }, + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], + relation: { opposite: "parent", name: "CommentReplies" } }, reactions: { - name: 'reactions', - type: 'CommentReaction', + name: "reactions", + type: "CommentReaction", array: true, - originModel: 'Comment', - relation: { opposite: 'comment' }, - }, + originModel: "Comment", + relation: { opposite: "comment" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, CodeSnippetComment: { - name: 'CodeSnippetComment', - baseModel: 'Comment', + name: "CodeSnippetComment", + baseModel: "Comment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - originModel: 'Comment', - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + originModel: "Comment", + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, body: { - name: 'body', - type: 'String', - originModel: 'Comment', + name: "body", + type: "String", + originModel: "Comment" }, kind: { - name: 'kind', - type: 'CommentKind', - originModel: 'Comment', - isDiscriminator: true, + name: "kind", + type: "CommentKind", + originModel: "Comment", + isDiscriminator: true }, edited: { - name: 'edited', - type: 'Boolean', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "edited", + type: "Boolean", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, resolved: { - name: 'resolved', - type: 'Boolean', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "resolved", + type: "Boolean", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, task: { - name: 'task', - type: 'Task', - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, + name: "task", + type: "Task", + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', - originModel: 'Comment', - foreignKeyFor: ['task'] as readonly string[], + name: "taskId", + type: "Int", + originModel: "Comment", + foreignKeyFor: [ + "task" + ] as readonly string[] }, author: { - name: 'author', - type: 'User', - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, + name: "author", + type: "User", + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } }, authorId: { - name: 'authorId', - type: 'Int', - originModel: 'Comment', - foreignKeyFor: ['author'] as readonly string[], + name: "authorId", + type: "Int", + originModel: "Comment", + foreignKeyFor: [ + "author" + ] as readonly string[] }, parent: { - name: 'parent', - type: 'Comment', + name: "parent", + type: "Comment", optional: true, - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - originModel: 'Comment', - foreignKeyFor: ['parent'] as readonly string[], + originModel: "Comment", + foreignKeyFor: [ + "parent" + ] as readonly string[] }, replies: { - name: 'replies', - type: 'Comment', + name: "replies", + type: "Comment", array: true, - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parent', name: 'CommentReplies' }, + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], + relation: { opposite: "parent", name: "CommentReplies" } }, reactions: { - name: 'reactions', - type: 'CommentReaction', + name: "reactions", + type: "CommentReaction", array: true, - originModel: 'Comment', - relation: { opposite: 'comment' }, + originModel: "Comment", + relation: { opposite: "comment" } }, language: { - name: 'language', - type: 'String', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('plaintext') }] }, - ] as readonly AttributeApplication[], - default: 'plaintext' as FieldDefault, - }, + name: "language", + type: "String", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("plaintext") }] }] as readonly AttributeApplication[], + default: "plaintext" as FieldDefault + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, AttachmentComment: { - name: 'AttachmentComment', - baseModel: 'Comment', + name: "AttachmentComment", + baseModel: "Comment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - originModel: 'Comment', - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + originModel: "Comment", + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, body: { - name: 'body', - type: 'String', - originModel: 'Comment', + name: "body", + type: "String", + originModel: "Comment" }, kind: { - name: 'kind', - type: 'CommentKind', - originModel: 'Comment', - isDiscriminator: true, + name: "kind", + type: "CommentKind", + originModel: "Comment", + isDiscriminator: true }, edited: { - name: 'edited', - type: 'Boolean', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "edited", + type: "Boolean", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, resolved: { - name: 'resolved', - type: 'Boolean', - originModel: 'Comment', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "resolved", + type: "Boolean", + originModel: "Comment", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, task: { - name: 'task', - type: 'Task', - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['taskId'], references: ['id'] }, + name: "task", + type: "Task", + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', - originModel: 'Comment', - foreignKeyFor: ['task'] as readonly string[], + name: "taskId", + type: "Int", + originModel: "Comment", + foreignKeyFor: [ + "task" + ] as readonly string[] }, author: { - name: 'author', - type: 'User', - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('authorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['authorId'], references: ['id'] }, + name: "author", + type: "User", + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("authorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["authorId"], references: ["id"] } }, authorId: { - name: 'authorId', - type: 'Int', - originModel: 'Comment', - foreignKeyFor: ['author'] as readonly string[], + name: "authorId", + type: "Int", + originModel: "Comment", + foreignKeyFor: [ + "author" + ] as readonly string[] }, parent: { - name: 'parent', - type: 'Comment', + name: "parent", + type: "Comment", optional: true, - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { name: 'name', value: ExpressionUtils.literal('CommentReplies') }, - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('parentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'replies', name: 'CommentReplies', fields: ['parentId'], references: ['id'] }, + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }, { name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("parentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "replies", name: "CommentReplies", fields: ["parentId"], references: ["id"] } }, parentId: { - name: 'parentId', - type: 'Int', + name: "parentId", + type: "Int", optional: true, - originModel: 'Comment', - foreignKeyFor: ['parent'] as readonly string[], + originModel: "Comment", + foreignKeyFor: [ + "parent" + ] as readonly string[] }, replies: { - name: 'replies', - type: 'Comment', + name: "replies", + type: "Comment", array: true, - originModel: 'Comment', - attributes: [ - { - name: '@relation', - args: [{ name: 'name', value: ExpressionUtils.literal('CommentReplies') }], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'parent', name: 'CommentReplies' }, + originModel: "Comment", + attributes: [{ name: "@relation", args: [{ name: "name", value: ExpressionUtils.literal("CommentReplies") }] }] as readonly AttributeApplication[], + relation: { opposite: "parent", name: "CommentReplies" } }, reactions: { - name: 'reactions', - type: 'CommentReaction', + name: "reactions", + type: "CommentReaction", array: true, - originModel: 'Comment', - relation: { opposite: 'comment' }, + originModel: "Comment", + relation: { opposite: "comment" } }, attachFilename: { - name: 'attachFilename', - type: 'String', + name: "attachFilename", + type: "String" }, attachMimeType: { - name: 'attachMimeType', - type: 'String', + name: "attachMimeType", + type: "String" }, attachSizeBytes: { - name: 'attachSizeBytes', - type: 'Int', + name: "attachSizeBytes", + type: "Int" }, attachStorageKey: { - name: 'attachStorageKey', - type: 'String', - }, + name: "attachStorageKey", + type: "String" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, CommentReaction: { - name: 'CommentReaction', + name: "CommentReaction", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, emoji: { - name: 'emoji', - type: 'String', + name: "emoji", + type: "String" }, comment: { - name: 'comment', - type: 'Comment', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('commentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'reactions', fields: ['commentId'], references: ['id'] }, + name: "comment", + type: "Comment", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("commentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "reactions", fields: ["commentId"], references: ["id"] } }, commentId: { - name: 'commentId', - type: 'Int', - foreignKeyFor: ['comment'] as readonly string[], - }, - }, - idFields: ['id'], + name: "commentId", + type: "Int", + foreignKeyFor: [ + "comment" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Review: { - name: 'Review', + name: "Review", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, decision: { - name: 'decision', - type: 'ReviewDecision', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal('PENDING') }] }, - ] as readonly AttributeApplication[], - default: 'PENDING' as FieldDefault, + name: "decision", + type: "ReviewDecision", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal("PENDING") }] }] as readonly AttributeApplication[], + default: "PENDING" as FieldDefault }, summary: { - name: 'summary', - type: 'String', - optional: true, + name: "summary", + type: "String", + optional: true }, task: { - name: 'task', - type: 'Task', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'reviews', fields: ['taskId'], references: ['id'] }, + name: "task", + type: "Task", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "reviews", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', - foreignKeyFor: ['task'] as readonly string[], + name: "taskId", + type: "Int", + foreignKeyFor: [ + "task" + ] as readonly string[] }, reviewer: { - name: 'reviewer', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('reviewerId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'reviews', fields: ['reviewerId'], references: ['id'] }, + name: "reviewer", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reviewerId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "reviews", fields: ["reviewerId"], references: ["id"] } }, reviewerId: { - name: 'reviewerId', - type: 'Int', - foreignKeyFor: ['reviewer'] as readonly string[], + name: "reviewerId", + type: "Int", + foreignKeyFor: [ + "reviewer" + ] as readonly string[] }, comments: { - name: 'comments', - type: 'ReviewComment', + name: "comments", + type: "ReviewComment", array: true, - relation: { opposite: 'review' }, - }, + relation: { opposite: "review" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, ReviewComment: { - name: 'ReviewComment', + name: "ReviewComment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, body: { - name: 'body', - type: 'String', + name: "body", + type: "String" }, lineRef: { - name: 'lineRef', - type: 'String', - optional: true, + name: "lineRef", + type: "String", + optional: true }, review: { - name: 'review', - type: 'Review', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('reviewId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'comments', fields: ['reviewId'], references: ['id'] }, + name: "review", + type: "Review", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("reviewId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "comments", fields: ["reviewId"], references: ["id"] } }, reviewId: { - name: 'reviewId', - type: 'Int', - foreignKeyFor: ['review'] as readonly string[], - }, - }, - idFields: ['id'], + name: "reviewId", + type: "Int", + foreignKeyFor: [ + "review" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Attachment: { - name: 'Attachment', + name: "Attachment", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, filename: { - name: 'filename', - type: 'String', + name: "filename", + type: "String" }, mimeType: { - name: 'mimeType', - type: 'String', + name: "mimeType", + type: "String" }, sizeBytes: { - name: 'sizeBytes', - type: 'Int', + name: "sizeBytes", + type: "Int" }, storageKey: { - name: 'storageKey', - type: 'String', + name: "storageKey", + type: "String" }, task: { - name: 'task', - type: 'Task', + name: "task", + type: "Task", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'attachments', fields: ['taskId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "attachments", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', + name: "taskId", + type: "Int", optional: true, - foreignKeyFor: ['task'] as readonly string[], - }, + foreignKeyFor: [ + "task" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Document: { - name: 'Document', + name: "Document", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, title: { - name: 'title', - type: 'String', + name: "title", + type: "String" }, content: { - name: 'content', - type: 'String', - optional: true, + name: "content", + type: "String", + optional: true }, published: { - name: 'published', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "published", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'documents', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "documents", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', - foreignKeyFor: ['project'] as readonly string[], + name: "projectId", + type: "Int", + foreignKeyFor: [ + "project" + ] as readonly string[] }, sections: { - name: 'sections', - type: 'DocumentSection', + name: "sections", + type: "DocumentSection", array: true, - relation: { opposite: 'document' }, - }, + relation: { opposite: "document" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, DocumentSection: { - name: 'DocumentSection', + name: "DocumentSection", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, order: { - name: 'order', - type: 'Int', + name: "order", + type: "Int" }, heading: { - name: 'heading', - type: 'String', + name: "heading", + type: "String" }, content: { - name: 'content', - type: 'String', - optional: true, + name: "content", + type: "String", + optional: true }, document: { - name: 'document', - type: 'Document', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('documentId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'sections', fields: ['documentId'], references: ['id'] }, + name: "document", + type: "Document", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("documentId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "sections", fields: ["documentId"], references: ["id"] } }, documentId: { - name: 'documentId', - type: 'Int', - foreignKeyFor: ['document'] as readonly string[], - }, - }, - idFields: ['id'], + name: "documentId", + type: "Int", + foreignKeyFor: [ + "document" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, TimeEntry: { - name: 'TimeEntry', + name: "TimeEntry", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, startedAt: { - name: 'startedAt', - type: 'DateTime', + name: "startedAt", + type: "DateTime" }, stoppedAt: { - name: 'stoppedAt', - type: 'DateTime', - optional: true, + name: "stoppedAt", + type: "DateTime", + optional: true }, durationMin: { - name: 'durationMin', - type: 'Int', - optional: true, + name: "durationMin", + type: "Int", + optional: true }, note: { - name: 'note', - type: 'String', - optional: true, + name: "note", + type: "String", + optional: true }, task: { - name: 'task', - type: 'Task', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'timeEntries', fields: ['taskId'], references: ['id'] }, + name: "task", + type: "Task", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "timeEntries", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', - foreignKeyFor: ['task'] as readonly string[], + name: "taskId", + type: "Int", + foreignKeyFor: [ + "task" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'timeEntries', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "timeEntries", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], - }, - }, - idFields: ['id'], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Notification: { - name: 'Notification', + name: "Notification", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, readAt: { - name: 'readAt', - type: 'DateTime', - optional: true, + name: "readAt", + type: "DateTime", + optional: true }, kind: { - name: 'kind', - type: 'NotificationType', - isDiscriminator: true, + name: "kind", + type: "NotificationType", + isDiscriminator: true }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], - }, + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] + } }, attributes: [ - { name: '@@delegate', args: [{ name: 'discriminator', value: ExpressionUtils.field('kind') }] }, + { name: "@@delegate", args: [{ name: "discriminator", value: ExpressionUtils.field("kind") }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, + id: { type: "Int" } }, isDelegate: true, - subModels: [ - 'MentionNotification', - 'AssignmentNotification', - 'StatusChangeNotification', - 'CommentNotification', - 'ReviewRequestNotification', - 'ApprovalNotification', - ], + subModels: ["MentionNotification", "AssignmentNotification", "StatusChangeNotification", "CommentNotification", "ReviewRequestNotification", "ApprovalNotification"] }, MentionNotification: { - name: 'MentionNotification', - baseModel: 'Notification', + name: "MentionNotification", + baseModel: "Notification", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Notification', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Notification", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, readAt: { - name: 'readAt', - type: 'DateTime', + name: "readAt", + type: "DateTime", optional: true, - originModel: 'Notification', + originModel: "Notification" }, kind: { - name: 'kind', - type: 'NotificationType', - originModel: 'Notification', - isDiscriminator: true, + name: "kind", + type: "NotificationType", + originModel: "Notification", + isDiscriminator: true }, user: { - name: 'user', - type: 'User', - originModel: 'Notification', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + originModel: "Notification", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - originModel: 'Notification', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + originModel: "Notification", + foreignKeyFor: [ + "user" + ] as readonly string[] }, mentionedByUserId: { - name: 'mentionedByUserId', - type: 'Int', + name: "mentionedByUserId", + type: "Int" }, taskId: { - name: 'taskId', - type: 'Int', - }, + name: "taskId", + type: "Int" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, AssignmentNotification: { - name: 'AssignmentNotification', - baseModel: 'Notification', + name: "AssignmentNotification", + baseModel: "Notification", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Notification', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Notification", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, readAt: { - name: 'readAt', - type: 'DateTime', + name: "readAt", + type: "DateTime", optional: true, - originModel: 'Notification', + originModel: "Notification" }, kind: { - name: 'kind', - type: 'NotificationType', - originModel: 'Notification', - isDiscriminator: true, + name: "kind", + type: "NotificationType", + originModel: "Notification", + isDiscriminator: true }, user: { - name: 'user', - type: 'User', - originModel: 'Notification', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + originModel: "Notification", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - originModel: 'Notification', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + originModel: "Notification", + foreignKeyFor: [ + "user" + ] as readonly string[] }, taskId: { - name: 'taskId', - type: 'Int', + name: "taskId", + type: "Int" }, assignedByUserId: { - name: 'assignedByUserId', - type: 'Int', - }, + name: "assignedByUserId", + type: "Int" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, StatusChangeNotification: { - name: 'StatusChangeNotification', - baseModel: 'Notification', + name: "StatusChangeNotification", + baseModel: "Notification", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Notification', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Notification", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, readAt: { - name: 'readAt', - type: 'DateTime', + name: "readAt", + type: "DateTime", optional: true, - originModel: 'Notification', + originModel: "Notification" }, kind: { - name: 'kind', - type: 'NotificationType', - originModel: 'Notification', - isDiscriminator: true, + name: "kind", + type: "NotificationType", + originModel: "Notification", + isDiscriminator: true }, user: { - name: 'user', - type: 'User', - originModel: 'Notification', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + originModel: "Notification", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - originModel: 'Notification', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + originModel: "Notification", + foreignKeyFor: [ + "user" + ] as readonly string[] }, taskId: { - name: 'taskId', - type: 'Int', + name: "taskId", + type: "Int" }, fromStatus: { - name: 'fromStatus', - type: 'String', + name: "fromStatus", + type: "String" }, toStatus: { - name: 'toStatus', - type: 'String', - }, + name: "toStatus", + type: "String" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, CommentNotification: { - name: 'CommentNotification', - baseModel: 'Notification', + name: "CommentNotification", + baseModel: "Notification", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Notification', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Notification", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, readAt: { - name: 'readAt', - type: 'DateTime', + name: "readAt", + type: "DateTime", optional: true, - originModel: 'Notification', + originModel: "Notification" }, kind: { - name: 'kind', - type: 'NotificationType', - originModel: 'Notification', - isDiscriminator: true, + name: "kind", + type: "NotificationType", + originModel: "Notification", + isDiscriminator: true }, user: { - name: 'user', - type: 'User', - originModel: 'Notification', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + originModel: "Notification", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - originModel: 'Notification', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + originModel: "Notification", + foreignKeyFor: [ + "user" + ] as readonly string[] }, commentId: { - name: 'commentId', - type: 'Int', - }, + name: "commentId", + type: "Int" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, ReviewRequestNotification: { - name: 'ReviewRequestNotification', - baseModel: 'Notification', + name: "ReviewRequestNotification", + baseModel: "Notification", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Notification', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Notification", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, readAt: { - name: 'readAt', - type: 'DateTime', + name: "readAt", + type: "DateTime", optional: true, - originModel: 'Notification', + originModel: "Notification" }, kind: { - name: 'kind', - type: 'NotificationType', - originModel: 'Notification', - isDiscriminator: true, + name: "kind", + type: "NotificationType", + originModel: "Notification", + isDiscriminator: true }, user: { - name: 'user', - type: 'User', - originModel: 'Notification', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + originModel: "Notification", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - originModel: 'Notification', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + originModel: "Notification", + foreignKeyFor: [ + "user" + ] as readonly string[] }, reviewId: { - name: 'reviewId', - type: 'Int', + name: "reviewId", + type: "Int" }, requestedByUserId: { - name: 'requestedByUserId', - type: 'Int', - }, + name: "requestedByUserId", + type: "Int" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, ApprovalNotification: { - name: 'ApprovalNotification', - baseModel: 'Notification', + name: "ApprovalNotification", + baseModel: "Notification", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - originModel: 'Notification', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + originModel: "Notification", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, readAt: { - name: 'readAt', - type: 'DateTime', + name: "readAt", + type: "DateTime", optional: true, - originModel: 'Notification', + originModel: "Notification" }, kind: { - name: 'kind', - type: 'NotificationType', - originModel: 'Notification', - isDiscriminator: true, + name: "kind", + type: "NotificationType", + originModel: "Notification", + isDiscriminator: true }, user: { - name: 'user', - type: 'User', - originModel: 'Notification', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'notifications', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + originModel: "Notification", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "notifications", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - originModel: 'Notification', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + originModel: "Notification", + foreignKeyFor: [ + "user" + ] as readonly string[] }, targetType: { - name: 'targetType', - type: 'String', + name: "targetType", + type: "String" }, targetId: { - name: 'targetId', - type: 'Int', - }, + name: "targetId", + type: "Int" + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, ActivityLogEntry: { - name: 'ActivityLogEntry', + name: "ActivityLogEntry", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, action: { - name: 'action', - type: 'String', + name: "action", + type: "String" }, meta: { - name: 'meta', - type: 'String', - optional: true, + name: "meta", + type: "String", + optional: true }, organization: { - name: 'organization', - type: 'Organization', + name: "organization", + type: "Organization", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'activityLog', fields: ['organizationId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "activityLog", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', + name: "organizationId", + type: "Int", optional: true, - foreignKeyFor: ['organization'] as readonly string[], + foreignKeyFor: [ + "organization" + ] as readonly string[] }, user: { - name: 'user', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('userId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'activityLog', fields: ['userId'], references: ['id'] }, + name: "user", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("userId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "activityLog", fields: ["userId"], references: ["id"] } }, userId: { - name: 'userId', - type: 'Int', - foreignKeyFor: ['user'] as readonly string[], + name: "userId", + type: "Int", + foreignKeyFor: [ + "user" + ] as readonly string[] }, task: { - name: 'task', - type: 'Task', + name: "task", + type: "Task", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'activityLog', fields: ['taskId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "activityLog", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', + name: "taskId", + type: "Int", optional: true, - foreignKeyFor: ['task'] as readonly string[], - }, + foreignKeyFor: [ + "task" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, AuditLog: { - name: 'AuditLog', + name: "AuditLog", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, entityType: { - name: 'entityType', - type: 'String', + name: "entityType", + type: "String" }, entityId: { - name: 'entityId', - type: 'Int', + name: "entityId", + type: "Int" }, action: { - name: 'action', - type: 'String', + name: "action", + type: "String" }, diff: { - name: 'diff', - type: 'String', - optional: true, + name: "diff", + type: "String", + optional: true }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'auditLogs', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "auditLogs", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, actor: { - name: 'actor', - type: 'User', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('actorId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'auditLogs', fields: ['actorId'], references: ['id'] }, + name: "actor", + type: "User", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("actorId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "auditLogs", fields: ["actorId"], references: ["id"] } }, actorId: { - name: 'actorId', - type: 'Int', - foreignKeyFor: ['actor'] as readonly string[], - }, - }, - idFields: ['id'], + name: "actorId", + type: "Int", + foreignKeyFor: [ + "actor" + ] as readonly string[] + } + }, + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, CustomFieldDefinition: { - name: 'CustomFieldDefinition', + name: "CustomFieldDefinition", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, name: { - name: 'name', - type: 'String', + name: "name", + type: "String" }, fieldType: { - name: 'fieldType', - type: 'String', + name: "fieldType", + type: "String" }, required: { - name: 'required', - type: 'Boolean', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.literal(false) }] }, - ] as readonly AttributeApplication[], - default: false as FieldDefault, + name: "required", + type: "Boolean", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.literal(false) }] }] as readonly AttributeApplication[], + default: false as FieldDefault }, defaultValue: { - name: 'defaultValue', - type: 'String', - optional: true, + name: "defaultValue", + type: "String", + optional: true }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'customFields', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "customFields", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, values: { - name: 'values', - type: 'CustomFieldValue', + name: "values", + type: "CustomFieldValue", array: true, - relation: { opposite: 'field' }, - }, + relation: { opposite: "field" } + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, CustomFieldValue: { - name: 'CustomFieldValue', + name: "CustomFieldValue", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, value: { - name: 'value', - type: 'String', + name: "value", + type: "String" }, field: { - name: 'field', - type: 'CustomFieldDefinition', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('fieldId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'values', fields: ['fieldId'], references: ['id'] }, + name: "field", + type: "CustomFieldDefinition", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("fieldId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "values", fields: ["fieldId"], references: ["id"] } }, fieldId: { - name: 'fieldId', - type: 'Int', - foreignKeyFor: ['field'] as readonly string[], + name: "fieldId", + type: "Int", + foreignKeyFor: [ + "field" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', + name: "project", + type: "Project", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'customFieldValues', fields: ['projectId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "customFieldValues", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', + name: "projectId", + type: "Int", optional: true, - foreignKeyFor: ['project'] as readonly string[], + foreignKeyFor: [ + "project" + ] as readonly string[] }, task: { - name: 'task', - type: 'Task', + name: "task", + type: "Task", optional: true, - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('taskId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'customFieldValues', fields: ['taskId'], references: ['id'] }, + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("taskId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "customFieldValues", fields: ["taskId"], references: ["id"] } }, taskId: { - name: 'taskId', - type: 'Int', + name: "taskId", + type: "Int", optional: true, - foreignKeyFor: ['task'] as readonly string[], - }, + foreignKeyFor: [ + "task" + ] as readonly string[] + } }, - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - }, + id: { type: "Int" } + } }, Integration: { - name: 'Integration', + name: "Integration", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, updatedAt: { - name: 'updatedAt', - type: 'DateTime', + name: "updatedAt", + type: "DateTime", updatedAt: true, - attributes: [{ name: '@updatedAt' }] as readonly AttributeApplication[], + attributes: [{ name: "@updatedAt" }] as readonly AttributeApplication[] }, provider: { - name: 'provider', - type: 'String', + name: "provider", + type: "String" }, accessToken: { - name: 'accessToken', - type: 'String', - optional: true, + name: "accessToken", + type: "String", + optional: true }, config: { - name: 'config', - type: 'String', - optional: true, + name: "config", + type: "String", + optional: true }, organization: { - name: 'organization', - type: 'Organization', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('organizationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'integrations', fields: ['organizationId'], references: ['id'] }, + name: "organization", + type: "Organization", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "integrations", fields: ["organizationId"], references: ["id"] } }, organizationId: { - name: 'organizationId', - type: 'Int', - foreignKeyFor: ['organization'] as readonly string[], + name: "organizationId", + type: "Int", + foreignKeyFor: [ + "organization" + ] as readonly string[] }, links: { - name: 'links', - type: 'IntegrationLink', + name: "links", + type: "IntegrationLink", array: true, - relation: { opposite: 'integration' }, - }, + relation: { opposite: "integration" } + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('organizationId'), - ExpressionUtils.field('provider'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("organizationId"), ExpressionUtils.field("provider")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - organizationId_provider: { organizationId: { type: 'Int' }, provider: { type: 'String' } }, - }, + id: { type: "Int" }, + organizationId_provider: { organizationId: { type: "Int" }, provider: { type: "String" } } + } }, IntegrationLink: { - name: 'IntegrationLink', + name: "IntegrationLink", fields: { id: { - name: 'id', - type: 'Int', + name: "id", + type: "Int", id: true, - attributes: [ - { name: '@id' }, - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('autoincrement') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('autoincrement') as FieldDefault, + attributes: [{ name: "@id" }, { name: "@default", args: [{ name: "value", value: ExpressionUtils.call("autoincrement") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("autoincrement") as FieldDefault }, createdAt: { - name: 'createdAt', - type: 'DateTime', - attributes: [ - { name: '@default', args: [{ name: 'value', value: ExpressionUtils.call('now') }] }, - ] as readonly AttributeApplication[], - default: ExpressionUtils.call('now') as FieldDefault, + name: "createdAt", + type: "DateTime", + attributes: [{ name: "@default", args: [{ name: "value", value: ExpressionUtils.call("now") }] }] as readonly AttributeApplication[], + default: ExpressionUtils.call("now") as FieldDefault }, externalId: { - name: 'externalId', - type: 'String', + name: "externalId", + type: "String" }, url: { - name: 'url', - type: 'String', - optional: true, + name: "url", + type: "String", + optional: true }, integration: { - name: 'integration', - type: 'Integration', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('integrationId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'links', fields: ['integrationId'], references: ['id'] }, + name: "integration", + type: "Integration", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("integrationId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "links", fields: ["integrationId"], references: ["id"] } }, integrationId: { - name: 'integrationId', - type: 'Int', - foreignKeyFor: ['integration'] as readonly string[], + name: "integrationId", + type: "Int", + foreignKeyFor: [ + "integration" + ] as readonly string[] }, project: { - name: 'project', - type: 'Project', - attributes: [ - { - name: '@relation', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('projectId')]), - }, - { - name: 'references', - value: ExpressionUtils.array('Int', [ExpressionUtils.field('id')]), - }, - ], - }, - ] as readonly AttributeApplication[], - relation: { opposite: 'integrationLinks', fields: ['projectId'], references: ['id'] }, + name: "project", + type: "Project", + attributes: [{ name: "@relation", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("projectId")]) }, { name: "references", value: ExpressionUtils.array("Int", [ExpressionUtils.field("id")]) }] }] as readonly AttributeApplication[], + relation: { opposite: "integrationLinks", fields: ["projectId"], references: ["id"] } }, projectId: { - name: 'projectId', - type: 'Int', - foreignKeyFor: ['project'] as readonly string[], - }, + name: "projectId", + type: "Int", + foreignKeyFor: [ + "project" + ] as readonly string[] + } }, attributes: [ - { - name: '@@unique', - args: [ - { - name: 'fields', - value: ExpressionUtils.array('Int', [ - ExpressionUtils.field('integrationId'), - ExpressionUtils.field('externalId'), - ]), - }, - ], - }, + { name: "@@unique", args: [{ name: "fields", value: ExpressionUtils.array("Int", [ExpressionUtils.field("integrationId"), ExpressionUtils.field("externalId")]) }] } ] as readonly AttributeApplication[], - idFields: ['id'], + idFields: ["id"], uniqueFields: { - id: { type: 'Int' }, - integrationId_externalId: { integrationId: { type: 'Int' }, externalId: { type: 'String' } }, - }, - }, + id: { type: "Int" }, + integrationId_externalId: { integrationId: { type: "Int" }, externalId: { type: "String" } } + } + } } as const; enums = { UserRole: { - name: 'UserRole', + name: "UserRole", values: { - SUPER_ADMIN: 'SUPER_ADMIN', - ADMIN: 'ADMIN', - MANAGER: 'MANAGER', - MEMBER: 'MEMBER', - GUEST: 'GUEST', - }, + SUPER_ADMIN: "SUPER_ADMIN", + ADMIN: "ADMIN", + MANAGER: "MANAGER", + MEMBER: "MEMBER", + GUEST: "GUEST" + } }, ProjectStatus: { - name: 'ProjectStatus', + name: "ProjectStatus", values: { - DRAFT: 'DRAFT', - ACTIVE: 'ACTIVE', - ARCHIVED: 'ARCHIVED', - DELETED: 'DELETED', - }, + DRAFT: "DRAFT", + ACTIVE: "ACTIVE", + ARCHIVED: "ARCHIVED", + DELETED: "DELETED" + } }, TaskStatus: { - name: 'TaskStatus', + name: "TaskStatus", values: { - BACKLOG: 'BACKLOG', - TODO: 'TODO', - IN_PROGRESS: 'IN_PROGRESS', - IN_REVIEW: 'IN_REVIEW', - DONE: 'DONE', - CANCELLED: 'CANCELLED', - }, + BACKLOG: "BACKLOG", + TODO: "TODO", + IN_PROGRESS: "IN_PROGRESS", + IN_REVIEW: "IN_REVIEW", + DONE: "DONE", + CANCELLED: "CANCELLED" + } }, TaskPriority: { - name: 'TaskPriority', + name: "TaskPriority", values: { - CRITICAL: 'CRITICAL', - HIGH: 'HIGH', - MEDIUM: 'MEDIUM', - LOW: 'LOW', - }, + CRITICAL: "CRITICAL", + HIGH: "HIGH", + MEDIUM: "MEDIUM", + LOW: "LOW" + } }, CommentKind: { - name: 'CommentKind', + name: "CommentKind", values: { - TEXT: 'TEXT', - CODE_SNIPPET: 'CODE_SNIPPET', - ATTACHMENT: 'ATTACHMENT', - }, + TEXT: "TEXT", + CODE_SNIPPET: "CODE_SNIPPET", + ATTACHMENT: "ATTACHMENT" + } }, NotificationType: { - name: 'NotificationType', + name: "NotificationType", values: { - MENTION: 'MENTION', - ASSIGNMENT: 'ASSIGNMENT', - STATUS_CHANGE: 'STATUS_CHANGE', - COMMENT: 'COMMENT', - REVIEW_REQUEST: 'REVIEW_REQUEST', - APPROVAL_NEEDED: 'APPROVAL_NEEDED', - }, + MENTION: "MENTION", + ASSIGNMENT: "ASSIGNMENT", + STATUS_CHANGE: "STATUS_CHANGE", + COMMENT: "COMMENT", + REVIEW_REQUEST: "REVIEW_REQUEST", + APPROVAL_NEEDED: "APPROVAL_NEEDED" + } }, ReviewDecision: { - name: 'ReviewDecision', + name: "ReviewDecision", values: { - PENDING: 'PENDING', - APPROVED: 'APPROVED', - REJECTED: 'REJECTED', - CHANGES_REQUESTED: 'CHANGES_REQUESTED', - }, + PENDING: "PENDING", + APPROVED: "APPROVED", + REJECTED: "REJECTED", + CHANGES_REQUESTED: "CHANGES_REQUESTED" + } }, InvoiceStatus: { - name: 'InvoiceStatus', + name: "InvoiceStatus", values: { - DRAFT: 'DRAFT', - SENT: 'SENT', - PAID: 'PAID', - OVERDUE: 'OVERDUE', - CANCELLED: 'CANCELLED', - }, + DRAFT: "DRAFT", + SENT: "SENT", + PAID: "PAID", + OVERDUE: "OVERDUE", + CANCELLED: "CANCELLED" + } }, PaymentMethod: { - name: 'PaymentMethod', + name: "PaymentMethod", values: { - CREDIT_CARD: 'CREDIT_CARD', - BANK_TRANSFER: 'BANK_TRANSFER', - PAYPAL: 'PAYPAL', - CRYPTO: 'CRYPTO', - }, - }, + CREDIT_CARD: "CREDIT_CARD", + BANK_TRANSFER: "BANK_TRANSFER", + PAYPAL: "PAYPAL", + CRYPTO: "CRYPTO" + } + } } as const; - authType = 'User' as const; + authType = "User" as const; plugins = {}; } export const schema = new SchemaType();