@appwrite.io/console 1.5.2 → 1.6.0

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.
Files changed (53) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +7673 -9723
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +7673 -9723
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +7673 -9723
  7. package/docs/examples/organizations/validate-invoice.md +14 -0
  8. package/package.json +1 -1
  9. package/src/client.ts +21 -4
  10. package/src/enums/o-auth-provider.ts +1 -0
  11. package/src/models.ts +118 -6
  12. package/src/services/account.ts +126 -430
  13. package/src/services/assistant.ts +2 -7
  14. package/src/services/avatars.ts +7 -21
  15. package/src/services/backups.ts +24 -84
  16. package/src/services/console.ts +14 -49
  17. package/src/services/databases.ts +96 -336
  18. package/src/services/functions.ts +55 -192
  19. package/src/services/graphql.ts +4 -14
  20. package/src/services/health.ts +50 -175
  21. package/src/services/locale.ts +16 -56
  22. package/src/services/messaging.ts +92 -322
  23. package/src/services/migrations.ts +24 -84
  24. package/src/services/organizations.ts +86 -196
  25. package/src/services/project.ts +12 -42
  26. package/src/services/projects.ts +92 -322
  27. package/src/services/proxy.ts +10 -35
  28. package/src/services/storage.ts +27 -93
  29. package/src/services/teams.ts +28 -98
  30. package/src/services/users.ts +86 -301
  31. package/src/services/vcs.ts +20 -70
  32. package/types/enums/o-auth-provider.d.ts +1 -0
  33. package/types/models.d.ts +118 -6
  34. package/types/services/account.d.ts +4 -128
  35. package/types/services/assistant.d.ts +0 -2
  36. package/types/services/avatars.d.ts +0 -14
  37. package/types/services/backups.d.ts +0 -24
  38. package/types/services/console.d.ts +0 -14
  39. package/types/services/databases.d.ts +0 -96
  40. package/types/services/functions.d.ts +0 -56
  41. package/types/services/graphql.d.ts +0 -4
  42. package/types/services/health.d.ts +0 -50
  43. package/types/services/locale.d.ts +0 -16
  44. package/types/services/messaging.d.ts +0 -92
  45. package/types/services/migrations.d.ts +0 -24
  46. package/types/services/organizations.d.ts +11 -58
  47. package/types/services/project.d.ts +0 -12
  48. package/types/services/projects.d.ts +0 -92
  49. package/types/services/proxy.d.ts +0 -10
  50. package/types/services/storage.d.ts +0 -30
  51. package/types/services/teams.d.ts +0 -28
  52. package/types/services/users.d.ts +0 -86
  53. package/types/services/vcs.d.ts +0 -20
@@ -10,15 +10,13 @@ export class Graphql {
10
10
  }
11
11
 
12
12
  /**
13
- * GraphQL endpoint
14
- *
15
13
  * Execute a GraphQL mutation.
16
14
  *
17
15
  * @param {object} query
18
16
  * @throws {AppwriteException}
19
17
  * @returns {Promise<{}>}
20
18
  */
21
- async query(query: object): Promise<{}> {
19
+ query(query: object): Promise<{}> {
22
20
  if (typeof query === 'undefined') {
23
21
  throw new AppwriteException('Missing required parameter: "query"');
24
22
  }
@@ -34,10 +32,7 @@ export class Graphql {
34
32
  'content-type': 'application/json',
35
33
  }
36
34
 
37
- payload['project'] = this.client.config.project;
38
-
39
-
40
- return await this.client.call(
35
+ return this.client.call(
41
36
  'post',
42
37
  uri,
43
38
  apiHeaders,
@@ -45,15 +40,13 @@ export class Graphql {
45
40
  );
46
41
  }
47
42
  /**
48
- * GraphQL endpoint
49
- *
50
43
  * Execute a GraphQL mutation.
51
44
  *
52
45
  * @param {object} query
53
46
  * @throws {AppwriteException}
54
47
  * @returns {Promise<{}>}
55
48
  */
56
- async mutation(query: object): Promise<{}> {
49
+ mutation(query: object): Promise<{}> {
57
50
  if (typeof query === 'undefined') {
58
51
  throw new AppwriteException('Missing required parameter: "query"');
59
52
  }
@@ -69,10 +62,7 @@ export class Graphql {
69
62
  'content-type': 'application/json',
70
63
  }
71
64
 
72
- payload['project'] = this.client.config.project;
73
-
74
-
75
- return await this.client.call(
65
+ return this.client.call(
76
66
  'post',
77
67
  uri,
78
68
  apiHeaders,