node-appwrite 15.0.0 → 15.0.1
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/dist/client.js +7 -4
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +7 -4
- package/dist/client.mjs.map +1 -1
- package/dist/models.d.mts +2 -2
- package/dist/models.d.ts +2 -2
- package/dist/services/account.d.mts +0 -86
- package/dist/services/account.d.ts +0 -86
- package/dist/services/account.js +86 -172
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +86 -172
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +0 -14
- package/dist/services/avatars.d.ts +0 -14
- package/dist/services/avatars.js +14 -28
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +14 -28
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +0 -84
- package/dist/services/databases.d.ts +0 -84
- package/dist/services/databases.js +84 -168
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +84 -168
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +0 -48
- package/dist/services/functions.d.ts +0 -48
- package/dist/services/functions.js +48 -96
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +48 -96
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/graphql.d.mts +0 -4
- package/dist/services/graphql.d.ts +0 -4
- package/dist/services/graphql.js +4 -8
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs +4 -8
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +0 -46
- package/dist/services/health.d.ts +0 -46
- package/dist/services/health.js +46 -92
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +46 -92
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/locale.d.mts +0 -16
- package/dist/services/locale.d.ts +0 -16
- package/dist/services/locale.js +16 -32
- package/dist/services/locale.js.map +1 -1
- package/dist/services/locale.mjs +16 -32
- package/dist/services/locale.mjs.map +1 -1
- package/dist/services/messaging.d.mts +3 -95
- package/dist/services/messaging.d.ts +3 -95
- package/dist/services/messaging.js +95 -187
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +95 -187
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/storage.d.mts +0 -26
- package/dist/services/storage.d.ts +0 -26
- package/dist/services/storage.js +26 -52
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +26 -52
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/teams.d.mts +0 -26
- package/dist/services/teams.d.ts +0 -26
- package/dist/services/teams.js +26 -52
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +26 -52
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/users.d.mts +0 -84
- package/dist/services/users.d.ts +0 -84
- package/dist/services/users.js +84 -168
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +84 -168
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
package/dist/services/locale.mjs
CHANGED
|
@@ -4,8 +4,6 @@ var Locale = class {
|
|
|
4
4
|
this.client = client;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Get user locale
|
|
8
|
-
*
|
|
9
7
|
* 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.
|
|
10
8
|
|
|
11
9
|
([IP Geolocation by DB-IP](https://db-ip.com))
|
|
@@ -13,14 +11,14 @@ var Locale = class {
|
|
|
13
11
|
* @throws {AppwriteException}
|
|
14
12
|
* @returns {Promise<Models.Locale>}
|
|
15
13
|
*/
|
|
16
|
-
|
|
14
|
+
get() {
|
|
17
15
|
const apiPath = "/locale";
|
|
18
16
|
const payload = {};
|
|
19
17
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20
18
|
const apiHeaders = {
|
|
21
19
|
"content-type": "application/json"
|
|
22
20
|
};
|
|
23
|
-
return
|
|
21
|
+
return this.client.call(
|
|
24
22
|
"get",
|
|
25
23
|
uri,
|
|
26
24
|
apiHeaders,
|
|
@@ -28,21 +26,19 @@ var Locale = class {
|
|
|
28
26
|
);
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
|
-
* List locale codes
|
|
32
|
-
*
|
|
33
29
|
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
34
30
|
*
|
|
35
31
|
* @throws {AppwriteException}
|
|
36
32
|
* @returns {Promise<Models.LocaleCodeList>}
|
|
37
33
|
*/
|
|
38
|
-
|
|
34
|
+
listCodes() {
|
|
39
35
|
const apiPath = "/locale/codes";
|
|
40
36
|
const payload = {};
|
|
41
37
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42
38
|
const apiHeaders = {
|
|
43
39
|
"content-type": "application/json"
|
|
44
40
|
};
|
|
45
|
-
return
|
|
41
|
+
return this.client.call(
|
|
46
42
|
"get",
|
|
47
43
|
uri,
|
|
48
44
|
apiHeaders,
|
|
@@ -50,21 +46,19 @@ var Locale = class {
|
|
|
50
46
|
);
|
|
51
47
|
}
|
|
52
48
|
/**
|
|
53
|
-
* List continents
|
|
54
|
-
*
|
|
55
49
|
* List of all continents. You can use the locale header to get the data in a supported language.
|
|
56
50
|
*
|
|
57
51
|
* @throws {AppwriteException}
|
|
58
52
|
* @returns {Promise<Models.ContinentList>}
|
|
59
53
|
*/
|
|
60
|
-
|
|
54
|
+
listContinents() {
|
|
61
55
|
const apiPath = "/locale/continents";
|
|
62
56
|
const payload = {};
|
|
63
57
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
64
58
|
const apiHeaders = {
|
|
65
59
|
"content-type": "application/json"
|
|
66
60
|
};
|
|
67
|
-
return
|
|
61
|
+
return this.client.call(
|
|
68
62
|
"get",
|
|
69
63
|
uri,
|
|
70
64
|
apiHeaders,
|
|
@@ -72,21 +66,19 @@ var Locale = class {
|
|
|
72
66
|
);
|
|
73
67
|
}
|
|
74
68
|
/**
|
|
75
|
-
* List countries
|
|
76
|
-
*
|
|
77
69
|
* List of all countries. You can use the locale header to get the data in a supported language.
|
|
78
70
|
*
|
|
79
71
|
* @throws {AppwriteException}
|
|
80
72
|
* @returns {Promise<Models.CountryList>}
|
|
81
73
|
*/
|
|
82
|
-
|
|
74
|
+
listCountries() {
|
|
83
75
|
const apiPath = "/locale/countries";
|
|
84
76
|
const payload = {};
|
|
85
77
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
86
78
|
const apiHeaders = {
|
|
87
79
|
"content-type": "application/json"
|
|
88
80
|
};
|
|
89
|
-
return
|
|
81
|
+
return this.client.call(
|
|
90
82
|
"get",
|
|
91
83
|
uri,
|
|
92
84
|
apiHeaders,
|
|
@@ -94,21 +86,19 @@ var Locale = class {
|
|
|
94
86
|
);
|
|
95
87
|
}
|
|
96
88
|
/**
|
|
97
|
-
* List EU countries
|
|
98
|
-
*
|
|
99
89
|
* 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.
|
|
100
90
|
*
|
|
101
91
|
* @throws {AppwriteException}
|
|
102
92
|
* @returns {Promise<Models.CountryList>}
|
|
103
93
|
*/
|
|
104
|
-
|
|
94
|
+
listCountriesEU() {
|
|
105
95
|
const apiPath = "/locale/countries/eu";
|
|
106
96
|
const payload = {};
|
|
107
97
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
108
98
|
const apiHeaders = {
|
|
109
99
|
"content-type": "application/json"
|
|
110
100
|
};
|
|
111
|
-
return
|
|
101
|
+
return this.client.call(
|
|
112
102
|
"get",
|
|
113
103
|
uri,
|
|
114
104
|
apiHeaders,
|
|
@@ -116,21 +106,19 @@ var Locale = class {
|
|
|
116
106
|
);
|
|
117
107
|
}
|
|
118
108
|
/**
|
|
119
|
-
* List countries phone codes
|
|
120
|
-
*
|
|
121
109
|
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
|
|
122
110
|
*
|
|
123
111
|
* @throws {AppwriteException}
|
|
124
112
|
* @returns {Promise<Models.PhoneList>}
|
|
125
113
|
*/
|
|
126
|
-
|
|
114
|
+
listCountriesPhones() {
|
|
127
115
|
const apiPath = "/locale/countries/phones";
|
|
128
116
|
const payload = {};
|
|
129
117
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
130
118
|
const apiHeaders = {
|
|
131
119
|
"content-type": "application/json"
|
|
132
120
|
};
|
|
133
|
-
return
|
|
121
|
+
return this.client.call(
|
|
134
122
|
"get",
|
|
135
123
|
uri,
|
|
136
124
|
apiHeaders,
|
|
@@ -138,21 +126,19 @@ var Locale = class {
|
|
|
138
126
|
);
|
|
139
127
|
}
|
|
140
128
|
/**
|
|
141
|
-
* List currencies
|
|
142
|
-
*
|
|
143
129
|
* 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.
|
|
144
130
|
*
|
|
145
131
|
* @throws {AppwriteException}
|
|
146
132
|
* @returns {Promise<Models.CurrencyList>}
|
|
147
133
|
*/
|
|
148
|
-
|
|
134
|
+
listCurrencies() {
|
|
149
135
|
const apiPath = "/locale/currencies";
|
|
150
136
|
const payload = {};
|
|
151
137
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
152
138
|
const apiHeaders = {
|
|
153
139
|
"content-type": "application/json"
|
|
154
140
|
};
|
|
155
|
-
return
|
|
141
|
+
return this.client.call(
|
|
156
142
|
"get",
|
|
157
143
|
uri,
|
|
158
144
|
apiHeaders,
|
|
@@ -160,21 +146,19 @@ var Locale = class {
|
|
|
160
146
|
);
|
|
161
147
|
}
|
|
162
148
|
/**
|
|
163
|
-
* List languages
|
|
164
|
-
*
|
|
165
149
|
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
|
|
166
150
|
*
|
|
167
151
|
* @throws {AppwriteException}
|
|
168
152
|
* @returns {Promise<Models.LanguageList>}
|
|
169
153
|
*/
|
|
170
|
-
|
|
154
|
+
listLanguages() {
|
|
171
155
|
const apiPath = "/locale/languages";
|
|
172
156
|
const payload = {};
|
|
173
157
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
174
158
|
const apiHeaders = {
|
|
175
159
|
"content-type": "application/json"
|
|
176
160
|
};
|
|
177
|
-
return
|
|
161
|
+
return this.client.call(
|
|
178
162
|
"get",
|
|
179
163
|
uri,
|
|
180
164
|
apiHeaders,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":";AAGO,IAAM,SAAN,MAAa;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA
|
|
1
|
+
{"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":"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","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nexport class Locale {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * 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.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Locale>}\n */\n get(): Promise<Models.Locale> {\n const apiPath = '/locale';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n listCodes(): Promise<Models.LocaleCodeList> {\n const apiPath = '/locale/codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.ContinentList>}\n */\n listContinents(): Promise<Models.ContinentList> {\n const apiPath = '/locale/continents';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n listCountries(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * 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.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n listCountriesEU(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries/eu';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.PhoneList>}\n */\n listCountriesPhones(): Promise<Models.PhoneList> {\n const apiPath = '/locale/countries/phones';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * 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.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CurrencyList>}\n */\n listCurrencies(): Promise<Models.CurrencyList> {\n const apiPath = '/locale/currencies';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LanguageList>}\n */\n listLanguages(): Promise<Models.LanguageList> {\n const apiPath = '/locale/languages';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
|
|
@@ -8,8 +8,6 @@ declare class Messaging {
|
|
|
8
8
|
client: Client;
|
|
9
9
|
constructor(client: Client);
|
|
10
10
|
/**
|
|
11
|
-
* List messages
|
|
12
|
-
*
|
|
13
11
|
* Get a list of all messages from the current Appwrite project.
|
|
14
12
|
*
|
|
15
13
|
* @param {string[]} queries
|
|
@@ -19,8 +17,6 @@ declare class Messaging {
|
|
|
19
17
|
*/
|
|
20
18
|
listMessages(queries?: string[], search?: string): Promise<Models.MessageList>;
|
|
21
19
|
/**
|
|
22
|
-
* Create email
|
|
23
|
-
*
|
|
24
20
|
* Create a new email message.
|
|
25
21
|
*
|
|
26
22
|
* @param {string} messageId
|
|
@@ -40,9 +36,7 @@ declare class Messaging {
|
|
|
40
36
|
*/
|
|
41
37
|
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>;
|
|
42
38
|
/**
|
|
43
|
-
* Update email
|
|
44
|
-
*
|
|
45
|
-
* Update an email message by its unique ID.
|
|
39
|
+
* Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
|
|
46
40
|
|
|
47
41
|
*
|
|
48
42
|
* @param {string} messageId
|
|
@@ -62,8 +56,6 @@ declare class Messaging {
|
|
|
62
56
|
*/
|
|
63
57
|
updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string, attachments?: string[]): Promise<Models.Message>;
|
|
64
58
|
/**
|
|
65
|
-
* Create push notification
|
|
66
|
-
*
|
|
67
59
|
* Create a new push notification.
|
|
68
60
|
*
|
|
69
61
|
* @param {string} messageId
|
|
@@ -90,9 +82,7 @@ declare class Messaging {
|
|
|
90
82
|
*/
|
|
91
83
|
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?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
|
|
92
84
|
/**
|
|
93
|
-
* Update push notification
|
|
94
|
-
*
|
|
95
|
-
* Update a push notification by its unique ID.
|
|
85
|
+
* Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
|
|
96
86
|
|
|
97
87
|
*
|
|
98
88
|
* @param {string} messageId
|
|
@@ -119,8 +109,6 @@ declare class Messaging {
|
|
|
119
109
|
*/
|
|
120
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, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
|
|
121
111
|
/**
|
|
122
|
-
* Create SMS
|
|
123
|
-
*
|
|
124
112
|
* Create a new SMS message.
|
|
125
113
|
*
|
|
126
114
|
* @param {string} messageId
|
|
@@ -135,9 +123,7 @@ declare class Messaging {
|
|
|
135
123
|
*/
|
|
136
124
|
createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
|
|
137
125
|
/**
|
|
138
|
-
* Update SMS
|
|
139
|
-
*
|
|
140
|
-
* Update an SMS message by its unique ID.
|
|
126
|
+
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
|
|
141
127
|
|
|
142
128
|
*
|
|
143
129
|
* @param {string} messageId
|
|
@@ -152,8 +138,6 @@ declare class Messaging {
|
|
|
152
138
|
*/
|
|
153
139
|
updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
|
|
154
140
|
/**
|
|
155
|
-
* Get message
|
|
156
|
-
*
|
|
157
141
|
* Get a message by its unique ID.
|
|
158
142
|
|
|
159
143
|
*
|
|
@@ -163,8 +147,6 @@ declare class Messaging {
|
|
|
163
147
|
*/
|
|
164
148
|
getMessage(messageId: string): Promise<Models.Message>;
|
|
165
149
|
/**
|
|
166
|
-
* Delete message
|
|
167
|
-
*
|
|
168
150
|
* Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.
|
|
169
151
|
*
|
|
170
152
|
* @param {string} messageId
|
|
@@ -173,8 +155,6 @@ declare class Messaging {
|
|
|
173
155
|
*/
|
|
174
156
|
delete(messageId: string): Promise<{}>;
|
|
175
157
|
/**
|
|
176
|
-
* List message logs
|
|
177
|
-
*
|
|
178
158
|
* Get the message activity logs listed by its unique ID.
|
|
179
159
|
*
|
|
180
160
|
* @param {string} messageId
|
|
@@ -184,8 +164,6 @@ declare class Messaging {
|
|
|
184
164
|
*/
|
|
185
165
|
listMessageLogs(messageId: string, queries?: string[]): Promise<Models.LogList>;
|
|
186
166
|
/**
|
|
187
|
-
* List message targets
|
|
188
|
-
*
|
|
189
167
|
* Get a list of the targets associated with a message.
|
|
190
168
|
*
|
|
191
169
|
* @param {string} messageId
|
|
@@ -195,8 +173,6 @@ declare class Messaging {
|
|
|
195
173
|
*/
|
|
196
174
|
listTargets(messageId: string, queries?: string[]): Promise<Models.TargetList>;
|
|
197
175
|
/**
|
|
198
|
-
* List providers
|
|
199
|
-
*
|
|
200
176
|
* Get a list of all providers from the current Appwrite project.
|
|
201
177
|
*
|
|
202
178
|
* @param {string[]} queries
|
|
@@ -206,8 +182,6 @@ declare class Messaging {
|
|
|
206
182
|
*/
|
|
207
183
|
listProviders(queries?: string[], search?: string): Promise<Models.ProviderList>;
|
|
208
184
|
/**
|
|
209
|
-
* Create APNS provider
|
|
210
|
-
*
|
|
211
185
|
* Create a new Apple Push Notification service provider.
|
|
212
186
|
*
|
|
213
187
|
* @param {string} providerId
|
|
@@ -223,8 +197,6 @@ declare class Messaging {
|
|
|
223
197
|
*/
|
|
224
198
|
createApnsProvider(providerId: string, name: string, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean, enabled?: boolean): Promise<Models.Provider>;
|
|
225
199
|
/**
|
|
226
|
-
* Update APNS provider
|
|
227
|
-
*
|
|
228
200
|
* Update a Apple Push Notification service provider by its unique ID.
|
|
229
201
|
*
|
|
230
202
|
* @param {string} providerId
|
|
@@ -240,8 +212,6 @@ declare class Messaging {
|
|
|
240
212
|
*/
|
|
241
213
|
updateApnsProvider(providerId: string, name?: string, enabled?: boolean, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean): Promise<Models.Provider>;
|
|
242
214
|
/**
|
|
243
|
-
* Create FCM provider
|
|
244
|
-
*
|
|
245
215
|
* Create a new Firebase Cloud Messaging provider.
|
|
246
216
|
*
|
|
247
217
|
* @param {string} providerId
|
|
@@ -253,8 +223,6 @@ declare class Messaging {
|
|
|
253
223
|
*/
|
|
254
224
|
createFcmProvider(providerId: string, name: string, serviceAccountJSON?: object, enabled?: boolean): Promise<Models.Provider>;
|
|
255
225
|
/**
|
|
256
|
-
* Update FCM provider
|
|
257
|
-
*
|
|
258
226
|
* Update a Firebase Cloud Messaging provider by its unique ID.
|
|
259
227
|
*
|
|
260
228
|
* @param {string} providerId
|
|
@@ -266,8 +234,6 @@ declare class Messaging {
|
|
|
266
234
|
*/
|
|
267
235
|
updateFcmProvider(providerId: string, name?: string, enabled?: boolean, serviceAccountJSON?: object): Promise<Models.Provider>;
|
|
268
236
|
/**
|
|
269
|
-
* Create Mailgun provider
|
|
270
|
-
*
|
|
271
237
|
* Create a new Mailgun provider.
|
|
272
238
|
*
|
|
273
239
|
* @param {string} providerId
|
|
@@ -285,8 +251,6 @@ declare class Messaging {
|
|
|
285
251
|
*/
|
|
286
252
|
createMailgunProvider(providerId: string, name: string, apiKey?: string, domain?: string, isEuRegion?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
287
253
|
/**
|
|
288
|
-
* Update Mailgun provider
|
|
289
|
-
*
|
|
290
254
|
* Update a Mailgun provider by its unique ID.
|
|
291
255
|
*
|
|
292
256
|
* @param {string} providerId
|
|
@@ -304,8 +268,6 @@ declare class Messaging {
|
|
|
304
268
|
*/
|
|
305
269
|
updateMailgunProvider(providerId: string, name?: string, apiKey?: string, domain?: string, isEuRegion?: boolean, enabled?: boolean, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string): Promise<Models.Provider>;
|
|
306
270
|
/**
|
|
307
|
-
* Create Msg91 provider
|
|
308
|
-
*
|
|
309
271
|
* Create a new MSG91 provider.
|
|
310
272
|
*
|
|
311
273
|
* @param {string} providerId
|
|
@@ -319,8 +281,6 @@ declare class Messaging {
|
|
|
319
281
|
*/
|
|
320
282
|
createMsg91Provider(providerId: string, name: string, templateId?: string, senderId?: string, authKey?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
321
283
|
/**
|
|
322
|
-
* Update Msg91 provider
|
|
323
|
-
*
|
|
324
284
|
* Update a MSG91 provider by its unique ID.
|
|
325
285
|
*
|
|
326
286
|
* @param {string} providerId
|
|
@@ -334,8 +294,6 @@ declare class Messaging {
|
|
|
334
294
|
*/
|
|
335
295
|
updateMsg91Provider(providerId: string, name?: string, enabled?: boolean, templateId?: string, senderId?: string, authKey?: string): Promise<Models.Provider>;
|
|
336
296
|
/**
|
|
337
|
-
* Create Sendgrid provider
|
|
338
|
-
*
|
|
339
297
|
* Create a new Sendgrid provider.
|
|
340
298
|
*
|
|
341
299
|
* @param {string} providerId
|
|
@@ -351,8 +309,6 @@ declare class Messaging {
|
|
|
351
309
|
*/
|
|
352
310
|
createSendgridProvider(providerId: string, name: string, apiKey?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
353
311
|
/**
|
|
354
|
-
* Update Sendgrid provider
|
|
355
|
-
*
|
|
356
312
|
* Update a Sendgrid provider by its unique ID.
|
|
357
313
|
*
|
|
358
314
|
* @param {string} providerId
|
|
@@ -368,8 +324,6 @@ declare class Messaging {
|
|
|
368
324
|
*/
|
|
369
325
|
updateSendgridProvider(providerId: string, name?: string, enabled?: boolean, apiKey?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string): Promise<Models.Provider>;
|
|
370
326
|
/**
|
|
371
|
-
* Create SMTP provider
|
|
372
|
-
*
|
|
373
327
|
* Create a new SMTP provider.
|
|
374
328
|
*
|
|
375
329
|
* @param {string} providerId
|
|
@@ -391,8 +345,6 @@ declare class Messaging {
|
|
|
391
345
|
*/
|
|
392
346
|
createSmtpProvider(providerId: string, name: string, host: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
393
347
|
/**
|
|
394
|
-
* Update SMTP provider
|
|
395
|
-
*
|
|
396
348
|
* Update a SMTP provider by its unique ID.
|
|
397
349
|
*
|
|
398
350
|
* @param {string} providerId
|
|
@@ -414,8 +366,6 @@ declare class Messaging {
|
|
|
414
366
|
*/
|
|
415
367
|
updateSmtpProvider(providerId: string, name?: string, host?: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
416
368
|
/**
|
|
417
|
-
* Create Telesign provider
|
|
418
|
-
*
|
|
419
369
|
* Create a new Telesign provider.
|
|
420
370
|
*
|
|
421
371
|
* @param {string} providerId
|
|
@@ -429,8 +379,6 @@ declare class Messaging {
|
|
|
429
379
|
*/
|
|
430
380
|
createTelesignProvider(providerId: string, name: string, from?: string, customerId?: string, apiKey?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
431
381
|
/**
|
|
432
|
-
* Update Telesign provider
|
|
433
|
-
*
|
|
434
382
|
* Update a Telesign provider by its unique ID.
|
|
435
383
|
*
|
|
436
384
|
* @param {string} providerId
|
|
@@ -444,8 +392,6 @@ declare class Messaging {
|
|
|
444
392
|
*/
|
|
445
393
|
updateTelesignProvider(providerId: string, name?: string, enabled?: boolean, customerId?: string, apiKey?: string, from?: string): Promise<Models.Provider>;
|
|
446
394
|
/**
|
|
447
|
-
* Create Textmagic provider
|
|
448
|
-
*
|
|
449
395
|
* Create a new Textmagic provider.
|
|
450
396
|
*
|
|
451
397
|
* @param {string} providerId
|
|
@@ -459,8 +405,6 @@ declare class Messaging {
|
|
|
459
405
|
*/
|
|
460
406
|
createTextmagicProvider(providerId: string, name: string, from?: string, username?: string, apiKey?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
461
407
|
/**
|
|
462
|
-
* Update Textmagic provider
|
|
463
|
-
*
|
|
464
408
|
* Update a Textmagic provider by its unique ID.
|
|
465
409
|
*
|
|
466
410
|
* @param {string} providerId
|
|
@@ -474,8 +418,6 @@ declare class Messaging {
|
|
|
474
418
|
*/
|
|
475
419
|
updateTextmagicProvider(providerId: string, name?: string, enabled?: boolean, username?: string, apiKey?: string, from?: string): Promise<Models.Provider>;
|
|
476
420
|
/**
|
|
477
|
-
* Create Twilio provider
|
|
478
|
-
*
|
|
479
421
|
* Create a new Twilio provider.
|
|
480
422
|
*
|
|
481
423
|
* @param {string} providerId
|
|
@@ -489,8 +431,6 @@ declare class Messaging {
|
|
|
489
431
|
*/
|
|
490
432
|
createTwilioProvider(providerId: string, name: string, from?: string, accountSid?: string, authToken?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
491
433
|
/**
|
|
492
|
-
* Update Twilio provider
|
|
493
|
-
*
|
|
494
434
|
* Update a Twilio provider by its unique ID.
|
|
495
435
|
*
|
|
496
436
|
* @param {string} providerId
|
|
@@ -504,8 +444,6 @@ declare class Messaging {
|
|
|
504
444
|
*/
|
|
505
445
|
updateTwilioProvider(providerId: string, name?: string, enabled?: boolean, accountSid?: string, authToken?: string, from?: string): Promise<Models.Provider>;
|
|
506
446
|
/**
|
|
507
|
-
* Create Vonage provider
|
|
508
|
-
*
|
|
509
447
|
* Create a new Vonage provider.
|
|
510
448
|
*
|
|
511
449
|
* @param {string} providerId
|
|
@@ -519,8 +457,6 @@ declare class Messaging {
|
|
|
519
457
|
*/
|
|
520
458
|
createVonageProvider(providerId: string, name: string, from?: string, apiKey?: string, apiSecret?: string, enabled?: boolean): Promise<Models.Provider>;
|
|
521
459
|
/**
|
|
522
|
-
* Update Vonage provider
|
|
523
|
-
*
|
|
524
460
|
* Update a Vonage provider by its unique ID.
|
|
525
461
|
*
|
|
526
462
|
* @param {string} providerId
|
|
@@ -534,8 +470,6 @@ declare class Messaging {
|
|
|
534
470
|
*/
|
|
535
471
|
updateVonageProvider(providerId: string, name?: string, enabled?: boolean, apiKey?: string, apiSecret?: string, from?: string): Promise<Models.Provider>;
|
|
536
472
|
/**
|
|
537
|
-
* Get provider
|
|
538
|
-
*
|
|
539
473
|
* Get a provider by its unique ID.
|
|
540
474
|
|
|
541
475
|
*
|
|
@@ -545,8 +479,6 @@ declare class Messaging {
|
|
|
545
479
|
*/
|
|
546
480
|
getProvider(providerId: string): Promise<Models.Provider>;
|
|
547
481
|
/**
|
|
548
|
-
* Delete provider
|
|
549
|
-
*
|
|
550
482
|
* Delete a provider by its unique ID.
|
|
551
483
|
*
|
|
552
484
|
* @param {string} providerId
|
|
@@ -555,8 +487,6 @@ declare class Messaging {
|
|
|
555
487
|
*/
|
|
556
488
|
deleteProvider(providerId: string): Promise<{}>;
|
|
557
489
|
/**
|
|
558
|
-
* List provider logs
|
|
559
|
-
*
|
|
560
490
|
* Get the provider activity logs listed by its unique ID.
|
|
561
491
|
*
|
|
562
492
|
* @param {string} providerId
|
|
@@ -566,8 +496,6 @@ declare class Messaging {
|
|
|
566
496
|
*/
|
|
567
497
|
listProviderLogs(providerId: string, queries?: string[]): Promise<Models.LogList>;
|
|
568
498
|
/**
|
|
569
|
-
* List subscriber logs
|
|
570
|
-
*
|
|
571
499
|
* Get the subscriber activity logs listed by its unique ID.
|
|
572
500
|
*
|
|
573
501
|
* @param {string} subscriberId
|
|
@@ -577,8 +505,6 @@ declare class Messaging {
|
|
|
577
505
|
*/
|
|
578
506
|
listSubscriberLogs(subscriberId: string, queries?: string[]): Promise<Models.LogList>;
|
|
579
507
|
/**
|
|
580
|
-
* List topics
|
|
581
|
-
*
|
|
582
508
|
* Get a list of all topics from the current Appwrite project.
|
|
583
509
|
*
|
|
584
510
|
* @param {string[]} queries
|
|
@@ -588,8 +514,6 @@ declare class Messaging {
|
|
|
588
514
|
*/
|
|
589
515
|
listTopics(queries?: string[], search?: string): Promise<Models.TopicList>;
|
|
590
516
|
/**
|
|
591
|
-
* Create topic
|
|
592
|
-
*
|
|
593
517
|
* Create a new topic.
|
|
594
518
|
*
|
|
595
519
|
* @param {string} topicId
|
|
@@ -600,8 +524,6 @@ declare class Messaging {
|
|
|
600
524
|
*/
|
|
601
525
|
createTopic(topicId: string, name: string, subscribe?: string[]): Promise<Models.Topic>;
|
|
602
526
|
/**
|
|
603
|
-
* Get topic
|
|
604
|
-
*
|
|
605
527
|
* Get a topic by its unique ID.
|
|
606
528
|
|
|
607
529
|
*
|
|
@@ -611,8 +533,6 @@ declare class Messaging {
|
|
|
611
533
|
*/
|
|
612
534
|
getTopic(topicId: string): Promise<Models.Topic>;
|
|
613
535
|
/**
|
|
614
|
-
* Update topic
|
|
615
|
-
*
|
|
616
536
|
* Update a topic by its unique ID.
|
|
617
537
|
|
|
618
538
|
*
|
|
@@ -624,8 +544,6 @@ declare class Messaging {
|
|
|
624
544
|
*/
|
|
625
545
|
updateTopic(topicId: string, name?: string, subscribe?: string[]): Promise<Models.Topic>;
|
|
626
546
|
/**
|
|
627
|
-
* Delete topic
|
|
628
|
-
*
|
|
629
547
|
* Delete a topic by its unique ID.
|
|
630
548
|
*
|
|
631
549
|
* @param {string} topicId
|
|
@@ -634,8 +552,6 @@ declare class Messaging {
|
|
|
634
552
|
*/
|
|
635
553
|
deleteTopic(topicId: string): Promise<{}>;
|
|
636
554
|
/**
|
|
637
|
-
* List topic logs
|
|
638
|
-
*
|
|
639
555
|
* Get the topic activity logs listed by its unique ID.
|
|
640
556
|
*
|
|
641
557
|
* @param {string} topicId
|
|
@@ -645,8 +561,6 @@ declare class Messaging {
|
|
|
645
561
|
*/
|
|
646
562
|
listTopicLogs(topicId: string, queries?: string[]): Promise<Models.LogList>;
|
|
647
563
|
/**
|
|
648
|
-
* List subscribers
|
|
649
|
-
*
|
|
650
564
|
* Get a list of all subscribers from the current Appwrite project.
|
|
651
565
|
*
|
|
652
566
|
* @param {string} topicId
|
|
@@ -657,8 +571,6 @@ declare class Messaging {
|
|
|
657
571
|
*/
|
|
658
572
|
listSubscribers(topicId: string, queries?: string[], search?: string): Promise<Models.SubscriberList>;
|
|
659
573
|
/**
|
|
660
|
-
* Create subscriber
|
|
661
|
-
*
|
|
662
574
|
* Create a new subscriber.
|
|
663
575
|
*
|
|
664
576
|
* @param {string} topicId
|
|
@@ -669,8 +581,6 @@ declare class Messaging {
|
|
|
669
581
|
*/
|
|
670
582
|
createSubscriber(topicId: string, subscriberId: string, targetId: string): Promise<Models.Subscriber>;
|
|
671
583
|
/**
|
|
672
|
-
* Get subscriber
|
|
673
|
-
*
|
|
674
584
|
* Get a subscriber by its unique ID.
|
|
675
585
|
|
|
676
586
|
*
|
|
@@ -681,8 +591,6 @@ declare class Messaging {
|
|
|
681
591
|
*/
|
|
682
592
|
getSubscriber(topicId: string, subscriberId: string): Promise<Models.Subscriber>;
|
|
683
593
|
/**
|
|
684
|
-
* Delete subscriber
|
|
685
|
-
*
|
|
686
594
|
* Delete a subscriber by its unique ID.
|
|
687
595
|
*
|
|
688
596
|
* @param {string} topicId
|