@appwrite.io/console 0.6.0-rc.13 → 0.6.0-rc.14

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 (36) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk.js +128 -68
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +129 -69
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +128 -68
  7. package/docs/examples/account/update-phone-session.md +14 -0
  8. package/docs/examples/messaging/create-email.md +2 -2
  9. package/docs/examples/messaging/create-push.md +2 -2
  10. package/docs/examples/messaging/create-sms.md +2 -2
  11. package/docs/examples/messaging/update-email.md +2 -2
  12. package/docs/examples/messaging/update-push.md +2 -2
  13. package/docs/examples/messaging/update-sms.md +2 -2
  14. package/docs/examples/users/delete-authenticator.md +1 -2
  15. package/package.json +1 -1
  16. package/src/client.ts +1 -1
  17. package/src/enums/index-type.ts +0 -1
  18. package/src/index.ts +0 -1
  19. package/src/services/account.ts +54 -5
  20. package/src/services/databases.ts +20 -3
  21. package/src/services/health.ts +2 -0
  22. package/src/services/messaging.ts +42 -40
  23. package/src/services/project.ts +1 -1
  24. package/src/services/storage.ts +2 -2
  25. package/src/services/users.ts +10 -11
  26. package/types/enums/index-type.d.ts +1 -2
  27. package/types/index.d.ts +0 -1
  28. package/types/services/account.d.ts +29 -5
  29. package/types/services/databases.d.ts +20 -3
  30. package/types/services/health.d.ts +2 -0
  31. package/types/services/messaging.d.ts +30 -28
  32. package/types/services/project.d.ts +1 -1
  33. package/types/services/storage.d.ts +2 -2
  34. package/types/services/users.d.ts +10 -3
  35. package/src/enums/message-status.ts +0 -5
  36. package/types/enums/message-status.d.ts +0 -5
@@ -2,7 +2,6 @@ import { Service } from '../service';
2
2
  import { AppwriteException, Client } from '../client';
3
3
  import type { Models } from '../models';
4
4
  import type { UploadProgress, Payload } from '../client';
5
- import { MessageStatus } from '../enums/message-status';
6
5
  import { SmtpEncryption } from '../enums/smtp-encryption';
7
6
 
8
7
  export class Messaging extends Service {
@@ -41,7 +40,7 @@ export class Messaging extends Service {
41
40
  }
42
41
 
43
42
  /**
44
- * Create an email
43
+ * Create email
45
44
  *
46
45
  * Create a new email message.
47
46
  *
@@ -54,13 +53,13 @@ export class Messaging extends Service {
54
53
  * @param {string[]} cc
55
54
  * @param {string[]} bcc
56
55
  * @param {string[]} attachments
57
- * @param {MessageStatus} status
56
+ * @param {boolean} draft
58
57
  * @param {boolean} html
59
58
  * @param {string} scheduledAt
60
59
  * @throws {AppwriteException}
61
60
  * @returns {Promise}
62
61
  */
63
- async createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[], status?: MessageStatus, html?: boolean, scheduledAt?: string): Promise<Models.Message> {
62
+ async createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[], draft?: boolean, html?: boolean, scheduledAt?: string): Promise<Models.Message> {
64
63
  if (typeof messageId === 'undefined') {
65
64
  throw new AppwriteException('Missing required parameter: "messageId"');
66
65
  }
@@ -112,8 +111,8 @@ export class Messaging extends Service {
112
111
  payload['attachments'] = attachments;
113
112
  }
114
113
 
115
- if (typeof status !== 'undefined') {
116
- payload['status'] = status;
114
+ if (typeof draft !== 'undefined') {
115
+ payload['draft'] = draft;
117
116
  }
118
117
 
119
118
  if (typeof html !== 'undefined') {
@@ -131,7 +130,7 @@ export class Messaging extends Service {
131
130
  }
132
131
 
133
132
  /**
134
- * Update an email
133
+ * Update email
135
134
  *
136
135
  * Update an email message by its unique ID.
137
136
  *
@@ -142,7 +141,7 @@ export class Messaging extends Service {
142
141
  * @param {string[]} targets
143
142
  * @param {string} subject
144
143
  * @param {string} content
145
- * @param {MessageStatus} status
144
+ * @param {boolean} draft
146
145
  * @param {boolean} html
147
146
  * @param {string[]} cc
148
147
  * @param {string[]} bcc
@@ -150,7 +149,7 @@ export class Messaging extends Service {
150
149
  * @throws {AppwriteException}
151
150
  * @returns {Promise}
152
151
  */
153
- async updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, status?: MessageStatus, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string): Promise<Models.Message> {
152
+ async updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string): Promise<Models.Message> {
154
153
  if (typeof messageId === 'undefined') {
155
154
  throw new AppwriteException('Missing required parameter: "messageId"');
156
155
  }
@@ -178,8 +177,8 @@ export class Messaging extends Service {
178
177
  payload['content'] = content;
179
178
  }
180
179
 
181
- if (typeof status !== 'undefined') {
182
- payload['status'] = status;
180
+ if (typeof draft !== 'undefined') {
181
+ payload['draft'] = draft;
183
182
  }
184
183
 
185
184
  if (typeof html !== 'undefined') {
@@ -205,7 +204,7 @@ export class Messaging extends Service {
205
204
  }
206
205
 
207
206
  /**
208
- * Create a push notification
207
+ * Create push notification
209
208
  *
210
209
  * Create a new push notification.
211
210
  *
@@ -223,12 +222,12 @@ export class Messaging extends Service {
223
222
  * @param {string} color
224
223
  * @param {string} tag
225
224
  * @param {string} badge
226
- * @param {MessageStatus} status
225
+ * @param {boolean} draft
227
226
  * @param {string} scheduledAt
228
227
  * @throws {AppwriteException}
229
228
  * @returns {Promise}
230
229
  */
231
- async createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, status?: MessageStatus, scheduledAt?: string): Promise<Models.Message> {
230
+ async createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
232
231
  if (typeof messageId === 'undefined') {
233
232
  throw new AppwriteException('Missing required parameter: "messageId"');
234
233
  }
@@ -300,8 +299,8 @@ export class Messaging extends Service {
300
299
  payload['badge'] = badge;
301
300
  }
302
301
 
303
- if (typeof status !== 'undefined') {
304
- payload['status'] = status;
302
+ if (typeof draft !== 'undefined') {
303
+ payload['draft'] = draft;
305
304
  }
306
305
 
307
306
  if (typeof scheduledAt !== 'undefined') {
@@ -315,7 +314,7 @@ export class Messaging extends Service {
315
314
  }
316
315
 
317
316
  /**
318
- * Update a push notification
317
+ * Update push notification
319
318
  *
320
319
  * Update a push notification by its unique ID.
321
320
  *
@@ -334,12 +333,12 @@ export class Messaging extends Service {
334
333
  * @param {string} color
335
334
  * @param {string} tag
336
335
  * @param {number} badge
337
- * @param {MessageStatus} status
336
+ * @param {boolean} draft
338
337
  * @param {string} scheduledAt
339
338
  * @throws {AppwriteException}
340
339
  * @returns {Promise}
341
340
  */
342
- async updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, status?: MessageStatus, scheduledAt?: string): Promise<Models.Message> {
341
+ async updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
343
342
  if (typeof messageId === 'undefined') {
344
343
  throw new AppwriteException('Missing required parameter: "messageId"');
345
344
  }
@@ -399,8 +398,8 @@ export class Messaging extends Service {
399
398
  payload['badge'] = badge;
400
399
  }
401
400
 
402
- if (typeof status !== 'undefined') {
403
- payload['status'] = status;
401
+ if (typeof draft !== 'undefined') {
402
+ payload['draft'] = draft;
404
403
  }
405
404
 
406
405
  if (typeof scheduledAt !== 'undefined') {
@@ -414,7 +413,7 @@ export class Messaging extends Service {
414
413
  }
415
414
 
416
415
  /**
417
- * Create an SMS
416
+ * Create SMS
418
417
  *
419
418
  * Create a new SMS message.
420
419
  *
@@ -423,12 +422,12 @@ export class Messaging extends Service {
423
422
  * @param {string[]} topics
424
423
  * @param {string[]} users
425
424
  * @param {string[]} targets
426
- * @param {MessageStatus} status
425
+ * @param {boolean} draft
427
426
  * @param {string} scheduledAt
428
427
  * @throws {AppwriteException}
429
428
  * @returns {Promise}
430
429
  */
431
- async createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], status?: MessageStatus, scheduledAt?: string): Promise<Models.Message> {
430
+ async createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
432
431
  if (typeof messageId === 'undefined') {
433
432
  throw new AppwriteException('Missing required parameter: "messageId"');
434
433
  }
@@ -460,8 +459,8 @@ export class Messaging extends Service {
460
459
  payload['targets'] = targets;
461
460
  }
462
461
 
463
- if (typeof status !== 'undefined') {
464
- payload['status'] = status;
462
+ if (typeof draft !== 'undefined') {
463
+ payload['draft'] = draft;
465
464
  }
466
465
 
467
466
  if (typeof scheduledAt !== 'undefined') {
@@ -475,7 +474,7 @@ export class Messaging extends Service {
475
474
  }
476
475
 
477
476
  /**
478
- * Update an SMS
477
+ * Update SMS
479
478
  *
480
479
  * Update an email message by its unique ID.
481
480
  *
@@ -485,12 +484,12 @@ export class Messaging extends Service {
485
484
  * @param {string[]} users
486
485
  * @param {string[]} targets
487
486
  * @param {string} content
488
- * @param {MessageStatus} status
487
+ * @param {boolean} draft
489
488
  * @param {string} scheduledAt
490
489
  * @throws {AppwriteException}
491
490
  * @returns {Promise}
492
491
  */
493
- async updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, status?: MessageStatus, scheduledAt?: string): Promise<Models.Message> {
492
+ async updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message> {
494
493
  if (typeof messageId === 'undefined') {
495
494
  throw new AppwriteException('Missing required parameter: "messageId"');
496
495
  }
@@ -514,8 +513,8 @@ export class Messaging extends Service {
514
513
  payload['content'] = content;
515
514
  }
516
515
 
517
- if (typeof status !== 'undefined') {
518
- payload['status'] = status;
516
+ if (typeof draft !== 'undefined') {
517
+ payload['draft'] = draft;
519
518
  }
520
519
 
521
520
  if (typeof scheduledAt !== 'undefined') {
@@ -529,7 +528,7 @@ export class Messaging extends Service {
529
528
  }
530
529
 
531
530
  /**
532
- * Get a message
531
+ * Get message
533
532
  *
534
533
  * Get a message by its unique ID.
535
534
  *
@@ -553,8 +552,10 @@ export class Messaging extends Service {
553
552
  }
554
553
 
555
554
  /**
556
- * Delete a message
555
+ * Delete message
557
556
  *
557
+ * Delete a message. If the message is not a draft or scheduled, but has been
558
+ * sent, this will not recall the message.
558
559
  *
559
560
  * @param {string} messageId
560
561
  * @throws {AppwriteException}
@@ -1117,6 +1118,7 @@ export class Messaging extends Service {
1117
1118
  /**
1118
1119
  * Create Sendgrid provider
1119
1120
  *
1121
+ * Create a new Sendgrid provider.
1120
1122
  *
1121
1123
  * @param {string} providerId
1122
1124
  * @param {string} name
@@ -1973,7 +1975,7 @@ export class Messaging extends Service {
1973
1975
  }
1974
1976
 
1975
1977
  /**
1976
- * Create a topic
1978
+ * Create topic
1977
1979
  *
1978
1980
  * Create a new topic.
1979
1981
  *
@@ -2014,7 +2016,7 @@ export class Messaging extends Service {
2014
2016
  }
2015
2017
 
2016
2018
  /**
2017
- * Get a topic
2019
+ * Get topic
2018
2020
  *
2019
2021
  * Get a topic by its unique ID.
2020
2022
  *
@@ -2038,7 +2040,7 @@ export class Messaging extends Service {
2038
2040
  }
2039
2041
 
2040
2042
  /**
2041
- * Update a topic
2043
+ * Update topic
2042
2044
  *
2043
2045
  * Update a topic by its unique ID.
2044
2046
  *
@@ -2072,7 +2074,7 @@ export class Messaging extends Service {
2072
2074
  }
2073
2075
 
2074
2076
  /**
2075
- * Delete a topic
2077
+ * Delete topic
2076
2078
  *
2077
2079
  * Delete a topic by its unique ID.
2078
2080
  *
@@ -2156,7 +2158,7 @@ export class Messaging extends Service {
2156
2158
  }
2157
2159
 
2158
2160
  /**
2159
- * Create a subscriber
2161
+ * Create subscriber
2160
2162
  *
2161
2163
  * Create a new subscriber.
2162
2164
  *
@@ -2197,7 +2199,7 @@ export class Messaging extends Service {
2197
2199
  }
2198
2200
 
2199
2201
  /**
2200
- * Get a subscriber
2202
+ * Get subscriber
2201
2203
  *
2202
2204
  * Get a subscriber by its unique ID.
2203
2205
  *
@@ -2226,7 +2228,7 @@ export class Messaging extends Service {
2226
2228
  }
2227
2229
 
2228
2230
  /**
2229
- * Delete a subscriber
2231
+ * Delete subscriber
2230
2232
  *
2231
2233
  * Delete a subscriber by its unique ID.
2232
2234
  *
@@ -12,7 +12,7 @@ export class Project extends Service {
12
12
  }
13
13
 
14
14
  /**
15
- * Get usage stats for a project
15
+ * Get project usage stats
16
16
  *
17
17
  *
18
18
  * @param {string} startDate
@@ -640,7 +640,7 @@ export class Storage extends Service {
640
640
  }
641
641
 
642
642
  /**
643
- * Get usage stats for storage
643
+ * Get storage usage stats
644
644
  *
645
645
  *
646
646
  * @param {StorageUsageRange} range
@@ -662,7 +662,7 @@ export class Storage extends Service {
662
662
  }
663
663
 
664
664
  /**
665
- * Get usage stats for storage bucket
665
+ * Get bucket usage stats
666
666
  *
667
667
  *
668
668
  * @param {string} bucketId
@@ -591,7 +591,7 @@ export class Users extends Service {
591
591
  }
592
592
 
593
593
  /**
594
- * Get usage stats for the users API
594
+ * Get users usage stats
595
595
  *
596
596
  *
597
597
  * @param {UserUsageRange} range
@@ -786,6 +786,7 @@ export class Users extends Service {
786
786
  /**
787
787
  * Update MFA
788
788
  *
789
+ * Enable or disable MFA on a user account.
789
790
  *
790
791
  * @param {string} userId
791
792
  * @param {boolean} mfa
@@ -817,6 +818,7 @@ export class Users extends Service {
817
818
  /**
818
819
  * List Factors
819
820
  *
821
+ * List the factors available on the account to be used as a MFA challange.
820
822
  *
821
823
  * @param {string} userId
822
824
  * @throws {AppwriteException}
@@ -839,14 +841,14 @@ export class Users extends Service {
839
841
  /**
840
842
  * Delete Authenticator
841
843
  *
844
+ * Delete an authenticator app.
842
845
  *
843
846
  * @param {string} userId
844
847
  * @param {AuthenticatorType} type
845
- * @param {string} otp
846
848
  * @throws {AppwriteException}
847
849
  * @returns {Promise}
848
850
  */
849
- async deleteAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType, otp: string): Promise<Models.User<Preferences>> {
851
+ async deleteAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType): Promise<Models.User<Preferences>> {
850
852
  if (typeof userId === 'undefined') {
851
853
  throw new AppwriteException('Missing required parameter: "userId"');
852
854
  }
@@ -855,17 +857,9 @@ export class Users extends Service {
855
857
  throw new AppwriteException('Missing required parameter: "type"');
856
858
  }
857
859
 
858
- if (typeof otp === 'undefined') {
859
- throw new AppwriteException('Missing required parameter: "otp"');
860
- }
861
-
862
860
  const apiPath = '/users/{userId}/mfa/{type}'.replace('{userId}', userId).replace('{type}', type);
863
861
  const payload: Payload = {};
864
862
 
865
- if (typeof otp !== 'undefined') {
866
- payload['otp'] = otp;
867
- }
868
-
869
863
  const uri = new URL(this.client.config.endpoint + apiPath);
870
864
  return await this.client.call('delete', uri, {
871
865
  'content-type': 'application/json',
@@ -1163,6 +1157,7 @@ export class Users extends Service {
1163
1157
  /**
1164
1158
  * List User Targets
1165
1159
  *
1160
+ * List the messaging targets that are associated with a user.
1166
1161
  *
1167
1162
  * @param {string} userId
1168
1163
  * @param {string[]} queries
@@ -1190,6 +1185,7 @@ export class Users extends Service {
1190
1185
  /**
1191
1186
  * Create User Target
1192
1187
  *
1188
+ * Create a messaging target.
1193
1189
  *
1194
1190
  * @param {string} userId
1195
1191
  * @param {string} targetId
@@ -1249,6 +1245,7 @@ export class Users extends Service {
1249
1245
  /**
1250
1246
  * Get User Target
1251
1247
  *
1248
+ * Get a user's push notification target by ID.
1252
1249
  *
1253
1250
  * @param {string} userId
1254
1251
  * @param {string} targetId
@@ -1276,6 +1273,7 @@ export class Users extends Service {
1276
1273
  /**
1277
1274
  * Update User target
1278
1275
  *
1276
+ * Update a messaging target.
1279
1277
  *
1280
1278
  * @param {string} userId
1281
1279
  * @param {string} targetId
@@ -1318,6 +1316,7 @@ export class Users extends Service {
1318
1316
  /**
1319
1317
  * Delete user target
1320
1318
  *
1319
+ * Delete a messaging target.
1321
1320
  *
1322
1321
  * @param {string} userId
1323
1322
  * @param {string} targetId
@@ -1,6 +1,5 @@
1
1
  export declare enum IndexType {
2
2
  Key = "key",
3
3
  Fulltext = "fulltext",
4
- Unique = "unique",
5
- Spatial = "spatial"
4
+ Unique = "unique"
6
5
  }
package/types/index.d.ts CHANGED
@@ -36,7 +36,6 @@ export { Runtime } from './enums/runtime';
36
36
  export { FunctionUsageRange } from './enums/function-usage-range';
37
37
  export { ExecutionMethod } from './enums/execution-method';
38
38
  export { Name } from './enums/name';
39
- export { MessageStatus } from './enums/message-status';
40
39
  export { SmtpEncryption } from './enums/smtp-encryption';
41
40
  export { ProjectUsageRange } from './enums/project-usage-range';
42
41
  export { Region } from './enums/region';
@@ -108,6 +108,7 @@ export declare class Account extends Service {
108
108
  /**
109
109
  * Update MFA
110
110
  *
111
+ * Enable or disable MFA on an account.
111
112
  *
112
113
  * @param {boolean} mfa
113
114
  * @throws {AppwriteException}
@@ -126,6 +127,7 @@ export declare class Account extends Service {
126
127
  /**
127
128
  * Create MFA Challenge (confirmation)
128
129
  *
130
+ * Complete the MFA challenge by providing the one-time password.
129
131
  *
130
132
  * @param {string} challengeId
131
133
  * @param {string} otp
@@ -136,6 +138,7 @@ export declare class Account extends Service {
136
138
  /**
137
139
  * List Factors
138
140
  *
141
+ * List the factors available on the account to be used as a MFA challange.
139
142
  *
140
143
  * @throws {AppwriteException}
141
144
  * @returns {Promise}
@@ -144,6 +147,10 @@ export declare class Account extends Service {
144
147
  /**
145
148
  * Add Authenticator
146
149
  *
150
+ * Add an authenticator app to be used as an MFA factor. Verify the
151
+ * authenticator using the [verify
152
+ * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
153
+ * method.
147
154
  *
148
155
  * @param {AuthenticatorType} type
149
156
  * @throws {AppwriteException}
@@ -153,6 +160,9 @@ export declare class Account extends Service {
153
160
  /**
154
161
  * Verify Authenticator
155
162
  *
163
+ * Verify an authenticator app after adding it using the [add
164
+ * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
165
+ * method.
156
166
  *
157
167
  * @param {AuthenticatorType} type
158
168
  * @param {string} otp
@@ -163,6 +173,7 @@ export declare class Account extends Service {
163
173
  /**
164
174
  * Delete Authenticator
165
175
  *
176
+ * Delete an authenticator for a user by ID.
166
177
  *
167
178
  * @param {AuthenticatorType} type
168
179
  * @param {string} otp
@@ -320,7 +331,7 @@ export declare class Account extends Service {
320
331
  */
321
332
  createEmailPasswordSession(email: string, password: string): Promise<Models.Session>;
322
333
  /**
323
- * Create session (deprecated)
334
+ * Update magic URL session
324
335
  *
325
336
  * Use this endpoint to create a session from token. Provide the **userId**
326
337
  * and **secret** parameters from the successful response of authentication
@@ -360,6 +371,19 @@ export declare class Account extends Service {
360
371
  * @returns {void|string}
361
372
  */
362
373
  createOAuth2Session(provider: OAuthProvider, success?: string, failure?: string, scopes?: string[]): void | URL;
374
+ /**
375
+ * Update phone session
376
+ *
377
+ * Use this endpoint to create a session from token. Provide the **userId**
378
+ * and **secret** parameters from the successful response of authentication
379
+ * flows initiated by token creation. For example, magic URL and phone login.
380
+ *
381
+ * @param {string} userId
382
+ * @param {string} secret
383
+ * @throws {AppwriteException}
384
+ * @returns {Promise}
385
+ */
386
+ updatePhoneSession(userId: string, secret: string): Promise<Models.Session>;
363
387
  /**
364
388
  * Create session
365
389
  *
@@ -385,7 +409,7 @@ export declare class Account extends Service {
385
409
  */
386
410
  getSession(sessionId: string): Promise<Models.Session>;
387
411
  /**
388
- * Update (or renew) a session
412
+ * Update (or renew) session
389
413
  *
390
414
  * Extend session's expiry to increase it's lifespan. Extending a session is
391
415
  * useful when session length is short such as 5 minutes.
@@ -421,7 +445,7 @@ export declare class Account extends Service {
421
445
  */
422
446
  updateStatus<Preferences extends Models.Preferences>(): Promise<Models.User<Preferences>>;
423
447
  /**
424
- * Create a push target
448
+ * Create push target
425
449
  *
426
450
  *
427
451
  * @param {string} targetId
@@ -432,7 +456,7 @@ export declare class Account extends Service {
432
456
  */
433
457
  createPushTarget(targetId: string, identifier: string, providerId?: string): Promise<Models.Target>;
434
458
  /**
435
- * Update a push target
459
+ * Update push target
436
460
  *
437
461
  *
438
462
  * @param {string} targetId
@@ -442,7 +466,7 @@ export declare class Account extends Service {
442
466
  */
443
467
  updatePushTarget(targetId: string, identifier: string): Promise<Models.Target>;
444
468
  /**
445
- * Delete a push target
469
+ * Delete push target
446
470
  *
447
471
  *
448
472
  * @param {string} targetId
@@ -33,7 +33,7 @@ export declare class Databases extends Service {
33
33
  */
34
34
  create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
35
35
  /**
36
- * Get usage stats for the database
36
+ * Get databases usage stats
37
37
  *
38
38
  *
39
39
  * @param {DatabaseUsageRange} range
@@ -148,6 +148,7 @@ export declare class Databases extends Service {
148
148
  /**
149
149
  * List attributes
150
150
  *
151
+ * List attributes in the collection.
151
152
  *
152
153
  * @param {string} databaseId
153
154
  * @param {string} collectionId
@@ -175,6 +176,8 @@ export declare class Databases extends Service {
175
176
  /**
176
177
  * Update boolean attribute
177
178
  *
179
+ * Update a boolean attribute. Changing the `default` value will not update
180
+ * already existing documents.
178
181
  *
179
182
  * @param {string} databaseId
180
183
  * @param {string} collectionId
@@ -188,6 +191,7 @@ export declare class Databases extends Service {
188
191
  /**
189
192
  * Create datetime attribute
190
193
  *
194
+ * Create a date time attribute according to the ISO 8601 standard.
191
195
  *
192
196
  * @param {string} databaseId
193
197
  * @param {string} collectionId
@@ -202,6 +206,8 @@ export declare class Databases extends Service {
202
206
  /**
203
207
  * Update dateTime attribute
204
208
  *
209
+ * Update a date time attribute. Changing the `default` value will not update
210
+ * already existing documents.
205
211
  *
206
212
  * @param {string} databaseId
207
213
  * @param {string} collectionId
@@ -247,6 +253,9 @@ export declare class Databases extends Service {
247
253
  /**
248
254
  * Create enum attribute
249
255
  *
256
+ * Create an enumeration attribute. The `elements` param acts as a white-list
257
+ * of accepted values for this attribute.
258
+ *
250
259
  *
251
260
  * @param {string} databaseId
252
261
  * @param {string} collectionId
@@ -470,6 +479,7 @@ export declare class Databases extends Service {
470
479
  /**
471
480
  * Get attribute
472
481
  *
482
+ * Get attribute by ID.
473
483
  *
474
484
  * @param {string} databaseId
475
485
  * @param {string} collectionId
@@ -481,6 +491,7 @@ export declare class Databases extends Service {
481
491
  /**
482
492
  * Delete attribute
483
493
  *
494
+ * Deletes an attribute.
484
495
  *
485
496
  * @param {string} databaseId
486
497
  * @param {string} collectionId
@@ -591,6 +602,7 @@ export declare class Databases extends Service {
591
602
  /**
592
603
  * List indexes
593
604
  *
605
+ * List indexes in the collection.
594
606
  *
595
607
  * @param {string} databaseId
596
608
  * @param {string} collectionId
@@ -602,6 +614,9 @@ export declare class Databases extends Service {
602
614
  /**
603
615
  * Create index
604
616
  *
617
+ * Creates an index on the attributes listed. Your index should include all
618
+ * the attributes you will query in a single request.
619
+ * Attributes can be `key`, `fulltext`, and `unique`.
605
620
  *
606
621
  * @param {string} databaseId
607
622
  * @param {string} collectionId
@@ -616,6 +631,7 @@ export declare class Databases extends Service {
616
631
  /**
617
632
  * Get index
618
633
  *
634
+ * Get index by ID.
619
635
  *
620
636
  * @param {string} databaseId
621
637
  * @param {string} collectionId
@@ -627,6 +643,7 @@ export declare class Databases extends Service {
627
643
  /**
628
644
  * Delete index
629
645
  *
646
+ * Delete an index.
630
647
  *
631
648
  * @param {string} databaseId
632
649
  * @param {string} collectionId
@@ -648,7 +665,7 @@ export declare class Databases extends Service {
648
665
  */
649
666
  listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList>;
650
667
  /**
651
- * Get usage stats for a collection
668
+ * Get collection usage stats
652
669
  *
653
670
  *
654
671
  * @param {string} databaseId
@@ -670,7 +687,7 @@ export declare class Databases extends Service {
670
687
  */
671
688
  listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList>;
672
689
  /**
673
- * Get usage stats for the database
690
+ * Get database usage stats
674
691
  *
675
692
  *
676
693
  * @param {string} databaseId
@@ -131,6 +131,8 @@ export declare class Health extends Service {
131
131
  /**
132
132
  * Get functions queue
133
133
  *
134
+ * Get the number of function executions that are waiting to be processed in
135
+ * the Appwrite internal queue server.
134
136
  *
135
137
  * @param {number} threshold
136
138
  * @throws {AppwriteException}