@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.
- package/README.md +1 -1
- package/dist/cjs/sdk.js +128 -68
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +129 -69
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +128 -68
- package/docs/examples/account/update-phone-session.md +14 -0
- package/docs/examples/messaging/create-email.md +2 -2
- package/docs/examples/messaging/create-push.md +2 -2
- package/docs/examples/messaging/create-sms.md +2 -2
- package/docs/examples/messaging/update-email.md +2 -2
- package/docs/examples/messaging/update-push.md +2 -2
- package/docs/examples/messaging/update-sms.md +2 -2
- package/docs/examples/users/delete-authenticator.md +1 -2
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/index-type.ts +0 -1
- package/src/index.ts +0 -1
- package/src/services/account.ts +54 -5
- package/src/services/databases.ts +20 -3
- package/src/services/health.ts +2 -0
- package/src/services/messaging.ts +42 -40
- package/src/services/project.ts +1 -1
- package/src/services/storage.ts +2 -2
- package/src/services/users.ts +10 -11
- package/types/enums/index-type.d.ts +1 -2
- package/types/index.d.ts +0 -1
- package/types/services/account.d.ts +29 -5
- package/types/services/databases.d.ts +20 -3
- package/types/services/health.d.ts +2 -0
- package/types/services/messaging.d.ts +30 -28
- package/types/services/project.d.ts +1 -1
- package/types/services/storage.d.ts +2 -2
- package/types/services/users.d.ts +10 -3
- package/src/enums/message-status.ts +0 -5
- package/types/enums/message-status.d.ts +0 -5
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Service } from '../service';
|
|
2
2
|
import { Client } from '../client';
|
|
3
3
|
import type { Models } from '../models';
|
|
4
|
-
import { MessageStatus } from '../enums/message-status';
|
|
5
4
|
import { SmtpEncryption } from '../enums/smtp-encryption';
|
|
6
5
|
export declare class Messaging extends Service {
|
|
7
6
|
constructor(client: Client);
|
|
@@ -17,7 +16,7 @@ export declare class Messaging extends Service {
|
|
|
17
16
|
*/
|
|
18
17
|
listMessages(queries?: string[], search?: string): Promise<Models.MessageList>;
|
|
19
18
|
/**
|
|
20
|
-
* Create
|
|
19
|
+
* Create email
|
|
21
20
|
*
|
|
22
21
|
* Create a new email message.
|
|
23
22
|
*
|
|
@@ -30,15 +29,15 @@ export declare class Messaging extends Service {
|
|
|
30
29
|
* @param {string[]} cc
|
|
31
30
|
* @param {string[]} bcc
|
|
32
31
|
* @param {string[]} attachments
|
|
33
|
-
* @param {
|
|
32
|
+
* @param {boolean} draft
|
|
34
33
|
* @param {boolean} html
|
|
35
34
|
* @param {string} scheduledAt
|
|
36
35
|
* @throws {AppwriteException}
|
|
37
36
|
* @returns {Promise}
|
|
38
37
|
*/
|
|
39
|
-
createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[],
|
|
38
|
+
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>;
|
|
40
39
|
/**
|
|
41
|
-
* Update
|
|
40
|
+
* Update email
|
|
42
41
|
*
|
|
43
42
|
* Update an email message by its unique ID.
|
|
44
43
|
*
|
|
@@ -49,7 +48,7 @@ export declare class Messaging extends Service {
|
|
|
49
48
|
* @param {string[]} targets
|
|
50
49
|
* @param {string} subject
|
|
51
50
|
* @param {string} content
|
|
52
|
-
* @param {
|
|
51
|
+
* @param {boolean} draft
|
|
53
52
|
* @param {boolean} html
|
|
54
53
|
* @param {string[]} cc
|
|
55
54
|
* @param {string[]} bcc
|
|
@@ -57,9 +56,9 @@ export declare class Messaging extends Service {
|
|
|
57
56
|
* @throws {AppwriteException}
|
|
58
57
|
* @returns {Promise}
|
|
59
58
|
*/
|
|
60
|
-
updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string,
|
|
59
|
+
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>;
|
|
61
60
|
/**
|
|
62
|
-
* Create
|
|
61
|
+
* Create push notification
|
|
63
62
|
*
|
|
64
63
|
* Create a new push notification.
|
|
65
64
|
*
|
|
@@ -77,14 +76,14 @@ export declare class Messaging extends Service {
|
|
|
77
76
|
* @param {string} color
|
|
78
77
|
* @param {string} tag
|
|
79
78
|
* @param {string} badge
|
|
80
|
-
* @param {
|
|
79
|
+
* @param {boolean} draft
|
|
81
80
|
* @param {string} scheduledAt
|
|
82
81
|
* @throws {AppwriteException}
|
|
83
82
|
* @returns {Promise}
|
|
84
83
|
*/
|
|
85
|
-
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,
|
|
84
|
+
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>;
|
|
86
85
|
/**
|
|
87
|
-
* Update
|
|
86
|
+
* Update push notification
|
|
88
87
|
*
|
|
89
88
|
* Update a push notification by its unique ID.
|
|
90
89
|
*
|
|
@@ -103,14 +102,14 @@ export declare class Messaging extends Service {
|
|
|
103
102
|
* @param {string} color
|
|
104
103
|
* @param {string} tag
|
|
105
104
|
* @param {number} badge
|
|
106
|
-
* @param {
|
|
105
|
+
* @param {boolean} draft
|
|
107
106
|
* @param {string} scheduledAt
|
|
108
107
|
* @throws {AppwriteException}
|
|
109
108
|
* @returns {Promise}
|
|
110
109
|
*/
|
|
111
|
-
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,
|
|
110
|
+
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>;
|
|
112
111
|
/**
|
|
113
|
-
* Create
|
|
112
|
+
* Create SMS
|
|
114
113
|
*
|
|
115
114
|
* Create a new SMS message.
|
|
116
115
|
*
|
|
@@ -119,14 +118,14 @@ export declare class Messaging extends Service {
|
|
|
119
118
|
* @param {string[]} topics
|
|
120
119
|
* @param {string[]} users
|
|
121
120
|
* @param {string[]} targets
|
|
122
|
-
* @param {
|
|
121
|
+
* @param {boolean} draft
|
|
123
122
|
* @param {string} scheduledAt
|
|
124
123
|
* @throws {AppwriteException}
|
|
125
124
|
* @returns {Promise}
|
|
126
125
|
*/
|
|
127
|
-
createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[],
|
|
126
|
+
createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
|
|
128
127
|
/**
|
|
129
|
-
* Update
|
|
128
|
+
* Update SMS
|
|
130
129
|
*
|
|
131
130
|
* Update an email message by its unique ID.
|
|
132
131
|
*
|
|
@@ -136,14 +135,14 @@ export declare class Messaging extends Service {
|
|
|
136
135
|
* @param {string[]} users
|
|
137
136
|
* @param {string[]} targets
|
|
138
137
|
* @param {string} content
|
|
139
|
-
* @param {
|
|
138
|
+
* @param {boolean} draft
|
|
140
139
|
* @param {string} scheduledAt
|
|
141
140
|
* @throws {AppwriteException}
|
|
142
141
|
* @returns {Promise}
|
|
143
142
|
*/
|
|
144
|
-
updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string,
|
|
143
|
+
updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
|
|
145
144
|
/**
|
|
146
|
-
* Get
|
|
145
|
+
* Get message
|
|
147
146
|
*
|
|
148
147
|
* Get a message by its unique ID.
|
|
149
148
|
*
|
|
@@ -154,8 +153,10 @@ export declare class Messaging extends Service {
|
|
|
154
153
|
*/
|
|
155
154
|
getMessage(messageId: string): Promise<Models.Message>;
|
|
156
155
|
/**
|
|
157
|
-
* Delete
|
|
156
|
+
* Delete message
|
|
158
157
|
*
|
|
158
|
+
* Delete a message. If the message is not a draft or scheduled, but has been
|
|
159
|
+
* sent, this will not recall the message.
|
|
159
160
|
*
|
|
160
161
|
* @param {string} messageId
|
|
161
162
|
* @throws {AppwriteException}
|
|
@@ -326,6 +327,7 @@ export declare class Messaging extends Service {
|
|
|
326
327
|
/**
|
|
327
328
|
* Create Sendgrid provider
|
|
328
329
|
*
|
|
330
|
+
* Create a new Sendgrid provider.
|
|
329
331
|
*
|
|
330
332
|
* @param {string} providerId
|
|
331
333
|
* @param {string} name
|
|
@@ -577,7 +579,7 @@ export declare class Messaging extends Service {
|
|
|
577
579
|
*/
|
|
578
580
|
listTopics(queries?: string[], search?: string): Promise<Models.TopicList>;
|
|
579
581
|
/**
|
|
580
|
-
* Create
|
|
582
|
+
* Create topic
|
|
581
583
|
*
|
|
582
584
|
* Create a new topic.
|
|
583
585
|
*
|
|
@@ -589,7 +591,7 @@ export declare class Messaging extends Service {
|
|
|
589
591
|
*/
|
|
590
592
|
createTopic(topicId: string, name: string, subscribe?: string[]): Promise<Models.Topic>;
|
|
591
593
|
/**
|
|
592
|
-
* Get
|
|
594
|
+
* Get topic
|
|
593
595
|
*
|
|
594
596
|
* Get a topic by its unique ID.
|
|
595
597
|
*
|
|
@@ -600,7 +602,7 @@ export declare class Messaging extends Service {
|
|
|
600
602
|
*/
|
|
601
603
|
getTopic(topicId: string): Promise<Models.Topic>;
|
|
602
604
|
/**
|
|
603
|
-
* Update
|
|
605
|
+
* Update topic
|
|
604
606
|
*
|
|
605
607
|
* Update a topic by its unique ID.
|
|
606
608
|
*
|
|
@@ -613,7 +615,7 @@ export declare class Messaging extends Service {
|
|
|
613
615
|
*/
|
|
614
616
|
updateTopic(topicId: string, name?: string, subscribe?: string[]): Promise<Models.Topic>;
|
|
615
617
|
/**
|
|
616
|
-
* Delete
|
|
618
|
+
* Delete topic
|
|
617
619
|
*
|
|
618
620
|
* Delete a topic by its unique ID.
|
|
619
621
|
*
|
|
@@ -646,7 +648,7 @@ export declare class Messaging extends Service {
|
|
|
646
648
|
*/
|
|
647
649
|
listSubscribers(topicId: string, queries?: string[], search?: string): Promise<Models.SubscriberList>;
|
|
648
650
|
/**
|
|
649
|
-
* Create
|
|
651
|
+
* Create subscriber
|
|
650
652
|
*
|
|
651
653
|
* Create a new subscriber.
|
|
652
654
|
*
|
|
@@ -658,7 +660,7 @@ export declare class Messaging extends Service {
|
|
|
658
660
|
*/
|
|
659
661
|
createSubscriber(topicId: string, subscriberId: string, targetId: string): Promise<Models.Subscriber>;
|
|
660
662
|
/**
|
|
661
|
-
* Get
|
|
663
|
+
* Get subscriber
|
|
662
664
|
*
|
|
663
665
|
* Get a subscriber by its unique ID.
|
|
664
666
|
*
|
|
@@ -670,7 +672,7 @@ export declare class Messaging extends Service {
|
|
|
670
672
|
*/
|
|
671
673
|
getSubscriber(topicId: string, subscriberId: string): Promise<Models.Subscriber>;
|
|
672
674
|
/**
|
|
673
|
-
* Delete
|
|
675
|
+
* Delete subscriber
|
|
674
676
|
*
|
|
675
677
|
* Delete a subscriber by its unique ID.
|
|
676
678
|
*
|
|
@@ -213,7 +213,7 @@ export declare class Storage extends Service {
|
|
|
213
213
|
*/
|
|
214
214
|
getFileView(bucketId: string, fileId: string): URL;
|
|
215
215
|
/**
|
|
216
|
-
* Get usage stats
|
|
216
|
+
* Get storage usage stats
|
|
217
217
|
*
|
|
218
218
|
*
|
|
219
219
|
* @param {StorageUsageRange} range
|
|
@@ -222,7 +222,7 @@ export declare class Storage extends Service {
|
|
|
222
222
|
*/
|
|
223
223
|
getUsage(range?: StorageUsageRange): Promise<Models.UsageStorage>;
|
|
224
224
|
/**
|
|
225
|
-
* Get usage stats
|
|
225
|
+
* Get bucket usage stats
|
|
226
226
|
*
|
|
227
227
|
*
|
|
228
228
|
* @param {string} bucketId
|
|
@@ -177,7 +177,7 @@ export declare class Users extends Service {
|
|
|
177
177
|
*/
|
|
178
178
|
createSHAUser<Preferences extends Models.Preferences>(userId: string, email: string, password: string, passwordVersion?: PasswordHash, name?: string): Promise<Models.User<Preferences>>;
|
|
179
179
|
/**
|
|
180
|
-
* Get usage stats
|
|
180
|
+
* Get users usage stats
|
|
181
181
|
*
|
|
182
182
|
*
|
|
183
183
|
* @param {UserUsageRange} range
|
|
@@ -261,6 +261,7 @@ export declare class Users extends Service {
|
|
|
261
261
|
/**
|
|
262
262
|
* Update MFA
|
|
263
263
|
*
|
|
264
|
+
* Enable or disable MFA on a user account.
|
|
264
265
|
*
|
|
265
266
|
* @param {string} userId
|
|
266
267
|
* @param {boolean} mfa
|
|
@@ -271,6 +272,7 @@ export declare class Users extends Service {
|
|
|
271
272
|
/**
|
|
272
273
|
* List Factors
|
|
273
274
|
*
|
|
275
|
+
* List the factors available on the account to be used as a MFA challange.
|
|
274
276
|
*
|
|
275
277
|
* @param {string} userId
|
|
276
278
|
* @throws {AppwriteException}
|
|
@@ -280,14 +282,14 @@ export declare class Users extends Service {
|
|
|
280
282
|
/**
|
|
281
283
|
* Delete Authenticator
|
|
282
284
|
*
|
|
285
|
+
* Delete an authenticator app.
|
|
283
286
|
*
|
|
284
287
|
* @param {string} userId
|
|
285
288
|
* @param {AuthenticatorType} type
|
|
286
|
-
* @param {string} otp
|
|
287
289
|
* @throws {AppwriteException}
|
|
288
290
|
* @returns {Promise}
|
|
289
291
|
*/
|
|
290
|
-
deleteAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType
|
|
292
|
+
deleteAuthenticator<Preferences extends Models.Preferences>(userId: string, type: AuthenticatorType): Promise<Models.User<Preferences>>;
|
|
291
293
|
/**
|
|
292
294
|
* Update name
|
|
293
295
|
*
|
|
@@ -405,6 +407,7 @@ export declare class Users extends Service {
|
|
|
405
407
|
/**
|
|
406
408
|
* List User Targets
|
|
407
409
|
*
|
|
410
|
+
* List the messaging targets that are associated with a user.
|
|
408
411
|
*
|
|
409
412
|
* @param {string} userId
|
|
410
413
|
* @param {string[]} queries
|
|
@@ -415,6 +418,7 @@ export declare class Users extends Service {
|
|
|
415
418
|
/**
|
|
416
419
|
* Create User Target
|
|
417
420
|
*
|
|
421
|
+
* Create a messaging target.
|
|
418
422
|
*
|
|
419
423
|
* @param {string} userId
|
|
420
424
|
* @param {string} targetId
|
|
@@ -429,6 +433,7 @@ export declare class Users extends Service {
|
|
|
429
433
|
/**
|
|
430
434
|
* Get User Target
|
|
431
435
|
*
|
|
436
|
+
* Get a user's push notification target by ID.
|
|
432
437
|
*
|
|
433
438
|
* @param {string} userId
|
|
434
439
|
* @param {string} targetId
|
|
@@ -439,6 +444,7 @@ export declare class Users extends Service {
|
|
|
439
444
|
/**
|
|
440
445
|
* Update User target
|
|
441
446
|
*
|
|
447
|
+
* Update a messaging target.
|
|
442
448
|
*
|
|
443
449
|
* @param {string} userId
|
|
444
450
|
* @param {string} targetId
|
|
@@ -452,6 +458,7 @@ export declare class Users extends Service {
|
|
|
452
458
|
/**
|
|
453
459
|
* Delete user target
|
|
454
460
|
*
|
|
461
|
+
* Delete a messaging target.
|
|
455
462
|
*
|
|
456
463
|
* @param {string} userId
|
|
457
464
|
* @param {string} targetId
|