convex 0.12.0 → 0.12.2
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/README.md +3 -1
- package/api-extractor-configs/temp/api-tmp.api.md +78 -0
- package/api-extractor-configs/temp/browser-tmp.api.md +174 -0
- package/api-extractor-configs/temp/react-auth0-tmp.api.md +21 -0
- package/api-extractor-configs/temp/react-clerk-tmp.api.md +22 -0
- package/api-extractor-configs/temp/react-tmp.api.md +210 -0
- package/api-extractor-configs/temp/schema-tmp.api.md +146 -0
- package/api-extractor-configs/temp/server-tmp.api.md +517 -0
- package/build.py +10 -1
- 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-auth0/ConvexProviderWithAuth0.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-auth0/ConvexProviderWithAuth0.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-auth0/ConvexProviderWithAuth0.d.ts +1 -2
- package/dist/types/react-auth0/ConvexProviderWithAuth0.d.ts.map +1 -1
- package/dist/types/react-clerk/ConvexProviderWithClerk.d.ts +2 -4
- package/dist/types/react-clerk/ConvexProviderWithClerk.d.ts.map +1 -1
- package/dist/types/react-clerk/react-clerk-internal.d.ts +35 -0
- package/dist/types/react-clerk/react-clerk.d.ts +35 -0
- package/package.json +2 -2
- package/react-clerk-api-extractor.json +18 -0
- package/src/index.ts +1 -1
- package/src/react-auth0/ConvexProviderWithAuth0.tsx +1 -1
- package/src/react-clerk/ConvexProviderWithClerk.tsx +3 -3
- /package/dist/types/{react → react-auth0}/react-auth0-internal.d.ts +0 -0
package/README.md
CHANGED
|
@@ -25,8 +25,10 @@ This package includes several separate entry points for building apps on Convex:
|
|
|
25
25
|
working with values stored in Convex.
|
|
26
26
|
- [`convex/schema`](https://docs.convex.dev/api/modules/schema): Utilities for
|
|
27
27
|
defining the schema of your Convex project.
|
|
28
|
-
- [`convex/react-auth0`](https://docs.convex.dev/api/modules/
|
|
28
|
+
- [`convex/react-auth0`](https://docs.convex.dev/api/modules/react_auth0): A React
|
|
29
29
|
component for authenticating users with Auth0.
|
|
30
|
+
- [`convex/react-clerk`](https://docs.convex.dev/api/modules/react_clerk): A React
|
|
31
|
+
component for authenticating users with Clerk.
|
|
30
32
|
|
|
31
33
|
This package also includes [`convex`](https://docs.convex.dev/using/cli), a
|
|
32
34
|
command-line interface for managing Convex projects.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
## API Report File for "convex"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @public
|
|
8
|
+
export type ActionNames<API extends GenericAPI> = keyof API["allActions"] & string;
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export type ApiFromModules<Modules extends Record<string, Record<string, any>>> = {
|
|
12
|
+
publicQueries: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
13
|
+
isQuery: true;
|
|
14
|
+
isPublic: true;
|
|
15
|
+
}>>>;
|
|
16
|
+
allQueries: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
17
|
+
isQuery: true;
|
|
18
|
+
}>>>;
|
|
19
|
+
publicMutations: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
20
|
+
isMutation: true;
|
|
21
|
+
isPublic: true;
|
|
22
|
+
}>>>;
|
|
23
|
+
allMutations: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
24
|
+
isMutation: true;
|
|
25
|
+
}>>>;
|
|
26
|
+
publicActions: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
27
|
+
isAction: true;
|
|
28
|
+
isPublic: true;
|
|
29
|
+
}>>>;
|
|
30
|
+
allActions: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
31
|
+
isAction: true;
|
|
32
|
+
}>>>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// @public
|
|
36
|
+
export type GenericAPI = {
|
|
37
|
+
publicQueries: Record<string, (...args: any[]) => any>;
|
|
38
|
+
allQueries: Record<string, (...args: any[]) => any>;
|
|
39
|
+
publicMutations: Record<string, (...args: any[]) => any>;
|
|
40
|
+
allMutations: Record<string, (...args: any[]) => any>;
|
|
41
|
+
publicActions: Record<string, (...args: any[]) => any>;
|
|
42
|
+
allActions: Record<string, (...args: any[]) => any>;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// @public
|
|
46
|
+
export type MutationNames<API extends GenericAPI> = keyof API["allMutations"] & string;
|
|
47
|
+
|
|
48
|
+
// @public
|
|
49
|
+
export type NamedAction<API extends GenericAPI, Name extends ActionNames<API>> = API["allActions"][Name];
|
|
50
|
+
|
|
51
|
+
// @public
|
|
52
|
+
export type NamedMutation<API extends GenericAPI, Name extends MutationNames<API>> = API["allMutations"][Name];
|
|
53
|
+
|
|
54
|
+
// @public
|
|
55
|
+
export type NamedQuery<API extends GenericAPI, Name extends QueryNames<API>> = API["allQueries"][Name];
|
|
56
|
+
|
|
57
|
+
// @public
|
|
58
|
+
export type PublicActionNames<API extends GenericAPI> = keyof API["publicActions"] & string;
|
|
59
|
+
|
|
60
|
+
// @public
|
|
61
|
+
export type PublicMutationNames<API extends GenericAPI> = keyof API["publicMutations"] & string;
|
|
62
|
+
|
|
63
|
+
// @public
|
|
64
|
+
export type PublicQueryNames<API extends GenericAPI> = keyof API["publicQueries"] & string;
|
|
65
|
+
|
|
66
|
+
// @public
|
|
67
|
+
export type QueryNames<API extends GenericAPI> = keyof API["allQueries"] & string;
|
|
68
|
+
|
|
69
|
+
// Warnings were encountered during analysis:
|
|
70
|
+
//
|
|
71
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "Expand" needs to be exported by the entry point index.d.ts
|
|
72
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "ConvertToClientFunctions" needs to be exported by the entry point index.d.ts
|
|
73
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "PickByValue" needs to be exported by the entry point index.d.ts
|
|
74
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "MergeAllExports" needs to be exported by the entry point index.d.ts
|
|
75
|
+
|
|
76
|
+
// (No @packageDocumentation comment for this package)
|
|
77
|
+
|
|
78
|
+
```
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
## API Report File for "convex"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @public
|
|
8
|
+
export type ActionNames<API extends GenericAPI> = keyof API["allActions"] & string;
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export type ApiFromModules<Modules extends Record<string, Record<string, any>>> = {
|
|
12
|
+
publicQueries: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
13
|
+
isQuery: true;
|
|
14
|
+
isPublic: true;
|
|
15
|
+
}>>>;
|
|
16
|
+
allQueries: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
17
|
+
isQuery: true;
|
|
18
|
+
}>>>;
|
|
19
|
+
publicMutations: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
20
|
+
isMutation: true;
|
|
21
|
+
isPublic: true;
|
|
22
|
+
}>>>;
|
|
23
|
+
allMutations: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
24
|
+
isMutation: true;
|
|
25
|
+
}>>>;
|
|
26
|
+
publicActions: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
27
|
+
isAction: true;
|
|
28
|
+
isPublic: true;
|
|
29
|
+
}>>>;
|
|
30
|
+
allActions: Expand<ConvertToClientFunctions<PickByValue<MergeAllExports<Modules>, {
|
|
31
|
+
isAction: true;
|
|
32
|
+
}>>>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// @public
|
|
36
|
+
export interface ClientOptions {
|
|
37
|
+
unsavedChangesWarning?: boolean;
|
|
38
|
+
verbose?: boolean;
|
|
39
|
+
webSocketConstructor?: typeof WebSocket;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// @public
|
|
43
|
+
export class ConvexHttpClient<API extends GenericAPI> {
|
|
44
|
+
constructor(address: string);
|
|
45
|
+
action<Name extends PublicActionNames<API>>(name: Name): (...args: Parameters<NamedAction<API, Name>>) => Promise<ReturnType<NamedAction<API, Name>>>;
|
|
46
|
+
backendUrl(): string;
|
|
47
|
+
clearAuth(): void;
|
|
48
|
+
mutation<Name extends PublicMutationNames<API>>(name: Name): (...args: Parameters<NamedMutation<API, Name>>) => Promise<ReturnType<NamedMutation<API, Name>>>;
|
|
49
|
+
query<Name extends PublicQueryNames<API>>(name: Name): (...args: Parameters<NamedQuery<API, Name>>) => Promise<ReturnType<NamedQuery<API, Name>>>;
|
|
50
|
+
setAuth(value: string): void;
|
|
51
|
+
// @internal
|
|
52
|
+
setDebug(debug: boolean): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// @public
|
|
56
|
+
export type GenericAPI = {
|
|
57
|
+
publicQueries: Record<string, (...args: any[]) => any>;
|
|
58
|
+
allQueries: Record<string, (...args: any[]) => any>;
|
|
59
|
+
publicMutations: Record<string, (...args: any[]) => any>;
|
|
60
|
+
allMutations: Record<string, (...args: any[]) => any>;
|
|
61
|
+
publicActions: Record<string, (...args: any[]) => any>;
|
|
62
|
+
allActions: Record<string, (...args: any[]) => any>;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// @public
|
|
66
|
+
export class InternalConvexClient {
|
|
67
|
+
constructor(address: string, onTransition: (updatedQueries: QueryToken[]) => void, options?: ClientOptions);
|
|
68
|
+
// (undocumented)
|
|
69
|
+
action<Args extends any[]>(udfPath: string, args: Args): Promise<any>;
|
|
70
|
+
// (undocumented)
|
|
71
|
+
clearAuth(): void;
|
|
72
|
+
// (undocumented)
|
|
73
|
+
close(): Promise<void>;
|
|
74
|
+
// Warning: (ae-forgotten-export) The symbol "ConnectionState" needs to be exported by the entry point index.d.ts
|
|
75
|
+
connectionState(): ConnectionState;
|
|
76
|
+
// (undocumented)
|
|
77
|
+
hasAuth(): boolean;
|
|
78
|
+
// Warning: (ae-forgotten-export) The symbol "Value" needs to be exported by the entry point index.d.ts
|
|
79
|
+
localQueryResult(udfPath: string, args: any[]): Value | undefined;
|
|
80
|
+
// (undocumented)
|
|
81
|
+
mutate<Args extends any[]>(udfPath: string, args: Args, optimisticUpdate?: OptimisticUpdate<GenericAPI, Args> | null): Promise<any>;
|
|
82
|
+
queryJournal(name: string, args: any[]): QueryJournal | undefined;
|
|
83
|
+
// @internal (undocumented)
|
|
84
|
+
setAdminAuth(value: string, fakeUserIdentity?: UserIdentityAttributes): void;
|
|
85
|
+
// Warning: (ae-forgotten-export) The symbol "AuthTokenFetcher" needs to be exported by the entry point index.d.ts
|
|
86
|
+
//
|
|
87
|
+
// (undocumented)
|
|
88
|
+
setAuth(fetchToken: AuthTokenFetcher): Promise<void>;
|
|
89
|
+
subscribe(name: string, args: any[], journal?: QueryJournal): {
|
|
90
|
+
queryToken: QueryToken;
|
|
91
|
+
unsubscribe: () => void;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// @public
|
|
96
|
+
export interface Mutation<F extends (...args: any[]) => Promise<any>> {
|
|
97
|
+
(...args: Parameters<F>): Promise<Awaited<ReturnType<F>>>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// @public
|
|
101
|
+
export type MutationNames<API extends GenericAPI> = keyof API["allMutations"] & string;
|
|
102
|
+
|
|
103
|
+
// @public
|
|
104
|
+
export type NamedAction<API extends GenericAPI, Name extends ActionNames<API>> = API["allActions"][Name];
|
|
105
|
+
|
|
106
|
+
// @public
|
|
107
|
+
export type NamedMutation<API extends GenericAPI, Name extends MutationNames<API>> = API["allMutations"][Name];
|
|
108
|
+
|
|
109
|
+
// @public
|
|
110
|
+
export type NamedQuery<API extends GenericAPI, Name extends QueryNames<API>> = API["allQueries"][Name];
|
|
111
|
+
|
|
112
|
+
// @public
|
|
113
|
+
export interface OptimisticLocalStore<API extends GenericAPI = GenericAPI> {
|
|
114
|
+
getAllQueries<Name extends PublicQueryNames<API>>(name: Name): {
|
|
115
|
+
args: Parameters<NamedQuery<API, Name>>;
|
|
116
|
+
value: undefined | ReturnType<NamedQuery<API, Name>>;
|
|
117
|
+
}[];
|
|
118
|
+
getQuery<Name extends PublicQueryNames<API>>(name: Name, args: Parameters<NamedQuery<API, Name>>): undefined | ReturnType<NamedQuery<API, Name>>;
|
|
119
|
+
setQuery<Name extends PublicQueryNames<API>>(name: Name, args: Parameters<NamedQuery<API, Name>>, value: undefined | ReturnType<NamedQuery<API, Name>>): void;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// @public
|
|
123
|
+
export type OptimisticUpdate<API extends GenericAPI, Arguments extends Value[]> = (localQueryStore: OptimisticLocalStore<API>, ...args: Arguments) => void;
|
|
124
|
+
|
|
125
|
+
// @public
|
|
126
|
+
export type PublicActionNames<API extends GenericAPI> = keyof API["publicActions"] & string;
|
|
127
|
+
|
|
128
|
+
// @public
|
|
129
|
+
export type PublicMutationNames<API extends GenericAPI> = keyof API["publicMutations"] & string;
|
|
130
|
+
|
|
131
|
+
// @public
|
|
132
|
+
export type PublicQueryNames<API extends GenericAPI> = keyof API["publicQueries"] & string;
|
|
133
|
+
|
|
134
|
+
// @public
|
|
135
|
+
export interface Query<F extends (...args: any[]) => Promise<any>> {
|
|
136
|
+
(...args: Parameters<F>): Promise<Awaited<ReturnType<F>>>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// @public
|
|
140
|
+
export type QueryJournal = string | null;
|
|
141
|
+
|
|
142
|
+
// @public
|
|
143
|
+
export type QueryNames<API extends GenericAPI> = keyof API["allQueries"] & string;
|
|
144
|
+
|
|
145
|
+
// @public
|
|
146
|
+
export type QueryResult = {
|
|
147
|
+
success: true;
|
|
148
|
+
value: Value;
|
|
149
|
+
} | {
|
|
150
|
+
success: false;
|
|
151
|
+
errorMessage: string;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// @public
|
|
155
|
+
export type QueryToken = string;
|
|
156
|
+
|
|
157
|
+
// Warning: (ae-forgotten-export) The symbol "UserIdentity" needs to be exported by the entry point index.d.ts
|
|
158
|
+
// Warning: (ae-internal-missing-underscore) The name "UserIdentityAttributes" should be prefixed with an underscore because the declaration is marked as @internal
|
|
159
|
+
//
|
|
160
|
+
// @internal (undocumented)
|
|
161
|
+
export type UserIdentityAttributes = Omit<UserIdentity, "updatedAt" | "issuer"> & {
|
|
162
|
+
updatedAt?: string;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// Warnings were encountered during analysis:
|
|
166
|
+
//
|
|
167
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "Expand" needs to be exported by the entry point index.d.ts
|
|
168
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "ConvertToClientFunctions" needs to be exported by the entry point index.d.ts
|
|
169
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "PickByValue" needs to be exported by the entry point index.d.ts
|
|
170
|
+
// src/api/index.ts:172:3 - (ae-forgotten-export) The symbol "MergeAllExports" needs to be exported by the entry point index.d.ts
|
|
171
|
+
|
|
172
|
+
// (No @packageDocumentation comment for this package)
|
|
173
|
+
|
|
174
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## API Report File for "convex"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
|
+
|
|
9
|
+
// @public
|
|
10
|
+
export function ConvexProviderWithAuth0({ children, client, }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
client: IConvexReactClient;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
|
|
15
|
+
// Warnings were encountered during analysis:
|
|
16
|
+
//
|
|
17
|
+
// src/react-auth0/ConvexProviderWithAuth0.tsx:30:3 - (ae-forgotten-export) The symbol "IConvexReactClient" needs to be exported by the entry point index.d.ts
|
|
18
|
+
|
|
19
|
+
// (No @packageDocumentation comment for this package)
|
|
20
|
+
|
|
21
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## API Report File for "convex"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ClerkProviderProps } from '@clerk/clerk-react';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export function ConvexProviderWithClerk({ children, client, }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
client: IConvexReactClient;
|
|
14
|
+
} & ClerkProviderProps): JSX.Element;
|
|
15
|
+
|
|
16
|
+
// Warnings were encountered during analysis:
|
|
17
|
+
//
|
|
18
|
+
// src/react-clerk/ConvexProviderWithClerk.tsx:32:3 - (ae-forgotten-export) The symbol "IConvexReactClient" needs to be exported by the entry point index.d.ts
|
|
19
|
+
|
|
20
|
+
// (No @packageDocumentation comment for this package)
|
|
21
|
+
|
|
22
|
+
```
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
## API Report File for "convex"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { default as React_2 } from 'react';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
|
|
10
|
+
// @public
|
|
11
|
+
export function Authenticated({ children }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): ReactNode;
|
|
14
|
+
|
|
15
|
+
// @public
|
|
16
|
+
export function AuthLoading({ children }: {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}): ReactNode;
|
|
19
|
+
|
|
20
|
+
// @public
|
|
21
|
+
export type AuthTokenFetcher = () => Promise<string | null | undefined>;
|
|
22
|
+
|
|
23
|
+
// @public
|
|
24
|
+
export type ConvexAuthState = {
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
isAuthenticated: boolean;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// @public
|
|
30
|
+
export const ConvexProvider: React_2.FC<{
|
|
31
|
+
client: ConvexReactClient<any>;
|
|
32
|
+
children?: React_2.ReactNode;
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
// @public
|
|
36
|
+
export function ConvexProviderWithAuth({ children, client, useAuth, }: {
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
client: IConvexReactClient;
|
|
39
|
+
useAuth: () => {
|
|
40
|
+
isLoading: boolean;
|
|
41
|
+
isAuthenticated: boolean;
|
|
42
|
+
fetchAccessToken: () => Promise<string | null>;
|
|
43
|
+
};
|
|
44
|
+
}): JSX.Element;
|
|
45
|
+
|
|
46
|
+
// Warning: (ae-forgotten-export) The symbol "GenericAPI" needs to be exported by the entry point index.d.ts
|
|
47
|
+
//
|
|
48
|
+
// @public
|
|
49
|
+
export class ConvexReactClient<API extends GenericAPI> {
|
|
50
|
+
constructor(address: string, options?: ReactClientOptions);
|
|
51
|
+
// Warning: (ae-forgotten-export) The symbol "PublicActionNames" needs to be exported by the entry point index.d.ts
|
|
52
|
+
action<Name extends PublicActionNames<API>>(name: Name): ReactAction<API, Name>;
|
|
53
|
+
clearAuth(): void;
|
|
54
|
+
close(): Promise<void>;
|
|
55
|
+
// Warning: (ae-forgotten-export) The symbol "ConnectionState" needs to be exported by the entry point index.d.ts
|
|
56
|
+
connectionState(): ConnectionState;
|
|
57
|
+
// Warning: (ae-forgotten-export) The symbol "PublicMutationNames" needs to be exported by the entry point index.d.ts
|
|
58
|
+
mutation<Name extends PublicMutationNames<API>>(name: Name): ReactMutation<API, Name>;
|
|
59
|
+
// Warning: (ae-forgotten-export) The symbol "UserIdentityAttributes" needs to be exported by the entry point index.d.ts
|
|
60
|
+
//
|
|
61
|
+
// @internal (undocumented)
|
|
62
|
+
setAdminAuth(token: string, identity?: UserIdentityAttributes): void;
|
|
63
|
+
setAuth(fetchToken: AuthTokenFetcher): Promise<void>;
|
|
64
|
+
// Warning: (ae-forgotten-export) The symbol "PublicQueryNames" needs to be exported by the entry point index.d.ts
|
|
65
|
+
// Warning: (ae-forgotten-export) The symbol "NamedQuery" needs to be exported by the entry point index.d.ts
|
|
66
|
+
// 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: Parameters<NamedQuery<API, Name>>, journal?: QueryJournal): Watch<ReturnType<NamedQuery<API, Name>>>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Warning: (ae-forgotten-export) The symbol "OptimisticLocalStore" needs to be exported by the entry point index.d.ts
|
|
71
|
+
//
|
|
72
|
+
// @public
|
|
73
|
+
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
|
+
|
|
75
|
+
// @public
|
|
76
|
+
export type PaginatedQueryArgs<Query extends PaginatedQueryFunction<any, any>> = Query extends PaginatedQueryFunction<infer Args, any> ? Args : never;
|
|
77
|
+
|
|
78
|
+
// Warning: (ae-forgotten-export) The symbol "PaginationOptions" needs to be exported by the entry point index.d.ts
|
|
79
|
+
// Warning: (ae-forgotten-export) The symbol "PaginationResult" needs to be exported by the entry point index.d.ts
|
|
80
|
+
//
|
|
81
|
+
// @public
|
|
82
|
+
export type PaginatedQueryFunction<Args extends any[], ReturnType> = (paginationOptions: PaginationOptions, ...args: Args) => PaginationResult<ReturnType>;
|
|
83
|
+
|
|
84
|
+
// Warning: (ae-forgotten-export) The symbol "PickByValue" needs to be exported by the entry point index.d.ts
|
|
85
|
+
//
|
|
86
|
+
// @public
|
|
87
|
+
export type PaginatedQueryNames<API extends GenericAPI> = keyof PickByValue<API["publicQueries"], PaginatedQueryFunction<any, any>> & string;
|
|
88
|
+
|
|
89
|
+
// @public
|
|
90
|
+
export type PaginatedQueryReturnType<Query extends PaginatedQueryFunction<any, any>> = Query extends PaginatedQueryFunction<any, infer ReturnType> ? ReturnType : never;
|
|
91
|
+
|
|
92
|
+
// @public
|
|
93
|
+
export interface ReactAction<API extends GenericAPI, Name extends PublicActionNames<API>> {
|
|
94
|
+
// Warning: (ae-forgotten-export) The symbol "NamedAction" needs to be exported by the entry point index.d.ts
|
|
95
|
+
(...args: Parameters<NamedAction<API, Name>>): Promise<ReturnType<NamedAction<API, Name>>>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// @public
|
|
99
|
+
export interface ReactClientOptions {
|
|
100
|
+
unsavedChangesWarning?: boolean;
|
|
101
|
+
verbose?: boolean;
|
|
102
|
+
webSocketConstructor?: typeof WebSocket;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// @public
|
|
106
|
+
export interface ReactMutation<API extends GenericAPI, Name extends PublicMutationNames<API>> {
|
|
107
|
+
// Warning: (ae-forgotten-export) The symbol "NamedMutation" needs to be exported by the entry point index.d.ts
|
|
108
|
+
(...args: Parameters<NamedMutation<API, Name>>): Promise<ReturnType<NamedMutation<API, Name>>>;
|
|
109
|
+
// Warning: (ae-forgotten-export) The symbol "OptimisticUpdate" needs to be exported by the entry point index.d.ts
|
|
110
|
+
withOptimisticUpdate(optimisticUpdate: OptimisticUpdate<API, Parameters<NamedMutation<API, Name>>>): ReactMutation<API, Name>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// @public
|
|
114
|
+
export type RequestForQueries = Record<string, {
|
|
115
|
+
name: string;
|
|
116
|
+
args: Value[];
|
|
117
|
+
}>;
|
|
118
|
+
|
|
119
|
+
// @public
|
|
120
|
+
export function Unauthenticated({ children }: {
|
|
121
|
+
children: ReactNode;
|
|
122
|
+
}): ReactNode;
|
|
123
|
+
|
|
124
|
+
// @public
|
|
125
|
+
export type UseActionForAPI<API extends GenericAPI> = <Name extends PublicActionNames<API>>(name: Name) => ReactAction<API, Name>;
|
|
126
|
+
|
|
127
|
+
// @public
|
|
128
|
+
export function useActionGeneric<API extends GenericAPI, Name extends PublicActionNames<API>>(name: Name): ReactAction<API, Name>;
|
|
129
|
+
|
|
130
|
+
// @public
|
|
131
|
+
export function useConvexAuth(): {
|
|
132
|
+
isLoading: boolean;
|
|
133
|
+
isAuthenticated: boolean;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
// @public
|
|
137
|
+
export type UseConvexForAPI<API extends GenericAPI> = () => ConvexReactClient<API>;
|
|
138
|
+
|
|
139
|
+
// @public
|
|
140
|
+
export function useConvexGeneric<API extends GenericAPI>(): ConvexReactClient<API>;
|
|
141
|
+
|
|
142
|
+
// @public
|
|
143
|
+
export type UseMutationForAPI<API extends GenericAPI> = <Name extends PublicMutationNames<API>>(name: Name) => ReactMutation<API, Name>;
|
|
144
|
+
|
|
145
|
+
// @public
|
|
146
|
+
export function useMutationGeneric<API extends GenericAPI, Name extends PublicMutationNames<API>>(name: Name): ReactMutation<API, Name>;
|
|
147
|
+
|
|
148
|
+
// @public
|
|
149
|
+
export type UsePaginatedQueryForAPI<API extends GenericAPI> = <Name extends PaginatedQueryNames<API>>(name: Name, options: {
|
|
150
|
+
initialNumItems: number;
|
|
151
|
+
}, ...args: PaginatedQueryArgs<NamedQuery<API, Name>>) => UsePaginatedQueryResult<PaginatedQueryReturnType<NamedQuery<API, Name>>>;
|
|
152
|
+
|
|
153
|
+
// @public
|
|
154
|
+
export function usePaginatedQueryGeneric(name: string, options: {
|
|
155
|
+
initialNumItems: number;
|
|
156
|
+
}, ...args: Value[]): UsePaginatedQueryResult<any>;
|
|
157
|
+
|
|
158
|
+
// @public
|
|
159
|
+
export type UsePaginatedQueryResult<T> = {
|
|
160
|
+
results: T[];
|
|
161
|
+
} & ({
|
|
162
|
+
status: "CanLoadMore";
|
|
163
|
+
loadMore: (numItems: number) => void;
|
|
164
|
+
} | {
|
|
165
|
+
status: "LoadingMore";
|
|
166
|
+
loadMore: undefined;
|
|
167
|
+
} | {
|
|
168
|
+
status: "Exhausted";
|
|
169
|
+
loadMore: undefined;
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// @public
|
|
173
|
+
export type UseQueriesForAPI<API extends GenericAPI> = <QueryNameMap extends Record<string, PublicQueryNames<API>>>(queries: {
|
|
174
|
+
[Identifier in keyof QueryNameMap]: {
|
|
175
|
+
name: QueryNameMap[Identifier];
|
|
176
|
+
args: Parameters<NamedQuery<API, QueryNameMap[Identifier]>>;
|
|
177
|
+
};
|
|
178
|
+
}) => {
|
|
179
|
+
[Identifier in keyof QueryNameMap]: ReturnType<NamedQuery<API, QueryNameMap[Identifier]>> | undefined | Error;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
// @public
|
|
183
|
+
export function useQueriesGeneric(queries: RequestForQueries): Record<string, any | undefined | Error>;
|
|
184
|
+
|
|
185
|
+
// @public
|
|
186
|
+
export type UseQueryForAPI<API extends GenericAPI> = <Name extends PublicQueryNames<API>>(name: Name, ...args: Parameters<NamedQuery<API, Name>>) => ReturnType<NamedQuery<API, Name>> | undefined;
|
|
187
|
+
|
|
188
|
+
// @public
|
|
189
|
+
export function useQueryGeneric<API extends GenericAPI, Name extends PublicQueryNames<API>>(name: Name, ...args: Parameters<NamedQuery<API, Name>>): ReturnType<NamedQuery<API, Name>> | undefined;
|
|
190
|
+
|
|
191
|
+
// Warning: (ae-internal-missing-underscore) The name "useQueryInternal" should be prefixed with an underscore because the declaration is marked as @internal
|
|
192
|
+
//
|
|
193
|
+
// @internal (undocumented)
|
|
194
|
+
export function useQueryInternal<API extends GenericAPI, Name extends PublicQueryNames<API>>(convex: ConvexReactClient<API>, name: Name, ...args: Parameters<NamedQuery<API, Name>>): ReturnType<NamedQuery<API, Name>> | undefined;
|
|
195
|
+
|
|
196
|
+
// @public
|
|
197
|
+
export interface Watch<T> {
|
|
198
|
+
journal(): QueryJournal | undefined;
|
|
199
|
+
localQueryResult(): T | undefined;
|
|
200
|
+
onUpdate(callback: () => void): () => void;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Warnings were encountered during analysis:
|
|
204
|
+
//
|
|
205
|
+
// 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/use_queries.ts:156:5 - (ae-forgotten-export) The symbol "Value" needs to be exported by the entry point index.d.ts
|
|
207
|
+
|
|
208
|
+
// (No @packageDocumentation comment for this package)
|
|
209
|
+
|
|
210
|
+
```
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
## API Report File for "convex"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// Warning: (ae-forgotten-export) The symbol "MaybeMakeLooseDataModel" needs to be exported by the entry point index.d.ts
|
|
8
|
+
// Warning: (ae-forgotten-export) The symbol "MaybeMakeLooseTableInfo" needs to be exported by the entry point index.d.ts
|
|
9
|
+
//
|
|
10
|
+
// @public
|
|
11
|
+
export type DataModelFromSchemaDefinition<SchemaDef extends SchemaDefinition<any, boolean>> = MaybeMakeLooseDataModel<{
|
|
12
|
+
[TableName in keyof SchemaDef["tables"] & string]: SchemaDef["tables"][TableName] extends TableDefinition<infer Document, infer FieldPaths, infer Indexes, infer SearchIndexes> ? MaybeMakeLooseTableInfo<{
|
|
13
|
+
document: Expand<IdField<TableName> & Document>;
|
|
14
|
+
fieldPaths: keyof IdField<TableName> | FieldPaths;
|
|
15
|
+
indexes: Expand<Indexes & SystemIndexes>;
|
|
16
|
+
searchIndexes: SearchIndexes;
|
|
17
|
+
}, SchemaDef["isStrict"]> : never;
|
|
18
|
+
}, SchemaDef["isStrict"]>;
|
|
19
|
+
|
|
20
|
+
// @public
|
|
21
|
+
export function defineSchema<Schema extends GenericSchema, IsStrict extends boolean = true>(schema: Schema, options?: DefineSchemaOptions<IsStrict>): SchemaDefinition<Schema, IsStrict>;
|
|
22
|
+
|
|
23
|
+
// @public
|
|
24
|
+
export interface DefineSchemaOptions<IsStrict extends boolean> {
|
|
25
|
+
// (undocumented)
|
|
26
|
+
exportDocumentType?: boolean;
|
|
27
|
+
strict?: IsStrict;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Warning: (ae-forgotten-export) The symbol "ExtractDocument" needs to be exported by the entry point index.d.ts
|
|
31
|
+
// Warning: (ae-forgotten-export) The symbol "ExtractFieldPaths" needs to be exported by the entry point index.d.ts
|
|
32
|
+
//
|
|
33
|
+
// @public
|
|
34
|
+
export function defineTable<DocumentSchema extends SchemaType<Record<string, any>, false, any>>(documentSchema: DocumentSchema): TableDefinition<ExtractDocument<DocumentSchema>, ExtractFieldPaths<DocumentSchema>>;
|
|
35
|
+
|
|
36
|
+
// Warning: (ae-forgotten-export) The symbol "ObjectSchemaType" needs to be exported by the entry point index.d.ts
|
|
37
|
+
//
|
|
38
|
+
// @public
|
|
39
|
+
export function defineTable<DocumentSchema extends Record<string, SchemaType<any, any, any>>>(documentSchema: DocumentSchema): TableDefinition<ExtractDocument<ObjectSchemaType<DocumentSchema>>, ExtractFieldPaths<ObjectSchemaType<DocumentSchema>>>;
|
|
40
|
+
|
|
41
|
+
// @public
|
|
42
|
+
export type GenericSchema = Record<string, TableDefinition>;
|
|
43
|
+
|
|
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
|
+
// @public
|
|
67
|
+
export class SchemaDefinition<Schema extends GenericSchema, IsStrict extends boolean> {
|
|
68
|
+
// @internal
|
|
69
|
+
constructor(tables: Schema, options?: DefineSchemaOptions<IsStrict>);
|
|
70
|
+
// @internal
|
|
71
|
+
export(): string;
|
|
72
|
+
// (undocumented)
|
|
73
|
+
isStrict: IsStrict;
|
|
74
|
+
// (undocumented)
|
|
75
|
+
tables: Schema;
|
|
76
|
+
}
|
|
77
|
+
|
|
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
|
+
// @public
|
|
98
|
+
export interface SearchIndexConfig<SearchField extends string, FilterFields extends string> {
|
|
99
|
+
filterFields?: FilterFields[];
|
|
100
|
+
searchField: SearchField;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Warning: (ae-forgotten-export) The symbol "GenericDocument" needs to be exported by the entry point index.d.ts
|
|
104
|
+
// Warning: (ae-forgotten-export) The symbol "GenericTableIndexes" needs to be exported by the entry point index.d.ts
|
|
105
|
+
// Warning: (ae-forgotten-export) The symbol "GenericTableSearchIndexes" needs to be exported by the entry point index.d.ts
|
|
106
|
+
//
|
|
107
|
+
// @public
|
|
108
|
+
export class TableDefinition<Document extends GenericDocument = GenericDocument, FieldPaths extends string = string, Indexes extends GenericTableIndexes = {}, SearchIndexes extends GenericTableSearchIndexes = {}> {
|
|
109
|
+
// @internal
|
|
110
|
+
constructor(documentType: SchemaType<any, any, any>);
|
|
111
|
+
// @internal
|
|
112
|
+
export(): {
|
|
113
|
+
indexes: {
|
|
114
|
+
indexDescriptor: string;
|
|
115
|
+
fields: string[];
|
|
116
|
+
}[];
|
|
117
|
+
searchIndexes: {
|
|
118
|
+
indexDescriptor: string;
|
|
119
|
+
searchField: string;
|
|
120
|
+
filterFields: string[];
|
|
121
|
+
}[];
|
|
122
|
+
referencedTableNames: Set<string>;
|
|
123
|
+
documentType: string;
|
|
124
|
+
};
|
|
125
|
+
// Warning: (ae-forgotten-export) The symbol "IndexTiebreakerField" needs to be exported by the entry point index.d.ts
|
|
126
|
+
index<IndexName extends string, FirstFieldPath extends FieldPaths, RestFieldPaths extends FieldPaths[]>(name: IndexName, fields: [FirstFieldPath, ...RestFieldPaths]): TableDefinition<Document, FieldPaths, Expand<Indexes & Record<IndexName, [
|
|
127
|
+
FirstFieldPath,
|
|
128
|
+
...RestFieldPaths,
|
|
129
|
+
IndexTiebreakerField
|
|
130
|
+
]>>, SearchIndexes>;
|
|
131
|
+
searchIndex<IndexName extends string, SearchField extends FieldPaths, FilterFields extends FieldPaths = never>(name: IndexName, indexConfig: Expand<SearchIndexConfig<SearchField, FilterFields>>): TableDefinition<Document, FieldPaths, Indexes, Expand<SearchIndexes & Record<IndexName, {
|
|
132
|
+
searchField: SearchField;
|
|
133
|
+
filterFields: FilterFields;
|
|
134
|
+
}>>>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Warnings were encountered during analysis:
|
|
138
|
+
//
|
|
139
|
+
// src/schema/index.ts:117:15 - (ae-forgotten-export) The symbol "Id" needs to be exported by the entry point index.d.ts
|
|
140
|
+
// src/schema/index.ts:692:13 - (ae-forgotten-export) The symbol "Expand" needs to be exported by the entry point index.d.ts
|
|
141
|
+
// src/schema/index.ts:692:13 - (ae-forgotten-export) The symbol "IdField" needs to be exported by the entry point index.d.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
|
|
143
|
+
|
|
144
|
+
// (No @packageDocumentation comment for this package)
|
|
145
|
+
|
|
146
|
+
```
|