@zeroin.earth/appwrite-graphql 0.15.0 → 0.15.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.d.mts CHANGED
@@ -1763,9 +1763,7 @@ declare function useDeleteSessions(): {
1763
1763
  mutate: _tanstack_react_query.UseMutateFunction<{
1764
1764
  __typename?: "Status";
1765
1765
  status?: boolean;
1766
- }, AppwriteException, Exact<{
1767
- sessionId: string;
1768
- }>, unknown>;
1766
+ }, AppwriteException, void, unknown>;
1769
1767
  reset: () => void;
1770
1768
  context: unknown;
1771
1769
  failureCount: number;
@@ -1775,14 +1773,10 @@ declare function useDeleteSessions(): {
1775
1773
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1776
1774
  __typename?: "Status";
1777
1775
  status?: boolean;
1778
- }, AppwriteException, Exact<{
1779
- sessionId: string;
1780
- }>, unknown>;
1776
+ }, AppwriteException, void, unknown>;
1781
1777
  } | {
1782
1778
  data: undefined;
1783
- variables: Exact<{
1784
- sessionId: string;
1785
- }>;
1779
+ variables: void;
1786
1780
  error: null;
1787
1781
  isError: false;
1788
1782
  isIdle: false;
@@ -1792,9 +1786,7 @@ declare function useDeleteSessions(): {
1792
1786
  mutate: _tanstack_react_query.UseMutateFunction<{
1793
1787
  __typename?: "Status";
1794
1788
  status?: boolean;
1795
- }, AppwriteException, Exact<{
1796
- sessionId: string;
1797
- }>, unknown>;
1789
+ }, AppwriteException, void, unknown>;
1798
1790
  reset: () => void;
1799
1791
  context: unknown;
1800
1792
  failureCount: number;
@@ -1804,15 +1796,11 @@ declare function useDeleteSessions(): {
1804
1796
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1805
1797
  __typename?: "Status";
1806
1798
  status?: boolean;
1807
- }, AppwriteException, Exact<{
1808
- sessionId: string;
1809
- }>, unknown>;
1799
+ }, AppwriteException, void, unknown>;
1810
1800
  } | {
1811
1801
  data: undefined;
1812
1802
  error: AppwriteException;
1813
- variables: Exact<{
1814
- sessionId: string;
1815
- }>;
1803
+ variables: void;
1816
1804
  isError: true;
1817
1805
  isIdle: false;
1818
1806
  isPending: false;
@@ -1821,9 +1809,7 @@ declare function useDeleteSessions(): {
1821
1809
  mutate: _tanstack_react_query.UseMutateFunction<{
1822
1810
  __typename?: "Status";
1823
1811
  status?: boolean;
1824
- }, AppwriteException, Exact<{
1825
- sessionId: string;
1826
- }>, unknown>;
1812
+ }, AppwriteException, void, unknown>;
1827
1813
  reset: () => void;
1828
1814
  context: unknown;
1829
1815
  failureCount: number;
@@ -1833,18 +1819,14 @@ declare function useDeleteSessions(): {
1833
1819
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1834
1820
  __typename?: "Status";
1835
1821
  status?: boolean;
1836
- }, AppwriteException, Exact<{
1837
- sessionId: string;
1838
- }>, unknown>;
1822
+ }, AppwriteException, void, unknown>;
1839
1823
  } | {
1840
1824
  data: {
1841
1825
  __typename?: "Status";
1842
1826
  status?: boolean;
1843
1827
  };
1844
1828
  error: null;
1845
- variables: Exact<{
1846
- sessionId: string;
1847
- }>;
1829
+ variables: void;
1848
1830
  isError: false;
1849
1831
  isIdle: false;
1850
1832
  isPending: false;
@@ -1853,9 +1835,7 @@ declare function useDeleteSessions(): {
1853
1835
  mutate: _tanstack_react_query.UseMutateFunction<{
1854
1836
  __typename?: "Status";
1855
1837
  status?: boolean;
1856
- }, AppwriteException, Exact<{
1857
- sessionId: string;
1858
- }>, unknown>;
1838
+ }, AppwriteException, void, unknown>;
1859
1839
  reset: () => void;
1860
1840
  context: unknown;
1861
1841
  failureCount: number;
@@ -1865,9 +1845,7 @@ declare function useDeleteSessions(): {
1865
1845
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1866
1846
  __typename?: "Status";
1867
1847
  status?: boolean;
1868
- }, AppwriteException, Exact<{
1869
- sessionId: string;
1870
- }>, unknown>;
1848
+ }, AppwriteException, void, unknown>;
1871
1849
  };
1872
1850
 
1873
1851
  declare function useGetMfaRecoveryCodes(): {
package/dist/index.d.ts CHANGED
@@ -1763,9 +1763,7 @@ declare function useDeleteSessions(): {
1763
1763
  mutate: _tanstack_react_query.UseMutateFunction<{
1764
1764
  __typename?: "Status";
1765
1765
  status?: boolean;
1766
- }, AppwriteException, Exact<{
1767
- sessionId: string;
1768
- }>, unknown>;
1766
+ }, AppwriteException, void, unknown>;
1769
1767
  reset: () => void;
1770
1768
  context: unknown;
1771
1769
  failureCount: number;
@@ -1775,14 +1773,10 @@ declare function useDeleteSessions(): {
1775
1773
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1776
1774
  __typename?: "Status";
1777
1775
  status?: boolean;
1778
- }, AppwriteException, Exact<{
1779
- sessionId: string;
1780
- }>, unknown>;
1776
+ }, AppwriteException, void, unknown>;
1781
1777
  } | {
1782
1778
  data: undefined;
1783
- variables: Exact<{
1784
- sessionId: string;
1785
- }>;
1779
+ variables: void;
1786
1780
  error: null;
1787
1781
  isError: false;
1788
1782
  isIdle: false;
@@ -1792,9 +1786,7 @@ declare function useDeleteSessions(): {
1792
1786
  mutate: _tanstack_react_query.UseMutateFunction<{
1793
1787
  __typename?: "Status";
1794
1788
  status?: boolean;
1795
- }, AppwriteException, Exact<{
1796
- sessionId: string;
1797
- }>, unknown>;
1789
+ }, AppwriteException, void, unknown>;
1798
1790
  reset: () => void;
1799
1791
  context: unknown;
1800
1792
  failureCount: number;
@@ -1804,15 +1796,11 @@ declare function useDeleteSessions(): {
1804
1796
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1805
1797
  __typename?: "Status";
1806
1798
  status?: boolean;
1807
- }, AppwriteException, Exact<{
1808
- sessionId: string;
1809
- }>, unknown>;
1799
+ }, AppwriteException, void, unknown>;
1810
1800
  } | {
1811
1801
  data: undefined;
1812
1802
  error: AppwriteException;
1813
- variables: Exact<{
1814
- sessionId: string;
1815
- }>;
1803
+ variables: void;
1816
1804
  isError: true;
1817
1805
  isIdle: false;
1818
1806
  isPending: false;
@@ -1821,9 +1809,7 @@ declare function useDeleteSessions(): {
1821
1809
  mutate: _tanstack_react_query.UseMutateFunction<{
1822
1810
  __typename?: "Status";
1823
1811
  status?: boolean;
1824
- }, AppwriteException, Exact<{
1825
- sessionId: string;
1826
- }>, unknown>;
1812
+ }, AppwriteException, void, unknown>;
1827
1813
  reset: () => void;
1828
1814
  context: unknown;
1829
1815
  failureCount: number;
@@ -1833,18 +1819,14 @@ declare function useDeleteSessions(): {
1833
1819
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1834
1820
  __typename?: "Status";
1835
1821
  status?: boolean;
1836
- }, AppwriteException, Exact<{
1837
- sessionId: string;
1838
- }>, unknown>;
1822
+ }, AppwriteException, void, unknown>;
1839
1823
  } | {
1840
1824
  data: {
1841
1825
  __typename?: "Status";
1842
1826
  status?: boolean;
1843
1827
  };
1844
1828
  error: null;
1845
- variables: Exact<{
1846
- sessionId: string;
1847
- }>;
1829
+ variables: void;
1848
1830
  isError: false;
1849
1831
  isIdle: false;
1850
1832
  isPending: false;
@@ -1853,9 +1835,7 @@ declare function useDeleteSessions(): {
1853
1835
  mutate: _tanstack_react_query.UseMutateFunction<{
1854
1836
  __typename?: "Status";
1855
1837
  status?: boolean;
1856
- }, AppwriteException, Exact<{
1857
- sessionId: string;
1858
- }>, unknown>;
1838
+ }, AppwriteException, void, unknown>;
1859
1839
  reset: () => void;
1860
1840
  context: unknown;
1861
1841
  failureCount: number;
@@ -1865,9 +1845,7 @@ declare function useDeleteSessions(): {
1865
1845
  mutateAsync: _tanstack_react_query.UseMutateAsyncFunction<{
1866
1846
  __typename?: "Status";
1867
1847
  status?: boolean;
1868
- }, AppwriteException, Exact<{
1869
- sessionId: string;
1870
- }>, unknown>;
1848
+ }, AppwriteException, void, unknown>;
1871
1849
  };
1872
1850
 
1873
1851
  declare function useGetMfaRecoveryCodes(): {
package/dist/index.js CHANGED
@@ -186,6 +186,7 @@ var CreateSessionDocument = { "kind": "Document", "definitions": [{ "kind": "Ope
186
186
  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" } }] } }] } }] };
187
187
  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" } }] } }] } }] };
188
188
  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" } }] } }] } }] };
189
+ var DeleteSessionsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "DeleteSessions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "accountDeleteSessions" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "status" } }] } }] } }] };
189
190
  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" } }] } }] } }] };
190
191
  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" } }] } }] } }] };
191
192
  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" } }] } }] } }] };
@@ -238,6 +239,7 @@ var documents = {
238
239
  "\n mutation DeleteIdentity($identityId: String!) {\n accountDeleteIdentity(identityId: $identityId) {\n status\n }\n }\n": DeleteIdentityDocument,
239
240
  "\n mutation DeleteMfaAuthenticator($type: String!, $otp: String!) {\n accountDeleteMfaAuthenticator(type: $type, otp: $otp) {\n mfa\n }\n }\n": DeleteMfaAuthenticatorDocument,
240
241
  "\n mutation DeleteSession($sessionId: String!) {\n accountDeleteSession(sessionId: $sessionId) {\n status\n }\n }\n": DeleteSessionDocument,
242
+ "\n mutation DeleteSessions {\n accountDeleteSessions {\n status\n }\n }\n": DeleteSessionsDocument,
241
243
  "\n query GetMfaRecoveryCodes {\n accountGetMfaRecoveryCodes {\n recoveryCodes\n }\n }\n": GetMfaRecoveryCodesDocument,
242
244
  "\n query GetPrefs {\n accountGetPrefs {\n data\n }\n }\n": GetPrefsDocument,
243
245
  "\n query GetSession($sessionId: String!) {\n accountGetSession(sessionId: $sessionId) {\n userId\n expire\n current\n }\n }\n": GetSessionDocument,
@@ -760,11 +762,11 @@ function useDeleteSession() {
760
762
  }
761
763
 
762
764
  // src/account/useDeleteSessions.ts
763
- var deleteSession2 = gql(
765
+ var deleteSessions = gql(
764
766
  /* GraphQL */
765
767
  `
766
- mutation DeleteSession($sessionId: String!) {
767
- accountDeleteSession(sessionId: $sessionId) {
768
+ mutation DeleteSessions {
769
+ accountDeleteSessions {
768
770
  status
769
771
  }
770
772
  }
@@ -773,17 +775,14 @@ var deleteSession2 = gql(
773
775
  function useDeleteSessions() {
774
776
  const { graphql: graphql2 } = useAppwrite();
775
777
  const queryResult = useMutation({
776
- mutationFn: async ({ sessionId }) => {
778
+ mutationFn: async () => {
777
779
  const { data, errors } = await graphql2.mutation({
778
- query: deleteSession2,
779
- variables: {
780
- sessionId
781
- }
780
+ query: deleteSessions
782
781
  });
783
782
  if (errors) {
784
783
  throw errors;
785
784
  }
786
- return data.accountDeleteSession;
785
+ return data.accountDeleteSessions;
787
786
  }
788
787
  });
789
788
  return { ...queryResult };
@@ -1015,7 +1014,7 @@ function useLogin() {
1015
1014
  }
1016
1015
 
1017
1016
  // src/account/useLogout.ts
1018
- var deleteSession3 = gql(
1017
+ var deleteSession2 = gql(
1019
1018
  /* GraphQL */
1020
1019
  `
1021
1020
  mutation DeleteSession($sessionId: String!) {
@@ -1031,7 +1030,7 @@ function useLogout() {
1031
1030
  const queryResult = useMutation({
1032
1031
  mutationFn: async ({ sessionId }) => {
1033
1032
  const { data, errors } = await graphql2.mutation({
1034
- query: deleteSession3,
1033
+ query: deleteSession2,
1035
1034
  variables: {
1036
1035
  sessionId
1037
1036
  }