@zeroin.earth/appwrite-graphql 23.0.2 → 23.0.4
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/dist/index.cjs +45 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -46
- package/dist/index.d.ts +50 -46
- package/dist/index.js +45 -45
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/react-native/index.cjs +94 -94
- package/react-native/index.d.cts +49 -47
- package/react-native/index.d.ts +49 -47
- package/react-native/index.js +94 -94
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
import * as _graphql_typed_document_node_core from '@graphql-typed-document-node/core';
|
|
2
2
|
import { TypedDocumentNode, ResultOf } from '@graphql-typed-document-node/core';
|
|
3
3
|
import * as appwrite from 'appwrite';
|
|
4
|
-
import { AppwriteException, Client, Account as Account$1, Avatars,
|
|
4
|
+
import { Realtime, AppwriteException, Client, Account as Account$1, Avatars, Storage, Databases, Functions, Locale as Locale$1, Messaging as Messaging$1, TablesDB as TablesDB$1, Teams, AuthenticatorType, AuthenticationFactor, OAuthProvider, Browser, CreditCard, Flag, Models, ImageGravity, ImageFormat } from 'appwrite';
|
|
5
5
|
export { AppwriteException, AuthenticationFactor, AuthenticatorType, ID, Models, OAuthProvider } from 'appwrite';
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
7
|
import { UseMutationOptions, QueryKey, UndefinedInitialDataOptions, DefinedInitialDataOptions, UseQueryOptions, UseSuspenseQueryOptions, QueryClient } from '@tanstack/react-query';
|
|
8
|
-
import * as React from 'react';
|
|
9
|
-
import { ReactNode } from 'react';
|
|
10
|
-
import { Persister, AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
11
|
-
export { AsyncStorage, Persister } from '@tanstack/query-persist-client-core';
|
|
12
8
|
import * as gql_tada from 'gql.tada';
|
|
13
9
|
import { ResultOf as ResultOf$1, VariablesOf } from 'gql.tada';
|
|
14
10
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
11
|
+
import { Persister, AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
12
|
+
export { AsyncStorage, Persister } from '@tanstack/query-persist-client-core';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { ReactNode } from 'react';
|
|
15
|
+
|
|
16
|
+
/** Minimal realtime interface — works with both the standalone Realtime class (web) and Client-integrated realtime (React Native). */
|
|
17
|
+
type RealtimeLike = Pick<Realtime, 'subscribe'>;
|
|
18
|
+
/**
|
|
19
|
+
* Resolves intersection and mapped types into a flat object for cleaner IntelliSense.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
type Prettify<T> = {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} & {};
|
|
25
|
+
type QueryOptions = {
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
retry?: boolean | number | ((failureCount: number, error: unknown) => boolean);
|
|
28
|
+
retryDelay?: number | ((attemptIndex: number) => number);
|
|
29
|
+
staleTime?: number;
|
|
30
|
+
};
|
|
15
31
|
|
|
16
32
|
/**
|
|
17
33
|
* Returns the Appwrite client instance from context.
|
|
@@ -21,7 +37,7 @@ declare function useAppwrite(): {
|
|
|
21
37
|
client: appwrite.Client;
|
|
22
38
|
account: appwrite.Account;
|
|
23
39
|
avatars: appwrite.Avatars;
|
|
24
|
-
realtime:
|
|
40
|
+
realtime: RealtimeLike;
|
|
25
41
|
storage: appwrite.Storage;
|
|
26
42
|
graphql: {
|
|
27
43
|
client: appwrite.Client;
|
|
@@ -56,20 +72,6 @@ declare function useAppwrite(): {
|
|
|
56
72
|
teams: appwrite.Teams;
|
|
57
73
|
};
|
|
58
74
|
|
|
59
|
-
/**
|
|
60
|
-
* Resolves intersection and mapped types into a flat object for cleaner IntelliSense.
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
type Prettify<T> = {
|
|
64
|
-
[K in keyof T]: T[K];
|
|
65
|
-
} & {};
|
|
66
|
-
type QueryOptions = {
|
|
67
|
-
enabled?: boolean;
|
|
68
|
-
retry?: boolean | number | ((failureCount: number, error: unknown) => boolean);
|
|
69
|
-
retryDelay?: number | ((attemptIndex: number) => number);
|
|
70
|
-
staleTime?: number;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
75
|
/**
|
|
74
76
|
* Wrapper around TanStack Query's `useMutation` that automatically injects the Appwrite-managed `QueryClient`.
|
|
75
77
|
* Use this instead of importing `useMutation` from `@tanstack/react-query` directly.
|
|
@@ -125,7 +127,7 @@ declare function createAppwriteClient({ endpoint, projectId, }: {
|
|
|
125
127
|
client: Client;
|
|
126
128
|
account: Account$1;
|
|
127
129
|
avatars: Avatars;
|
|
128
|
-
realtime:
|
|
130
|
+
realtime: RealtimeLike;
|
|
129
131
|
storage: Storage;
|
|
130
132
|
graphql: {
|
|
131
133
|
client: Client;
|
|
@@ -153,26 +155,6 @@ declare function createAppwriteClient({ endpoint, projectId, }: {
|
|
|
153
155
|
};
|
|
154
156
|
type AppwriteClient = ReturnType<typeof createAppwriteClient>;
|
|
155
157
|
|
|
156
|
-
/**
|
|
157
|
-
* React context provider that supplies the Appwrite client and QueryClient to all child hooks.
|
|
158
|
-
* Supports optional `persister` for offline cache persistence and `onCacheRestored` callback.
|
|
159
|
-
* Must wrap any component using Appwrite hooks.
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```tsx
|
|
163
|
-
* <AppwriteProvider client={client}>
|
|
164
|
-
* <App />
|
|
165
|
-
* </AppwriteProvider>
|
|
166
|
-
* ```
|
|
167
|
-
*/
|
|
168
|
-
declare function AppwriteProvider({ client, queryClient, persister, onCacheRestored, children, }: {
|
|
169
|
-
client: AppwriteClient;
|
|
170
|
-
queryClient?: QueryClient;
|
|
171
|
-
persister?: Persister;
|
|
172
|
-
onCacheRestored?: () => void;
|
|
173
|
-
children: ReactNode;
|
|
174
|
-
}): React.JSX.Element;
|
|
175
|
-
|
|
176
158
|
declare const getAccount: gql_tada.TadaDocumentNode<{
|
|
177
159
|
accountGet: {
|
|
178
160
|
_id: string;
|
|
@@ -1455,9 +1437,9 @@ type SignUpVariables = Prettify<Omit<VariablesOf<typeof createAccount>, 'userId'
|
|
|
1455
1437
|
/** The result returned by the {@link useSignUp} mutation. */
|
|
1456
1438
|
type SignUpResult = Prettify<ResultOf$1<typeof createAccount>['accountCreate']>;
|
|
1457
1439
|
/** The variables accepted by the verify email mutation in {@link useSignUp}. */
|
|
1458
|
-
type VerifyEmailVariables = {
|
|
1440
|
+
type VerifyEmailVariables = Prettify<{
|
|
1459
1441
|
verifyUrl: string;
|
|
1460
|
-
}
|
|
1442
|
+
}>;
|
|
1461
1443
|
/** The result returned by the verify email mutation in {@link useSignUp}. */
|
|
1462
1444
|
type VerifyEmailResult = Prettify<ResultOf$1<typeof verify>['accountCreateVerification']>;
|
|
1463
1445
|
/**
|
|
@@ -1512,7 +1494,9 @@ declare function useSignUp(): {
|
|
|
1512
1494
|
}, unknown>;
|
|
1513
1495
|
verifyEmail: _tanstack_react_query.UseMutationResult<{
|
|
1514
1496
|
expire: string;
|
|
1515
|
-
}, AppwriteException[],
|
|
1497
|
+
}, AppwriteException[], {
|
|
1498
|
+
verifyUrl: string;
|
|
1499
|
+
}, unknown>;
|
|
1516
1500
|
};
|
|
1517
1501
|
|
|
1518
1502
|
declare const accountUpdateEmail: gql_tada.TadaDocumentNode<{
|
|
@@ -5112,8 +5096,6 @@ declare function hydrateMutationDefaults(queryClient: QueryClient, client: Appwr
|
|
|
5112
5096
|
conflictStrategy?: ConflictStrategy;
|
|
5113
5097
|
}): void;
|
|
5114
5098
|
|
|
5115
|
-
declare function webNetworkAdapter(): NetworkAdapter;
|
|
5116
|
-
|
|
5117
5099
|
type Props = {
|
|
5118
5100
|
functionId: string;
|
|
5119
5101
|
body?: Record<string, string | number | boolean | null>;
|
|
@@ -5597,4 +5579,26 @@ declare function useListExecutions({ functionId, queries, }: {
|
|
|
5597
5579
|
}[];
|
|
5598
5580
|
}, AppwriteException[]>;
|
|
5599
5581
|
|
|
5582
|
+
declare function webNetworkAdapter(): NetworkAdapter;
|
|
5583
|
+
|
|
5584
|
+
/**
|
|
5585
|
+
* React context provider that supplies the Appwrite client and QueryClient to all child hooks.
|
|
5586
|
+
* Supports optional `persister` for offline cache persistence and `onCacheRestored` callback.
|
|
5587
|
+
* Must wrap any component using Appwrite hooks.
|
|
5588
|
+
*
|
|
5589
|
+
* @example
|
|
5590
|
+
* ```tsx
|
|
5591
|
+
* <AppwriteProvider client={client}>
|
|
5592
|
+
* <App />
|
|
5593
|
+
* </AppwriteProvider>
|
|
5594
|
+
* ```
|
|
5595
|
+
*/
|
|
5596
|
+
declare function AppwriteProvider({ client, queryClient, persister, onCacheRestored, children, }: {
|
|
5597
|
+
client: AppwriteClient;
|
|
5598
|
+
queryClient?: QueryClient;
|
|
5599
|
+
persister?: Persister;
|
|
5600
|
+
onCacheRestored?: () => void;
|
|
5601
|
+
children: ReactNode;
|
|
5602
|
+
}): React.JSX.Element;
|
|
5603
|
+
|
|
5600
5604
|
export { type AccountResult, AppwriteProvider, type ConflictContext, type ConflictStrategy, type CreateAnonymousSessionResult, type CreateDocumentResult, type CreateDocumentVariables, type CreateEmailTokenResult, type CreateEmailTokenVariables, type CreateEmailVerificationResult, type CreateEmailVerificationVariables, type CreateFileResult, type CreateFileVariables, type CreateJWTResult, type CreateMagicURLTokenResult, type CreateMagicURLTokenVariables, type CreateMembershipResult, type CreateMembershipVariables, type CreateMfaAuthenticatorResult, type CreateMfaAuthenticatorVariables, type CreateMfaChallengeResult, type CreateMfaChallengeVariables, type CreateMfaRecoveryCodesResult, type CreateOAuth2TokenVariables, type CreateOperationsResult, type CreateOperationsVariables, type CreatePhoneTokenResult, type CreatePhoneTokenVariables, type CreatePhoneVerificationResult, type CreatePushTargetResult, type CreatePushTargetVariables, type CreateSessionResult, type CreateSessionVariables, type CreateSubscriberResult, type CreateSubscriberVariables, type CreateTeamResult, type CreateTeamVariables, type CreateTransactionResult, type CreateTransactionVariables, type DecrementAttributeResult, type DecrementAttributeVariables, type DeleteDocumentResult, type DeleteDocumentVariables, type DeleteFileResult, type DeleteFileVariables, type DeleteIdentityResult, type DeleteIdentityVariables, type DeleteMembershipResult, type DeleteMembershipVariables, type DeleteMfaAuthenticatorResult, type DeleteMfaAuthenticatorVariables, type DeletePushTargetResult, type DeletePushTargetVariables, type DeleteSessionResult, type DeleteSessionVariables, type DeleteSessionsResult, type DeleteSubscriberResult, type DeleteSubscriberVariables, type DeleteTeamResult, type DeleteTeamVariables, type DeleteTransactionResult, type DeleteTransactionVariables, type DocumentParams, type FileResult, type FileVariables, type FilesResult, type FunctionResult, type GetExecutionResult, type GetExecutionVariables, type GetMfaRecoveryCodesResult, type GetPrefsResult, type GetSessionResult, type GetSessionVariables, type GetTransactionResult, type GetTransactionVariables, type IncrementAttributeResult, type IncrementAttributeVariables, Keys, type ListExecutionsResult, type ListIdentitiesResult, type ListMfaFactorsResult, type ListSessionsResult, type ListTransactionsResult, type LocaleCodesResult, type LocaleContinentsResult, type LocaleCountriesEUResult, type LocaleCountriesPhonesResult, type LocaleCountriesResult, type LocaleCurrenciesResult, type LocaleLanguagesResult, type LocaleResult, type LoginResult, type LoginVariables, type LogoutResult, type LogoutVariables, type LogsResult, type LogsVariables, type NetworkAdapter, type OAuthLoginVariables, type OfflineClient, type PasswordRecoveryResult, type PasswordRecoveryVariables, type Prettify, QueryBuilder, type QueryOptions, type ResetPasswordResult, type ResetPasswordVariables, type SignUpResult, type SignUpVariables, type TeamMembershipResult, type TeamMembershipVariables, type TeamMembershipsResult, type TeamPrefsResult, type TeamPrefsVariables, type TeamResult, type TeamVariables, type TeamsResult, type UpdateDocumentMutationContext, type UpdateDocumentResult, type UpdateDocumentVariables, type UpdateEmailResult, type UpdateEmailVariables, type UpdateEmailVerificationResult, type UpdateEmailVerificationVariables, type UpdateFileResult, type UpdateFileVariables, type UpdateMagicURLSessionResult, type UpdateMagicURLSessionVariables, type UpdateMembershipResult, type UpdateMembershipStatusResult, type UpdateMembershipStatusVariables, type UpdateMembershipVariables, type UpdateMfaAuthenticatorResult, type UpdateMfaAuthenticatorVariables, type UpdateMfaChallengeResult, type UpdateMfaChallengeVariables, type UpdateMfaRecoveryCodesResult, type UpdateMfaResult, type UpdateMfaVariables, type UpdateNameResult, type UpdateNameVariables, type UpdatePasswordResult, type UpdatePasswordVariables, type UpdatePhoneResult, type UpdatePhoneSessionResult, type UpdatePhoneSessionVariables, type UpdatePhoneVariables, type UpdatePhoneVerificationResult, type UpdatePhoneVerificationVariables, type UpdatePrefsResult, type UpdatePrefsVariables, type UpdatePushTargetResult, type UpdatePushTargetVariables, type UpdateSessionResult, type UpdateSessionVariables, type UpdateStatusResult, type UpdateTeamNameResult, type UpdateTeamNameVariables, type UpdateTeamPrefsResult, type UpdateTeamPrefsVariables, type UpdateTransactionResult, type UpdateTransactionVariables, type UpsertDocumentMutationContext, type UpsertDocumentResult, type UpsertDocumentVariables, type VerificationResult, type VerificationVariables, type VerifyEmailResult, type VerifyEmailVariables, createAppwriteClient, createOfflineClient, getAccountQuery, getCollectionQuery, getDocumentQuery, hydrateMutationDefaults, mutationRegistry, q, resolveConflict, teamQueryOptions, useAccount, useAppwrite, useAvatarBrowser, useAvatarCreditCard, useAvatarFavicon, useAvatarFlag, useAvatarImage, useAvatarInitials, useAvatarQR, useAvatarScreenshot, useCollection, useCollectionWithPagination, useCreateAnonymousSession, useCreateDocument, useCreateEmailToken, useCreateEmailVerification, useCreateFile, useCreateJWT, useCreateMagicURLToken, useCreateMembership, useCreateMfaAuthenticator, useCreateMfaChallenge, useCreateMfaRecoveryCodes, useCreateOAuth2Token, useCreateOperations, useCreatePhoneToken, useCreatePhoneVerification, useCreatePushTarget, useCreateSession, useCreateSubscriber, useCreateTeam, useCreateTransaction, useDecrementAttribute, useDeleteDocument, useDeleteFile, useDeleteIdentity, useDeleteMembership, useDeleteMfaAuthenticator, useDeletePushTarget, useDeleteSession, useDeleteSessions, useDeleteSubscriber, useDeleteTeam, useDeleteTransaction, useDocument, useFile, useFileDownload, useFilePreview, useFileView, useFiles, useFunction, useGetExecution, useGetMfaRecoveryCodes, useGetPrefs, useGetSession, useGetTransaction, useIncrementAttribute, useInfiniteCollection, useLazyAccount, useLazyQuery, useListExecutions, useListIdentities, useListMfaFactors, useListSessions, useListTransactions, useLocale, useLocaleCodes, useLocaleContinents, useLocaleCountries, useLocaleCountriesEU, useLocaleCountriesPhones, useLocaleCurrencies, useLocaleLanguages, useLogin, useLogout, useLogs, useMutation, usePasswordRecovery, useQuery, useQueryClient, useResetPassword, useSignUp, useSuspenseCollection, useSuspenseCollectionWithPagination, useSuspenseCreateJWT, useSuspenseDocument, useSuspenseFunction, useSuspenseQuery, useTeam, useTeamMembership, useTeamMemberships, useTeamPrefs, useTeams, useUpdateDocument, useUpdateEmail, useUpdateEmailVerification, useUpdateFile, useUpdateMagicURLSession, useUpdateMembership, useUpdateMembershipStatus, useUpdateMfa, useUpdateMfaAuthenticator, useUpdateMfaChallenge, useUpdateMfaRecoveryCodes, useUpdateName, useUpdatePassword, useUpdatePhone, useUpdatePhoneSession, useUpdatePhoneVerification, useUpdatePrefs, useUpdatePushTarget, useUpdateSession, useUpdateStatus, useUpdateTeamName, useUpdateTeamPrefs, useUpdateTransaction, useUpsertDocument, useVerification, webNetworkAdapter };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
import * as _graphql_typed_document_node_core from '@graphql-typed-document-node/core';
|
|
2
2
|
import { TypedDocumentNode, ResultOf } from '@graphql-typed-document-node/core';
|
|
3
3
|
import * as appwrite from 'appwrite';
|
|
4
|
-
import { AppwriteException, Client, Account as Account$1, Avatars,
|
|
4
|
+
import { Realtime, AppwriteException, Client, Account as Account$1, Avatars, Storage, Databases, Functions, Locale as Locale$1, Messaging as Messaging$1, TablesDB as TablesDB$1, Teams, AuthenticatorType, AuthenticationFactor, OAuthProvider, Browser, CreditCard, Flag, Models, ImageGravity, ImageFormat } from 'appwrite';
|
|
5
5
|
export { AppwriteException, AuthenticationFactor, AuthenticatorType, ID, Models, OAuthProvider } from 'appwrite';
|
|
6
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
7
7
|
import { UseMutationOptions, QueryKey, UndefinedInitialDataOptions, DefinedInitialDataOptions, UseQueryOptions, UseSuspenseQueryOptions, QueryClient } from '@tanstack/react-query';
|
|
8
|
-
import * as React from 'react';
|
|
9
|
-
import { ReactNode } from 'react';
|
|
10
|
-
import { Persister, AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
11
|
-
export { AsyncStorage, Persister } from '@tanstack/query-persist-client-core';
|
|
12
8
|
import * as gql_tada from 'gql.tada';
|
|
13
9
|
import { ResultOf as ResultOf$1, VariablesOf } from 'gql.tada';
|
|
14
10
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
11
|
+
import { Persister, AsyncStorage } from '@tanstack/query-persist-client-core';
|
|
12
|
+
export { AsyncStorage, Persister } from '@tanstack/query-persist-client-core';
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { ReactNode } from 'react';
|
|
15
|
+
|
|
16
|
+
/** Minimal realtime interface — works with both the standalone Realtime class (web) and Client-integrated realtime (React Native). */
|
|
17
|
+
type RealtimeLike = Pick<Realtime, 'subscribe'>;
|
|
18
|
+
/**
|
|
19
|
+
* Resolves intersection and mapped types into a flat object for cleaner IntelliSense.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
type Prettify<T> = {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} & {};
|
|
25
|
+
type QueryOptions = {
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
retry?: boolean | number | ((failureCount: number, error: unknown) => boolean);
|
|
28
|
+
retryDelay?: number | ((attemptIndex: number) => number);
|
|
29
|
+
staleTime?: number;
|
|
30
|
+
};
|
|
15
31
|
|
|
16
32
|
/**
|
|
17
33
|
* Returns the Appwrite client instance from context.
|
|
@@ -21,7 +37,7 @@ declare function useAppwrite(): {
|
|
|
21
37
|
client: appwrite.Client;
|
|
22
38
|
account: appwrite.Account;
|
|
23
39
|
avatars: appwrite.Avatars;
|
|
24
|
-
realtime:
|
|
40
|
+
realtime: RealtimeLike;
|
|
25
41
|
storage: appwrite.Storage;
|
|
26
42
|
graphql: {
|
|
27
43
|
client: appwrite.Client;
|
|
@@ -56,20 +72,6 @@ declare function useAppwrite(): {
|
|
|
56
72
|
teams: appwrite.Teams;
|
|
57
73
|
};
|
|
58
74
|
|
|
59
|
-
/**
|
|
60
|
-
* Resolves intersection and mapped types into a flat object for cleaner IntelliSense.
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
type Prettify<T> = {
|
|
64
|
-
[K in keyof T]: T[K];
|
|
65
|
-
} & {};
|
|
66
|
-
type QueryOptions = {
|
|
67
|
-
enabled?: boolean;
|
|
68
|
-
retry?: boolean | number | ((failureCount: number, error: unknown) => boolean);
|
|
69
|
-
retryDelay?: number | ((attemptIndex: number) => number);
|
|
70
|
-
staleTime?: number;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
75
|
/**
|
|
74
76
|
* Wrapper around TanStack Query's `useMutation` that automatically injects the Appwrite-managed `QueryClient`.
|
|
75
77
|
* Use this instead of importing `useMutation` from `@tanstack/react-query` directly.
|
|
@@ -125,7 +127,7 @@ declare function createAppwriteClient({ endpoint, projectId, }: {
|
|
|
125
127
|
client: Client;
|
|
126
128
|
account: Account$1;
|
|
127
129
|
avatars: Avatars;
|
|
128
|
-
realtime:
|
|
130
|
+
realtime: RealtimeLike;
|
|
129
131
|
storage: Storage;
|
|
130
132
|
graphql: {
|
|
131
133
|
client: Client;
|
|
@@ -153,26 +155,6 @@ declare function createAppwriteClient({ endpoint, projectId, }: {
|
|
|
153
155
|
};
|
|
154
156
|
type AppwriteClient = ReturnType<typeof createAppwriteClient>;
|
|
155
157
|
|
|
156
|
-
/**
|
|
157
|
-
* React context provider that supplies the Appwrite client and QueryClient to all child hooks.
|
|
158
|
-
* Supports optional `persister` for offline cache persistence and `onCacheRestored` callback.
|
|
159
|
-
* Must wrap any component using Appwrite hooks.
|
|
160
|
-
*
|
|
161
|
-
* @example
|
|
162
|
-
* ```tsx
|
|
163
|
-
* <AppwriteProvider client={client}>
|
|
164
|
-
* <App />
|
|
165
|
-
* </AppwriteProvider>
|
|
166
|
-
* ```
|
|
167
|
-
*/
|
|
168
|
-
declare function AppwriteProvider({ client, queryClient, persister, onCacheRestored, children, }: {
|
|
169
|
-
client: AppwriteClient;
|
|
170
|
-
queryClient?: QueryClient;
|
|
171
|
-
persister?: Persister;
|
|
172
|
-
onCacheRestored?: () => void;
|
|
173
|
-
children: ReactNode;
|
|
174
|
-
}): React.JSX.Element;
|
|
175
|
-
|
|
176
158
|
declare const getAccount: gql_tada.TadaDocumentNode<{
|
|
177
159
|
accountGet: {
|
|
178
160
|
_id: string;
|
|
@@ -1455,9 +1437,9 @@ type SignUpVariables = Prettify<Omit<VariablesOf<typeof createAccount>, 'userId'
|
|
|
1455
1437
|
/** The result returned by the {@link useSignUp} mutation. */
|
|
1456
1438
|
type SignUpResult = Prettify<ResultOf$1<typeof createAccount>['accountCreate']>;
|
|
1457
1439
|
/** The variables accepted by the verify email mutation in {@link useSignUp}. */
|
|
1458
|
-
type VerifyEmailVariables = {
|
|
1440
|
+
type VerifyEmailVariables = Prettify<{
|
|
1459
1441
|
verifyUrl: string;
|
|
1460
|
-
}
|
|
1442
|
+
}>;
|
|
1461
1443
|
/** The result returned by the verify email mutation in {@link useSignUp}. */
|
|
1462
1444
|
type VerifyEmailResult = Prettify<ResultOf$1<typeof verify>['accountCreateVerification']>;
|
|
1463
1445
|
/**
|
|
@@ -1512,7 +1494,9 @@ declare function useSignUp(): {
|
|
|
1512
1494
|
}, unknown>;
|
|
1513
1495
|
verifyEmail: _tanstack_react_query.UseMutationResult<{
|
|
1514
1496
|
expire: string;
|
|
1515
|
-
}, AppwriteException[],
|
|
1497
|
+
}, AppwriteException[], {
|
|
1498
|
+
verifyUrl: string;
|
|
1499
|
+
}, unknown>;
|
|
1516
1500
|
};
|
|
1517
1501
|
|
|
1518
1502
|
declare const accountUpdateEmail: gql_tada.TadaDocumentNode<{
|
|
@@ -5112,8 +5096,6 @@ declare function hydrateMutationDefaults(queryClient: QueryClient, client: Appwr
|
|
|
5112
5096
|
conflictStrategy?: ConflictStrategy;
|
|
5113
5097
|
}): void;
|
|
5114
5098
|
|
|
5115
|
-
declare function webNetworkAdapter(): NetworkAdapter;
|
|
5116
|
-
|
|
5117
5099
|
type Props = {
|
|
5118
5100
|
functionId: string;
|
|
5119
5101
|
body?: Record<string, string | number | boolean | null>;
|
|
@@ -5597,4 +5579,26 @@ declare function useListExecutions({ functionId, queries, }: {
|
|
|
5597
5579
|
}[];
|
|
5598
5580
|
}, AppwriteException[]>;
|
|
5599
5581
|
|
|
5582
|
+
declare function webNetworkAdapter(): NetworkAdapter;
|
|
5583
|
+
|
|
5584
|
+
/**
|
|
5585
|
+
* React context provider that supplies the Appwrite client and QueryClient to all child hooks.
|
|
5586
|
+
* Supports optional `persister` for offline cache persistence and `onCacheRestored` callback.
|
|
5587
|
+
* Must wrap any component using Appwrite hooks.
|
|
5588
|
+
*
|
|
5589
|
+
* @example
|
|
5590
|
+
* ```tsx
|
|
5591
|
+
* <AppwriteProvider client={client}>
|
|
5592
|
+
* <App />
|
|
5593
|
+
* </AppwriteProvider>
|
|
5594
|
+
* ```
|
|
5595
|
+
*/
|
|
5596
|
+
declare function AppwriteProvider({ client, queryClient, persister, onCacheRestored, children, }: {
|
|
5597
|
+
client: AppwriteClient;
|
|
5598
|
+
queryClient?: QueryClient;
|
|
5599
|
+
persister?: Persister;
|
|
5600
|
+
onCacheRestored?: () => void;
|
|
5601
|
+
children: ReactNode;
|
|
5602
|
+
}): React.JSX.Element;
|
|
5603
|
+
|
|
5600
5604
|
export { type AccountResult, AppwriteProvider, type ConflictContext, type ConflictStrategy, type CreateAnonymousSessionResult, type CreateDocumentResult, type CreateDocumentVariables, type CreateEmailTokenResult, type CreateEmailTokenVariables, type CreateEmailVerificationResult, type CreateEmailVerificationVariables, type CreateFileResult, type CreateFileVariables, type CreateJWTResult, type CreateMagicURLTokenResult, type CreateMagicURLTokenVariables, type CreateMembershipResult, type CreateMembershipVariables, type CreateMfaAuthenticatorResult, type CreateMfaAuthenticatorVariables, type CreateMfaChallengeResult, type CreateMfaChallengeVariables, type CreateMfaRecoveryCodesResult, type CreateOAuth2TokenVariables, type CreateOperationsResult, type CreateOperationsVariables, type CreatePhoneTokenResult, type CreatePhoneTokenVariables, type CreatePhoneVerificationResult, type CreatePushTargetResult, type CreatePushTargetVariables, type CreateSessionResult, type CreateSessionVariables, type CreateSubscriberResult, type CreateSubscriberVariables, type CreateTeamResult, type CreateTeamVariables, type CreateTransactionResult, type CreateTransactionVariables, type DecrementAttributeResult, type DecrementAttributeVariables, type DeleteDocumentResult, type DeleteDocumentVariables, type DeleteFileResult, type DeleteFileVariables, type DeleteIdentityResult, type DeleteIdentityVariables, type DeleteMembershipResult, type DeleteMembershipVariables, type DeleteMfaAuthenticatorResult, type DeleteMfaAuthenticatorVariables, type DeletePushTargetResult, type DeletePushTargetVariables, type DeleteSessionResult, type DeleteSessionVariables, type DeleteSessionsResult, type DeleteSubscriberResult, type DeleteSubscriberVariables, type DeleteTeamResult, type DeleteTeamVariables, type DeleteTransactionResult, type DeleteTransactionVariables, type DocumentParams, type FileResult, type FileVariables, type FilesResult, type FunctionResult, type GetExecutionResult, type GetExecutionVariables, type GetMfaRecoveryCodesResult, type GetPrefsResult, type GetSessionResult, type GetSessionVariables, type GetTransactionResult, type GetTransactionVariables, type IncrementAttributeResult, type IncrementAttributeVariables, Keys, type ListExecutionsResult, type ListIdentitiesResult, type ListMfaFactorsResult, type ListSessionsResult, type ListTransactionsResult, type LocaleCodesResult, type LocaleContinentsResult, type LocaleCountriesEUResult, type LocaleCountriesPhonesResult, type LocaleCountriesResult, type LocaleCurrenciesResult, type LocaleLanguagesResult, type LocaleResult, type LoginResult, type LoginVariables, type LogoutResult, type LogoutVariables, type LogsResult, type LogsVariables, type NetworkAdapter, type OAuthLoginVariables, type OfflineClient, type PasswordRecoveryResult, type PasswordRecoveryVariables, type Prettify, QueryBuilder, type QueryOptions, type ResetPasswordResult, type ResetPasswordVariables, type SignUpResult, type SignUpVariables, type TeamMembershipResult, type TeamMembershipVariables, type TeamMembershipsResult, type TeamPrefsResult, type TeamPrefsVariables, type TeamResult, type TeamVariables, type TeamsResult, type UpdateDocumentMutationContext, type UpdateDocumentResult, type UpdateDocumentVariables, type UpdateEmailResult, type UpdateEmailVariables, type UpdateEmailVerificationResult, type UpdateEmailVerificationVariables, type UpdateFileResult, type UpdateFileVariables, type UpdateMagicURLSessionResult, type UpdateMagicURLSessionVariables, type UpdateMembershipResult, type UpdateMembershipStatusResult, type UpdateMembershipStatusVariables, type UpdateMembershipVariables, type UpdateMfaAuthenticatorResult, type UpdateMfaAuthenticatorVariables, type UpdateMfaChallengeResult, type UpdateMfaChallengeVariables, type UpdateMfaRecoveryCodesResult, type UpdateMfaResult, type UpdateMfaVariables, type UpdateNameResult, type UpdateNameVariables, type UpdatePasswordResult, type UpdatePasswordVariables, type UpdatePhoneResult, type UpdatePhoneSessionResult, type UpdatePhoneSessionVariables, type UpdatePhoneVariables, type UpdatePhoneVerificationResult, type UpdatePhoneVerificationVariables, type UpdatePrefsResult, type UpdatePrefsVariables, type UpdatePushTargetResult, type UpdatePushTargetVariables, type UpdateSessionResult, type UpdateSessionVariables, type UpdateStatusResult, type UpdateTeamNameResult, type UpdateTeamNameVariables, type UpdateTeamPrefsResult, type UpdateTeamPrefsVariables, type UpdateTransactionResult, type UpdateTransactionVariables, type UpsertDocumentMutationContext, type UpsertDocumentResult, type UpsertDocumentVariables, type VerificationResult, type VerificationVariables, type VerifyEmailResult, type VerifyEmailVariables, createAppwriteClient, createOfflineClient, getAccountQuery, getCollectionQuery, getDocumentQuery, hydrateMutationDefaults, mutationRegistry, q, resolveConflict, teamQueryOptions, useAccount, useAppwrite, useAvatarBrowser, useAvatarCreditCard, useAvatarFavicon, useAvatarFlag, useAvatarImage, useAvatarInitials, useAvatarQR, useAvatarScreenshot, useCollection, useCollectionWithPagination, useCreateAnonymousSession, useCreateDocument, useCreateEmailToken, useCreateEmailVerification, useCreateFile, useCreateJWT, useCreateMagicURLToken, useCreateMembership, useCreateMfaAuthenticator, useCreateMfaChallenge, useCreateMfaRecoveryCodes, useCreateOAuth2Token, useCreateOperations, useCreatePhoneToken, useCreatePhoneVerification, useCreatePushTarget, useCreateSession, useCreateSubscriber, useCreateTeam, useCreateTransaction, useDecrementAttribute, useDeleteDocument, useDeleteFile, useDeleteIdentity, useDeleteMembership, useDeleteMfaAuthenticator, useDeletePushTarget, useDeleteSession, useDeleteSessions, useDeleteSubscriber, useDeleteTeam, useDeleteTransaction, useDocument, useFile, useFileDownload, useFilePreview, useFileView, useFiles, useFunction, useGetExecution, useGetMfaRecoveryCodes, useGetPrefs, useGetSession, useGetTransaction, useIncrementAttribute, useInfiniteCollection, useLazyAccount, useLazyQuery, useListExecutions, useListIdentities, useListMfaFactors, useListSessions, useListTransactions, useLocale, useLocaleCodes, useLocaleContinents, useLocaleCountries, useLocaleCountriesEU, useLocaleCountriesPhones, useLocaleCurrencies, useLocaleLanguages, useLogin, useLogout, useLogs, useMutation, usePasswordRecovery, useQuery, useQueryClient, useResetPassword, useSignUp, useSuspenseCollection, useSuspenseCollectionWithPagination, useSuspenseCreateJWT, useSuspenseDocument, useSuspenseFunction, useSuspenseQuery, useTeam, useTeamMembership, useTeamMemberships, useTeamPrefs, useTeams, useUpdateDocument, useUpdateEmail, useUpdateEmailVerification, useUpdateFile, useUpdateMagicURLSession, useUpdateMembership, useUpdateMembershipStatus, useUpdateMfa, useUpdateMfaAuthenticator, useUpdateMfaChallenge, useUpdateMfaRecoveryCodes, useUpdateName, useUpdatePassword, useUpdatePhone, useUpdatePhoneSession, useUpdatePhoneVerification, useUpdatePrefs, useUpdatePushTarget, useUpdateSession, useUpdateStatus, useUpdateTeamName, useUpdateTeamPrefs, useUpdateTransaction, useUpsertDocument, useVerification, webNetworkAdapter };
|