convex 0.12.1 → 0.12.2-nobin
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.
- package/api-extractor-configs/temp/api-tmp.api.md +27 -10
- package/api-extractor-configs/temp/browser-tmp.api.md +39 -33
- package/api-extractor-configs/temp/react-clerk-tmp.api.md +1 -2
- package/api-extractor-configs/temp/react-tmp.api.md +40 -23
- package/api-extractor-configs/temp/schema-tmp.api.md +8 -49
- package/api-extractor-configs/temp/server-tmp.api.md +75 -57
- package/api-extractor-configs/temp/values-tmp.api.md +94 -0
- package/dist/browser.bundle.js +1 -1
- package/dist/browser.bundle.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-clerk/ConvexProviderWithClerk.js.map +2 -2
- package/dist/cli.bundle.cjs +1 -1
- package/dist/cli.bundle.cjs.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react-clerk/ConvexProviderWithClerk.js.map +2 -2
- package/dist/react.bundle.js +1 -1
- package/dist/react.bundle.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/react-clerk/ConvexProviderWithClerk.d.ts +1 -2
- package/dist/types/react-clerk/ConvexProviderWithClerk.d.ts.map +1 -1
- package/dist/types/react-clerk/react-clerk-internal.d.ts +1 -2
- package/dist/types/react-clerk/react-clerk.d.ts +1 -2
- package/package.json +1 -4
- package/src/index.ts +1 -1
- package/src/react-clerk/ConvexProviderWithClerk.tsx +2 -2
|
@@ -32,14 +32,25 @@ export type ApiFromModules<Modules extends Record<string, Record<string, any>>>
|
|
|
32
32
|
}>>>;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
// Warning: (ae-forgotten-export) The symbol "Value" needs to be exported by the entry point index.d.ts
|
|
36
|
+
//
|
|
37
|
+
// @public
|
|
38
|
+
export type ArgsAndOptions<F extends (args?: Record<string, Value>) => any, Options> = Parameters<F>["length"] extends 0 ? [
|
|
39
|
+
args?: {},
|
|
40
|
+
options?: Options
|
|
41
|
+
] : [args: Parameters<F>[0], options?: Options];
|
|
42
|
+
|
|
43
|
+
// @public
|
|
44
|
+
export type ArgsObject<F extends (args?: Record<string, Value>) => any> = Parameters<F>["length"] extends 0 ? {} : Parameters<F>[0] & Record<string, Value>;
|
|
45
|
+
|
|
35
46
|
// @public
|
|
36
47
|
export type GenericAPI = {
|
|
37
|
-
publicQueries: Record<string,
|
|
38
|
-
allQueries: Record<string,
|
|
39
|
-
publicMutations: Record<string,
|
|
40
|
-
allMutations: Record<string,
|
|
41
|
-
publicActions: Record<string,
|
|
42
|
-
allActions: Record<string,
|
|
48
|
+
publicQueries: Record<string, ConvexFunction>;
|
|
49
|
+
allQueries: Record<string, ConvexFunction>;
|
|
50
|
+
publicMutations: Record<string, ConvexFunction>;
|
|
51
|
+
allMutations: Record<string, ConvexFunction>;
|
|
52
|
+
publicActions: Record<string, ConvexFunction>;
|
|
53
|
+
allActions: Record<string, ConvexFunction>;
|
|
43
54
|
};
|
|
44
55
|
|
|
45
56
|
// @public
|
|
@@ -54,6 +65,11 @@ export type NamedMutation<API extends GenericAPI, Name extends MutationNames<API
|
|
|
54
65
|
// @public
|
|
55
66
|
export type NamedQuery<API extends GenericAPI, Name extends QueryNames<API>> = API["allQueries"][Name];
|
|
56
67
|
|
|
68
|
+
// @public
|
|
69
|
+
export type OptionalRestArgs<F extends (args?: Record<string, Value>) => any> = Parameters<F>["length"] extends 0 ? [
|
|
70
|
+
args?: {}
|
|
71
|
+
] : [args: Parameters<F>[0]];
|
|
72
|
+
|
|
57
73
|
// @public
|
|
58
74
|
export type PublicActionNames<API extends GenericAPI> = keyof API["publicActions"] & string;
|
|
59
75
|
|
|
@@ -68,10 +84,11 @@ export type QueryNames<API extends GenericAPI> = keyof API["allQueries"] & strin
|
|
|
68
84
|
|
|
69
85
|
// Warnings were encountered during analysis:
|
|
70
86
|
//
|
|
71
|
-
// src/api/index.ts:
|
|
72
|
-
// src/api/index.ts:
|
|
73
|
-
// src/api/index.ts:
|
|
74
|
-
// src/api/index.ts:
|
|
87
|
+
// src/api/index.ts:20:3 - (ae-forgotten-export) The symbol "ConvexFunction" needs to be exported by the entry point index.d.ts
|
|
88
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "Expand" needs to be exported by the entry point index.d.ts
|
|
89
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "ConvertToClientFunctions" needs to be exported by the entry point index.d.ts
|
|
90
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "PickByValue" needs to be exported by the entry point index.d.ts
|
|
91
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "MergeAllExports" needs to be exported by the entry point index.d.ts
|
|
75
92
|
|
|
76
93
|
// (No @packageDocumentation comment for this package)
|
|
77
94
|
|
|
@@ -32,6 +32,17 @@ export type ApiFromModules<Modules extends Record<string, Record<string, any>>>
|
|
|
32
32
|
}>>>;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
+
// Warning: (ae-forgotten-export) The symbol "Value" needs to be exported by the entry point index.d.ts
|
|
36
|
+
//
|
|
37
|
+
// @public
|
|
38
|
+
export type ArgsAndOptions<F extends (args?: Record<string, Value>) => any, Options> = Parameters<F>["length"] extends 0 ? [
|
|
39
|
+
args?: {},
|
|
40
|
+
options?: Options
|
|
41
|
+
] : [args: Parameters<F>[0], options?: Options];
|
|
42
|
+
|
|
43
|
+
// @public
|
|
44
|
+
export type ArgsObject<F extends (args?: Record<string, Value>) => any> = Parameters<F>["length"] extends 0 ? {} : Parameters<F>[0] & Record<string, Value>;
|
|
45
|
+
|
|
35
46
|
// @public
|
|
36
47
|
export interface ClientOptions {
|
|
37
48
|
unsavedChangesWarning?: boolean;
|
|
@@ -42,11 +53,11 @@ export interface ClientOptions {
|
|
|
42
53
|
// @public
|
|
43
54
|
export class ConvexHttpClient<API extends GenericAPI> {
|
|
44
55
|
constructor(address: string);
|
|
45
|
-
action<Name extends PublicActionNames<API>>(name: Name
|
|
56
|
+
action<Name extends PublicActionNames<API>>(name: Name, ...args: OptionalRestArgs<NamedAction<API, Name>>): Promise<ReturnType<NamedAction<API, Name>>>;
|
|
46
57
|
backendUrl(): string;
|
|
47
58
|
clearAuth(): void;
|
|
48
|
-
mutation<Name extends PublicMutationNames<API>>(name: Name
|
|
49
|
-
query<Name extends PublicQueryNames<API>>(name: Name
|
|
59
|
+
mutation<Name extends PublicMutationNames<API>>(name: Name, ...args: OptionalRestArgs<NamedMutation<API, Name>>): Promise<ReturnType<NamedMutation<API, Name>>>;
|
|
60
|
+
query<Name extends PublicQueryNames<API>>(name: Name, ...args: OptionalRestArgs<NamedQuery<API, Name>>): Promise<ReturnType<NamedQuery<API, Name>>>;
|
|
50
61
|
setAuth(value: string): void;
|
|
51
62
|
// @internal
|
|
52
63
|
setDebug(debug: boolean): void;
|
|
@@ -54,19 +65,19 @@ export class ConvexHttpClient<API extends GenericAPI> {
|
|
|
54
65
|
|
|
55
66
|
// @public
|
|
56
67
|
export type GenericAPI = {
|
|
57
|
-
publicQueries: Record<string,
|
|
58
|
-
allQueries: Record<string,
|
|
59
|
-
publicMutations: Record<string,
|
|
60
|
-
allMutations: Record<string,
|
|
61
|
-
publicActions: Record<string,
|
|
62
|
-
allActions: Record<string,
|
|
68
|
+
publicQueries: Record<string, ConvexFunction>;
|
|
69
|
+
allQueries: Record<string, ConvexFunction>;
|
|
70
|
+
publicMutations: Record<string, ConvexFunction>;
|
|
71
|
+
allMutations: Record<string, ConvexFunction>;
|
|
72
|
+
publicActions: Record<string, ConvexFunction>;
|
|
73
|
+
allActions: Record<string, ConvexFunction>;
|
|
63
74
|
};
|
|
64
75
|
|
|
65
76
|
// @public
|
|
66
77
|
export class InternalConvexClient {
|
|
67
78
|
constructor(address: string, onTransition: (updatedQueries: QueryToken[]) => void, options?: ClientOptions);
|
|
68
79
|
// (undocumented)
|
|
69
|
-
action
|
|
80
|
+
action(udfPath: string, args: Record<string, Value>): Promise<any>;
|
|
70
81
|
// (undocumented)
|
|
71
82
|
clearAuth(): void;
|
|
72
83
|
// (undocumented)
|
|
@@ -75,28 +86,22 @@ export class InternalConvexClient {
|
|
|
75
86
|
connectionState(): ConnectionState;
|
|
76
87
|
// (undocumented)
|
|
77
88
|
hasAuth(): boolean;
|
|
78
|
-
|
|
79
|
-
localQueryResult(udfPath: string, args: any[]): Value | undefined;
|
|
89
|
+
localQueryResult(udfPath: string, args: Record<string, Value>): Value | undefined;
|
|
80
90
|
// (undocumented)
|
|
81
|
-
mutate<Args extends
|
|
82
|
-
queryJournal(name: string, args:
|
|
91
|
+
mutate<Args extends Record<string, Value>>(udfPath: string, args: Args, optimisticUpdate?: OptimisticUpdate<GenericAPI, Args> | null): Promise<any>;
|
|
92
|
+
queryJournal(name: string, args: Record<string, Value>): QueryJournal | undefined;
|
|
83
93
|
// @internal (undocumented)
|
|
84
94
|
setAdminAuth(value: string, fakeUserIdentity?: UserIdentityAttributes): void;
|
|
85
95
|
// Warning: (ae-forgotten-export) The symbol "AuthTokenFetcher" needs to be exported by the entry point index.d.ts
|
|
86
96
|
//
|
|
87
97
|
// (undocumented)
|
|
88
98
|
setAuth(fetchToken: AuthTokenFetcher): Promise<void>;
|
|
89
|
-
subscribe(name: string, args
|
|
99
|
+
subscribe(name: string, args?: Record<string, Value>, journal?: QueryJournal): {
|
|
90
100
|
queryToken: QueryToken;
|
|
91
101
|
unsubscribe: () => void;
|
|
92
102
|
};
|
|
93
103
|
}
|
|
94
104
|
|
|
95
|
-
// @public
|
|
96
|
-
export interface Mutation<F extends (...args: any[]) => Promise<any>> {
|
|
97
|
-
(...args: Parameters<F>): Promise<Awaited<ReturnType<F>>>;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
105
|
// @public
|
|
101
106
|
export type MutationNames<API extends GenericAPI> = keyof API["allMutations"] & string;
|
|
102
107
|
|
|
@@ -112,15 +117,20 @@ export type NamedQuery<API extends GenericAPI, Name extends QueryNames<API>> = A
|
|
|
112
117
|
// @public
|
|
113
118
|
export interface OptimisticLocalStore<API extends GenericAPI = GenericAPI> {
|
|
114
119
|
getAllQueries<Name extends PublicQueryNames<API>>(name: Name): {
|
|
115
|
-
args:
|
|
120
|
+
args: ArgsObject<NamedQuery<API, Name>>;
|
|
116
121
|
value: undefined | ReturnType<NamedQuery<API, Name>>;
|
|
117
122
|
}[];
|
|
118
|
-
getQuery<Name extends PublicQueryNames<API>>(name: Name, args:
|
|
119
|
-
setQuery<Name extends PublicQueryNames<API>>(name: Name, args:
|
|
123
|
+
getQuery<Name extends PublicQueryNames<API>>(name: Name, ...args: OptionalRestArgs<NamedQuery<API, Name>>): undefined | ReturnType<NamedQuery<API, Name>>;
|
|
124
|
+
setQuery<Name extends PublicQueryNames<API>>(name: Name, args: ArgsObject<NamedQuery<API, Name>>, value: undefined | ReturnType<NamedQuery<API, Name>>): void;
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
// @public
|
|
123
|
-
export type OptimisticUpdate<API extends GenericAPI,
|
|
128
|
+
export type OptimisticUpdate<API extends GenericAPI, Args extends Record<string, Value>> = (localQueryStore: OptimisticLocalStore<API>, args: Args) => void;
|
|
129
|
+
|
|
130
|
+
// @public
|
|
131
|
+
export type OptionalRestArgs<F extends (args?: Record<string, Value>) => any> = Parameters<F>["length"] extends 0 ? [
|
|
132
|
+
args?: {}
|
|
133
|
+
] : [args: Parameters<F>[0]];
|
|
124
134
|
|
|
125
135
|
// @public
|
|
126
136
|
export type PublicActionNames<API extends GenericAPI> = keyof API["publicActions"] & string;
|
|
@@ -131,11 +141,6 @@ export type PublicMutationNames<API extends GenericAPI> = keyof API["publicMutat
|
|
|
131
141
|
// @public
|
|
132
142
|
export type PublicQueryNames<API extends GenericAPI> = keyof API["publicQueries"] & string;
|
|
133
143
|
|
|
134
|
-
// @public
|
|
135
|
-
export interface Query<F extends (...args: any[]) => Promise<any>> {
|
|
136
|
-
(...args: Parameters<F>): Promise<Awaited<ReturnType<F>>>;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
144
|
// @public
|
|
140
145
|
export type QueryJournal = string | null;
|
|
141
146
|
|
|
@@ -164,10 +169,11 @@ export type UserIdentityAttributes = Omit<UserIdentity, "updatedAt" | "issuer">
|
|
|
164
169
|
|
|
165
170
|
// Warnings were encountered during analysis:
|
|
166
171
|
//
|
|
167
|
-
// src/api/index.ts:
|
|
168
|
-
// src/api/index.ts:
|
|
169
|
-
// src/api/index.ts:
|
|
170
|
-
// src/api/index.ts:
|
|
172
|
+
// src/api/index.ts:20:3 - (ae-forgotten-export) The symbol "ConvexFunction" needs to be exported by the entry point index.d.ts
|
|
173
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "Expand" needs to be exported by the entry point index.d.ts
|
|
174
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "ConvertToClientFunctions" needs to be exported by the entry point index.d.ts
|
|
175
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "PickByValue" needs to be exported by the entry point index.d.ts
|
|
176
|
+
// src/api/index.ts:227:3 - (ae-forgotten-export) The symbol "MergeAllExports" needs to be exported by the entry point index.d.ts
|
|
171
177
|
|
|
172
178
|
// (No @packageDocumentation comment for this package)
|
|
173
179
|
|
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
import { ClerkProviderProps } from '@clerk/clerk-react';
|
|
8
7
|
import { ReactNode } from 'react';
|
|
9
8
|
|
|
10
9
|
// @public
|
|
11
10
|
export function ConvexProviderWithClerk({ children, client, }: {
|
|
12
11
|
children: ReactNode;
|
|
13
12
|
client: IConvexReactClient;
|
|
14
|
-
}
|
|
13
|
+
}): JSX.Element;
|
|
15
14
|
|
|
16
15
|
// Warnings were encountered during analysis:
|
|
17
16
|
//
|
|
@@ -10,15 +10,17 @@ import { ReactNode } from 'react';
|
|
|
10
10
|
// @public
|
|
11
11
|
export function Authenticated({ children }: {
|
|
12
12
|
children: ReactNode;
|
|
13
|
-
}):
|
|
13
|
+
}): JSX.Element | null;
|
|
14
14
|
|
|
15
15
|
// @public
|
|
16
16
|
export function AuthLoading({ children }: {
|
|
17
17
|
children: ReactNode;
|
|
18
|
-
}):
|
|
18
|
+
}): JSX.Element | null;
|
|
19
19
|
|
|
20
20
|
// @public
|
|
21
|
-
export type AuthTokenFetcher = (
|
|
21
|
+
export type AuthTokenFetcher = (args: {
|
|
22
|
+
forceRefreshToken: boolean;
|
|
23
|
+
}) => Promise<string | null | undefined>;
|
|
22
24
|
|
|
23
25
|
// @public
|
|
24
26
|
export type ConvexAuthState = {
|
|
@@ -39,7 +41,9 @@ export function ConvexProviderWithAuth({ children, client, useAuth, }: {
|
|
|
39
41
|
useAuth: () => {
|
|
40
42
|
isLoading: boolean;
|
|
41
43
|
isAuthenticated: boolean;
|
|
42
|
-
fetchAccessToken: (
|
|
44
|
+
fetchAccessToken: (args: {
|
|
45
|
+
forceRefreshToken: boolean;
|
|
46
|
+
}) => Promise<string | null>;
|
|
43
47
|
};
|
|
44
48
|
}): JSX.Element;
|
|
45
49
|
|
|
@@ -62,9 +66,10 @@ export class ConvexReactClient<API extends GenericAPI> {
|
|
|
62
66
|
setAdminAuth(token: string, identity?: UserIdentityAttributes): void;
|
|
63
67
|
setAuth(fetchToken: AuthTokenFetcher): Promise<void>;
|
|
64
68
|
// Warning: (ae-forgotten-export) The symbol "PublicQueryNames" needs to be exported by the entry point index.d.ts
|
|
69
|
+
// Warning: (ae-forgotten-export) The symbol "ArgsObject" needs to be exported by the entry point index.d.ts
|
|
65
70
|
// Warning: (ae-forgotten-export) The symbol "NamedQuery" needs to be exported by the entry point index.d.ts
|
|
66
71
|
// Warning: (ae-forgotten-export) The symbol "QueryJournal" needs to be exported by the entry point index.d.ts
|
|
67
|
-
watchQuery<Name extends PublicQueryNames<API>>(name: Name, args:
|
|
72
|
+
watchQuery<Name extends PublicQueryNames<API>>(name: Name, args: ArgsObject<NamedQuery<API, Name>>, journal?: QueryJournal): Watch<ReturnType<NamedQuery<API, Name>>>;
|
|
68
73
|
}
|
|
69
74
|
|
|
70
75
|
// Warning: (ae-forgotten-export) The symbol "OptimisticLocalStore" needs to be exported by the entry point index.d.ts
|
|
@@ -72,14 +77,18 @@ export class ConvexReactClient<API extends GenericAPI> {
|
|
|
72
77
|
// @public
|
|
73
78
|
export function optimisticallyUpdateValueInPaginatedQuery<API extends GenericAPI, Name extends PaginatedQueryNames<API>>(localStore: OptimisticLocalStore<API>, name: Name, args: PaginatedQueryArgs<NamedQuery<API, Name>>, updateValue: (currentValue: PaginatedQueryReturnType<NamedQuery<API, Name>>) => PaginatedQueryReturnType<NamedQuery<API, Name>>): void;
|
|
74
79
|
|
|
80
|
+
// Warning: (ae-forgotten-export) The symbol "Expand" needs to be exported by the entry point index.d.ts
|
|
81
|
+
// Warning: (ae-forgotten-export) The symbol "BetterOmit" needs to be exported by the entry point index.d.ts
|
|
82
|
+
//
|
|
75
83
|
// @public
|
|
76
|
-
export type PaginatedQueryArgs<Query extends PaginatedQueryFunction<any, any>> = Query
|
|
84
|
+
export type PaginatedQueryArgs<Query extends PaginatedQueryFunction<any, any>> = Expand<BetterOmit<Parameters<Query>[0], "paginationOpts">>;
|
|
77
85
|
|
|
78
|
-
// Warning: (ae-forgotten-export) The symbol "PaginationOptions" needs to be exported by the entry point index.d.ts
|
|
79
86
|
// Warning: (ae-forgotten-export) The symbol "PaginationResult" needs to be exported by the entry point index.d.ts
|
|
80
87
|
//
|
|
81
88
|
// @public
|
|
82
|
-
export type PaginatedQueryFunction<Args extends
|
|
89
|
+
export type PaginatedQueryFunction<Args extends object, ReturnType> = (args: {
|
|
90
|
+
paginationOpts: PaginationOptions;
|
|
91
|
+
} & Args) => PaginationResult<ReturnType>;
|
|
83
92
|
|
|
84
93
|
// Warning: (ae-forgotten-export) The symbol "PickByValue" needs to be exported by the entry point index.d.ts
|
|
85
94
|
//
|
|
@@ -91,8 +100,9 @@ export type PaginatedQueryReturnType<Query extends PaginatedQueryFunction<any, a
|
|
|
91
100
|
|
|
92
101
|
// @public
|
|
93
102
|
export interface ReactAction<API extends GenericAPI, Name extends PublicActionNames<API>> {
|
|
103
|
+
// Warning: (ae-forgotten-export) The symbol "OptionalRestArgs" needs to be exported by the entry point index.d.ts
|
|
94
104
|
// Warning: (ae-forgotten-export) The symbol "NamedAction" needs to be exported by the entry point index.d.ts
|
|
95
|
-
(...args:
|
|
105
|
+
(...args: OptionalRestArgs<NamedAction<API, Name>>): Promise<ReturnType<NamedAction<API, Name>>>;
|
|
96
106
|
}
|
|
97
107
|
|
|
98
108
|
// @public
|
|
@@ -105,21 +115,21 @@ export interface ReactClientOptions {
|
|
|
105
115
|
// @public
|
|
106
116
|
export interface ReactMutation<API extends GenericAPI, Name extends PublicMutationNames<API>> {
|
|
107
117
|
// Warning: (ae-forgotten-export) The symbol "NamedMutation" needs to be exported by the entry point index.d.ts
|
|
108
|
-
(...args:
|
|
118
|
+
(...args: OptionalRestArgs<NamedMutation<API, Name>>): Promise<ReturnType<NamedMutation<API, Name>>>;
|
|
109
119
|
// Warning: (ae-forgotten-export) The symbol "OptimisticUpdate" needs to be exported by the entry point index.d.ts
|
|
110
|
-
withOptimisticUpdate(optimisticUpdate: OptimisticUpdate<API,
|
|
120
|
+
withOptimisticUpdate(optimisticUpdate: OptimisticUpdate<API, ArgsObject<NamedMutation<API, Name>>>): ReactMutation<API, Name>;
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
// @public
|
|
114
124
|
export type RequestForQueries = Record<string, {
|
|
115
125
|
name: string;
|
|
116
|
-
args: Value
|
|
126
|
+
args: Record<string, Value>;
|
|
117
127
|
}>;
|
|
118
128
|
|
|
119
129
|
// @public
|
|
120
130
|
export function Unauthenticated({ children }: {
|
|
121
131
|
children: ReactNode;
|
|
122
|
-
}):
|
|
132
|
+
}): JSX.Element | null;
|
|
123
133
|
|
|
124
134
|
// @public
|
|
125
135
|
export type UseActionForAPI<API extends GenericAPI> = <Name extends PublicActionNames<API>>(name: Name) => ReactAction<API, Name>;
|
|
@@ -146,14 +156,14 @@ export type UseMutationForAPI<API extends GenericAPI> = <Name extends PublicMuta
|
|
|
146
156
|
export function useMutationGeneric<API extends GenericAPI, Name extends PublicMutationNames<API>>(name: Name): ReactMutation<API, Name>;
|
|
147
157
|
|
|
148
158
|
// @public
|
|
149
|
-
export type UsePaginatedQueryForAPI<API extends GenericAPI> = <Name extends PaginatedQueryNames<API>>(name: Name, options: {
|
|
159
|
+
export type UsePaginatedQueryForAPI<API extends GenericAPI> = <Name extends PaginatedQueryNames<API>>(name: Name, args: PaginatedQueryArgs<NamedQuery<API, Name>>, options: {
|
|
150
160
|
initialNumItems: number;
|
|
151
|
-
}
|
|
161
|
+
}) => UsePaginatedQueryResult<PaginatedQueryReturnType<NamedQuery<API, Name>>>;
|
|
152
162
|
|
|
153
163
|
// @public
|
|
154
|
-
export function usePaginatedQueryGeneric(name: string, options: {
|
|
164
|
+
export function usePaginatedQueryGeneric(name: string, args: Record<string, Value>, options: {
|
|
155
165
|
initialNumItems: number;
|
|
156
|
-
}
|
|
166
|
+
}): UsePaginatedQueryResult<any>;
|
|
157
167
|
|
|
158
168
|
// @public
|
|
159
169
|
export type UsePaginatedQueryResult<T> = {
|
|
@@ -173,7 +183,7 @@ export type UsePaginatedQueryResult<T> = {
|
|
|
173
183
|
export type UseQueriesForAPI<API extends GenericAPI> = <QueryNameMap extends Record<string, PublicQueryNames<API>>>(queries: {
|
|
174
184
|
[Identifier in keyof QueryNameMap]: {
|
|
175
185
|
name: QueryNameMap[Identifier];
|
|
176
|
-
args:
|
|
186
|
+
args: ArgsObject<NamedQuery<API, QueryNameMap[Identifier]>>;
|
|
177
187
|
};
|
|
178
188
|
}) => {
|
|
179
189
|
[Identifier in keyof QueryNameMap]: ReturnType<NamedQuery<API, QueryNameMap[Identifier]>> | undefined | Error;
|
|
@@ -182,16 +192,22 @@ export type UseQueriesForAPI<API extends GenericAPI> = <QueryNameMap extends Rec
|
|
|
182
192
|
// @public
|
|
183
193
|
export function useQueriesGeneric(queries: RequestForQueries): Record<string, any | undefined | Error>;
|
|
184
194
|
|
|
195
|
+
// Warning: (ae-forgotten-export) The symbol "ArgsAndOptions" needs to be exported by the entry point index.d.ts
|
|
196
|
+
//
|
|
185
197
|
// @public
|
|
186
|
-
export type UseQueryForAPI<API extends GenericAPI> = <Name extends PublicQueryNames<API>>(name: Name, ...
|
|
198
|
+
export type UseQueryForAPI<API extends GenericAPI> = <Name extends PublicQueryNames<API>>(name: Name, ...argsAndOptions: ArgsAndOptions<NamedQuery<API, Name>, UseQueryOptions>) => ReturnType<NamedQuery<API, Name>> | undefined;
|
|
187
199
|
|
|
188
200
|
// @public
|
|
189
|
-
export function useQueryGeneric
|
|
201
|
+
export function useQueryGeneric(name: string, args?: Record<string, Value>, _options?: UseQueryOptions): unknown | undefined;
|
|
190
202
|
|
|
191
203
|
// Warning: (ae-internal-missing-underscore) The name "useQueryInternal" should be prefixed with an underscore because the declaration is marked as @internal
|
|
192
204
|
//
|
|
193
|
-
// @internal
|
|
194
|
-
export function useQueryInternal
|
|
205
|
+
// @internal
|
|
206
|
+
export function useQueryInternal(convex: ConvexReactClient<any>, name: string, args?: Record<string, Value>, _options?: UseQueryOptions): unknown | undefined;
|
|
207
|
+
|
|
208
|
+
// @public
|
|
209
|
+
export interface UseQueryOptions {
|
|
210
|
+
}
|
|
195
211
|
|
|
196
212
|
// @public
|
|
197
213
|
export interface Watch<T> {
|
|
@@ -203,7 +219,8 @@ export interface Watch<T> {
|
|
|
203
219
|
// Warnings were encountered during analysis:
|
|
204
220
|
//
|
|
205
221
|
// src/react/ConvexAuthState.tsx:64:3 - (ae-forgotten-export) The symbol "IConvexReactClient" needs to be exported by the entry point index.d.ts
|
|
206
|
-
// src/react/
|
|
222
|
+
// src/react/use_paginated_query.ts:283:5 - (ae-forgotten-export) The symbol "PaginationOptions" needs to be exported by the entry point index.d.ts
|
|
223
|
+
// src/react/use_queries.ts:161:5 - (ae-forgotten-export) The symbol "Value" needs to be exported by the entry point index.d.ts
|
|
207
224
|
|
|
208
225
|
// (No @packageDocumentation comment for this package)
|
|
209
226
|
|
|
@@ -27,42 +27,21 @@ export interface DefineSchemaOptions<IsStrict extends boolean> {
|
|
|
27
27
|
strict?: IsStrict;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
// Warning: (ae-forgotten-export) The symbol "Validator" needs to be exported by the entry point index.d.ts
|
|
30
31
|
// Warning: (ae-forgotten-export) The symbol "ExtractDocument" needs to be exported by the entry point index.d.ts
|
|
31
32
|
// Warning: (ae-forgotten-export) The symbol "ExtractFieldPaths" needs to be exported by the entry point index.d.ts
|
|
32
33
|
//
|
|
33
34
|
// @public
|
|
34
|
-
export function defineTable<DocumentSchema extends
|
|
35
|
+
export function defineTable<DocumentSchema extends Validator<Record<string, any>, false, any>>(documentSchema: DocumentSchema): TableDefinition<ExtractDocument<DocumentSchema>, ExtractFieldPaths<DocumentSchema>>;
|
|
35
36
|
|
|
36
|
-
// Warning: (ae-forgotten-export) The symbol "
|
|
37
|
+
// Warning: (ae-forgotten-export) The symbol "ObjectValidator" needs to be exported by the entry point index.d.ts
|
|
37
38
|
//
|
|
38
39
|
// @public
|
|
39
|
-
export function defineTable<DocumentSchema extends Record<string,
|
|
40
|
+
export function defineTable<DocumentSchema extends Record<string, Validator<any, any, any>>>(documentSchema: DocumentSchema): TableDefinition<ExtractDocument<ObjectValidator<DocumentSchema>>, ExtractFieldPaths<ObjectValidator<DocumentSchema>>>;
|
|
40
41
|
|
|
41
42
|
// @public
|
|
42
43
|
export type GenericSchema = Record<string, TableDefinition>;
|
|
43
44
|
|
|
44
|
-
// @public
|
|
45
|
-
export type Infer<SType extends SchemaType<any, any, any>> = SType["type"];
|
|
46
|
-
|
|
47
|
-
// @public
|
|
48
|
-
export const s: {
|
|
49
|
-
id<TableName extends string>(tableName: TableName): SchemaType<Id<TableName>, false, never>;
|
|
50
|
-
null(): SchemaType<null>;
|
|
51
|
-
number(): SchemaType<number>;
|
|
52
|
-
bigint(): SchemaType<bigint>;
|
|
53
|
-
boolean(): SchemaType<boolean>;
|
|
54
|
-
string(): SchemaType<string>;
|
|
55
|
-
bytes(): SchemaType<ArrayBuffer>;
|
|
56
|
-
literal<T extends string | number | bigint | boolean>(literal: T): SchemaType<T, false, never>;
|
|
57
|
-
array<T_1>(values: SchemaType<T_1, false, any>): SchemaType<T_1[], false, never>;
|
|
58
|
-
set<T_2>(values: SchemaType<T_2, false, any>): SchemaType<Set<T_2>, false, never>;
|
|
59
|
-
map<K, V>(keys: SchemaType<K, false, any>, values: SchemaType<V, false, any>): SchemaType<Map<K, V>, false, never>;
|
|
60
|
-
object<T_3 extends Record<string, SchemaType<any, any, any>>>(schema: T_3): ObjectSchemaType<T_3>;
|
|
61
|
-
union<T_4 extends [SchemaType<any, false, any>, SchemaType<any, false, any>, ...SchemaType<any, false, any>[]]>(...schemaTypes: T_4): SchemaType<T_4[number]["type"], false, T_4[number]["fieldPaths"]>;
|
|
62
|
-
any(): SchemaType<any, false, string>;
|
|
63
|
-
optional<T_5 extends SchemaType<any, false, any>>(inner: T_5): SchemaType<T_5["type"], true, T_5["fieldPaths"]>;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
45
|
// @public
|
|
67
46
|
export class SchemaDefinition<Schema extends GenericSchema, IsStrict extends boolean> {
|
|
68
47
|
// @internal
|
|
@@ -75,25 +54,6 @@ export class SchemaDefinition<Schema extends GenericSchema, IsStrict extends boo
|
|
|
75
54
|
tables: Schema;
|
|
76
55
|
}
|
|
77
56
|
|
|
78
|
-
// @public
|
|
79
|
-
export class SchemaType<TypeScriptType, IsOptional extends boolean = false, FieldPaths extends string = never> {
|
|
80
|
-
constructor(type: JsonSchemaType, optional: boolean, referencedTableNames?: Set<string>);
|
|
81
|
-
// (undocumented)
|
|
82
|
-
readonly fieldPaths: FieldPaths;
|
|
83
|
-
// (undocumented)
|
|
84
|
-
readonly isOptional: IsOptional;
|
|
85
|
-
// Warning: (ae-forgotten-export) The symbol "JsonSchemaType" needs to be exported by the entry point index.d.ts
|
|
86
|
-
//
|
|
87
|
-
// (undocumented)
|
|
88
|
-
readonly jsonSchemaType: JsonSchemaType;
|
|
89
|
-
// (undocumented)
|
|
90
|
-
readonly optional: boolean;
|
|
91
|
-
// (undocumented)
|
|
92
|
-
readonly referencedTableNames: Set<string>;
|
|
93
|
-
// (undocumented)
|
|
94
|
-
readonly type: TypeScriptType;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
57
|
// @public
|
|
98
58
|
export interface SearchIndexConfig<SearchField extends string, FilterFields extends string> {
|
|
99
59
|
filterFields?: FilterFields[];
|
|
@@ -107,7 +67,7 @@ export interface SearchIndexConfig<SearchField extends string, FilterFields exte
|
|
|
107
67
|
// @public
|
|
108
68
|
export class TableDefinition<Document extends GenericDocument = GenericDocument, FieldPaths extends string = string, Indexes extends GenericTableIndexes = {}, SearchIndexes extends GenericTableSearchIndexes = {}> {
|
|
109
69
|
// @internal
|
|
110
|
-
constructor(documentType:
|
|
70
|
+
constructor(documentType: Validator<any, any, any>);
|
|
111
71
|
// @internal
|
|
112
72
|
export(): {
|
|
113
73
|
indexes: {
|
|
@@ -136,10 +96,9 @@ export class TableDefinition<Document extends GenericDocument = GenericDocument,
|
|
|
136
96
|
|
|
137
97
|
// Warnings were encountered during analysis:
|
|
138
98
|
//
|
|
139
|
-
// src/schema/index.ts:
|
|
140
|
-
// src/schema/index.ts:
|
|
141
|
-
// src/schema/index.ts:
|
|
142
|
-
// src/schema/index.ts:694:13 - (ae-forgotten-export) The symbol "SystemIndexes" needs to be exported by the entry point index.d.ts
|
|
99
|
+
// src/schema/index.ts:448:13 - (ae-forgotten-export) The symbol "Expand" needs to be exported by the entry point index.d.ts
|
|
100
|
+
// src/schema/index.ts:448:13 - (ae-forgotten-export) The symbol "IdField" needs to be exported by the entry point index.d.ts
|
|
101
|
+
// src/schema/index.ts:450:13 - (ae-forgotten-export) The symbol "SystemIndexes" needs to be exported by the entry point index.d.ts
|
|
143
102
|
|
|
144
103
|
// (No @packageDocumentation comment for this package)
|
|
145
104
|
|