@appwrite.io/console 1.5.1 → 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 (66) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/sdk.js +7714 -9758
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +7714 -9758
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +7714 -9758
  7. package/docs/examples/databases/update-float-attribute.md +2 -2
  8. package/docs/examples/databases/update-integer-attribute.md +2 -2
  9. package/docs/examples/health/{get-queue-usage-count.md → get-queue-stats-resources.md} +1 -1
  10. package/docs/examples/health/{get-queue-usage-dump.md → get-queue-stats-usage-dump.md} +1 -1
  11. package/docs/examples/organizations/create.md +5 -1
  12. package/docs/examples/organizations/update-plan.md +5 -1
  13. package/docs/examples/organizations/validate-invoice.md +14 -0
  14. package/package.json +1 -1
  15. package/src/client.ts +21 -4
  16. package/src/enums/credit-card.ts +1 -0
  17. package/src/enums/name.ts +3 -2
  18. package/src/enums/o-auth-provider.ts +1 -0
  19. package/src/enums/runtime.ts +3 -0
  20. package/src/models.ts +202 -5
  21. package/src/services/account.ts +126 -430
  22. package/src/services/assistant.ts +2 -7
  23. package/src/services/avatars.ts +7 -21
  24. package/src/services/backups.ts +24 -84
  25. package/src/services/console.ts +14 -49
  26. package/src/services/databases.ts +99 -350
  27. package/src/services/functions.ts +55 -192
  28. package/src/services/graphql.ts +4 -14
  29. package/src/services/health.ts +55 -207
  30. package/src/services/locale.ts +16 -56
  31. package/src/services/messaging.ts +92 -322
  32. package/src/services/migrations.ts +24 -84
  33. package/src/services/organizations.ts +118 -196
  34. package/src/services/project.ts +12 -42
  35. package/src/services/projects.ts +92 -322
  36. package/src/services/proxy.ts +10 -35
  37. package/src/services/storage.ts +27 -93
  38. package/src/services/teams.ts +28 -98
  39. package/src/services/users.ts +86 -301
  40. package/src/services/vcs.ts +20 -70
  41. package/types/enums/credit-card.d.ts +2 -1
  42. package/types/enums/name.d.ts +3 -2
  43. package/types/enums/o-auth-provider.d.ts +1 -0
  44. package/types/enums/runtime.d.ts +3 -0
  45. package/types/models.d.ts +202 -5
  46. package/types/services/account.d.ts +4 -128
  47. package/types/services/assistant.d.ts +0 -2
  48. package/types/services/avatars.d.ts +0 -14
  49. package/types/services/backups.d.ts +0 -24
  50. package/types/services/console.d.ts +0 -14
  51. package/types/services/databases.d.ts +5 -100
  52. package/types/services/functions.d.ts +0 -56
  53. package/types/services/graphql.d.ts +0 -4
  54. package/types/services/health.d.ts +5 -64
  55. package/types/services/locale.d.ts +0 -16
  56. package/types/services/messaging.d.ts +0 -92
  57. package/types/services/migrations.d.ts +0 -24
  58. package/types/services/organizations.d.ts +21 -60
  59. package/types/services/project.d.ts +0 -12
  60. package/types/services/projects.d.ts +0 -92
  61. package/types/services/proxy.d.ts +0 -10
  62. package/types/services/storage.d.ts +0 -30
  63. package/types/services/teams.d.ts +0 -28
  64. package/types/services/users.d.ts +0 -86
  65. package/types/services/vcs.d.ts +0 -20
  66. package/docs/examples/health/get-queue.md +0 -11
@@ -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,