@zeroin.earth/appwrite-graphql 0.13.1 → 0.14.1

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.js CHANGED
@@ -24,17 +24,53 @@ __export(src_exports, {
24
24
  useAccount: () => useAccount,
25
25
  useAppwrite: () => useAppwrite,
26
26
  useCollection: () => useCollection,
27
+ useCreateAnonymousSession: () => useCreateAnonymousSession,
27
28
  useCreateDocument: () => useCreateDocument,
29
+ useCreateEmailToken: () => useCreateEmailToken,
30
+ useCreateJWT: () => useCreateJWT,
31
+ useCreateMagicURLToken: () => useCreateMagicURLToken,
32
+ useCreateMfaAuthenticator: () => useCreateMfaAuthenticator,
33
+ useCreateMfaChallenge: () => useCreateMfaChallenge,
34
+ useCreateMfaRecoveryCodes: () => useCreateMfaRecoveryCodes,
35
+ useCreatePhoneToken: () => useCreatePhoneToken,
36
+ useCreatePhoneVerification: () => useCreatePhoneVerification,
37
+ useCreateSession: () => useCreateSession,
38
+ useDeleteDocument: () => useDeleteDocument,
39
+ useDeleteIdentity: () => useDeleteIdentity,
40
+ useDeleteMfaAuthenticator: () => useDeleteMfaAuthenticator,
41
+ useDeleteSession: () => useDeleteSession,
42
+ useDeleteSessions: () => useDeleteSessions,
28
43
  useDocument: () => useDocument,
29
44
  useFunction: () => useFunction,
45
+ useGetMfaRecoveryCodes: () => useGetMfaRecoveryCodes,
46
+ useGetPrefs: () => useGetPrefs,
47
+ useGetSession: () => useGetSession,
48
+ useListIdentities: () => useListIdentities,
49
+ useListMfaFactors: () => useListMfaFactors,
50
+ useListSessions: () => useListSessions,
30
51
  useLogin: () => useLogin,
31
52
  useLogout: () => useLogout,
53
+ useLogs: () => useLogs,
32
54
  useMutation: () => useMutation,
33
55
  usePasswordRecovery: () => usePasswordRecovery,
34
56
  useQuery: () => useQuery,
35
57
  useQueryClient: () => useQueryClient,
36
58
  useResetPassword: () => useResetPassword,
37
59
  useSignUp: () => useSignUp,
60
+ useUpdateDocument: () => useUpdateDocument,
61
+ useUpdateEmail: () => useUpdateEmail,
62
+ useUpdateMagicURLSession: () => useUpdateMagicURLSession,
63
+ useUpdateMfa: () => useUpdateMfa,
64
+ useUpdateMfaAuthenticator: () => useUpdateMfaAuthenticator,
65
+ useUpdateMfaChallenge: () => useUpdateMfaChallenge,
66
+ useUpdateMfaRecoveryCodes: () => useUpdateMfaRecoveryCodes,
67
+ useUpdateName: () => useUpdateName,
68
+ useUpdatePassword: () => useUpdatePassword,
69
+ useUpdatePhone: () => useUpdatePhone,
70
+ useUpdatePhoneSession: () => useUpdatePhoneSession,
71
+ useUpdatePhoneVerification: () => useUpdatePhoneVerification,
72
+ useUpdatePrefs: () => useUpdatePrefs,
73
+ useUpdateSession: () => useUpdateSession,
38
74
  useVerification: () => useVerification
39
75
  });
40
76
  module.exports = __toCommonJS(src_exports);
@@ -49,11 +85,17 @@ var endpoint = process.env.APPWRITE_ENDPOINT ?? process.env.NEXT_PUBLIC_APPWRITE
49
85
  var projectId = process.env.APPWRITE_PROJECT_ID ?? process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID ?? "[PROJECT_ID]";
50
86
  client.setEndpoint(endpoint).setProject(projectId);
51
87
  var account = new import_appwrite.Account(client);
88
+ var databases = new import_appwrite.Databases(client);
89
+ var functions = new import_appwrite.Functions(client);
52
90
  var graphql = new import_appwrite.Graphql(client);
53
91
  var AccountAtom = (0, import_jotai.atom)(account);
92
+ var DatabasesAtom = (0, import_jotai.atom)(databases);
93
+ var FunctionsAtom = (0, import_jotai.atom)(functions);
54
94
  var GraphqlAtom = (0, import_jotai.atom)(graphql);
55
95
  function useAppwrite() {
56
96
  const [account2] = (0, import_jotai.useAtom)(AccountAtom);
97
+ const [databases2] = (0, import_jotai.useAtom)(DatabasesAtom);
98
+ const [functions2] = (0, import_jotai.useAtom)(FunctionsAtom);
57
99
  const [graphqlAppwrite] = (0, import_jotai.useAtom)(GraphqlAtom);
58
100
  const graphql2 = (0, import_react.useMemo)(
59
101
  () => ({
@@ -83,6 +125,8 @@ function useAppwrite() {
83
125
  );
84
126
  return {
85
127
  account: account2,
128
+ databases: databases2,
129
+ functions: functions2,
86
130
  graphql: graphql2
87
131
  };
88
132
  }
@@ -124,34 +168,104 @@ var import_immer = require("immer");
124
168
 
125
169
  // src/__generated__/graphql.ts
126
170
  var Account_UserFragmentFragmentDoc = { "kind": "Document", "definitions": [{ "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "Account_UserFragment" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "User" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }, { "kind": "Field", "name": { "kind": "Name", "value": "prefs" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "data" } }] } }] } }] };
171
+ var Identity_ProviderFragmentFragmentDoc = { "kind": "Document", "definitions": [{ "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "Identity_ProviderFragment" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Identity" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "provider" } }] } }] };
127
172
  var AccountGetDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AccountGet" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountGet" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "Account_UserFragment" } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "Account_UserFragment" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "User" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }, { "kind": "Field", "name": { "kind": "Name", "value": "prefs" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "data" } }] } }] } }] };
128
- var CreateEmailSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateEmailSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateEmailSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "email" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "password" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
173
+ var CreateAnonymousSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateAnonymousSession" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateAnonymousSession" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "_id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
174
+ var CreateEmailTokenDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateEmailToken" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "phrase" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Boolean" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateEmailToken" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "email" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "phrase" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "phrase" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
175
+ var CreateJwtDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateJWT" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateJWT" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "jwt" } }] } }] } }] };
176
+ var CreateMagicUrlTokenDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateMagicURLToken" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "url" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "phrase" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Boolean" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateMagicURLToken" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "email" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "url" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "url" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "phrase" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "phrase" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
177
+ var CreateMfaAuthenticatorDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateMfaAuthenticator" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateMfaAuthenticator" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "type" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "secret" } }, { "kind": "Field", "name": { "kind": "Name", "value": "uri" } }] } }] } }] };
178
+ var CreateMfaChallengeDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateMfaChallenge" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "factor" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateMfaChallenge" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "factor" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "factor" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
179
+ var CreateMfaRecoveryCodesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateMfaRecoveryCodes" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateMfaRecoveryCodes" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "recoveryCodes" } }] } }] } }] };
180
+ var CreatePhoneTokenDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreatePhoneToken" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "phone" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreatePhoneToken" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "phone" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "phone" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
181
+ var CreatePhoneVerificationDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreatePhoneVerification" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreatePhoneVerification" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
182
+ var CreateSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "secret" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
183
+ var DeleteIdentityDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteIdentity" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "identityId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountDeleteIdentity" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "identityId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "identityId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }] } }] } }] };
184
+ var DeleteMfaAuthenticatorDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteMfaAuthenticator" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "otp" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountDeleteMfaAuthenticator" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "type" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "otp" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "otp" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "mfa" } }] } }] } }] };
129
185
  var DeleteSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountDeleteSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "sessionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }] } }] } }] };
186
+ var GetMfaRecoveryCodesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetMfaRecoveryCodes" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountGetMfaRecoveryCodes" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "recoveryCodes" } }] } }] } }] };
187
+ var GetPrefsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetPrefs" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountGetPrefs" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "data" } }] } }] } }] };
188
+ var GetSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountGetSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "sessionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
189
+ var ListIdentitiesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListIdentities" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "queries" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountListIdentities" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "queries" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "queries" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "total" } }, { "kind": "Field", "name": { "kind": "Name", "value": "identities" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "Identity_ProviderFragment" } }] } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "Identity_ProviderFragment" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Identity" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "provider" } }] } }] };
190
+ var ListMfaFactorsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListMfaFactors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountListMfaFactors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "totp" } }, { "kind": "Field", "name": { "kind": "Name", "value": "phone" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }] } }] } }] };
191
+ var ListSessionsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListSessions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountListSessions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "sessions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "_id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "_createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "osName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientName" } }] } }] } }] } }] };
192
+ var CreateEmailPasswordSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateEmailPasswordSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateEmailPasswordSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "email" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "password" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
193
+ var ListLogsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListLogs" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "queries" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountListLogs" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "queries" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "queries" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "total" } }, { "kind": "Field", "name": { "kind": "Name", "value": "logs" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "event" } }, { "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "userEmail" } }, { "kind": "Field", "name": { "kind": "Name", "value": "userName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "mode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "ip" } }, { "kind": "Field", "name": { "kind": "Name", "value": "time" } }, { "kind": "Field", "name": { "kind": "Name", "value": "osCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "osName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "osVersion" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientVersion" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientEngine" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientEngineVersion" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deviceName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deviceBrand" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deviceModel" } }, { "kind": "Field", "name": { "kind": "Name", "value": "countryCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "countryName" } }] } }] } }] } }] };
130
194
  var CreateRecoveryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateRecovery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "url" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateRecovery" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "email" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "url" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "url" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
131
195
  var UpdateRecoveryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateRecovery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "passwordAgain" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateRecovery" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "secret" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "password" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "passwordAgain" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "passwordAgain" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
132
196
  var CreateAccountDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateAccount" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "name" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreate" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "name" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "name" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "email" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "password" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }] } }] } }] };
133
197
  var VerifyEmailDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "VerifyEmail" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "url" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountCreateVerification" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "url" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "url" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
198
+ var UpdateEmailDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateEmail" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateEmail" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "email" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "email" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "password" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "email" } }] } }] } }] };
199
+ var UpdateMagicUrlSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateMagicURLSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateMagicURLSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "secret" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
200
+ var UpdateMfaDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateMFA" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "mfa" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Boolean" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateMFA" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "mfa" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "mfa" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "mfa" } }] } }] } }] };
201
+ var UpdateMfaAuthenticatorDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateMfaAuthenticator" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "otp" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateMfaAuthenticator" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "type" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "type" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "otp" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "otp" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "mfa" } }] } }] } }] };
202
+ var UpdateMfaChallengeDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateMfaChallenge" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "challengeId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "otp" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateMfaChallenge" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "challengeId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "challengeId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "otp" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "otp" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }] } }] } }] };
203
+ var UpdateMfaRecoveryCodesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateMfaRecoveryCodes" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateMfaRecoveryCodes" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "recoveryCodes" } }] } }] } }] };
204
+ var UpdateNameDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateName" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "name" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateName" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "name" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "name" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] };
205
+ var UpdatePasswordDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdatePassword" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "oldPassword" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdatePassword" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "password" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "oldPassword" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "oldPassword" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }] } }] } }] };
206
+ var UpdatePhoneDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdatePhone" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "phone" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdatePhone" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "phone" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "phone" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "password" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "password" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "phone" } }] } }] } }] };
207
+ var UpdatePhoneSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdatePhoneSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdatePhoneSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "secret" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
208
+ var UpdatePhoneVerificationDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdatePhoneVerification" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdatePhoneVerification" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "secret" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
209
+ var UpdatePrefsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdatePrefs" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "prefs" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdatePrefs" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "prefs" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "prefs" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "prefs" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "data" } }] } }] } }] } }] };
210
+ var UpdateSessionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateSession" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateSession" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "sessionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "sessionId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "expire" } }, { "kind": "Field", "name": { "kind": "Name", "value": "current" } }] } }] } }] };
134
211
  var UpdateVerificationDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateVerification" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountUpdateVerification" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "secret" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "secret" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "expire" } }] } }] } }] };
135
212
  var ListDocumentsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ListDocuments" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "queries" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "databasesListDocuments" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "databaseId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "collectionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "queries" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "queries" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "total" } }, { "kind": "Field", "name": { "kind": "Name", "value": "documents" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "_id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "data" } }] } }] } }] } }] };
136
213
  var CreateDocumentDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateDocument" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "permissions" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "databasesCreateDocument" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "databaseId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "collectionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "documentId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "data" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "permissions" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "permissions" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "_id" } }] } }] } }] };
214
+ var DeleteDocumentDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteDocument" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "databasesDeleteDocument" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "databaseId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "collectionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "documentId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }] } }] } }] };
137
215
  var GetDocumentDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetDocument" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "databasesGetDocument" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "databaseId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "collectionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "documentId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "_id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "data" } }] } }] } }] };
216
+ var UpdateDocumentDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateDocument" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "permissions" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "databasesUpdateDocument" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "databaseId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "databaseId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "collectionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "collectionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "documentId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "documentId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "data" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "data" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "permissions" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "permissions" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "_id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "_collectionId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "_databaseId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "_createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "_updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "_permissions" } }, { "kind": "Field", "name": { "kind": "Name", "value": "data" } }] } }] } }] };
138
217
  var CreateExecutionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "CreateExecution" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "functionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "body" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "async" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Boolean" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "path" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "method" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "headers" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "JSON" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "functionsCreateExecution" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "functionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "functionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "body" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "body" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "async" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "async" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "path" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "path" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "method" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "method" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "headers" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "headers" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "_id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "responseStatusCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "responseBody" } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" } }, { "kind": "Field", "name": { "kind": "Name", "value": "duration" } }] } }] } }] };
139
218
  var GetFunctionExecutionDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetFunctionExecution" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "functionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "executionId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "functionsGetExecution" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "functionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "functionId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "executionId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "executionId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "errors" } }, { "kind": "Field", "name": { "kind": "Name", "value": "duration" } }] } }] } }] };
140
219
 
141
220
  // src/__generated__/gql.ts
142
221
  var documents = {
143
222
  "\n fragment Account_UserFragment on User {\n name\n email\n prefs {\n data\n }\n }\n": Account_UserFragmentFragmentDoc,
223
+ "\n fragment Identity_ProviderFragment on Identity {\n userId\n provider\n }\n": Identity_ProviderFragmentFragmentDoc,
144
224
  "\n query AccountGet {\n accountGet {\n ...Account_UserFragment\n }\n }\n": AccountGetDocument,
145
- "\n mutation CreateEmailSession($email: String!, $password: String!) {\n accountCreateEmailSession(email: $email, password: $password) {\n userId\n expire\n current\n }\n }\n": CreateEmailSessionDocument,
225
+ "\n mutation CreateAnonymousSession {\n accountCreateAnonymousSession {\n _id\n expire\n current\n }\n }\n": CreateAnonymousSessionDocument,
226
+ "\n mutation CreateEmailToken($userId: String!, $email: String!, $phrase: Boolean) {\n accountCreateEmailToken(userId: $userId, email: $email, phrase: $phrase) {\n expire\n }\n }\n": CreateEmailTokenDocument,
227
+ "\n mutation CreateJWT {\n accountCreateJWT {\n jwt\n }\n }\n": CreateJwtDocument,
228
+ "\n mutation CreateMagicURLToken($userId: String!, $email: String!, $url: String, $phrase: Boolean) {\n accountCreateMagicURLToken(userId: $userId, email: $email, url: $url, phrase: $phrase) {\n expire\n }\n }\n": CreateMagicUrlTokenDocument,
229
+ "\n mutation CreateMfaAuthenticator($type: String!) {\n accountCreateMfaAuthenticator(type: $type) {\n secret\n uri\n }\n }\n": CreateMfaAuthenticatorDocument,
230
+ "\n mutation CreateMfaChallenge($factor: String!) {\n accountCreateMfaChallenge(factor: $factor) {\n userId\n expire\n }\n }\n": CreateMfaChallengeDocument,
231
+ "\n mutation CreateMfaRecoveryCodes {\n accountCreateMfaRecoveryCodes {\n recoveryCodes\n }\n }\n": CreateMfaRecoveryCodesDocument,
232
+ "\n mutation CreatePhoneToken($userId: String!, $phone: String!) {\n accountCreatePhoneToken(userId: $userId, phone: $phone) {\n expire\n }\n }\n": CreatePhoneTokenDocument,
233
+ "\n mutation CreatePhoneVerification {\n accountCreatePhoneVerification {\n expire\n }\n }\n": CreatePhoneVerificationDocument,
234
+ "\n mutation CreateSession($userId: String!, $secret: String!) {\n accountCreateSession(userId: $userId, secret: $secret) {\n userId\n expire\n current\n }\n }\n": CreateSessionDocument,
235
+ "\n mutation DeleteIdentity($identityId: String!) {\n accountDeleteIdentity(identityId: $identityId) {\n status\n }\n }\n": DeleteIdentityDocument,
236
+ "\n mutation DeleteMfaAuthenticator($type: String!, $otp: String!) {\n accountDeleteMfaAuthenticator(type: $type, otp: $otp) {\n mfa\n }\n }\n": DeleteMfaAuthenticatorDocument,
146
237
  "\n mutation DeleteSession($sessionId: String!) {\n accountDeleteSession(sessionId: $sessionId) {\n status\n }\n }\n": DeleteSessionDocument,
238
+ "\n query GetMfaRecoveryCodes {\n accountGetMfaRecoveryCodes {\n recoveryCodes\n }\n }\n": GetMfaRecoveryCodesDocument,
239
+ "\n query GetPrefs {\n accountGetPrefs {\n data\n }\n }\n": GetPrefsDocument,
240
+ "\n query GetSession($sessionId: String!) {\n accountGetSession(sessionId: $sessionId) {\n userId\n expire\n current\n }\n }\n": GetSessionDocument,
241
+ "\n query ListIdentities($queries: [String!]) {\n accountListIdentities(queries: $queries) {\n total\n identities {\n ...Identity_ProviderFragment\n }\n }\n }\n": ListIdentitiesDocument,
242
+ "\n query ListMfaFactors {\n accountListMfaFactors {\n totp\n phone\n email\n }\n }\n": ListMfaFactorsDocument,
243
+ "\n query ListSessions {\n accountListSessions {\n sessions {\n _id\n _createdAt\n osName\n clientName\n }\n }\n }\n": ListSessionsDocument,
244
+ "\n mutation CreateEmailPasswordSession($email: String!, $password: String!) {\n accountCreateEmailPasswordSession(email: $email, password: $password) {\n userId\n expire\n current\n }\n }\n": CreateEmailPasswordSessionDocument,
245
+ "\n query ListLogs($queries: [String!]) {\n accountListLogs(queries: $queries) {\n total\n logs {\n event\n userId\n userEmail\n userName\n mode\n ip\n time\n osCode\n osName\n osVersion\n clientType\n clientCode\n clientName\n clientVersion\n clientEngine\n clientEngineVersion\n deviceName\n deviceBrand\n deviceModel\n countryCode\n countryName\n }\n }\n }\n": ListLogsDocument,
147
246
  "\n mutation CreateRecovery($email: String!, $url: String!) {\n accountCreateRecovery(email: $email, url: $url) {\n expire\n }\n }\n": CreateRecoveryDocument,
148
247
  "\n mutation UpdateRecovery(\n $userId: String!\n $secret: String!\n $password: String!\n $passwordAgain: String!\n ) {\n accountUpdateRecovery(\n userId: $userId\n secret: $secret\n password: $password\n passwordAgain: $passwordAgain\n ) {\n expire\n }\n }\n": UpdateRecoveryDocument,
149
248
  "\n mutation CreateAccount($userId: String!, $name: String, $email: String!, $password: String!) {\n accountCreate(userId: $userId, name: $name, email: $email, password: $password) {\n name\n email\n }\n }\n": CreateAccountDocument,
150
249
  "\n mutation VerifyEmail($url: String!) {\n accountCreateVerification(url: $url) {\n expire\n }\n }\n": VerifyEmailDocument,
250
+ "\n mutation UpdateEmail($email: String!, $password: String!) {\n accountUpdateEmail(email: $email, password: $password) {\n name\n email\n }\n }\n": UpdateEmailDocument,
251
+ "\n mutation UpdateMagicURLSession($userId: String!, $secret: String!) {\n accountUpdateMagicURLSession(userId: $userId, secret: $secret) {\n userId\n expire\n current\n }\n }\n": UpdateMagicUrlSessionDocument,
252
+ "\n mutation UpdateMFA($mfa: Boolean!) {\n accountUpdateMFA(mfa: $mfa) {\n mfa\n }\n }\n": UpdateMfaDocument,
253
+ "\n mutation UpdateMfaAuthenticator($type: String!, $otp: String!) {\n accountUpdateMfaAuthenticator(type: $type, otp: $otp) {\n mfa\n }\n }\n": UpdateMfaAuthenticatorDocument,
254
+ "\n mutation UpdateMfaChallenge($challengeId: String!, $otp: String!) {\n accountUpdateMfaChallenge(challengeId: $challengeId, otp: $otp) {\n status\n }\n }\n": UpdateMfaChallengeDocument,
255
+ "\n mutation UpdateMfaRecoveryCodes {\n accountUpdateMfaRecoveryCodes {\n recoveryCodes\n }\n }\n": UpdateMfaRecoveryCodesDocument,
256
+ "\n mutation UpdateName($name: String!) {\n accountUpdateName(name: $name) {\n name\n }\n }\n": UpdateNameDocument,
257
+ "\n mutation UpdatePassword($password: String!, $oldPassword: String!) {\n accountUpdatePassword(password: $password, oldPassword: $oldPassword) {\n status\n }\n }\n": UpdatePasswordDocument,
258
+ "\n mutation UpdatePhone($phone: String!, $password: String!) {\n accountUpdatePhone(phone: $phone, password: $password) {\n phone\n }\n }\n": UpdatePhoneDocument,
259
+ "\n mutation UpdatePhoneSession($userId: String!, $secret: String!) {\n accountUpdatePhoneSession(userId: $userId, secret: $secret) {\n userId\n expire\n current\n }\n }\n": UpdatePhoneSessionDocument,
260
+ "\n mutation UpdatePhoneVerification($userId: String!, $secret: String!) {\n accountUpdatePhoneVerification(userId: $userId, secret: $secret) {\n expire\n }\n }\n": UpdatePhoneVerificationDocument,
261
+ "\n mutation UpdatePrefs($prefs: JSON!) {\n accountUpdatePrefs(prefs: $prefs) {\n prefs {\n data\n }\n }\n }\n": UpdatePrefsDocument,
262
+ "\n mutation UpdateSession($sessionId: String!) {\n accountUpdateSession(sessionId: $sessionId) {\n userId\n expire\n current\n }\n }\n": UpdateSessionDocument,
151
263
  "\n mutation UpdateVerification($userId: String!, $secret: String!) {\n accountUpdateVerification(userId: $userId, secret: $secret) {\n expire\n }\n }\n": UpdateVerificationDocument,
152
264
  "\n query ListDocuments($databaseId: String!, $collectionId: String!, $queries: [String!]) {\n databasesListDocuments(\n databaseId: $databaseId\n collectionId: $collectionId\n queries: $queries\n ) {\n total\n documents {\n _id\n data\n }\n }\n }\n": ListDocumentsDocument,
153
265
  "\n mutation CreateDocument(\n $databaseId: String!\n $collectionId: String!\n $documentId: String!\n $data: JSON!\n $permissions: [String!]\n ) {\n databasesCreateDocument(\n databaseId: $databaseId\n collectionId: $collectionId\n documentId: $documentId\n data: $data\n permissions: $permissions\n ) {\n _id\n }\n }\n": CreateDocumentDocument,
266
+ "\n mutation DeleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!) {\n databasesDeleteDocument(\n databaseId: $databaseId\n collectionId: $collectionId\n documentId: $documentId\n ) {\n status\n }\n }\n": DeleteDocumentDocument,
154
267
  "\n query GetDocument($databaseId: String!, $collectionId: String!, $documentId: String!) {\n databasesGetDocument(\n databaseId: $databaseId\n collectionId: $collectionId\n documentId: $documentId\n ) {\n _id\n data\n }\n }\n": GetDocumentDocument,
268
+ "\n mutation UpdateDocument(\n $databaseId: String!\n $collectionId: String!\n $documentId: String!\n $data: JSON!\n $permissions: [String!]\n ) {\n databasesUpdateDocument(\n databaseId: $databaseId\n collectionId: $collectionId\n documentId: $documentId\n data: $data\n permissions: $permissions\n ) {\n _id\n _collectionId\n _databaseId\n _createdAt\n _updatedAt\n _permissions\n data\n }\n }\n": UpdateDocumentDocument,
155
269
  "\n mutation CreateExecution(\n $functionId: String!\n $body: String\n $async: Boolean\n $path: String\n $method: String\n $headers: JSON\n ) {\n functionsCreateExecution(\n functionId: $functionId\n body: $body\n async: $async\n path: $path\n method: $method\n headers: $headers\n ) {\n _id\n status\n responseStatusCode\n responseBody\n errors\n duration\n }\n }\n": CreateExecutionDocument,
156
270
  "\n query GetFunctionExecution($functionId: String!, $executionId: String!) {\n functionsGetExecution(functionId: $functionId, executionId: $executionId) {\n status\n errors\n duration\n }\n }\n": GetFunctionExecutionDocument
157
271
  };
@@ -170,9 +284,7 @@ var getAccount = gql(
170
284
  }
171
285
  `
172
286
  );
173
- function useAccount({
174
- options
175
- }) {
287
+ function useAccount() {
176
288
  const { graphql: graphql2 } = useAppwrite();
177
289
  const queryClient2 = useQueryClient();
178
290
  const queryResult = useQuery({
@@ -186,8 +298,7 @@ function useAccount({
186
298
  }
187
299
  return data.accountGet;
188
300
  },
189
- retry: false,
190
- ...options
301
+ retry: false
191
302
  });
192
303
  (0, import_react2.useEffect)(() => {
193
304
  const unsubscribe = graphql2.client.subscribe(
@@ -210,223 +321,1291 @@ function useAccount({
210
321
  response.payload
211
322
  );
212
323
  }
213
- );
214
- return unsubscribe;
215
- }, [graphql2.client, queryClient2]);
216
- return queryResult;
324
+ );
325
+ return unsubscribe;
326
+ }, [graphql2.client, queryClient2]);
327
+ return queryResult;
328
+ }
329
+
330
+ // src/__generated__/fragment-masking.ts
331
+ function getFragmentData(_documentNode, fragmentType) {
332
+ return fragmentType;
333
+ }
334
+
335
+ // src/account/useCreateAnonymousSession.ts
336
+ var createAnonymousSession = gql(
337
+ /* GraphQL */
338
+ `
339
+ mutation CreateAnonymousSession {
340
+ accountCreateAnonymousSession {
341
+ _id
342
+ expire
343
+ current
344
+ }
345
+ }
346
+ `
347
+ );
348
+ function useCreateAnonymousSession() {
349
+ const { graphql: graphql2 } = useAppwrite();
350
+ const queryResult = useMutation({
351
+ mutationFn: async () => {
352
+ const { data, errors } = await graphql2.mutation({
353
+ query: createAnonymousSession
354
+ });
355
+ if (errors) {
356
+ throw errors;
357
+ }
358
+ return data.accountCreateAnonymousSession;
359
+ }
360
+ });
361
+ return { ...queryResult };
362
+ }
363
+
364
+ // src/account/useCreateEmailToken.ts
365
+ var createEmailToken = gql(
366
+ /* GraphQL */
367
+ `
368
+ mutation CreateEmailToken($userId: String!, $email: String!, $phrase: Boolean) {
369
+ accountCreateEmailToken(userId: $userId, email: $email, phrase: $phrase) {
370
+ expire
371
+ }
372
+ }
373
+ `
374
+ );
375
+ function useCreateEmailToken() {
376
+ const { graphql: graphql2 } = useAppwrite();
377
+ const queryResult = useMutation({
378
+ mutationFn: async ({ userId, email, phrase }) => {
379
+ const { data, errors } = await graphql2.mutation({
380
+ query: createEmailToken,
381
+ variables: {
382
+ userId,
383
+ email,
384
+ phrase
385
+ }
386
+ });
387
+ if (errors) {
388
+ throw errors;
389
+ }
390
+ return data.accountCreateEmailToken;
391
+ }
392
+ });
393
+ return { ...queryResult };
394
+ }
395
+
396
+ // src/account/useCreateJWT.ts
397
+ var accountCreateJWT = gql(
398
+ /* GraphQL */
399
+ `
400
+ mutation CreateJWT {
401
+ accountCreateJWT {
402
+ jwt
403
+ }
404
+ }
405
+ `
406
+ );
407
+ function useCreateJWT() {
408
+ const { graphql: graphql2 } = useAppwrite();
409
+ const queryResult = useMutation({
410
+ mutationFn: async () => {
411
+ const { data, errors } = await graphql2.mutation({
412
+ query: accountCreateJWT
413
+ });
414
+ if (errors) {
415
+ throw errors;
416
+ }
417
+ return data.accountCreateJWT;
418
+ }
419
+ });
420
+ return { ...queryResult };
421
+ }
422
+
423
+ // src/account/useCreateMagicURLToken.ts
424
+ var createMagicURLToken = gql(
425
+ /* GraphQL */
426
+ `
427
+ mutation CreateMagicURLToken($userId: String!, $email: String!, $url: String, $phrase: Boolean) {
428
+ accountCreateMagicURLToken(userId: $userId, email: $email, url: $url, phrase: $phrase) {
429
+ expire
430
+ }
431
+ }
432
+ `
433
+ );
434
+ function useCreateMagicURLToken() {
435
+ const { graphql: graphql2 } = useAppwrite();
436
+ const queryResult = useMutation({
437
+ mutationFn: async ({ userId, email, url, phrase }) => {
438
+ const { data, errors } = await graphql2.mutation({
439
+ query: createMagicURLToken,
440
+ variables: {
441
+ userId,
442
+ email,
443
+ url,
444
+ phrase
445
+ }
446
+ });
447
+ if (errors) {
448
+ throw errors;
449
+ }
450
+ return data.accountCreateMagicURLToken;
451
+ }
452
+ });
453
+ return { ...queryResult };
454
+ }
455
+
456
+ // src/account/useCreateMfaAuthenticator.ts
457
+ var accountCreateMfaAuthenticator = gql(
458
+ /* GraphQL */
459
+ `
460
+ mutation CreateMfaAuthenticator($type: String!) {
461
+ accountCreateMfaAuthenticator(type: $type) {
462
+ secret
463
+ uri
464
+ }
465
+ }
466
+ `
467
+ );
468
+ function useCreateMfaAuthenticator() {
469
+ const { graphql: graphql2 } = useAppwrite();
470
+ const queryResult = useMutation({
471
+ mutationFn: async ({ type = "totp" }) => {
472
+ const { data, errors } = await graphql2.mutation({
473
+ query: accountCreateMfaAuthenticator,
474
+ variables: {
475
+ type
476
+ }
477
+ });
478
+ if (errors) {
479
+ throw errors;
480
+ }
481
+ return data.accountCreateMfaAuthenticator;
482
+ }
483
+ });
484
+ return { ...queryResult };
485
+ }
486
+
487
+ // src/account/useCreateMfaChallenge.ts
488
+ var accountCreateMfaChallenge = gql(
489
+ /* GraphQL */
490
+ `
491
+ mutation CreateMfaChallenge($factor: String!) {
492
+ accountCreateMfaChallenge(factor: $factor) {
493
+ userId
494
+ expire
495
+ }
496
+ }
497
+ `
498
+ );
499
+ function useCreateMfaChallenge() {
500
+ const { graphql: graphql2 } = useAppwrite();
501
+ const queryResult = useMutation({
502
+ mutationFn: async ({ factor }) => {
503
+ const { data, errors } = await graphql2.mutation({
504
+ query: accountCreateMfaChallenge,
505
+ variables: {
506
+ factor
507
+ }
508
+ });
509
+ if (errors) {
510
+ throw errors;
511
+ }
512
+ return data.accountCreateMfaChallenge;
513
+ }
514
+ });
515
+ return { ...queryResult };
516
+ }
517
+
518
+ // src/account/useCreateMfaRecoveryCodes.ts
519
+ var accountCreateMfaRecoveryCodes = gql(
520
+ /* GraphQL */
521
+ `
522
+ mutation CreateMfaRecoveryCodes {
523
+ accountCreateMfaRecoveryCodes {
524
+ recoveryCodes
525
+ }
526
+ }
527
+ `
528
+ );
529
+ function useCreateMfaRecoveryCodes() {
530
+ const { graphql: graphql2 } = useAppwrite();
531
+ const queryResult = useMutation({
532
+ mutationFn: async () => {
533
+ const { data, errors } = await graphql2.mutation({
534
+ query: accountCreateMfaRecoveryCodes
535
+ });
536
+ if (errors) {
537
+ throw errors;
538
+ }
539
+ return data.accountCreateMfaRecoveryCodes;
540
+ }
541
+ });
542
+ return { ...queryResult };
543
+ }
544
+
545
+ // src/account/useCreatePhoneToken.ts
546
+ var createPhoneToken = gql(
547
+ /* GraphQL */
548
+ `
549
+ mutation CreatePhoneToken($userId: String!, $phone: String!) {
550
+ accountCreatePhoneToken(userId: $userId, phone: $phone) {
551
+ expire
552
+ }
553
+ }
554
+ `
555
+ );
556
+ function useCreatePhoneToken() {
557
+ const { graphql: graphql2 } = useAppwrite();
558
+ const queryResult = useMutation({
559
+ mutationFn: async ({ userId, phone }) => {
560
+ const { data, errors } = await graphql2.mutation({
561
+ query: createPhoneToken,
562
+ variables: {
563
+ userId,
564
+ phone
565
+ }
566
+ });
567
+ if (errors) {
568
+ throw errors;
569
+ }
570
+ return data.accountCreatePhoneToken;
571
+ }
572
+ });
573
+ return { ...queryResult };
574
+ }
575
+
576
+ // src/account/useCreatePhoneVerification.ts
577
+ var createPhoneVerification = gql(
578
+ /* GraphQL */
579
+ `
580
+ mutation CreatePhoneVerification {
581
+ accountCreatePhoneVerification {
582
+ expire
583
+ }
584
+ }
585
+ `
586
+ );
587
+ function useCreatePhoneVerification() {
588
+ const { graphql: graphql2 } = useAppwrite();
589
+ const queryResult = useMutation({
590
+ mutationFn: async () => {
591
+ const { data, errors } = await graphql2.mutation({
592
+ query: createPhoneVerification
593
+ });
594
+ if (errors) {
595
+ throw errors;
596
+ }
597
+ return data.accountCreatePhoneVerification;
598
+ }
599
+ });
600
+ return { ...queryResult };
601
+ }
602
+
603
+ // src/account/useCreateSession.ts
604
+ var createSession = gql(
605
+ /* GraphQL */
606
+ `
607
+ mutation CreateSession($userId: String!, $secret: String!) {
608
+ accountCreateSession(userId: $userId, secret: $secret) {
609
+ userId
610
+ expire
611
+ current
612
+ }
613
+ }
614
+ `
615
+ );
616
+ function useCreateSession() {
617
+ const { graphql: graphql2 } = useAppwrite();
618
+ const queryResult = useMutation({
619
+ mutationFn: async ({ userId, secret }) => {
620
+ const { data, errors } = await graphql2.mutation({
621
+ query: createSession,
622
+ variables: {
623
+ userId,
624
+ secret
625
+ }
626
+ });
627
+ if (errors) {
628
+ throw errors;
629
+ }
630
+ return data.accountCreateSession;
631
+ }
632
+ });
633
+ return { ...queryResult };
634
+ }
635
+
636
+ // src/account/useDeleteIdentity.ts
637
+ var accountDeleteIdentity = gql(
638
+ /* GraphQL */
639
+ `
640
+ mutation DeleteIdentity($identityId: String!) {
641
+ accountDeleteIdentity(identityId: $identityId) {
642
+ status
643
+ }
644
+ }
645
+ `
646
+ );
647
+ function useDeleteIdentity() {
648
+ const { graphql: graphql2 } = useAppwrite();
649
+ const queryResult = useMutation({
650
+ mutationFn: async ({ identityId }) => {
651
+ const { data, errors } = await graphql2.mutation({
652
+ query: accountDeleteIdentity,
653
+ variables: {
654
+ identityId
655
+ }
656
+ });
657
+ if (errors) {
658
+ throw errors;
659
+ }
660
+ return data.accountDeleteIdentity ?? { status: false };
661
+ }
662
+ });
663
+ return { ...queryResult };
664
+ }
665
+
666
+ // src/account/useDeleteMfaAuthenticator.ts
667
+ var updateMFAAuthenticator = gql(
668
+ /* GraphQL */
669
+ `
670
+ mutation DeleteMfaAuthenticator($type: String!, $otp: String!) {
671
+ accountDeleteMfaAuthenticator(type: $type, otp: $otp) {
672
+ mfa
673
+ }
674
+ }
675
+ `
676
+ );
677
+ function useDeleteMfaAuthenticator() {
678
+ const { graphql: graphql2 } = useAppwrite();
679
+ const queryResult = useMutation({
680
+ mutationFn: async ({ type = "totp", otp }) => {
681
+ const { data, errors } = await graphql2.mutation({
682
+ query: updateMFAAuthenticator,
683
+ variables: {
684
+ type,
685
+ otp
686
+ }
687
+ });
688
+ if (errors) {
689
+ throw errors;
690
+ }
691
+ return data.accountDeleteMfaAuthenticator;
692
+ }
693
+ });
694
+ return { ...queryResult };
695
+ }
696
+
697
+ // src/account/useDeleteSession.ts
698
+ var deleteSession = gql(
699
+ /* GraphQL */
700
+ `
701
+ mutation DeleteSession($sessionId: String!) {
702
+ accountDeleteSession(sessionId: $sessionId) {
703
+ status
704
+ }
705
+ }
706
+ `
707
+ );
708
+ function useDeleteSession() {
709
+ const { graphql: graphql2 } = useAppwrite();
710
+ const queryResult = useMutation({
711
+ mutationFn: async ({ sessionId }) => {
712
+ const { data, errors } = await graphql2.mutation({
713
+ query: deleteSession,
714
+ variables: {
715
+ sessionId
716
+ }
717
+ });
718
+ if (errors) {
719
+ throw errors;
720
+ }
721
+ return data.accountDeleteSession;
722
+ }
723
+ });
724
+ return { ...queryResult };
725
+ }
726
+
727
+ // src/account/useDeleteSessions.ts
728
+ var deleteSession2 = gql(
729
+ /* GraphQL */
730
+ `
731
+ mutation DeleteSession($sessionId: String!) {
732
+ accountDeleteSession(sessionId: $sessionId) {
733
+ status
734
+ }
735
+ }
736
+ `
737
+ );
738
+ function useDeleteSessions() {
739
+ const { graphql: graphql2 } = useAppwrite();
740
+ const queryResult = useMutation({
741
+ mutationFn: async ({ sessionId }) => {
742
+ const { data, errors } = await graphql2.mutation({
743
+ query: deleteSession2,
744
+ variables: {
745
+ sessionId
746
+ }
747
+ });
748
+ if (errors) {
749
+ throw errors;
750
+ }
751
+ return data.accountDeleteSession;
752
+ }
753
+ });
754
+ return { ...queryResult };
755
+ }
756
+
757
+ // src/account/useGetMfaRecoveryCodes.ts
758
+ var getMFARecoveryCodes = gql(
759
+ /* GraphQL */
760
+ `
761
+ query GetMfaRecoveryCodes {
762
+ accountGetMfaRecoveryCodes {
763
+ recoveryCodes
764
+ }
765
+ }
766
+ `
767
+ );
768
+ function useGetMfaRecoveryCodes() {
769
+ const { graphql: graphql2 } = useAppwrite();
770
+ const queryResult = useQuery({
771
+ queryKey: ["appwrite", "account", "mfa", "recovery-codes"],
772
+ queryFn: async () => {
773
+ const { data, errors } = await graphql2.query({
774
+ query: getMFARecoveryCodes
775
+ });
776
+ if (errors) {
777
+ throw errors;
778
+ }
779
+ return data.accountGetMfaRecoveryCodes;
780
+ }
781
+ });
782
+ return { ...queryResult };
783
+ }
784
+
785
+ // src/account/useGetPrefs.ts
786
+ var accountGetPrefs = gql(
787
+ /* GraphQL */
788
+ `
789
+ query GetPrefs {
790
+ accountGetPrefs {
791
+ data
792
+ }
793
+ }
794
+ `
795
+ );
796
+ function useGetPrefs() {
797
+ const { graphql: graphql2 } = useAppwrite();
798
+ const queryResult = useQuery({
799
+ queryKey: ["appwrite", "account", "prefs"],
800
+ queryFn: async () => {
801
+ const { data, errors } = await graphql2.query({
802
+ query: accountGetPrefs
803
+ });
804
+ if (errors) {
805
+ throw errors;
806
+ }
807
+ return data.accountGetPrefs;
808
+ }
809
+ });
810
+ return { ...queryResult };
811
+ }
812
+
813
+ // src/account/useGetSession.ts
814
+ var getSession = gql(
815
+ /* GraphQL */
816
+ `
817
+ query GetSession($sessionId: String!) {
818
+ accountGetSession(sessionId: $sessionId) {
819
+ userId
820
+ expire
821
+ current
822
+ }
823
+ }
824
+ `
825
+ );
826
+ function useGetSession({ sessionId }) {
827
+ const { graphql: graphql2 } = useAppwrite();
828
+ const queryResult = useQuery({
829
+ queryKey: ["appwrite", "account", "session", sessionId],
830
+ queryFn: async () => {
831
+ const { data, errors } = await graphql2.query({
832
+ query: getSession,
833
+ variables: { sessionId }
834
+ });
835
+ if (errors) {
836
+ throw errors;
837
+ }
838
+ return data.accountGetSession;
839
+ }
840
+ });
841
+ return queryResult;
842
+ }
843
+
844
+ // src/account/useListIdentities.ts
845
+ var accountListIdentities = gql(
846
+ /* GraphQL */
847
+ `
848
+ query ListIdentities($queries: [String!]) {
849
+ accountListIdentities(queries: $queries) {
850
+ total
851
+ identities {
852
+ ...Identity_ProviderFragment
853
+ }
854
+ }
855
+ }
856
+ `
857
+ );
858
+ function useListIdentities({ queries }) {
859
+ const { graphql: graphql2 } = useAppwrite();
860
+ const queryResult = useQuery({
861
+ queryKey: ["appwrite", "account", "identities", queries],
862
+ queryFn: async () => {
863
+ const { data, errors } = await graphql2.query({
864
+ query: accountListIdentities,
865
+ variables: {
866
+ queries
867
+ }
868
+ });
869
+ if (errors) {
870
+ throw errors;
871
+ }
872
+ return data.accountListIdentities;
873
+ }
874
+ });
875
+ return { ...queryResult };
876
+ }
877
+
878
+ // src/account/useListMfaFactors.ts
879
+ var listMFAFactors = gql(
880
+ /* GraphQL */
881
+ `
882
+ query ListMfaFactors {
883
+ accountListMfaFactors {
884
+ totp
885
+ phone
886
+ email
887
+ }
888
+ }
889
+ `
890
+ );
891
+ function useListMfaFactors() {
892
+ const { graphql: graphql2 } = useAppwrite();
893
+ const queryResult = useQuery({
894
+ queryKey: ["appwrite", "account", "mfa", "factors"],
895
+ queryFn: async () => {
896
+ const { data, errors } = await graphql2.query({
897
+ query: listMFAFactors
898
+ });
899
+ if (errors) {
900
+ throw errors;
901
+ }
902
+ return data.accountListMfaFactors;
903
+ }
904
+ });
905
+ return { ...queryResult };
906
+ }
907
+
908
+ // src/account/useListSessions.ts
909
+ var accountListSessions = gql(
910
+ /* GraphQL */
911
+ `
912
+ query ListSessions {
913
+ accountListSessions {
914
+ sessions {
915
+ _id
916
+ _createdAt
917
+ osName
918
+ clientName
919
+ }
920
+ }
921
+ }
922
+ `
923
+ );
924
+ function useListSessions() {
925
+ const { graphql: graphql2 } = useAppwrite();
926
+ const queryResult = useQuery({
927
+ queryKey: ["appwrite", "account", "sessions"],
928
+ queryFn: async () => {
929
+ const { data, errors } = await graphql2.query({
930
+ query: accountListSessions
931
+ });
932
+ if (errors) {
933
+ throw errors;
934
+ }
935
+ return data.accountListSessions;
936
+ }
937
+ });
938
+ return { ...queryResult };
939
+ }
940
+
941
+ // src/account/useLogin.ts
942
+ var accountCreateEmailPasswordSession = gql(
943
+ /* GraphQL */
944
+ `
945
+ mutation CreateEmailPasswordSession($email: String!, $password: String!) {
946
+ accountCreateEmailPasswordSession(email: $email, password: $password) {
947
+ userId
948
+ expire
949
+ current
950
+ }
951
+ }
952
+ `
953
+ );
954
+ function useLogin() {
955
+ const { account: account2, graphql: graphql2 } = useAppwrite();
956
+ const login = useMutation({
957
+ mutationFn: async ({ email, password }) => {
958
+ const { data, errors } = await graphql2.mutation({
959
+ query: accountCreateEmailPasswordSession,
960
+ variables: {
961
+ email,
962
+ password
963
+ }
964
+ });
965
+ if (errors) {
966
+ throw errors;
967
+ }
968
+ return data.accountCreateEmailPasswordSession;
969
+ }
970
+ });
971
+ const oAuthLogin = useMutation({
972
+ mutationFn: async ({ provider, success, failure }) => {
973
+ return account2.createOAuth2Session(provider, success, failure);
974
+ }
975
+ });
976
+ return {
977
+ login,
978
+ oAuthLogin
979
+ };
980
+ }
981
+
982
+ // src/account/useLogout.ts
983
+ var deleteSession3 = gql(
984
+ /* GraphQL */
985
+ `
986
+ mutation DeleteSession($sessionId: String!) {
987
+ accountDeleteSession(sessionId: $sessionId) {
988
+ status
989
+ }
990
+ }
991
+ `
992
+ );
993
+ function useLogout() {
994
+ const { graphql: graphql2 } = useAppwrite();
995
+ const queryClient2 = useQueryClient();
996
+ const queryResult = useMutation({
997
+ mutationFn: async ({ sessionId }) => {
998
+ const { data, errors } = await graphql2.mutation({
999
+ query: deleteSession3,
1000
+ variables: {
1001
+ sessionId
1002
+ }
1003
+ });
1004
+ if (errors) {
1005
+ throw errors;
1006
+ }
1007
+ return data?.accountDeleteSession;
1008
+ },
1009
+ onSuccess: async () => {
1010
+ queryClient2.setQueryData(["appwrite", "account"], null);
1011
+ queryClient2.removeQueries({ queryKey: ["appwrite", "account"] });
1012
+ }
1013
+ });
1014
+ return { ...queryResult, mutate: queryResult.mutate };
1015
+ }
1016
+
1017
+ // src/account/useLogs.ts
1018
+ var accountListLogs = gql(
1019
+ /* GraphQL */
1020
+ `
1021
+ query ListLogs($queries: [String!]) {
1022
+ accountListLogs(queries: $queries) {
1023
+ total
1024
+ logs {
1025
+ event
1026
+ userId
1027
+ userEmail
1028
+ userName
1029
+ mode
1030
+ ip
1031
+ time
1032
+ osCode
1033
+ osName
1034
+ osVersion
1035
+ clientType
1036
+ clientCode
1037
+ clientName
1038
+ clientVersion
1039
+ clientEngine
1040
+ clientEngineVersion
1041
+ deviceName
1042
+ deviceBrand
1043
+ deviceModel
1044
+ countryCode
1045
+ countryName
1046
+ }
1047
+ }
1048
+ }
1049
+ `
1050
+ );
1051
+ function useLogs({ queries }) {
1052
+ const { graphql: graphql2 } = useAppwrite();
1053
+ const queryResult = useQuery({
1054
+ queryKey: ["appwrite", "account", "logs", queries],
1055
+ queryFn: async () => {
1056
+ const { data, errors } = await graphql2.query({
1057
+ query: accountListLogs,
1058
+ variables: {
1059
+ queries
1060
+ }
1061
+ });
1062
+ if (errors) {
1063
+ throw errors;
1064
+ }
1065
+ return data.accountListLogs;
1066
+ }
1067
+ });
1068
+ return { ...queryResult };
1069
+ }
1070
+
1071
+ // src/account/usePasswordRecovery.ts
1072
+ var createRecovery = gql(
1073
+ /* GraphQL */
1074
+ `
1075
+ mutation CreateRecovery($email: String!, $url: String!) {
1076
+ accountCreateRecovery(email: $email, url: $url) {
1077
+ expire
1078
+ }
1079
+ }
1080
+ `
1081
+ );
1082
+ function usePasswordRecovery() {
1083
+ const { graphql: graphql2 } = useAppwrite();
1084
+ const queryResult = useMutation({
1085
+ mutationFn: async ({ email, url: resetUrl }) => {
1086
+ const { data, errors } = await graphql2.mutation({
1087
+ query: createRecovery,
1088
+ variables: {
1089
+ email,
1090
+ url: resetUrl
1091
+ }
1092
+ });
1093
+ if (errors) {
1094
+ throw errors;
1095
+ }
1096
+ return data.accountCreateRecovery;
1097
+ },
1098
+ onSuccess: async (_, variables) => {
1099
+ localStorage.setItem("email", variables.email);
1100
+ }
1101
+ });
1102
+ return { ...queryResult };
1103
+ }
1104
+
1105
+ // src/account/useResetPassword.ts
1106
+ var updateRecovery = gql(
1107
+ /* GraphQL */
1108
+ `
1109
+ mutation UpdateRecovery(
1110
+ $userId: String!
1111
+ $secret: String!
1112
+ $password: String!
1113
+ $passwordAgain: String!
1114
+ ) {
1115
+ accountUpdateRecovery(
1116
+ userId: $userId
1117
+ secret: $secret
1118
+ password: $password
1119
+ passwordAgain: $passwordAgain
1120
+ ) {
1121
+ expire
1122
+ }
1123
+ }
1124
+ `
1125
+ );
1126
+ function useResetPassword() {
1127
+ const { graphql: graphql2 } = useAppwrite();
1128
+ const queryResult = useMutation({
1129
+ mutationFn: async ({ userId, secret, password, passwordAgain: confirmPassword }) => {
1130
+ const { data, errors } = await graphql2.mutation({
1131
+ query: updateRecovery,
1132
+ variables: {
1133
+ userId,
1134
+ secret,
1135
+ password,
1136
+ passwordAgain: confirmPassword
1137
+ }
1138
+ });
1139
+ if (errors) {
1140
+ throw errors;
1141
+ }
1142
+ return data.accountUpdateRecovery ?? {};
1143
+ }
1144
+ });
1145
+ return { ...queryResult };
1146
+ }
1147
+
1148
+ // src/account/useSignUp.ts
1149
+ var import_appwrite2 = require("appwrite");
1150
+ var createAccount = gql(
1151
+ /* GraphQL */
1152
+ `
1153
+ mutation CreateAccount($userId: String!, $name: String, $email: String!, $password: String!) {
1154
+ accountCreate(userId: $userId, name: $name, email: $email, password: $password) {
1155
+ name
1156
+ email
1157
+ }
1158
+ }
1159
+ `
1160
+ );
1161
+ var verify = gql(
1162
+ /* GraphQL */
1163
+ `
1164
+ mutation VerifyEmail($url: String!) {
1165
+ accountCreateVerification(url: $url) {
1166
+ expire
1167
+ }
1168
+ }
1169
+ `
1170
+ );
1171
+ function useSignUp() {
1172
+ const { graphql: graphql2 } = useAppwrite();
1173
+ const signUp = useMutation({
1174
+ mutationFn: async ({ userId, email, password, name }) => {
1175
+ const { data, errors } = await graphql2.mutation({
1176
+ query: createAccount,
1177
+ variables: {
1178
+ userId: userId ?? import_appwrite2.ID.unique(),
1179
+ name,
1180
+ email,
1181
+ password
1182
+ }
1183
+ });
1184
+ if (errors) {
1185
+ throw errors;
1186
+ }
1187
+ return data.accountCreate;
1188
+ }
1189
+ });
1190
+ const verifyEmail = useMutation({
1191
+ mutationFn: async ({ verifyUrl }) => {
1192
+ const { data, errors } = await graphql2.mutation({
1193
+ query: verify,
1194
+ variables: {
1195
+ url: verifyUrl
1196
+ }
1197
+ });
1198
+ if (errors) {
1199
+ throw errors;
1200
+ }
1201
+ return data.accountCreateVerification;
1202
+ }
1203
+ });
1204
+ return { signUp, verifyEmail };
1205
+ }
1206
+
1207
+ // src/account/useUpdateEmail.ts
1208
+ var accountUpdateEmail = gql(
1209
+ /* GraphQL */
1210
+ `
1211
+ mutation UpdateEmail($email: String!, $password: String!) {
1212
+ accountUpdateEmail(email: $email, password: $password) {
1213
+ name
1214
+ email
1215
+ }
1216
+ }
1217
+ `
1218
+ );
1219
+ function useUpdateEmail() {
1220
+ const { graphql: graphql2 } = useAppwrite();
1221
+ const queryResult = useMutation({
1222
+ mutationFn: async ({ email, password }) => {
1223
+ const { data, errors } = await graphql2.mutation({
1224
+ query: accountUpdateEmail,
1225
+ variables: {
1226
+ email,
1227
+ password
1228
+ }
1229
+ });
1230
+ if (errors) {
1231
+ throw errors;
1232
+ }
1233
+ return data.accountUpdateEmail;
1234
+ }
1235
+ });
1236
+ return { ...queryResult };
1237
+ }
1238
+
1239
+ // src/account/useUpdateMagicURLSession.ts
1240
+ var updateMagicURLSession = gql(
1241
+ /* GraphQL */
1242
+ `
1243
+ mutation UpdateMagicURLSession($userId: String!, $secret: String!) {
1244
+ accountUpdateMagicURLSession(userId: $userId, secret: $secret) {
1245
+ userId
1246
+ expire
1247
+ current
1248
+ }
1249
+ }
1250
+ `
1251
+ );
1252
+ function useUpdateMagicURLSession() {
1253
+ const { graphql: graphql2 } = useAppwrite();
1254
+ const queryResult = useMutation({
1255
+ mutationFn: async ({ userId, secret }) => {
1256
+ const { data, errors } = await graphql2.mutation({
1257
+ query: updateMagicURLSession,
1258
+ variables: {
1259
+ userId,
1260
+ secret
1261
+ }
1262
+ });
1263
+ if (errors) {
1264
+ throw errors;
1265
+ }
1266
+ return data.accountUpdateMagicURLSession;
1267
+ }
1268
+ });
1269
+ return { ...queryResult };
1270
+ }
1271
+
1272
+ // src/account/useUpdateMfa.ts
1273
+ var accountUpdateMFA = gql(
1274
+ /* GraphQL */
1275
+ `
1276
+ mutation UpdateMFA($mfa: Boolean!) {
1277
+ accountUpdateMFA(mfa: $mfa) {
1278
+ mfa
1279
+ }
1280
+ }
1281
+ `
1282
+ );
1283
+ function useUpdateMfa() {
1284
+ const { graphql: graphql2 } = useAppwrite();
1285
+ const queryResult = useMutation({
1286
+ mutationFn: async ({ mfa }) => {
1287
+ const { data, errors } = await graphql2.mutation({
1288
+ query: accountUpdateMFA,
1289
+ variables: {
1290
+ mfa
1291
+ }
1292
+ });
1293
+ if (errors) {
1294
+ throw errors;
1295
+ }
1296
+ return data.accountUpdateMFA;
1297
+ }
1298
+ });
1299
+ return { ...queryResult };
1300
+ }
1301
+
1302
+ // src/account/useUpdateMfaAuthenticator.ts
1303
+ var updateMFAAuthenticator2 = gql(
1304
+ /* GraphQL */
1305
+ `
1306
+ mutation UpdateMfaAuthenticator($type: String!, $otp: String!) {
1307
+ accountUpdateMfaAuthenticator(type: $type, otp: $otp) {
1308
+ mfa
1309
+ }
1310
+ }
1311
+ `
1312
+ );
1313
+ function useUpdateMfaAuthenticator() {
1314
+ const { graphql: graphql2 } = useAppwrite();
1315
+ const queryResult = useMutation({
1316
+ mutationFn: async ({ type = "totp", otp }) => {
1317
+ const { data, errors } = await graphql2.mutation({
1318
+ query: updateMFAAuthenticator2,
1319
+ variables: {
1320
+ type,
1321
+ otp
1322
+ }
1323
+ });
1324
+ if (errors) {
1325
+ throw errors;
1326
+ }
1327
+ return data.accountUpdateMfaAuthenticator;
1328
+ }
1329
+ });
1330
+ return { ...queryResult };
217
1331
  }
218
1332
 
219
- // src/account/useLogin.ts
220
- var createEmailSession = gql(
1333
+ // src/account/useUpdateMfaChallenge.ts
1334
+ var accountUpdateMfaChallenge = gql(
221
1335
  /* GraphQL */
222
1336
  `
223
- mutation CreateEmailSession($email: String!, $password: String!) {
224
- accountCreateEmailSession(email: $email, password: $password) {
225
- userId
226
- expire
227
- current
1337
+ mutation UpdateMfaChallenge($challengeId: String!, $otp: String!) {
1338
+ accountUpdateMfaChallenge(challengeId: $challengeId, otp: $otp) {
1339
+ status
228
1340
  }
229
1341
  }
230
1342
  `
231
1343
  );
232
- function useLogin() {
233
- const { account: account2, graphql: graphql2 } = useAppwrite();
234
- const login = useMutation({
235
- mutationFn: async ({ email, password }) => {
1344
+ function useUpdateMfaChallenge() {
1345
+ const { graphql: graphql2 } = useAppwrite();
1346
+ const queryResult = useMutation({
1347
+ mutationFn: async ({ challengeId, otp }) => {
236
1348
  const { data, errors } = await graphql2.mutation({
237
- query: createEmailSession,
1349
+ query: accountUpdateMfaChallenge,
238
1350
  variables: {
239
- email,
240
- password
1351
+ challengeId,
1352
+ otp
241
1353
  }
242
1354
  });
243
1355
  if (errors) {
244
1356
  throw errors;
245
1357
  }
246
- return data.accountCreateEmailSession ?? {};
1358
+ return data.accountUpdateMfaChallenge;
247
1359
  }
248
1360
  });
249
- const oAuthLogin = useMutation({
250
- mutationFn: async ({ provider, success, failure }) => {
251
- return account2.createOAuth2Session(provider, success, failure);
1361
+ return { ...queryResult };
1362
+ }
1363
+
1364
+ // src/account/useUpdateMfaRecoveryCodes.ts
1365
+ var accountUpdateMfaRecoveryCodes = gql(
1366
+ /* GraphQL */
1367
+ `
1368
+ mutation UpdateMfaRecoveryCodes {
1369
+ accountUpdateMfaRecoveryCodes {
1370
+ recoveryCodes
1371
+ }
1372
+ }
1373
+ `
1374
+ );
1375
+ function useUpdateMfaRecoveryCodes() {
1376
+ const { graphql: graphql2 } = useAppwrite();
1377
+ const queryResult = useMutation({
1378
+ mutationFn: async () => {
1379
+ const { data, errors } = await graphql2.mutation({
1380
+ query: accountUpdateMfaRecoveryCodes
1381
+ });
1382
+ if (errors) {
1383
+ throw errors;
1384
+ }
1385
+ return data.accountUpdateMfaRecoveryCodes;
252
1386
  }
253
1387
  });
254
- return {
255
- login,
256
- oAuthLogin
257
- };
1388
+ return { ...queryResult };
258
1389
  }
259
1390
 
260
- // src/__generated__/fragment-masking.ts
261
- function getFragmentData(_documentNode, fragmentType) {
262
- return fragmentType;
1391
+ // src/account/useUpdateName.ts
1392
+ var accountUpdateName = gql(
1393
+ /* GraphQL */
1394
+ `
1395
+ mutation UpdateName($name: String!) {
1396
+ accountUpdateName(name: $name) {
1397
+ name
1398
+ }
1399
+ }
1400
+ `
1401
+ );
1402
+ function useUpdateName() {
1403
+ const { graphql: graphql2 } = useAppwrite();
1404
+ const queryResult = useMutation({
1405
+ mutationFn: async ({ name }) => {
1406
+ const { data: mutationData, errors } = await graphql2.mutation({
1407
+ query: accountUpdateName,
1408
+ variables: {
1409
+ name
1410
+ }
1411
+ });
1412
+ if (errors) {
1413
+ throw errors;
1414
+ }
1415
+ return mutationData.accountUpdateName;
1416
+ }
1417
+ });
1418
+ return { ...queryResult };
263
1419
  }
264
1420
 
265
- // src/account/useLogout.ts
266
- var deleteSession = gql(
1421
+ // src/account/useUpdatePassword.ts
1422
+ var updatePassword = gql(
267
1423
  /* GraphQL */
268
1424
  `
269
- mutation DeleteSession($sessionId: String!) {
270
- accountDeleteSession(sessionId: $sessionId) {
1425
+ mutation UpdatePassword($password: String!, $oldPassword: String!) {
1426
+ accountUpdatePassword(password: $password, oldPassword: $oldPassword) {
271
1427
  status
272
1428
  }
273
1429
  }
274
1430
  `
275
1431
  );
276
- function useLogout() {
1432
+ function useUpdatePassword() {
277
1433
  const { graphql: graphql2 } = useAppwrite();
278
- const queryClient2 = useQueryClient();
279
- const logout = useMutation({
280
- mutationFn: () => {
281
- return graphql2.mutation({
282
- query: deleteSession,
1434
+ const queryResult = useMutation({
1435
+ mutationFn: async ({ password, oldPassword }) => {
1436
+ const { data, errors } = await graphql2.mutation({
1437
+ query: updatePassword,
283
1438
  variables: {
284
- sessionId: "current"
1439
+ password,
1440
+ oldPassword
285
1441
  }
286
1442
  });
287
- },
288
- onSuccess: async () => {
289
- queryClient2.setQueryData(["appwrite", "account"], null);
290
- queryClient2.removeQueries({ queryKey: ["appwrite", "account"] });
1443
+ if (errors) {
1444
+ throw errors;
1445
+ }
1446
+ return data.accountUpdatePassword;
291
1447
  }
292
1448
  });
293
- return logout;
1449
+ return { ...queryResult };
294
1450
  }
295
1451
 
296
- // src/account/usePasswordRecovery.ts
297
- var createRecovery = gql(
1452
+ // src/account/useUpdatePhone.ts
1453
+ var accountUpdatePhone = gql(
298
1454
  /* GraphQL */
299
1455
  `
300
- mutation CreateRecovery($email: String!, $url: String!) {
301
- accountCreateRecovery(email: $email, url: $url) {
302
- expire
1456
+ mutation UpdatePhone($phone: String!, $password: String!) {
1457
+ accountUpdatePhone(phone: $phone, password: $password) {
1458
+ phone
303
1459
  }
304
1460
  }
305
1461
  `
306
1462
  );
307
- function usePasswordRecovery() {
1463
+ function useUpdatePhone() {
308
1464
  const { graphql: graphql2 } = useAppwrite();
309
- const passwordRecovery = useMutation({
310
- mutationFn: async ({ email, resetUrl }) => {
1465
+ const queryResult = useMutation({
1466
+ mutationFn: async ({ phone, password }) => {
311
1467
  const { data, errors } = await graphql2.mutation({
312
- query: createRecovery,
1468
+ query: accountUpdatePhone,
313
1469
  variables: {
314
- email,
315
- url: resetUrl
1470
+ phone,
1471
+ password
316
1472
  }
317
1473
  });
318
1474
  if (errors) {
319
1475
  throw errors;
320
1476
  }
321
- return data.accountCreateRecovery ?? {};
322
- },
323
- onSuccess: async (_, variables) => {
324
- localStorage.setItem("email", variables.email);
1477
+ return data.accountUpdatePhone;
325
1478
  }
326
1479
  });
327
- return passwordRecovery;
1480
+ return { ...queryResult };
328
1481
  }
329
1482
 
330
- // src/account/useResetPassword.ts
331
- var updateRecovery = gql(
1483
+ // src/account/useUpdatePhoneSession.ts
1484
+ var updatePhoneSession = gql(
332
1485
  /* GraphQL */
333
1486
  `
334
- mutation UpdateRecovery(
335
- $userId: String!
336
- $secret: String!
337
- $password: String!
338
- $passwordAgain: String!
339
- ) {
340
- accountUpdateRecovery(
341
- userId: $userId
342
- secret: $secret
343
- password: $password
344
- passwordAgain: $passwordAgain
345
- ) {
1487
+ mutation UpdatePhoneSession($userId: String!, $secret: String!) {
1488
+ accountUpdatePhoneSession(userId: $userId, secret: $secret) {
1489
+ userId
346
1490
  expire
1491
+ current
347
1492
  }
348
1493
  }
349
1494
  `
350
1495
  );
351
- function useResetPassword() {
1496
+ function useUpdatePhoneSession() {
352
1497
  const { graphql: graphql2 } = useAppwrite();
353
- const passwordReset = useMutation({
354
- mutationFn: async ({ userId, secret, password, confirmPassword }) => {
1498
+ const queryResult = useMutation({
1499
+ mutationFn: async ({ userId, secret }) => {
355
1500
  const { data, errors } = await graphql2.mutation({
356
- query: updateRecovery,
1501
+ query: updatePhoneSession,
357
1502
  variables: {
358
1503
  userId,
359
- secret,
360
- password,
361
- passwordAgain: confirmPassword
1504
+ secret
362
1505
  }
363
1506
  });
364
1507
  if (errors) {
365
1508
  throw errors;
366
1509
  }
367
- return data.accountUpdateRecovery ?? {};
1510
+ return data.accountUpdatePhoneSession;
368
1511
  }
369
1512
  });
370
- return passwordReset;
1513
+ return { ...queryResult };
371
1514
  }
372
1515
 
373
- // src/account/useSignUp.ts
374
- var import_appwrite2 = require("appwrite");
375
- var createAccount = gql(
1516
+ // src/account/useUpdatePhoneVerification.ts
1517
+ var updatePhoneVerification = gql(
376
1518
  /* GraphQL */
377
1519
  `
378
- mutation CreateAccount($userId: String!, $name: String, $email: String!, $password: String!) {
379
- accountCreate(userId: $userId, name: $name, email: $email, password: $password) {
380
- name
381
- email
1520
+ mutation UpdatePhoneVerification($userId: String!, $secret: String!) {
1521
+ accountUpdatePhoneVerification(userId: $userId, secret: $secret) {
1522
+ expire
382
1523
  }
383
1524
  }
384
1525
  `
385
1526
  );
386
- var verify = gql(
1527
+ function useUpdatePhoneVerification() {
1528
+ const { graphql: graphql2 } = useAppwrite();
1529
+ const queryResult = useMutation({
1530
+ mutationFn: async ({ userId, secret }) => {
1531
+ const { data, errors } = await graphql2.mutation({
1532
+ query: updatePhoneVerification,
1533
+ variables: {
1534
+ userId,
1535
+ secret
1536
+ }
1537
+ });
1538
+ if (errors) {
1539
+ throw errors;
1540
+ }
1541
+ return data.accountUpdatePhoneVerification;
1542
+ }
1543
+ });
1544
+ return { ...queryResult };
1545
+ }
1546
+
1547
+ // src/account/useUpdatePrefs.ts
1548
+ var accountUpdatePrefs = gql(
387
1549
  /* GraphQL */
388
1550
  `
389
- mutation VerifyEmail($url: String!) {
390
- accountCreateVerification(url: $url) {
391
- expire
1551
+ mutation UpdatePrefs($prefs: JSON!) {
1552
+ accountUpdatePrefs(prefs: $prefs) {
1553
+ prefs {
1554
+ data
1555
+ }
392
1556
  }
393
1557
  }
394
1558
  `
395
1559
  );
396
- function useSignUp() {
1560
+ function useUpdatePrefs() {
397
1561
  const { graphql: graphql2 } = useAppwrite();
398
- const signUp = useMutation({
399
- mutationFn: async ({ userId, email, password, name }) => {
1562
+ const queryResult = useMutation({
1563
+ mutationFn: async ({ prefs }) => {
400
1564
  const { data, errors } = await graphql2.mutation({
401
- query: createAccount,
1565
+ query: accountUpdatePrefs,
402
1566
  variables: {
403
- userId: userId ?? import_appwrite2.ID.unique(),
404
- name,
405
- email,
406
- password
1567
+ prefs
407
1568
  }
408
1569
  });
409
1570
  if (errors) {
410
1571
  throw errors;
411
1572
  }
412
- return data.accountCreate ?? {};
1573
+ return data.accountUpdatePrefs;
413
1574
  }
414
1575
  });
415
- const verifyEmail = useMutation({
416
- mutationFn: async ({ verifyUrl }) => {
1576
+ return { ...queryResult };
1577
+ }
1578
+
1579
+ // src/account/useUpdateSession.ts
1580
+ var updateSession = gql(
1581
+ /* GraphQL */
1582
+ `
1583
+ mutation UpdateSession($sessionId: String!) {
1584
+ accountUpdateSession(sessionId: $sessionId) {
1585
+ userId
1586
+ expire
1587
+ current
1588
+ }
1589
+ }
1590
+ `
1591
+ );
1592
+ function useUpdateSession() {
1593
+ const { graphql: graphql2 } = useAppwrite();
1594
+ const queryResult = useMutation({
1595
+ mutationFn: async ({ sessionId }) => {
417
1596
  const { data, errors } = await graphql2.mutation({
418
- query: verify,
1597
+ query: updateSession,
419
1598
  variables: {
420
- url: verifyUrl
1599
+ sessionId
421
1600
  }
422
1601
  });
423
1602
  if (errors) {
424
1603
  throw errors;
425
1604
  }
426
- return data.accountCreateVerification ?? {};
1605
+ return data.accountUpdateSession;
427
1606
  }
428
1607
  });
429
- return { signUp, verifyEmail };
1608
+ return { ...queryResult };
430
1609
  }
431
1610
 
432
1611
  // src/account/useVerification.ts
@@ -443,7 +1622,7 @@ var updateVerification = gql(
443
1622
  function useVerification() {
444
1623
  const { graphql: graphql2 } = useAppwrite();
445
1624
  const queryClient2 = useQueryClient();
446
- const verify2 = useMutation({
1625
+ const queryResult = useMutation({
447
1626
  mutationFn: async ({ userId, secret }) => {
448
1627
  if (!userId || !secret) {
449
1628
  throw new Error("Missing userId or secret");
@@ -464,7 +1643,7 @@ function useVerification() {
464
1643
  queryClient2.setQueryData(["appwrite", "account"], null);
465
1644
  }
466
1645
  });
467
- return verify2;
1646
+ return { ...queryResult };
468
1647
  }
469
1648
 
470
1649
  // src/databases/useCollection.ts
@@ -490,8 +1669,7 @@ var listDocuments = gql(
490
1669
  function useCollection({
491
1670
  databaseId,
492
1671
  collectionId,
493
- queries,
494
- options
1672
+ queries
495
1673
  }) {
496
1674
  const { graphql: graphql2 } = useAppwrite();
497
1675
  const queryClient2 = useQueryClient();
@@ -517,8 +1695,7 @@ function useCollection({
517
1695
  total: data.databasesListDocuments?.total ?? 0,
518
1696
  documents: documents2
519
1697
  };
520
- },
521
- ...options
1698
+ }
522
1699
  });
523
1700
  (0, import_react3.useEffect)(() => {
524
1701
  const unsubscribe = graphql2.client.subscribe(
@@ -574,11 +1751,10 @@ var createDocument = gql(
574
1751
  }
575
1752
  `
576
1753
  );
577
- function useCreateDocument(databaseId, collectionId, documentId, data, permissions, options) {
1754
+ function useCreateDocument() {
578
1755
  const { graphql: graphql2 } = useAppwrite();
579
1756
  const mutationResult = useMutation({
580
- mutationKey: ["appwrite", "databases", databaseId, collectionId, "documents", documentId],
581
- mutationFn: async () => {
1757
+ mutationFn: async ({ databaseId, collectionId, documentId, data, permissions }) => {
582
1758
  const { data: mutationData, errors } = await graphql2.mutation({
583
1759
  query: createDocument,
584
1760
  variables: {
@@ -592,13 +1768,72 @@ function useCreateDocument(databaseId, collectionId, documentId, data, permissio
592
1768
  if (errors) {
593
1769
  throw errors;
594
1770
  }
595
- return mutationData.databasesCreateDocument?._id;
596
- },
597
- ...options
1771
+ return mutationData.databasesCreateDocument;
1772
+ }
598
1773
  });
599
1774
  return mutationResult;
600
1775
  }
601
1776
 
1777
+ // src/databases/useDeleteDocument.ts
1778
+ var deleteDocument = gql(
1779
+ /* GraphQL */
1780
+ `
1781
+ mutation DeleteDocument($databaseId: String!, $collectionId: String!, $documentId: String!) {
1782
+ databasesDeleteDocument(
1783
+ databaseId: $databaseId
1784
+ collectionId: $collectionId
1785
+ documentId: $documentId
1786
+ ) {
1787
+ status
1788
+ }
1789
+ }
1790
+ `
1791
+ );
1792
+ function useDeleteDocument() {
1793
+ const { graphql: graphql2 } = useAppwrite();
1794
+ const queryClient2 = useQueryClient();
1795
+ const mutationResult = useMutation({
1796
+ mutationFn: async ({ databaseId, collectionId, documentId }) => {
1797
+ const { data: mutationData, errors } = await graphql2.mutation({
1798
+ query: deleteDocument,
1799
+ variables: {
1800
+ databaseId,
1801
+ collectionId,
1802
+ documentId
1803
+ }
1804
+ });
1805
+ if (errors) {
1806
+ throw errors;
1807
+ }
1808
+ return mutationData.databasesDeleteDocument;
1809
+ },
1810
+ onSuccess: async (_, variables) => {
1811
+ queryClient2.setQueryData(
1812
+ [
1813
+ "appwrite",
1814
+ "databases",
1815
+ variables.databaseId,
1816
+ variables.collectionId,
1817
+ "documents",
1818
+ variables.documentId
1819
+ ],
1820
+ null
1821
+ );
1822
+ queryClient2.removeQueries({
1823
+ queryKey: [
1824
+ "appwrite",
1825
+ "databases",
1826
+ variables.databaseId,
1827
+ variables.collectionId,
1828
+ "documents",
1829
+ variables.documentId
1830
+ ]
1831
+ });
1832
+ }
1833
+ });
1834
+ return { ...mutationResult };
1835
+ }
1836
+
602
1837
  // src/databases/useDocument.ts
603
1838
  var import_react4 = require("react");
604
1839
  var getDocument = gql(
@@ -616,7 +1851,11 @@ var getDocument = gql(
616
1851
  }
617
1852
  `
618
1853
  );
619
- function useDocument(databaseId, collectionId, documentId, options) {
1854
+ function useDocument({
1855
+ databaseId,
1856
+ collectionId,
1857
+ documentId
1858
+ }) {
620
1859
  const { graphql: graphql2 } = useAppwrite();
621
1860
  const queryClient2 = useQueryClient();
622
1861
  const queryResult = useQuery({
@@ -638,8 +1877,7 @@ function useDocument(databaseId, collectionId, documentId, options) {
638
1877
  ...data.databasesGetDocument ? JSON.parse(data.databasesGetDocument.data) : {}
639
1878
  };
640
1879
  return document;
641
- },
642
- ...options
1880
+ }
643
1881
  });
644
1882
  (0, import_react4.useEffect)(() => {
645
1883
  const unsubscribe = graphql2.client.subscribe(
@@ -653,7 +1891,63 @@ function useDocument(databaseId, collectionId, documentId, options) {
653
1891
  );
654
1892
  return unsubscribe;
655
1893
  }, [databaseId, collectionId, documentId, graphql2.client, queryClient2]);
656
- return queryResult;
1894
+ return { ...queryResult };
1895
+ }
1896
+
1897
+ // src/databases/useUpdateDocument.ts
1898
+ var updateDocument = gql(
1899
+ /* GraphQL */
1900
+ `
1901
+ mutation UpdateDocument(
1902
+ $databaseId: String!
1903
+ $collectionId: String!
1904
+ $documentId: String!
1905
+ $data: JSON!
1906
+ $permissions: [String!]
1907
+ ) {
1908
+ databasesUpdateDocument(
1909
+ databaseId: $databaseId
1910
+ collectionId: $collectionId
1911
+ documentId: $documentId
1912
+ data: $data
1913
+ permissions: $permissions
1914
+ ) {
1915
+ _id
1916
+ _collectionId
1917
+ _databaseId
1918
+ _createdAt
1919
+ _updatedAt
1920
+ _permissions
1921
+ data
1922
+ }
1923
+ }
1924
+ `
1925
+ );
1926
+ function useUpdateDocument() {
1927
+ const { graphql: graphql2 } = useAppwrite();
1928
+ const mutationResult = useMutation({
1929
+ mutationFn: async ({ databaseId, collectionId, documentId, data, permissions }) => {
1930
+ const { data: mutationData, errors } = await graphql2.mutation({
1931
+ query: updateDocument,
1932
+ variables: {
1933
+ databaseId,
1934
+ collectionId,
1935
+ documentId,
1936
+ data,
1937
+ permissions
1938
+ }
1939
+ });
1940
+ if (errors) {
1941
+ throw errors;
1942
+ }
1943
+ const document = {
1944
+ ...mutationData.databasesUpdateDocument,
1945
+ ...mutationData.databasesUpdateDocument ? JSON.parse(mutationData.databasesUpdateDocument.data) : {}
1946
+ };
1947
+ return document;
1948
+ }
1949
+ });
1950
+ return { ...mutationResult };
657
1951
  }
658
1952
 
659
1953
  // src/functions/useFunction.ts
@@ -780,10 +2074,20 @@ var Account_UserFragment = gql(
780
2074
  }
781
2075
  `
782
2076
  );
2077
+ var Identity_ProviderFragment = gql(
2078
+ /* GraphQL */
2079
+ `
2080
+ fragment Identity_ProviderFragment on Identity {
2081
+ userId
2082
+ provider
2083
+ }
2084
+ `
2085
+ );
783
2086
 
784
2087
  // src/index.ts
785
2088
  var fragments = {
786
- Account_UserFragment
2089
+ Account_UserFragment,
2090
+ Identity_ProviderFragment
787
2091
  };
788
2092
  // Annotate the CommonJS export names for ESM import in node:
789
2093
  0 && (module.exports = {
@@ -792,17 +2096,53 @@ var fragments = {
792
2096
  useAccount,
793
2097
  useAppwrite,
794
2098
  useCollection,
2099
+ useCreateAnonymousSession,
795
2100
  useCreateDocument,
2101
+ useCreateEmailToken,
2102
+ useCreateJWT,
2103
+ useCreateMagicURLToken,
2104
+ useCreateMfaAuthenticator,
2105
+ useCreateMfaChallenge,
2106
+ useCreateMfaRecoveryCodes,
2107
+ useCreatePhoneToken,
2108
+ useCreatePhoneVerification,
2109
+ useCreateSession,
2110
+ useDeleteDocument,
2111
+ useDeleteIdentity,
2112
+ useDeleteMfaAuthenticator,
2113
+ useDeleteSession,
2114
+ useDeleteSessions,
796
2115
  useDocument,
797
2116
  useFunction,
2117
+ useGetMfaRecoveryCodes,
2118
+ useGetPrefs,
2119
+ useGetSession,
2120
+ useListIdentities,
2121
+ useListMfaFactors,
2122
+ useListSessions,
798
2123
  useLogin,
799
2124
  useLogout,
2125
+ useLogs,
800
2126
  useMutation,
801
2127
  usePasswordRecovery,
802
2128
  useQuery,
803
2129
  useQueryClient,
804
2130
  useResetPassword,
805
2131
  useSignUp,
2132
+ useUpdateDocument,
2133
+ useUpdateEmail,
2134
+ useUpdateMagicURLSession,
2135
+ useUpdateMfa,
2136
+ useUpdateMfaAuthenticator,
2137
+ useUpdateMfaChallenge,
2138
+ useUpdateMfaRecoveryCodes,
2139
+ useUpdateName,
2140
+ useUpdatePassword,
2141
+ useUpdatePhone,
2142
+ useUpdatePhoneSession,
2143
+ useUpdatePhoneVerification,
2144
+ useUpdatePrefs,
2145
+ useUpdateSession,
806
2146
  useVerification
807
2147
  });
808
2148
  //# sourceMappingURL=index.js.map