@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,8 +10,6 @@ export class Locale {
10
10
  }
11
11
 
12
12
  /**
13
- * Get user locale
14
- *
15
13
  * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
16
14
 
17
15
  ([IP Geolocation by DB-IP](https://db-ip.com))
@@ -19,7 +17,7 @@ export class Locale {
19
17
  * @throws {AppwriteException}
20
18
  * @returns {Promise<Models.Locale>}
21
19
  */
22
- async get(): Promise<Models.Locale> {
20
+ get(): Promise<Models.Locale> {
23
21
  const apiPath = '/locale';
24
22
  const payload: Payload = {};
25
23
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -28,10 +26,7 @@ export class Locale {
28
26
  'content-type': 'application/json',
29
27
  }
30
28
 
31
- payload['project'] = this.client.config.project;
32
-
33
-
34
- return await this.client.call(
29
+ return this.client.call(
35
30
  'get',
36
31
  uri,
37
32
  apiHeaders,
@@ -39,14 +34,12 @@ export class Locale {
39
34
  );
40
35
  }
41
36
  /**
42
- * List locale codes
43
- *
44
37
  * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
45
38
  *
46
39
  * @throws {AppwriteException}
47
40
  * @returns {Promise<Models.LocaleCodeList>}
48
41
  */
49
- async listCodes(): Promise<Models.LocaleCodeList> {
42
+ listCodes(): Promise<Models.LocaleCodeList> {
50
43
  const apiPath = '/locale/codes';
51
44
  const payload: Payload = {};
52
45
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -55,10 +48,7 @@ export class Locale {
55
48
  'content-type': 'application/json',
56
49
  }
57
50
 
58
- payload['project'] = this.client.config.project;
59
-
60
-
61
- return await this.client.call(
51
+ return this.client.call(
62
52
  'get',
63
53
  uri,
64
54
  apiHeaders,
@@ -66,14 +56,12 @@ export class Locale {
66
56
  );
67
57
  }
68
58
  /**
69
- * List continents
70
- *
71
59
  * List of all continents. You can use the locale header to get the data in a supported language.
72
60
  *
73
61
  * @throws {AppwriteException}
74
62
  * @returns {Promise<Models.ContinentList>}
75
63
  */
76
- async listContinents(): Promise<Models.ContinentList> {
64
+ listContinents(): Promise<Models.ContinentList> {
77
65
  const apiPath = '/locale/continents';
78
66
  const payload: Payload = {};
79
67
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -82,10 +70,7 @@ export class Locale {
82
70
  'content-type': 'application/json',
83
71
  }
84
72
 
85
- payload['project'] = this.client.config.project;
86
-
87
-
88
- return await this.client.call(
73
+ return this.client.call(
89
74
  'get',
90
75
  uri,
91
76
  apiHeaders,
@@ -93,14 +78,12 @@ export class Locale {
93
78
  );
94
79
  }
95
80
  /**
96
- * List countries
97
- *
98
81
  * List of all countries. You can use the locale header to get the data in a supported language.
99
82
  *
100
83
  * @throws {AppwriteException}
101
84
  * @returns {Promise<Models.CountryList>}
102
85
  */
103
- async listCountries(): Promise<Models.CountryList> {
86
+ listCountries(): Promise<Models.CountryList> {
104
87
  const apiPath = '/locale/countries';
105
88
  const payload: Payload = {};
106
89
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -109,10 +92,7 @@ export class Locale {
109
92
  'content-type': 'application/json',
110
93
  }
111
94
 
112
- payload['project'] = this.client.config.project;
113
-
114
-
115
- return await this.client.call(
95
+ return this.client.call(
116
96
  'get',
117
97
  uri,
118
98
  apiHeaders,
@@ -120,14 +100,12 @@ export class Locale {
120
100
  );
121
101
  }
122
102
  /**
123
- * List EU countries
124
- *
125
103
  * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
126
104
  *
127
105
  * @throws {AppwriteException}
128
106
  * @returns {Promise<Models.CountryList>}
129
107
  */
130
- async listCountriesEU(): Promise<Models.CountryList> {
108
+ listCountriesEU(): Promise<Models.CountryList> {
131
109
  const apiPath = '/locale/countries/eu';
132
110
  const payload: Payload = {};
133
111
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -136,10 +114,7 @@ export class Locale {
136
114
  'content-type': 'application/json',
137
115
  }
138
116
 
139
- payload['project'] = this.client.config.project;
140
-
141
-
142
- return await this.client.call(
117
+ return this.client.call(
143
118
  'get',
144
119
  uri,
145
120
  apiHeaders,
@@ -147,14 +122,12 @@ export class Locale {
147
122
  );
148
123
  }
149
124
  /**
150
- * List countries phone codes
151
- *
152
125
  * List of all countries phone codes. You can use the locale header to get the data in a supported language.
153
126
  *
154
127
  * @throws {AppwriteException}
155
128
  * @returns {Promise<Models.PhoneList>}
156
129
  */
157
- async listCountriesPhones(): Promise<Models.PhoneList> {
130
+ listCountriesPhones(): Promise<Models.PhoneList> {
158
131
  const apiPath = '/locale/countries/phones';
159
132
  const payload: Payload = {};
160
133
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -163,10 +136,7 @@ export class Locale {
163
136
  'content-type': 'application/json',
164
137
  }
165
138
 
166
- payload['project'] = this.client.config.project;
167
-
168
-
169
- return await this.client.call(
139
+ return this.client.call(
170
140
  'get',
171
141
  uri,
172
142
  apiHeaders,
@@ -174,14 +144,12 @@ export class Locale {
174
144
  );
175
145
  }
176
146
  /**
177
- * List currencies
178
- *
179
147
  * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
180
148
  *
181
149
  * @throws {AppwriteException}
182
150
  * @returns {Promise<Models.CurrencyList>}
183
151
  */
184
- async listCurrencies(): Promise<Models.CurrencyList> {
152
+ listCurrencies(): Promise<Models.CurrencyList> {
185
153
  const apiPath = '/locale/currencies';
186
154
  const payload: Payload = {};
187
155
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -190,10 +158,7 @@ export class Locale {
190
158
  'content-type': 'application/json',
191
159
  }
192
160
 
193
- payload['project'] = this.client.config.project;
194
-
195
-
196
- return await this.client.call(
161
+ return this.client.call(
197
162
  'get',
198
163
  uri,
199
164
  apiHeaders,
@@ -201,14 +166,12 @@ export class Locale {
201
166
  );
202
167
  }
203
168
  /**
204
- * List languages
205
- *
206
169
  * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
207
170
  *
208
171
  * @throws {AppwriteException}
209
172
  * @returns {Promise<Models.LanguageList>}
210
173
  */
211
- async listLanguages(): Promise<Models.LanguageList> {
174
+ listLanguages(): Promise<Models.LanguageList> {
212
175
  const apiPath = '/locale/languages';
213
176
  const payload: Payload = {};
214
177
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -217,10 +180,7 @@ export class Locale {
217
180
  'content-type': 'application/json',
218
181
  }
219
182
 
220
- payload['project'] = this.client.config.project;
221
-
222
-
223
- return await this.client.call(
183
+ return this.client.call(
224
184
  'get',
225
185
  uri,
226
186
  apiHeaders,