Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "ZenStack Runtime",
"type": "module",
"scripts": {
"build": "tsup-node",
"build": "tsup-node && pnpm test:generate",
"watch": "tsup-node --watch",
"lint": "eslint src --ext ts",
"test": "vitest run && pnpm test:generate && pnpm test:typecheck",
"test": "vitest run && pnpm test:typecheck",
"test:generate": "tsx test/scripts/generate.ts",
"test:typecheck": "tsc --project tsconfig.test.json",
"pack": "pnpm pack"
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/aggregate.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';
import { createUser } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/client-specs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LogEvent } from 'kysely';
import { getSchema, schema } from '../test-schema';
import { getSchema, schema } from '../schemas/basic';
import { makePostgresClient, makeSqliteClient } from '../utils';
import type { ClientContract } from '../../src';

Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/count.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-count-tests';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-create-many-and-return-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/create-many.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-create-many-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/create.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-create-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/delete-many.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-delete-many-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/delete.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-delete-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/filter.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-filter-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/find.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { NotFoundError } from '../../src/client/errors';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';
import { createPosts, createUser } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/group-by.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';
import { createUser } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/raw-query.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-raw-query-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/transaction.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-transaction-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/undefined-values.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';
import { createUser } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/update-many.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-update-many-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/update.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';
import { createUser } from './utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/upsert.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import type { ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';
import { createClientSpecs } from './client-specs';

const PG_DB_NAME = 'client-api-upsert-tests';
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/client-api/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ClientContract } from '../../src/client';
import type { schema } from '../test-schema';
import type { schema } from '../schemas/basic';

type ClientType = ClientContract<typeof schema>;

Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/plugin/kysely-on-query.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SQLite from 'better-sqlite3';
import { InsertQueryNode, Kysely, PrimitiveValueListNode, ValuesNode, type QueryResult } from 'kysely';
import { beforeEach, describe, expect, it } from 'vitest';
import { ZenStackClient, type ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';

describe('Kysely onQuery tests', () => {
let _client: ClientContract<typeof schema>;
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/plugin/mutation-hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import SQLite from 'better-sqlite3';
import { DeleteQueryNode, InsertQueryNode, UpdateQueryNode } from 'kysely';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import { ZenStackClient, type ClientContract } from '../../src';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';

describe('Entity lifecycle tests', () => {
let _client: ClientContract<typeof schema>;
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/plugin/query-lifecycle.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SQLite from 'better-sqlite3';
import { beforeEach, describe, expect, it } from 'vitest';
import { definePlugin, ZenStackClient, type ClientContract } from '../../src/client';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';

describe('Query interception tests', () => {
let _client: ClientContract<typeof schema>;
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/policy/read.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import { type ClientContract } from '../../src/client';
import { PolicyPlugin } from '../../src/plugins/policy/plugin';
import { createClientSpecs } from '../client-api/client-specs';
import { schema } from '../test-schema';
import { schema } from '../schemas/basic';

const PG_DB_NAME = 'policy-read-tests';

Expand Down
17 changes: 4 additions & 13 deletions packages/runtime/test/policy/todo-sample.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
import { generateTsSchemaFromFile } from '@zenstackhq/testtools';
import path from 'node:path';
import { beforeAll, describe, expect, it } from 'vitest';
import type { SchemaDef } from '../../src/schema';
import { describe, expect, it } from 'vitest';
import { schema } from '../schemas/todo/schema';
import { createPolicyTestClient } from './utils';

describe('todo sample tests', () => {
let schema: SchemaDef;

beforeAll(async () => {
const r = await generateTsSchemaFromFile(path.join(__dirname, '../schemas/todo.zmodel'));
schema = r.schema;
});

it('works with user CRUD', async () => {
const user1 = {
id: 'user1',
Expand Down Expand Up @@ -383,13 +374,13 @@ describe('todo sample tests', () => {
where: { id: 'space1' },
include: { lists: true },
});
expect(r.lists).toHaveLength(2);
expect(r?.lists).toHaveLength(2);

const r1 = await user2Db.space.findFirst({
where: { id: 'space1' },
include: { lists: true },
});
expect(r1.lists).toHaveLength(1);
expect(r1?.lists).toHaveLength(1);
});

// TODO: `future()` support
Expand Down
14 changes: 13 additions & 1 deletion packages/runtime/test/policy/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import type { ClientContract } from '../../src';
import { PolicyPlugin } from '../../src/plugins/policy';
import type { SchemaDef } from '../../src/schema';
import { createTestClient, type CreateTestClientOptions } from '../utils';

export function createPolicyTestClient(schema: string | SchemaDef, options?: CreateTestClientOptions<SchemaDef>) {
export async function createPolicyTestClient<Schema extends SchemaDef>(
schema: Schema,
options?: CreateTestClientOptions<Schema>,
): Promise<ClientContract<Schema>>;
export async function createPolicyTestClient<Schema extends SchemaDef>(
schema: string,
options?: CreateTestClientOptions<Schema>,
): Promise<any>;
export async function createPolicyTestClient<Schema extends SchemaDef>(
schema: Schema | string,
options?: CreateTestClientOptions<Schema>,
): Promise<any> {
return createTestClient(
schema as any,
{
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime/test/query-builder/query-builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createId } from '@paralleldrive/cuid2';
import SQLite from 'better-sqlite3';
import { describe, expect, it } from 'vitest';
import { ZenStackClient } from '../../src';
import { getSchema } from '../test-schema';
import { getSchema } from '../schemas/basic';

describe('Client API tests', () => {
const schema = getSchema('sqlite');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/* eslint-disable */

import { type SchemaDef, ExpressionUtils } from "../../dist/schema";
import { type SchemaDef, ExpressionUtils } from "../../../dist/schema";
export const schema = {
provider: {
type: "sqlite"
Expand Down
110 changes: 110 additions & 0 deletions packages/runtime/test/schemas/todo/input.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
//////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT MODIFY THIS FILE //
// This file is automatically generated by ZenStack CLI and should not be manually updated. //
//////////////////////////////////////////////////////////////////////////////////////////////

/* eslint-disable */

import { type SchemaType as $Schema } from "./schema";
import type { FindManyArgs as $FindManyArgs, FindUniqueArgs as $FindUniqueArgs, FindFirstArgs as $FindFirstArgs, 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 } from "@zenstackhq/runtime";
import type { SimplifiedModelResult as $SimplifiedModelResult, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/runtime";
export type SpaceFindManyArgs = $FindManyArgs<$Schema, "Space">;
export type SpaceFindUniqueArgs = $FindUniqueArgs<$Schema, "Space">;
export type SpaceFindFirstArgs = $FindFirstArgs<$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>> = $SimplifiedModelResult<$Schema, "Space", Args>;
export type SpaceUserFindManyArgs = $FindManyArgs<$Schema, "SpaceUser">;
export type SpaceUserFindUniqueArgs = $FindUniqueArgs<$Schema, "SpaceUser">;
export type SpaceUserFindFirstArgs = $FindFirstArgs<$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>> = $SimplifiedModelResult<$Schema, "SpaceUser", Args>;
export type UserFindManyArgs = $FindManyArgs<$Schema, "User">;
export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">;
export type UserFindFirstArgs = $FindFirstArgs<$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>> = $SimplifiedModelResult<$Schema, "User", Args>;
export type ListFindManyArgs = $FindManyArgs<$Schema, "List">;
export type ListFindUniqueArgs = $FindUniqueArgs<$Schema, "List">;
export type ListFindFirstArgs = $FindFirstArgs<$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>> = $SimplifiedModelResult<$Schema, "List", Args>;
export type TodoFindManyArgs = $FindManyArgs<$Schema, "Todo">;
export type TodoFindUniqueArgs = $FindUniqueArgs<$Schema, "Todo">;
export type TodoFindFirstArgs = $FindFirstArgs<$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>> = $SimplifiedModelResult<$Schema, "Todo", Args>;
14 changes: 14 additions & 0 deletions packages/runtime/test/schemas/todo/models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//////////////////////////////////////////////////////////////////////////////////////////////
// DO NOT MODIFY THIS FILE //
// This file is automatically generated by ZenStack CLI and should not be manually updated. //
//////////////////////////////////////////////////////////////////////////////////////////////

/* eslint-disable */

import { type SchemaType as $Schema } from "./schema";
import { type ModelResult as $ModelResult } from "@zenstackhq/runtime";
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">;
Loading