@zenstackhq/tanstack-query 3.0.0-beta.28 → 3.0.0-beta.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,8 +6,8 @@
6
6
  /* eslint-disable */
7
7
 
8
8
  import { type SchemaType as $Schema } from "./schema-lite";
9
- 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, ClientOptions as $ClientOptions } from "@zenstackhq/orm";
10
- import type { SimplifiedModelResult as $SimplifiedModelResult, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm";
9
+ 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, QueryOptions as $QueryOptions } from "@zenstackhq/orm";
10
+ import type { SimplifiedPlainResult as $Result, SelectIncludeOmit as $SelectIncludeOmit } from "@zenstackhq/orm";
11
11
  export type UserFindManyArgs = $FindManyArgs<$Schema, "User">;
12
12
  export type UserFindUniqueArgs = $FindUniqueArgs<$Schema, "User">;
13
13
  export type UserFindFirstArgs = $FindFirstArgs<$Schema, "User">;
@@ -27,7 +27,7 @@ export type UserWhereInput = $WhereInput<$Schema, "User">;
27
27
  export type UserSelect = $SelectInput<$Schema, "User">;
28
28
  export type UserInclude = $IncludeInput<$Schema, "User">;
29
29
  export type UserOmit = $OmitInput<$Schema, "User">;
30
- export type UserGetPayload<Args extends $SelectIncludeOmit<$Schema, "User", true>, Options extends $ClientOptions<$Schema> = $ClientOptions<$Schema>> = $SimplifiedModelResult<$Schema, "User", Options, Args>;
30
+ export type UserGetPayload<Args extends $SelectIncludeOmit<$Schema, "User", true>, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "User", Args, Options>;
31
31
  export type PostFindManyArgs = $FindManyArgs<$Schema, "Post">;
32
32
  export type PostFindUniqueArgs = $FindUniqueArgs<$Schema, "Post">;
33
33
  export type PostFindFirstArgs = $FindFirstArgs<$Schema, "Post">;
@@ -47,7 +47,7 @@ export type PostWhereInput = $WhereInput<$Schema, "Post">;
47
47
  export type PostSelect = $SelectInput<$Schema, "Post">;
48
48
  export type PostInclude = $IncludeInput<$Schema, "Post">;
49
49
  export type PostOmit = $OmitInput<$Schema, "Post">;
50
- export type PostGetPayload<Args extends $SelectIncludeOmit<$Schema, "Post", true>, Options extends $ClientOptions<$Schema> = $ClientOptions<$Schema>> = $SimplifiedModelResult<$Schema, "Post", Options, Args>;
50
+ export type PostGetPayload<Args extends $SelectIncludeOmit<$Schema, "Post", true>, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Post", Args, Options>;
51
51
  export type CategoryFindManyArgs = $FindManyArgs<$Schema, "Category">;
52
52
  export type CategoryFindUniqueArgs = $FindUniqueArgs<$Schema, "Category">;
53
53
  export type CategoryFindFirstArgs = $FindFirstArgs<$Schema, "Category">;
@@ -67,7 +67,7 @@ export type CategoryWhereInput = $WhereInput<$Schema, "Category">;
67
67
  export type CategorySelect = $SelectInput<$Schema, "Category">;
68
68
  export type CategoryInclude = $IncludeInput<$Schema, "Category">;
69
69
  export type CategoryOmit = $OmitInput<$Schema, "Category">;
70
- export type CategoryGetPayload<Args extends $SelectIncludeOmit<$Schema, "Category", true>, Options extends $ClientOptions<$Schema> = $ClientOptions<$Schema>> = $SimplifiedModelResult<$Schema, "Category", Options, Args>;
70
+ export type CategoryGetPayload<Args extends $SelectIncludeOmit<$Schema, "Category", true>, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Category", Args, Options>;
71
71
  export type FooFindManyArgs = $FindManyArgs<$Schema, "Foo">;
72
72
  export type FooFindUniqueArgs = $FindUniqueArgs<$Schema, "Foo">;
73
73
  export type FooFindFirstArgs = $FindFirstArgs<$Schema, "Foo">;
@@ -87,7 +87,7 @@ export type FooWhereInput = $WhereInput<$Schema, "Foo">;
87
87
  export type FooSelect = $SelectInput<$Schema, "Foo">;
88
88
  export type FooInclude = $IncludeInput<$Schema, "Foo">;
89
89
  export type FooOmit = $OmitInput<$Schema, "Foo">;
90
- export type FooGetPayload<Args extends $SelectIncludeOmit<$Schema, "Foo", true>, Options extends $ClientOptions<$Schema> = $ClientOptions<$Schema>> = $SimplifiedModelResult<$Schema, "Foo", Options, Args>;
90
+ export type FooGetPayload<Args extends $SelectIncludeOmit<$Schema, "Foo", true>, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Foo", Args, Options>;
91
91
  export type BarFindManyArgs = $FindManyArgs<$Schema, "Bar">;
92
92
  export type BarFindUniqueArgs = $FindUniqueArgs<$Schema, "Bar">;
93
93
  export type BarFindFirstArgs = $FindFirstArgs<$Schema, "Bar">;
@@ -107,4 +107,4 @@ export type BarWhereInput = $WhereInput<$Schema, "Bar">;
107
107
  export type BarSelect = $SelectInput<$Schema, "Bar">;
108
108
  export type BarInclude = $IncludeInput<$Schema, "Bar">;
109
109
  export type BarOmit = $OmitInput<$Schema, "Bar">;
110
- export type BarGetPayload<Args extends $SelectIncludeOmit<$Schema, "Bar", true>, Options extends $ClientOptions<$Schema> = $ClientOptions<$Schema>> = $SimplifiedModelResult<$Schema, "Bar", Options, Args>;
110
+ export type BarGetPayload<Args extends $SelectIncludeOmit<$Schema, "Bar", true>, Options extends $QueryOptions<$Schema> = $QueryOptions<$Schema>> = $Result<$Schema, "Bar", Args, Options>;
@@ -6,11 +6,11 @@
6
6
  /* eslint-disable */
7
7
 
8
8
  import { type SchemaDef, ExpressionUtils } from "@zenstackhq/orm/schema";
9
- const _schema = {
10
- provider: {
9
+ export class SchemaType implements SchemaDef {
10
+ provider = {
11
11
  type: "sqlite"
12
- },
13
- models: {
12
+ } as const;
13
+ models = {
14
14
  User: {
15
15
  name: "User",
16
16
  fields: {
@@ -165,12 +165,8 @@ const _schema = {
165
165
  id: { type: "String" }
166
166
  }
167
167
  }
168
- },
169
- authType: "User",
170
- plugins: {}
171
- } as const satisfies SchemaDef;
172
- type Schema = typeof _schema & {
173
- __brand?: "schema";
174
- };
175
- export const schema: Schema = _schema;
176
- export type SchemaType = Schema;
168
+ } as const;
169
+ authType = "User" as const;
170
+ plugins = {};
171
+ }
172
+ export const schema = new SchemaType();