@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
package/dist/iife/sdk.js CHANGED
@@ -115,7 +115,7 @@
115
115
  'x-sdk-name': 'Console',
116
116
  'x-sdk-platform': 'console',
117
117
  'x-sdk-language': 'web',
118
- 'x-sdk-version': '0.6.0-rc.13',
118
+ 'x-sdk-version': '0.6.0-rc.14',
119
119
  'X-Appwrite-Response-Format': '1.5.0',
120
120
  };
121
121
  this.realtime = {
@@ -668,6 +668,7 @@
668
668
  /**
669
669
  * Update MFA
670
670
  *
671
+ * Enable or disable MFA on an account.
671
672
  *
672
673
  * @param {boolean} mfa
673
674
  * @throws {AppwriteException}
@@ -716,6 +717,7 @@
716
717
  /**
717
718
  * Create MFA Challenge (confirmation)
718
719
  *
720
+ * Complete the MFA challenge by providing the one-time password.
719
721
  *
720
722
  * @param {string} challengeId
721
723
  * @param {string} otp
@@ -747,6 +749,7 @@
747
749
  /**
748
750
  * List Factors
749
751
  *
752
+ * List the factors available on the account to be used as a MFA challange.
750
753
  *
751
754
  * @throws {AppwriteException}
752
755
  * @returns {Promise}
@@ -764,6 +767,10 @@
764
767
  /**
765
768
  * Add Authenticator
766
769
  *
770
+ * Add an authenticator app to be used as an MFA factor. Verify the
771
+ * authenticator using the [verify
772
+ * authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
773
+ * method.
767
774
  *
768
775
  * @param {AuthenticatorType} type
769
776
  * @throws {AppwriteException}
@@ -785,6 +792,9 @@
785
792
  /**
786
793
  * Verify Authenticator
787
794
  *
795
+ * Verify an authenticator app after adding it using the [add
796
+ * authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
797
+ * method.
788
798
  *
789
799
  * @param {AuthenticatorType} type
790
800
  * @param {string} otp
@@ -813,6 +823,7 @@
813
823
  /**
814
824
  * Delete Authenticator
815
825
  *
826
+ * Delete an authenticator for a user by ID.
816
827
  *
817
828
  * @param {AuthenticatorType} type
818
829
  * @param {string} otp
@@ -1162,7 +1173,7 @@
1162
1173
  });
1163
1174
  }
1164
1175
  /**
1165
- * Create session (deprecated)
1176
+ * Update magic URL session
1166
1177
  *
1167
1178
  * Use this endpoint to create a session from token. Provide the **userId**
1168
1179
  * and **secret** parameters from the successful response of authentication
@@ -1249,6 +1260,40 @@
1249
1260
  return uri;
1250
1261
  }
1251
1262
  }
1263
+ /**
1264
+ * Update phone session
1265
+ *
1266
+ * Use this endpoint to create a session from token. Provide the **userId**
1267
+ * and **secret** parameters from the successful response of authentication
1268
+ * flows initiated by token creation. For example, magic URL and phone login.
1269
+ *
1270
+ * @param {string} userId
1271
+ * @param {string} secret
1272
+ * @throws {AppwriteException}
1273
+ * @returns {Promise}
1274
+ */
1275
+ updatePhoneSession(userId, secret) {
1276
+ return __awaiter(this, void 0, void 0, function* () {
1277
+ if (typeof userId === 'undefined') {
1278
+ throw new AppwriteException('Missing required parameter: "userId"');
1279
+ }
1280
+ if (typeof secret === 'undefined') {
1281
+ throw new AppwriteException('Missing required parameter: "secret"');
1282
+ }
1283
+ const apiPath = '/account/sessions/phone';
1284
+ const payload = {};
1285
+ if (typeof userId !== 'undefined') {
1286
+ payload['userId'] = userId;
1287
+ }
1288
+ if (typeof secret !== 'undefined') {
1289
+ payload['secret'] = secret;
1290
+ }
1291
+ const uri = new URL(this.client.config.endpoint + apiPath);
1292
+ return yield this.client.call('put', uri, {
1293
+ 'content-type': 'application/json',
1294
+ }, payload);
1295
+ });
1296
+ }
1252
1297
  /**
1253
1298
  * Create session
1254
1299
  *
@@ -1307,7 +1352,7 @@
1307
1352
  });
1308
1353
  }
1309
1354
  /**
1310
- * Update (or renew) a session
1355
+ * Update (or renew) session
1311
1356
  *
1312
1357
  * Extend session's expiry to increase it's lifespan. Extending a session is
1313
1358
  * useful when session length is short such as 5 minutes.
@@ -1376,7 +1421,7 @@
1376
1421
  });
1377
1422
  }
1378
1423
  /**
1379
- * Create a push target
1424
+ * Create push target
1380
1425
  *
1381
1426
  *
1382
1427
  * @param {string} targetId
@@ -1411,7 +1456,7 @@
1411
1456
  });
1412
1457
  }
1413
1458
  /**
1414
- * Update a push target
1459
+ * Update push target
1415
1460
  *
1416
1461
  *
1417
1462
  * @param {string} targetId
@@ -1439,7 +1484,7 @@
1439
1484
  });
1440
1485
  }
1441
1486
  /**
1442
- * Delete a push target
1487
+ * Delete push target
1443
1488
  *
1444
1489
  *
1445
1490
  * @param {string} targetId
@@ -2202,7 +2247,7 @@
2202
2247
  });
2203
2248
  }
2204
2249
  /**
2205
- * Get usage stats for the database
2250
+ * Get databases usage stats
2206
2251
  *
2207
2252
  *
2208
2253
  * @param {DatabaseUsageRange} range
@@ -2485,6 +2530,7 @@
2485
2530
  /**
2486
2531
  * List attributes
2487
2532
  *
2533
+ * List attributes in the collection.
2488
2534
  *
2489
2535
  * @param {string} databaseId
2490
2536
  * @param {string} collectionId
@@ -2563,6 +2609,8 @@
2563
2609
  /**
2564
2610
  * Update boolean attribute
2565
2611
  *
2612
+ * Update a boolean attribute. Changing the `default` value will not update
2613
+ * already existing documents.
2566
2614
  *
2567
2615
  * @param {string} databaseId
2568
2616
  * @param {string} collectionId
@@ -2606,6 +2654,7 @@
2606
2654
  /**
2607
2655
  * Create datetime attribute
2608
2656
  *
2657
+ * Create a date time attribute according to the ISO 8601 standard.
2609
2658
  *
2610
2659
  * @param {string} databaseId
2611
2660
  * @param {string} collectionId
@@ -2653,6 +2702,8 @@
2653
2702
  /**
2654
2703
  * Update dateTime attribute
2655
2704
  *
2705
+ * Update a date time attribute. Changing the `default` value will not update
2706
+ * already existing documents.
2656
2707
  *
2657
2708
  * @param {string} databaseId
2658
2709
  * @param {string} collectionId
@@ -2791,6 +2842,9 @@
2791
2842
  /**
2792
2843
  * Create enum attribute
2793
2844
  *
2845
+ * Create an enumeration attribute. The `elements` param acts as a white-list
2846
+ * of accepted values for this attribute.
2847
+ *
2794
2848
  *
2795
2849
  * @param {string} databaseId
2796
2850
  * @param {string} collectionId
@@ -3488,6 +3542,7 @@
3488
3542
  /**
3489
3543
  * Get attribute
3490
3544
  *
3545
+ * Get attribute by ID.
3491
3546
  *
3492
3547
  * @param {string} databaseId
3493
3548
  * @param {string} collectionId
@@ -3517,6 +3572,7 @@
3517
3572
  /**
3518
3573
  * Delete attribute
3519
3574
  *
3575
+ * Deletes an attribute.
3520
3576
  *
3521
3577
  * @param {string} databaseId
3522
3578
  * @param {string} collectionId
@@ -3798,6 +3854,7 @@
3798
3854
  /**
3799
3855
  * List indexes
3800
3856
  *
3857
+ * List indexes in the collection.
3801
3858
  *
3802
3859
  * @param {string} databaseId
3803
3860
  * @param {string} collectionId
@@ -3827,6 +3884,9 @@
3827
3884
  /**
3828
3885
  * Create index
3829
3886
  *
3887
+ * Creates an index on the attributes listed. Your index should include all
3888
+ * the attributes you will query in a single request.
3889
+ * Attributes can be `key`, `fulltext`, and `unique`.
3830
3890
  *
3831
3891
  * @param {string} databaseId
3832
3892
  * @param {string} collectionId
@@ -3877,6 +3937,7 @@
3877
3937
  /**
3878
3938
  * Get index
3879
3939
  *
3940
+ * Get index by ID.
3880
3941
  *
3881
3942
  * @param {string} databaseId
3882
3943
  * @param {string} collectionId
@@ -3906,6 +3967,7 @@
3906
3967
  /**
3907
3968
  * Delete index
3908
3969
  *
3970
+ * Delete an index.
3909
3971
  *
3910
3972
  * @param {string} databaseId
3911
3973
  * @param {string} collectionId
@@ -3963,7 +4025,7 @@
3963
4025
  });
3964
4026
  }
3965
4027
  /**
3966
- * Get usage stats for a collection
4028
+ * Get collection usage stats
3967
4029
  *
3968
4030
  *
3969
4031
  * @param {string} databaseId
@@ -4018,7 +4080,7 @@
4018
4080
  });
4019
4081
  }
4020
4082
  /**
4021
- * Get usage stats for the database
4083
+ * Get database usage stats
4022
4084
  *
4023
4085
  *
4024
4086
  * @param {string} databaseId
@@ -5205,6 +5267,8 @@
5205
5267
  /**
5206
5268
  * Get functions queue
5207
5269
  *
5270
+ * Get the number of function executions that are waiting to be processed in
5271
+ * the Appwrite internal queue server.
5208
5272
  *
5209
5273
  * @param {number} threshold
5210
5274
  * @throws {AppwriteException}
@@ -5576,7 +5640,7 @@
5576
5640
  });
5577
5641
  }
5578
5642
  /**
5579
- * Create an email
5643
+ * Create email
5580
5644
  *
5581
5645
  * Create a new email message.
5582
5646
  *
@@ -5589,13 +5653,13 @@
5589
5653
  * @param {string[]} cc
5590
5654
  * @param {string[]} bcc
5591
5655
  * @param {string[]} attachments
5592
- * @param {MessageStatus} status
5656
+ * @param {boolean} draft
5593
5657
  * @param {boolean} html
5594
5658
  * @param {string} scheduledAt
5595
5659
  * @throws {AppwriteException}
5596
5660
  * @returns {Promise}
5597
5661
  */
5598
- createEmail(messageId, subject, content, topics, users, targets, cc, bcc, attachments, status, html, scheduledAt) {
5662
+ createEmail(messageId, subject, content, topics, users, targets, cc, bcc, attachments, draft, html, scheduledAt) {
5599
5663
  return __awaiter(this, void 0, void 0, function* () {
5600
5664
  if (typeof messageId === 'undefined') {
5601
5665
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5635,8 +5699,8 @@
5635
5699
  if (typeof attachments !== 'undefined') {
5636
5700
  payload['attachments'] = attachments;
5637
5701
  }
5638
- if (typeof status !== 'undefined') {
5639
- payload['status'] = status;
5702
+ if (typeof draft !== 'undefined') {
5703
+ payload['draft'] = draft;
5640
5704
  }
5641
5705
  if (typeof html !== 'undefined') {
5642
5706
  payload['html'] = html;
@@ -5651,7 +5715,7 @@
5651
5715
  });
5652
5716
  }
5653
5717
  /**
5654
- * Update an email
5718
+ * Update email
5655
5719
  *
5656
5720
  * Update an email message by its unique ID.
5657
5721
  *
@@ -5662,7 +5726,7 @@
5662
5726
  * @param {string[]} targets
5663
5727
  * @param {string} subject
5664
5728
  * @param {string} content
5665
- * @param {MessageStatus} status
5729
+ * @param {boolean} draft
5666
5730
  * @param {boolean} html
5667
5731
  * @param {string[]} cc
5668
5732
  * @param {string[]} bcc
@@ -5670,7 +5734,7 @@
5670
5734
  * @throws {AppwriteException}
5671
5735
  * @returns {Promise}
5672
5736
  */
5673
- updateEmail(messageId, topics, users, targets, subject, content, status, html, cc, bcc, scheduledAt) {
5737
+ updateEmail(messageId, topics, users, targets, subject, content, draft, html, cc, bcc, scheduledAt) {
5674
5738
  return __awaiter(this, void 0, void 0, function* () {
5675
5739
  if (typeof messageId === 'undefined') {
5676
5740
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5692,8 +5756,8 @@
5692
5756
  if (typeof content !== 'undefined') {
5693
5757
  payload['content'] = content;
5694
5758
  }
5695
- if (typeof status !== 'undefined') {
5696
- payload['status'] = status;
5759
+ if (typeof draft !== 'undefined') {
5760
+ payload['draft'] = draft;
5697
5761
  }
5698
5762
  if (typeof html !== 'undefined') {
5699
5763
  payload['html'] = html;
@@ -5714,7 +5778,7 @@
5714
5778
  });
5715
5779
  }
5716
5780
  /**
5717
- * Create a push notification
5781
+ * Create push notification
5718
5782
  *
5719
5783
  * Create a new push notification.
5720
5784
  *
@@ -5732,12 +5796,12 @@
5732
5796
  * @param {string} color
5733
5797
  * @param {string} tag
5734
5798
  * @param {string} badge
5735
- * @param {MessageStatus} status
5799
+ * @param {boolean} draft
5736
5800
  * @param {string} scheduledAt
5737
5801
  * @throws {AppwriteException}
5738
5802
  * @returns {Promise}
5739
5803
  */
5740
- createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, status, scheduledAt) {
5804
+ createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
5741
5805
  return __awaiter(this, void 0, void 0, function* () {
5742
5806
  if (typeof messageId === 'undefined') {
5743
5807
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5792,8 +5856,8 @@
5792
5856
  if (typeof badge !== 'undefined') {
5793
5857
  payload['badge'] = badge;
5794
5858
  }
5795
- if (typeof status !== 'undefined') {
5796
- payload['status'] = status;
5859
+ if (typeof draft !== 'undefined') {
5860
+ payload['draft'] = draft;
5797
5861
  }
5798
5862
  if (typeof scheduledAt !== 'undefined') {
5799
5863
  payload['scheduledAt'] = scheduledAt;
@@ -5805,7 +5869,7 @@
5805
5869
  });
5806
5870
  }
5807
5871
  /**
5808
- * Update a push notification
5872
+ * Update push notification
5809
5873
  *
5810
5874
  * Update a push notification by its unique ID.
5811
5875
  *
@@ -5824,12 +5888,12 @@
5824
5888
  * @param {string} color
5825
5889
  * @param {string} tag
5826
5890
  * @param {number} badge
5827
- * @param {MessageStatus} status
5891
+ * @param {boolean} draft
5828
5892
  * @param {string} scheduledAt
5829
5893
  * @throws {AppwriteException}
5830
5894
  * @returns {Promise}
5831
5895
  */
5832
- updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, status, scheduledAt) {
5896
+ updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
5833
5897
  return __awaiter(this, void 0, void 0, function* () {
5834
5898
  if (typeof messageId === 'undefined') {
5835
5899
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5875,8 +5939,8 @@
5875
5939
  if (typeof badge !== 'undefined') {
5876
5940
  payload['badge'] = badge;
5877
5941
  }
5878
- if (typeof status !== 'undefined') {
5879
- payload['status'] = status;
5942
+ if (typeof draft !== 'undefined') {
5943
+ payload['draft'] = draft;
5880
5944
  }
5881
5945
  if (typeof scheduledAt !== 'undefined') {
5882
5946
  payload['scheduledAt'] = scheduledAt;
@@ -5888,7 +5952,7 @@
5888
5952
  });
5889
5953
  }
5890
5954
  /**
5891
- * Create an SMS
5955
+ * Create SMS
5892
5956
  *
5893
5957
  * Create a new SMS message.
5894
5958
  *
@@ -5897,12 +5961,12 @@
5897
5961
  * @param {string[]} topics
5898
5962
  * @param {string[]} users
5899
5963
  * @param {string[]} targets
5900
- * @param {MessageStatus} status
5964
+ * @param {boolean} draft
5901
5965
  * @param {string} scheduledAt
5902
5966
  * @throws {AppwriteException}
5903
5967
  * @returns {Promise}
5904
5968
  */
5905
- createSms(messageId, content, topics, users, targets, status, scheduledAt) {
5969
+ createSms(messageId, content, topics, users, targets, draft, scheduledAt) {
5906
5970
  return __awaiter(this, void 0, void 0, function* () {
5907
5971
  if (typeof messageId === 'undefined') {
5908
5972
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5927,8 +5991,8 @@
5927
5991
  if (typeof targets !== 'undefined') {
5928
5992
  payload['targets'] = targets;
5929
5993
  }
5930
- if (typeof status !== 'undefined') {
5931
- payload['status'] = status;
5994
+ if (typeof draft !== 'undefined') {
5995
+ payload['draft'] = draft;
5932
5996
  }
5933
5997
  if (typeof scheduledAt !== 'undefined') {
5934
5998
  payload['scheduledAt'] = scheduledAt;
@@ -5940,7 +6004,7 @@
5940
6004
  });
5941
6005
  }
5942
6006
  /**
5943
- * Update an SMS
6007
+ * Update SMS
5944
6008
  *
5945
6009
  * Update an email message by its unique ID.
5946
6010
  *
@@ -5950,12 +6014,12 @@
5950
6014
  * @param {string[]} users
5951
6015
  * @param {string[]} targets
5952
6016
  * @param {string} content
5953
- * @param {MessageStatus} status
6017
+ * @param {boolean} draft
5954
6018
  * @param {string} scheduledAt
5955
6019
  * @throws {AppwriteException}
5956
6020
  * @returns {Promise}
5957
6021
  */
5958
- updateSms(messageId, topics, users, targets, content, status, scheduledAt) {
6022
+ updateSms(messageId, topics, users, targets, content, draft, scheduledAt) {
5959
6023
  return __awaiter(this, void 0, void 0, function* () {
5960
6024
  if (typeof messageId === 'undefined') {
5961
6025
  throw new AppwriteException('Missing required parameter: "messageId"');
@@ -5974,8 +6038,8 @@
5974
6038
  if (typeof content !== 'undefined') {
5975
6039
  payload['content'] = content;
5976
6040
  }
5977
- if (typeof status !== 'undefined') {
5978
- payload['status'] = status;
6041
+ if (typeof draft !== 'undefined') {
6042
+ payload['draft'] = draft;
5979
6043
  }
5980
6044
  if (typeof scheduledAt !== 'undefined') {
5981
6045
  payload['scheduledAt'] = scheduledAt;
@@ -5987,7 +6051,7 @@
5987
6051
  });
5988
6052
  }
5989
6053
  /**
5990
- * Get a message
6054
+ * Get message
5991
6055
  *
5992
6056
  * Get a message by its unique ID.
5993
6057
  *
@@ -6010,8 +6074,10 @@
6010
6074
  });
6011
6075
  }
6012
6076
  /**
6013
- * Delete a message
6077
+ * Delete message
6014
6078
  *
6079
+ * Delete a message. If the message is not a draft or scheduled, but has been
6080
+ * sent, this will not recall the message.
6015
6081
  *
6016
6082
  * @param {string} messageId
6017
6083
  * @throws {AppwriteException}
@@ -6503,6 +6569,7 @@
6503
6569
  /**
6504
6570
  * Create Sendgrid provider
6505
6571
  *
6572
+ * Create a new Sendgrid provider.
6506
6573
  *
6507
6574
  * @param {string} providerId
6508
6575
  * @param {string} name
@@ -7246,7 +7313,7 @@
7246
7313
  });
7247
7314
  }
7248
7315
  /**
7249
- * Create a topic
7316
+ * Create topic
7250
7317
  *
7251
7318
  * Create a new topic.
7252
7319
  *
@@ -7282,7 +7349,7 @@
7282
7349
  });
7283
7350
  }
7284
7351
  /**
7285
- * Get a topic
7352
+ * Get topic
7286
7353
  *
7287
7354
  * Get a topic by its unique ID.
7288
7355
  *
@@ -7305,7 +7372,7 @@
7305
7372
  });
7306
7373
  }
7307
7374
  /**
7308
- * Update a topic
7375
+ * Update topic
7309
7376
  *
7310
7377
  * Update a topic by its unique ID.
7311
7378
  *
@@ -7336,7 +7403,7 @@
7336
7403
  });
7337
7404
  }
7338
7405
  /**
7339
- * Delete a topic
7406
+ * Delete topic
7340
7407
  *
7341
7408
  * Delete a topic by its unique ID.
7342
7409
  *
@@ -7414,7 +7481,7 @@
7414
7481
  });
7415
7482
  }
7416
7483
  /**
7417
- * Create a subscriber
7484
+ * Create subscriber
7418
7485
  *
7419
7486
  * Create a new subscriber.
7420
7487
  *
@@ -7450,7 +7517,7 @@
7450
7517
  });
7451
7518
  }
7452
7519
  /**
7453
- * Get a subscriber
7520
+ * Get subscriber
7454
7521
  *
7455
7522
  * Get a subscriber by its unique ID.
7456
7523
  *
@@ -7477,7 +7544,7 @@
7477
7544
  });
7478
7545
  }
7479
7546
  /**
7480
- * Delete a subscriber
7547
+ * Delete subscriber
7481
7548
  *
7482
7549
  * Delete a subscriber by its unique ID.
7483
7550
  *
@@ -8117,7 +8184,7 @@
8117
8184
  super(client);
8118
8185
  }
8119
8186
  /**
8120
- * Get usage stats for a project
8187
+ * Get project usage stats
8121
8188
  *
8122
8189
  *
8123
8190
  * @param {string} startDate
@@ -10385,7 +10452,7 @@
10385
10452
  return uri;
10386
10453
  }
10387
10454
  /**
10388
- * Get usage stats for storage
10455
+ * Get storage usage stats
10389
10456
  *
10390
10457
  *
10391
10458
  * @param {StorageUsageRange} range
@@ -10406,7 +10473,7 @@
10406
10473
  });
10407
10474
  }
10408
10475
  /**
10409
- * Get usage stats for storage bucket
10476
+ * Get bucket usage stats
10410
10477
  *
10411
10478
  *
10412
10479
  * @param {string} bucketId
@@ -11399,7 +11466,7 @@
11399
11466
  });
11400
11467
  }
11401
11468
  /**
11402
- * Get usage stats for the users API
11469
+ * Get users usage stats
11403
11470
  *
11404
11471
  *
11405
11472
  * @param {UserUsageRange} range
@@ -11582,6 +11649,7 @@
11582
11649
  /**
11583
11650
  * Update MFA
11584
11651
  *
11652
+ * Enable or disable MFA on a user account.
11585
11653
  *
11586
11654
  * @param {string} userId
11587
11655
  * @param {boolean} mfa
@@ -11610,6 +11678,7 @@
11610
11678
  /**
11611
11679
  * List Factors
11612
11680
  *
11681
+ * List the factors available on the account to be used as a MFA challange.
11613
11682
  *
11614
11683
  * @param {string} userId
11615
11684
  * @throws {AppwriteException}
@@ -11631,14 +11700,14 @@
11631
11700
  /**
11632
11701
  * Delete Authenticator
11633
11702
  *
11703
+ * Delete an authenticator app.
11634
11704
  *
11635
11705
  * @param {string} userId
11636
11706
  * @param {AuthenticatorType} type
11637
- * @param {string} otp
11638
11707
  * @throws {AppwriteException}
11639
11708
  * @returns {Promise}
11640
11709
  */
11641
- deleteAuthenticator(userId, type, otp) {
11710
+ deleteAuthenticator(userId, type) {
11642
11711
  return __awaiter(this, void 0, void 0, function* () {
11643
11712
  if (typeof userId === 'undefined') {
11644
11713
  throw new AppwriteException('Missing required parameter: "userId"');
@@ -11646,14 +11715,8 @@
11646
11715
  if (typeof type === 'undefined') {
11647
11716
  throw new AppwriteException('Missing required parameter: "type"');
11648
11717
  }
11649
- if (typeof otp === 'undefined') {
11650
- throw new AppwriteException('Missing required parameter: "otp"');
11651
- }
11652
11718
  const apiPath = '/users/{userId}/mfa/{type}'.replace('{userId}', userId).replace('{type}', type);
11653
11719
  const payload = {};
11654
- if (typeof otp !== 'undefined') {
11655
- payload['otp'] = otp;
11656
- }
11657
11720
  const uri = new URL(this.client.config.endpoint + apiPath);
11658
11721
  return yield this.client.call('delete', uri, {
11659
11722
  'content-type': 'application/json',
@@ -11930,6 +11993,7 @@
11930
11993
  /**
11931
11994
  * List User Targets
11932
11995
  *
11996
+ * List the messaging targets that are associated with a user.
11933
11997
  *
11934
11998
  * @param {string} userId
11935
11999
  * @param {string[]} queries
@@ -11955,6 +12019,7 @@
11955
12019
  /**
11956
12020
  * Create User Target
11957
12021
  *
12022
+ * Create a messaging target.
11958
12023
  *
11959
12024
  * @param {string} userId
11960
12025
  * @param {string} targetId
@@ -12005,6 +12070,7 @@
12005
12070
  /**
12006
12071
  * Get User Target
12007
12072
  *
12073
+ * Get a user's push notification target by ID.
12008
12074
  *
12009
12075
  * @param {string} userId
12010
12076
  * @param {string} targetId
@@ -12030,6 +12096,7 @@
12030
12096
  /**
12031
12097
  * Update User target
12032
12098
  *
12099
+ * Update a messaging target.
12033
12100
  *
12034
12101
  * @param {string} userId
12035
12102
  * @param {string} targetId
@@ -12067,6 +12134,7 @@
12067
12134
  /**
12068
12135
  * Delete user target
12069
12136
  *
12137
+ * Delete a messaging target.
12070
12138
  *
12071
12139
  * @param {string} userId
12072
12140
  * @param {string} targetId
@@ -12866,7 +12934,6 @@
12866
12934
  IndexType["Key"] = "key";
12867
12935
  IndexType["Fulltext"] = "fulltext";
12868
12936
  IndexType["Unique"] = "unique";
12869
- IndexType["Spatial"] = "spatial";
12870
12937
  })(exports.IndexType || (exports.IndexType = {}));
12871
12938
 
12872
12939
  exports.Runtime = void 0;
@@ -12942,13 +13009,6 @@
12942
13009
  Name["Hamsterv1"] = "hamsterv1";
12943
13010
  })(exports.Name || (exports.Name = {}));
12944
13011
 
12945
- exports.MessageStatus = void 0;
12946
- (function (MessageStatus) {
12947
- MessageStatus["Draft"] = "draft";
12948
- MessageStatus["Scheduled"] = "scheduled";
12949
- MessageStatus["Processing"] = "processing";
12950
- })(exports.MessageStatus || (exports.MessageStatus = {}));
12951
-
12952
13012
  exports.SmtpEncryption = void 0;
12953
13013
  (function (SmtpEncryption) {
12954
13014
  SmtpEncryption["None"] = "none";