appwrite-cli 12.0.1 → 13.0.0-rc.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.
Files changed (283) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +2 -2
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +145 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/client.d.ts +89 -0
  8. package/dist/lib/client.d.ts.map +1 -0
  9. package/dist/lib/client.js +227 -0
  10. package/dist/lib/client.js.map +1 -0
  11. package/dist/lib/commands/account.d.ts +379 -0
  12. package/dist/lib/commands/account.d.ts.map +1 -0
  13. package/dist/lib/commands/account.js +1228 -0
  14. package/dist/lib/commands/account.js.map +1 -0
  15. package/dist/lib/commands/console.d.ts +20 -0
  16. package/dist/lib/commands/console.d.ts.map +1 -0
  17. package/dist/lib/commands/console.js +78 -0
  18. package/dist/lib/commands/console.js.map +1 -0
  19. package/dist/lib/commands/databases.d.ts +732 -0
  20. package/dist/lib/commands/databases.d.ts.map +1 -0
  21. package/dist/lib/commands/databases.js +2196 -0
  22. package/dist/lib/commands/databases.js.map +1 -0
  23. package/dist/lib/commands/functions.d.ts +310 -0
  24. package/dist/lib/commands/functions.d.ts.map +1 -0
  25. package/dist/lib/commands/functions.js +1100 -0
  26. package/dist/lib/commands/functions.js.map +1 -0
  27. package/dist/lib/commands/generic.d.ts +17 -0
  28. package/dist/lib/commands/generic.d.ts.map +1 -0
  29. package/dist/lib/commands/generic.js +279 -0
  30. package/dist/lib/commands/generic.js.map +1 -0
  31. package/dist/lib/commands/graphql.d.ts +19 -0
  32. package/dist/lib/commands/graphql.d.ts.map +1 -0
  33. package/dist/lib/commands/graphql.js +77 -0
  34. package/dist/lib/commands/graphql.js.map +1 -0
  35. package/dist/lib/commands/health.d.ts +153 -0
  36. package/dist/lib/commands/health.d.ts.map +1 -0
  37. package/dist/lib/commands/health.js +464 -0
  38. package/dist/lib/commands/health.js.map +1 -0
  39. package/dist/lib/commands/init.d.ts +3 -0
  40. package/dist/lib/commands/init.d.ts.map +1 -0
  41. package/dist/lib/commands/init.js +518 -0
  42. package/dist/lib/commands/init.js.map +1 -0
  43. package/dist/lib/commands/locale.d.ts +53 -0
  44. package/dist/lib/commands/locale.d.ts.map +1 -0
  45. package/dist/lib/commands/locale.js +165 -0
  46. package/dist/lib/commands/locale.js.map +1 -0
  47. package/dist/lib/commands/messaging.d.ts +588 -0
  48. package/dist/lib/commands/messaging.d.ts.map +1 -0
  49. package/dist/lib/commands/messaging.js +2042 -0
  50. package/dist/lib/commands/messaging.js.map +1 -0
  51. package/dist/lib/commands/migrations.d.ts +150 -0
  52. package/dist/lib/commands/migrations.d.ts.map +1 -0
  53. package/dist/lib/commands/migrations.js +524 -0
  54. package/dist/lib/commands/migrations.js.map +1 -0
  55. package/dist/lib/commands/organizations.d.ts +11 -0
  56. package/dist/lib/commands/organizations.d.ts.map +1 -0
  57. package/dist/lib/commands/organizations.js +31 -0
  58. package/dist/lib/commands/organizations.js.map +1 -0
  59. package/dist/lib/commands/project.d.ts +53 -0
  60. package/dist/lib/commands/project.d.ts.map +1 -0
  61. package/dist/lib/commands/project.js +176 -0
  62. package/dist/lib/commands/project.js.map +1 -0
  63. package/dist/lib/commands/projects.d.ts +516 -0
  64. package/dist/lib/commands/projects.d.ts.map +1 -0
  65. package/dist/lib/commands/projects.js +1590 -0
  66. package/dist/lib/commands/projects.js.map +1 -0
  67. package/dist/lib/commands/proxy.d.ts +71 -0
  68. package/dist/lib/commands/proxy.d.ts.map +1 -0
  69. package/dist/lib/commands/proxy.js +240 -0
  70. package/dist/lib/commands/proxy.js.map +1 -0
  71. package/dist/lib/commands/pull.d.ts +8 -0
  72. package/dist/lib/commands/pull.d.ts.map +1 -0
  73. package/dist/lib/commands/pull.js +455 -0
  74. package/dist/lib/commands/pull.js.map +1 -0
  75. package/dist/lib/commands/push.d.ts +4 -0
  76. package/dist/lib/commands/push.d.ts.map +1 -0
  77. package/dist/lib/commands/push.js +2154 -0
  78. package/dist/lib/commands/push.js.map +1 -0
  79. package/dist/lib/commands/run.d.ts +3 -0
  80. package/dist/lib/commands/run.d.ts.map +1 -0
  81. package/dist/lib/commands/run.js +287 -0
  82. package/dist/lib/commands/run.js.map +1 -0
  83. package/dist/lib/commands/sites.d.ts +296 -0
  84. package/dist/lib/commands/sites.d.ts.map +1 -0
  85. package/dist/lib/commands/sites.js +1046 -0
  86. package/dist/lib/commands/sites.js.map +1 -0
  87. package/dist/lib/commands/storage.d.ts +170 -0
  88. package/dist/lib/commands/storage.d.ts.map +1 -0
  89. package/dist/lib/commands/storage.js +651 -0
  90. package/dist/lib/commands/storage.js.map +1 -0
  91. package/dist/lib/commands/tables-db.d.ts +728 -0
  92. package/dist/lib/commands/tables-db.d.ts.map +1 -0
  93. package/dist/lib/commands/tables-db.js +2198 -0
  94. package/dist/lib/commands/tables-db.js.map +1 -0
  95. package/dist/lib/commands/teams.d.ts +129 -0
  96. package/dist/lib/commands/teams.d.ts.map +1 -0
  97. package/dist/lib/commands/teams.js +403 -0
  98. package/dist/lib/commands/teams.js.map +1 -0
  99. package/dist/lib/commands/tokens.d.ts +48 -0
  100. package/dist/lib/commands/tokens.d.ts.map +1 -0
  101. package/dist/lib/commands/tokens.js +156 -0
  102. package/dist/lib/commands/tokens.js.map +1 -0
  103. package/dist/lib/commands/types.d.ts +3 -0
  104. package/dist/lib/commands/types.d.ts.map +1 -0
  105. package/dist/lib/commands/types.js +155 -0
  106. package/dist/lib/commands/types.js.map +1 -0
  107. package/dist/lib/commands/update.d.ts +3 -0
  108. package/dist/lib/commands/update.d.ts.map +1 -0
  109. package/dist/lib/commands/update.js +202 -0
  110. package/dist/lib/commands/update.js.map +1 -0
  111. package/dist/lib/commands/users.d.ts +382 -0
  112. package/dist/lib/commands/users.d.ts.map +1 -0
  113. package/dist/lib/commands/users.js +1195 -0
  114. package/dist/lib/commands/users.js.map +1 -0
  115. package/dist/lib/commands/vcs.d.ts +92 -0
  116. package/dist/lib/commands/vcs.d.ts.map +1 -0
  117. package/dist/lib/commands/vcs.js +276 -0
  118. package/dist/lib/commands/vcs.js.map +1 -0
  119. package/dist/lib/config.d.ts +118 -0
  120. package/dist/lib/config.d.ts.map +1 -0
  121. package/{lib → dist/lib}/config.js +204 -325
  122. package/dist/lib/config.js.map +1 -0
  123. package/dist/lib/emulation/docker.d.ts +15 -0
  124. package/dist/lib/emulation/docker.d.ts.map +1 -0
  125. package/dist/lib/emulation/docker.js +220 -0
  126. package/dist/lib/emulation/docker.js.map +1 -0
  127. package/dist/lib/emulation/utils.d.ts +29 -0
  128. package/dist/lib/emulation/utils.d.ts.map +1 -0
  129. package/dist/lib/emulation/utils.js +168 -0
  130. package/dist/lib/emulation/utils.js.map +1 -0
  131. package/dist/lib/exception.d.ts +8 -0
  132. package/dist/lib/exception.d.ts.map +1 -0
  133. package/dist/lib/exception.js +16 -0
  134. package/dist/lib/exception.js.map +1 -0
  135. package/dist/lib/id.d.ts +7 -0
  136. package/dist/lib/id.d.ts.map +1 -0
  137. package/dist/lib/id.js +32 -0
  138. package/dist/lib/id.js.map +1 -0
  139. package/dist/lib/paginate.d.ts +10 -0
  140. package/dist/lib/paginate.d.ts.map +1 -0
  141. package/{lib → dist/lib}/paginate.js +9 -15
  142. package/dist/lib/paginate.js.map +1 -0
  143. package/dist/lib/parser.d.ts +18 -0
  144. package/dist/lib/parser.d.ts.map +1 -0
  145. package/dist/lib/parser.js +237 -0
  146. package/dist/lib/parser.js.map +1 -0
  147. package/dist/lib/questions.d.ts +59 -0
  148. package/dist/lib/questions.d.ts.map +1 -0
  149. package/dist/lib/questions.js +995 -0
  150. package/dist/lib/questions.js.map +1 -0
  151. package/dist/lib/sdks.d.ts +4 -0
  152. package/dist/lib/sdks.d.ts.map +1 -0
  153. package/dist/lib/sdks.js +51 -0
  154. package/dist/lib/sdks.js.map +1 -0
  155. package/dist/lib/spinner.d.ts +28 -0
  156. package/dist/lib/spinner.d.ts.map +1 -0
  157. package/{lib → dist/lib}/spinner.js +34 -45
  158. package/dist/lib/spinner.js.map +1 -0
  159. package/dist/lib/type-generation/attribute.d.ts +17 -0
  160. package/dist/lib/type-generation/attribute.d.ts.map +1 -0
  161. package/dist/lib/type-generation/attribute.js +19 -0
  162. package/dist/lib/type-generation/attribute.js.map +1 -0
  163. package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
  164. package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
  165. package/dist/lib/type-generation/languages/csharp.js +180 -0
  166. package/dist/lib/type-generation/languages/csharp.js.map +1 -0
  167. package/dist/lib/type-generation/languages/dart.d.ts +8 -0
  168. package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
  169. package/dist/lib/type-generation/languages/dart.js +197 -0
  170. package/dist/lib/type-generation/languages/dart.js.map +1 -0
  171. package/dist/lib/type-generation/languages/java.d.ts +7 -0
  172. package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
  173. package/dist/lib/type-generation/languages/java.js +140 -0
  174. package/dist/lib/type-generation/languages/java.js.map +1 -0
  175. package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
  176. package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
  177. package/dist/lib/type-generation/languages/javascript.js +108 -0
  178. package/dist/lib/type-generation/languages/javascript.js.map +1 -0
  179. package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
  180. package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
  181. package/dist/lib/type-generation/languages/kotlin.js +95 -0
  182. package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
  183. package/dist/lib/type-generation/languages/language.d.ts +43 -0
  184. package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
  185. package/dist/lib/type-generation/languages/language.js +82 -0
  186. package/dist/lib/type-generation/languages/language.js.map +1 -0
  187. package/dist/lib/type-generation/languages/php.d.ts +7 -0
  188. package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
  189. package/dist/lib/type-generation/languages/php.js +116 -0
  190. package/dist/lib/type-generation/languages/php.js.map +1 -0
  191. package/dist/lib/type-generation/languages/swift.d.ts +7 -0
  192. package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
  193. package/dist/lib/type-generation/languages/swift.js +179 -0
  194. package/dist/lib/type-generation/languages/swift.js.map +1 -0
  195. package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
  196. package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
  197. package/dist/lib/type-generation/languages/typescript.js +112 -0
  198. package/dist/lib/type-generation/languages/typescript.js.map +1 -0
  199. package/dist/lib/types.d.ts +133 -0
  200. package/dist/lib/types.d.ts.map +1 -0
  201. package/dist/lib/types.js +3 -0
  202. package/dist/lib/types.js.map +1 -0
  203. package/dist/lib/utils.d.ts +15 -0
  204. package/dist/lib/utils.d.ts.map +1 -0
  205. package/{lib → dist/lib}/utils.js +74 -120
  206. package/dist/lib/utils.js.map +1 -0
  207. package/dist/lib/validations.d.ts +2 -0
  208. package/dist/lib/validations.d.ts.map +1 -0
  209. package/dist/lib/validations.js +20 -0
  210. package/dist/lib/validations.js.map +1 -0
  211. package/docs/examples/databases/upsert-document.md +1 -2
  212. package/index.ts +152 -0
  213. package/install.ps1 +2 -5
  214. package/install.sh +1 -2
  215. package/lib/client.ts +259 -0
  216. package/lib/commands/{account.js → account.ts} +408 -662
  217. package/lib/commands/console.ts +112 -0
  218. package/lib/commands/{databases.js → databases.ts} +818 -1136
  219. package/lib/commands/{functions.js → functions.ts} +381 -526
  220. package/lib/commands/{generic.js → generic.ts} +47 -39
  221. package/lib/commands/graphql.ts +110 -0
  222. package/lib/commands/{health.js → health.ts} +168 -284
  223. package/lib/commands/{init.js → init.ts} +68 -66
  224. package/lib/commands/{locale.js → locale.ts} +75 -121
  225. package/lib/commands/{messaging.js → messaging.ts} +699 -937
  226. package/lib/commands/{migrations.js → migrations.ts} +182 -258
  227. package/lib/commands/organizations.ts +46 -0
  228. package/lib/commands/{project.js → project.ts} +75 -111
  229. package/lib/commands/{projects.js → projects.ts} +587 -843
  230. package/lib/commands/{proxy.js → proxy.ts} +94 -140
  231. package/lib/commands/{pull.js → pull.ts} +54 -44
  232. package/lib/commands/{push.js → push.ts} +235 -191
  233. package/lib/commands/{run.js → run.ts} +61 -55
  234. package/lib/commands/{sites.js → sites.ts} +364 -504
  235. package/lib/commands/{storage.js → storage.ts} +216 -292
  236. package/lib/commands/{tables-db.js → tables-db.ts} +817 -1126
  237. package/lib/commands/{teams.js → teams.ts} +162 -236
  238. package/lib/commands/{tokens.js → tokens.ts} +70 -99
  239. package/lib/commands/{types.js → types.ts} +37 -35
  240. package/lib/commands/{update.js → update.ts} +25 -27
  241. package/lib/commands/{users.js → users.ts} +426 -644
  242. package/lib/commands/{vcs.js → vcs.ts} +118 -174
  243. package/lib/config.ts +854 -0
  244. package/lib/emulation/{docker.js → docker.ts} +39 -38
  245. package/lib/emulation/utils.ts +193 -0
  246. package/lib/exception.ts +20 -0
  247. package/lib/{id.js → id.ts} +5 -5
  248. package/lib/paginate.ts +63 -0
  249. package/lib/parser.ts +238 -0
  250. package/lib/{questions.js → questions.ts} +148 -156
  251. package/lib/sdks.ts +55 -0
  252. package/lib/spinner.ts +118 -0
  253. package/lib/type-generation/attribute.ts +17 -0
  254. package/lib/type-generation/languages/{csharp.js → csharp.ts} +59 -57
  255. package/lib/type-generation/languages/{dart.js → dart.ts} +91 -89
  256. package/lib/type-generation/languages/{java.js → java.ts} +58 -56
  257. package/lib/type-generation/languages/javascript.ts +111 -0
  258. package/lib/type-generation/languages/kotlin.ts +96 -0
  259. package/lib/type-generation/languages/language.ts +119 -0
  260. package/lib/type-generation/languages/{php.js → php.ts} +55 -53
  261. package/lib/type-generation/languages/{swift.js → swift.ts} +59 -57
  262. package/lib/type-generation/languages/typescript.ts +116 -0
  263. package/lib/types.ts +150 -0
  264. package/lib/utils.ts +322 -0
  265. package/lib/validations.ts +17 -0
  266. package/package.json +21 -12
  267. package/scoop/appwrite.config.json +3 -3
  268. package/tsconfig.json +30 -0
  269. package/index.js +0 -147
  270. package/lib/client.js +0 -254
  271. package/lib/commands/console.js +0 -127
  272. package/lib/commands/graphql.js +0 -126
  273. package/lib/commands/organizations.js +0 -48
  274. package/lib/emulation/utils.js +0 -186
  275. package/lib/exception.js +0 -9
  276. package/lib/parser.js +0 -250
  277. package/lib/sdks.js +0 -60
  278. package/lib/type-generation/attribute.js +0 -19
  279. package/lib/type-generation/languages/javascript.js +0 -111
  280. package/lib/type-generation/languages/kotlin.js +0 -94
  281. package/lib/type-generation/languages/language.js +0 -125
  282. package/lib/type-generation/languages/typescript.js +0 -116
  283. package/lib/validations.js +0 -17
@@ -1,31 +1,27 @@
1
- const fs = require('fs');
2
- const pathLib = require('path');
3
- const tar = require("tar");
4
- const ignore = require("ignore");
5
- const { promisify } = require('util');
6
- const libClient = require('../client.js');
7
- const { getAllFiles, showConsoleLink } = require('../utils.js');
8
- const { Command } = require('commander');
9
- const { sdkForProject, sdkForConsole } = require('../sdks')
10
- const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } = require('../parser')
11
- const { localConfig, globalConfig } = require("../config");
12
- const { File } = require('undici');
13
- const { ReadableStream } = require('stream/web');
14
-
15
- /**
16
- * @param {fs.ReadStream} readStream
17
- * @returns {ReadableStream}
18
- */
19
- function convertReadStreamToReadableStream(readStream) {
1
+ import fs = require('fs');
2
+ import pathLib = require('path');
3
+ import tar = require('tar');
4
+ import ignore = require('ignore');
5
+ import { promisify } from 'util';
6
+ import Client from '../client';
7
+ import { getAllFiles, showConsoleLink } from '../utils';
8
+ import { Command } from 'commander';
9
+ import { sdkForProject, sdkForConsole } from '../sdks';
10
+ import { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log, warn } from '../parser';
11
+ import { localConfig, globalConfig } from '../config';
12
+ import { File } from 'undici';
13
+ import { ReadableStream } from 'stream/web';
14
+
15
+ function convertReadStreamToReadableStream(readStream: fs.ReadStream): ReadableStream {
20
16
  return new ReadableStream({
21
17
  start(controller) {
22
- readStream.on("data", (chunk) => {
18
+ readStream.on("data", (chunk: Buffer) => {
23
19
  controller.enqueue(chunk);
24
20
  });
25
21
  readStream.on("end", () => {
26
22
  controller.close();
27
23
  });
28
- readStream.on("error", (err) => {
24
+ readStream.on("error", (err: Error) => {
29
25
  controller.error(err);
30
26
  });
31
27
  },
@@ -35,24 +31,21 @@ function convertReadStreamToReadableStream(readStream) {
35
31
  });
36
32
  }
37
33
 
38
- const messaging = new Command("messaging").description(commandDescriptions['messaging'] ?? '').configureHelp({
34
+ export const messaging = new Command("messaging").description(commandDescriptions['messaging'] ?? '').configureHelp({
39
35
  helpWidth: process.stdout.columns || 80
40
36
  })
41
37
 
42
- /**
43
- * @typedef {Object} MessagingListMessagesRequestParams
44
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType
45
- * @property {string} search Search term to filter your list results. Max length: 256 chars.
46
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
47
- * @property {boolean} overrideForCli
48
- * @property {boolean} parseOutput
49
- * @property {libClient | undefined} sdk
50
- */
51
-
52
- /**
53
- * @param {MessagingListMessagesRequestParams} params
54
- */
55
- const messagingListMessages = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
38
+ interface MessagingListMessagesRequestParams {
39
+ queries?: string[];
40
+ search?: string;
41
+ total?: boolean;
42
+ overrideForCli?: boolean;
43
+ parseOutput?: boolean;
44
+ sdk?: Client;
45
+ console?: boolean;
46
+ }
47
+
48
+ export const messagingListMessages = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingListMessagesRequestParams): Promise<any> => {
56
49
  let client = !sdk ? await sdkForProject() :
57
50
  sdk;
58
51
  let apiPath = '/messaging/messages';
@@ -73,7 +66,7 @@ const messagingListMessages = async ({queries,search,total,parseOutput = true, o
73
66
  }, payload);
74
67
 
75
68
  if (parseOutput) {
76
- if(console) {
69
+ if(showConsole) {
77
70
  showConsoleLink('messaging', 'listMessages');
78
71
  } else {
79
72
  parse(response)
@@ -83,29 +76,25 @@ const messagingListMessages = async ({queries,search,total,parseOutput = true, o
83
76
  return response;
84
77
 
85
78
  }
86
- /**
87
- * @typedef {Object} MessagingCreateEmailRequestParams
88
- * @property {string} messageId Message ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
89
- * @property {string} subject Email Subject.
90
- * @property {string} content Email Content.
91
- * @property {string[]} topics List of Topic IDs.
92
- * @property {string[]} users List of User IDs.
93
- * @property {string[]} targets List of Targets IDs.
94
- * @property {string[]} cc Array of target IDs to be added as CC.
95
- * @property {string[]} bcc Array of target IDs to be added as BCC.
96
- * @property {string[]} attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as &lt;BUCKET_ID&gt;:&lt;FILE_ID&gt;.
97
- * @property {boolean} draft Is message a draft
98
- * @property {boolean} html Is content of type HTML
99
- * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
100
- * @property {boolean} overrideForCli
101
- * @property {boolean} parseOutput
102
- * @property {libClient | undefined} sdk
103
- */
104
-
105
- /**
106
- * @param {MessagingCreateEmailRequestParams} params
107
- */
108
- const messagingCreateEmail = async ({messageId,subject,content,topics,users,targets,cc,bcc,attachments,draft,html,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
79
+ interface MessagingCreateEmailRequestParams {
80
+ messageId: string;
81
+ subject: string;
82
+ content: string;
83
+ topics?: string[];
84
+ users?: string[];
85
+ targets?: string[];
86
+ cc?: string[];
87
+ bcc?: string[];
88
+ attachments?: string[];
89
+ draft?: boolean;
90
+ html?: boolean;
91
+ scheduledAt?: string;
92
+ overrideForCli?: boolean;
93
+ parseOutput?: boolean;
94
+ sdk?: Client;
95
+ }
96
+
97
+ export const messagingCreateEmail = async ({messageId,subject,content,topics,users,targets,cc,bcc,attachments,draft,html,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateEmailRequestParams): Promise<any> => {
109
98
  let client = !sdk ? await sdkForProject() :
110
99
  sdk;
111
100
  let apiPath = '/messaging/messages/email';
@@ -166,29 +155,25 @@ const messagingCreateEmail = async ({messageId,subject,content,topics,users,targ
166
155
  return response;
167
156
 
168
157
  }
169
- /**
170
- * @typedef {Object} MessagingUpdateEmailRequestParams
171
- * @property {string} messageId Message ID.
172
- * @property {string[]} topics List of Topic IDs.
173
- * @property {string[]} users List of User IDs.
174
- * @property {string[]} targets List of Targets IDs.
175
- * @property {string} subject Email Subject.
176
- * @property {string} content Email Content.
177
- * @property {boolean} draft Is message a draft
178
- * @property {boolean} html Is content of type HTML
179
- * @property {string[]} cc Array of target IDs to be added as CC.
180
- * @property {string[]} bcc Array of target IDs to be added as BCC.
181
- * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
182
- * @property {string[]} attachments Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as &lt;BUCKET_ID&gt;:&lt;FILE_ID&gt;.
183
- * @property {boolean} overrideForCli
184
- * @property {boolean} parseOutput
185
- * @property {libClient | undefined} sdk
186
- */
187
-
188
- /**
189
- * @param {MessagingUpdateEmailRequestParams} params
190
- */
191
- const messagingUpdateEmail = async ({messageId,topics,users,targets,subject,content,draft,html,cc,bcc,scheduledAt,attachments,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
158
+ interface MessagingUpdateEmailRequestParams {
159
+ messageId: string;
160
+ topics?: string[];
161
+ users?: string[];
162
+ targets?: string[];
163
+ subject?: string;
164
+ content?: string;
165
+ draft?: boolean;
166
+ html?: boolean;
167
+ cc?: string[];
168
+ bcc?: string[];
169
+ scheduledAt?: string;
170
+ attachments?: string[];
171
+ overrideForCli?: boolean;
172
+ parseOutput?: boolean;
173
+ sdk?: Client;
174
+ }
175
+
176
+ export const messagingUpdateEmail = async ({messageId,topics,users,targets,subject,content,draft,html,cc,bcc,scheduledAt,attachments,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateEmailRequestParams): Promise<any> => {
192
177
  let client = !sdk ? await sdkForProject() :
193
178
  sdk;
194
179
  let apiPath = '/messaging/messages/email/{messageId}'.replace('{messageId}', messageId);
@@ -246,36 +231,32 @@ const messagingUpdateEmail = async ({messageId,topics,users,targets,subject,cont
246
231
  return response;
247
232
 
248
233
  }
249
- /**
250
- * @typedef {Object} MessagingCreatePushRequestParams
251
- * @property {string} messageId Message ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
252
- * @property {string} title Title for push notification.
253
- * @property {string} body Body for push notification.
254
- * @property {string[]} topics List of Topic IDs.
255
- * @property {string[]} users List of User IDs.
256
- * @property {string[]} targets List of Targets IDs.
257
- * @property {object} data Additional key-value pair data for push notification.
258
- * @property {string} action Action for push notification.
259
- * @property {string} image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as &lt;BUCKET_ID&gt;:&lt;FILE_ID&gt;.
260
- * @property {string} icon Icon for push notification. Available only for Android and Web Platform.
261
- * @property {string} sound Sound for push notification. Available only for Android and iOS Platform.
262
- * @property {string} color Color for push notification. Available only for Android Platform.
263
- * @property {string} tag Tag for push notification. Available only for Android Platform.
264
- * @property {number} badge Badge for push notification. Available only for iOS Platform.
265
- * @property {boolean} draft Is message a draft
266
- * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
267
- * @property {boolean} contentAvailable If set to true, the notification will be delivered in the background. Available only for iOS Platform.
268
- * @property {boolean} critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
269
- * @property {MessagePriority} priority Set the notification priority. &quot;normal&quot; will consider device state and may not deliver notifications immediately. &quot;high&quot; will always attempt to immediately deliver the notification.
270
- * @property {boolean} overrideForCli
271
- * @property {boolean} parseOutput
272
- * @property {libClient | undefined} sdk
273
- */
274
-
275
- /**
276
- * @param {MessagingCreatePushRequestParams} params
277
- */
278
- const messagingCreatePush = async ({messageId,title,body,topics,users,targets,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,contentAvailable,critical,priority,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
234
+ interface MessagingCreatePushRequestParams {
235
+ messageId: string;
236
+ title?: string;
237
+ body?: string;
238
+ topics?: string[];
239
+ users?: string[];
240
+ targets?: string[];
241
+ data?: object;
242
+ action?: string;
243
+ image?: string;
244
+ icon?: string;
245
+ sound?: string;
246
+ color?: string;
247
+ tag?: string;
248
+ badge?: number;
249
+ draft?: boolean;
250
+ scheduledAt?: string;
251
+ contentAvailable?: boolean;
252
+ critical?: boolean;
253
+ priority?: MessagePriority;
254
+ overrideForCli?: boolean;
255
+ parseOutput?: boolean;
256
+ sdk?: Client;
257
+ }
258
+
259
+ export const messagingCreatePush = async ({messageId,title,body,topics,users,targets,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,contentAvailable,critical,priority,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreatePushRequestParams): Promise<any> => {
279
260
  let client = !sdk ? await sdkForProject() :
280
261
  sdk;
281
262
  let apiPath = '/messaging/messages/push';
@@ -354,36 +335,32 @@ const messagingCreatePush = async ({messageId,title,body,topics,users,targets,da
354
335
  return response;
355
336
 
356
337
  }
357
- /**
358
- * @typedef {Object} MessagingUpdatePushRequestParams
359
- * @property {string} messageId Message ID.
360
- * @property {string[]} topics List of Topic IDs.
361
- * @property {string[]} users List of User IDs.
362
- * @property {string[]} targets List of Targets IDs.
363
- * @property {string} title Title for push notification.
364
- * @property {string} body Body for push notification.
365
- * @property {object} data Additional Data for push notification.
366
- * @property {string} action Action for push notification.
367
- * @property {string} image Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as &lt;BUCKET_ID&gt;:&lt;FILE_ID&gt;.
368
- * @property {string} icon Icon for push notification. Available only for Android and Web platforms.
369
- * @property {string} sound Sound for push notification. Available only for Android and iOS platforms.
370
- * @property {string} color Color for push notification. Available only for Android platforms.
371
- * @property {string} tag Tag for push notification. Available only for Android platforms.
372
- * @property {number} badge Badge for push notification. Available only for iOS platforms.
373
- * @property {boolean} draft Is message a draft
374
- * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
375
- * @property {boolean} contentAvailable If set to true, the notification will be delivered in the background. Available only for iOS Platform.
376
- * @property {boolean} critical If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
377
- * @property {MessagePriority} priority Set the notification priority. &quot;normal&quot; will consider device battery state and may send notifications later. &quot;high&quot; will always attempt to immediately deliver the notification.
378
- * @property {boolean} overrideForCli
379
- * @property {boolean} parseOutput
380
- * @property {libClient | undefined} sdk
381
- */
382
-
383
- /**
384
- * @param {MessagingUpdatePushRequestParams} params
385
- */
386
- const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,contentAvailable,critical,priority,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
338
+ interface MessagingUpdatePushRequestParams {
339
+ messageId: string;
340
+ topics?: string[];
341
+ users?: string[];
342
+ targets?: string[];
343
+ title?: string;
344
+ body?: string;
345
+ data?: object;
346
+ action?: string;
347
+ image?: string;
348
+ icon?: string;
349
+ sound?: string;
350
+ color?: string;
351
+ tag?: string;
352
+ badge?: number;
353
+ draft?: boolean;
354
+ scheduledAt?: string;
355
+ contentAvailable?: boolean;
356
+ critical?: boolean;
357
+ priority?: MessagePriority;
358
+ overrideForCli?: boolean;
359
+ parseOutput?: boolean;
360
+ sdk?: Client;
361
+ }
362
+
363
+ export const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,data,action,image,icon,sound,color,tag,badge,draft,scheduledAt,contentAvailable,critical,priority,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdatePushRequestParams): Promise<any> => {
387
364
  let client = !sdk ? await sdkForProject() :
388
365
  sdk;
389
366
  let apiPath = '/messaging/messages/push/{messageId}'.replace('{messageId}', messageId);
@@ -459,24 +436,20 @@ const messagingUpdatePush = async ({messageId,topics,users,targets,title,body,da
459
436
  return response;
460
437
 
461
438
  }
462
- /**
463
- * @typedef {Object} MessagingCreateSMSRequestParams
464
- * @property {string} messageId Message ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
465
- * @property {string} content SMS Content.
466
- * @property {string[]} topics List of Topic IDs.
467
- * @property {string[]} users List of User IDs.
468
- * @property {string[]} targets List of Targets IDs.
469
- * @property {boolean} draft Is message a draft
470
- * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
471
- * @property {boolean} overrideForCli
472
- * @property {boolean} parseOutput
473
- * @property {libClient | undefined} sdk
474
- */
475
-
476
- /**
477
- * @param {MessagingCreateSMSRequestParams} params
478
- */
479
- const messagingCreateSMS = async ({messageId,content,topics,users,targets,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
439
+ interface MessagingCreateSMSRequestParams {
440
+ messageId: string;
441
+ content: string;
442
+ topics?: string[];
443
+ users?: string[];
444
+ targets?: string[];
445
+ draft?: boolean;
446
+ scheduledAt?: string;
447
+ overrideForCli?: boolean;
448
+ parseOutput?: boolean;
449
+ sdk?: Client;
450
+ }
451
+
452
+ export const messagingCreateSMS = async ({messageId,content,topics,users,targets,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateSMSRequestParams): Promise<any> => {
480
453
  let client = !sdk ? await sdkForProject() :
481
454
  sdk;
482
455
  let apiPath = '/messaging/messages/sms';
@@ -519,24 +492,20 @@ const messagingCreateSMS = async ({messageId,content,topics,users,targets,draft,
519
492
  return response;
520
493
 
521
494
  }
522
- /**
523
- * @typedef {Object} MessagingUpdateSMSRequestParams
524
- * @property {string} messageId Message ID.
525
- * @property {string[]} topics List of Topic IDs.
526
- * @property {string[]} users List of User IDs.
527
- * @property {string[]} targets List of Targets IDs.
528
- * @property {string} content Email Content.
529
- * @property {boolean} draft Is message a draft
530
- * @property {string} scheduledAt Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
531
- * @property {boolean} overrideForCli
532
- * @property {boolean} parseOutput
533
- * @property {libClient | undefined} sdk
534
- */
535
-
536
- /**
537
- * @param {MessagingUpdateSMSRequestParams} params
538
- */
539
- const messagingUpdateSMS = async ({messageId,topics,users,targets,content,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
495
+ interface MessagingUpdateSMSRequestParams {
496
+ messageId: string;
497
+ topics?: string[];
498
+ users?: string[];
499
+ targets?: string[];
500
+ content?: string;
501
+ draft?: boolean;
502
+ scheduledAt?: string;
503
+ overrideForCli?: boolean;
504
+ parseOutput?: boolean;
505
+ sdk?: Client;
506
+ }
507
+
508
+ export const messagingUpdateSMS = async ({messageId,topics,users,targets,content,draft,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateSMSRequestParams): Promise<any> => {
540
509
  let client = !sdk ? await sdkForProject() :
541
510
  sdk;
542
511
  let apiPath = '/messaging/messages/sms/{messageId}'.replace('{messageId}', messageId);
@@ -576,18 +545,15 @@ const messagingUpdateSMS = async ({messageId,topics,users,targets,content,draft,
576
545
  return response;
577
546
 
578
547
  }
579
- /**
580
- * @typedef {Object} MessagingGetMessageRequestParams
581
- * @property {string} messageId Message ID.
582
- * @property {boolean} overrideForCli
583
- * @property {boolean} parseOutput
584
- * @property {libClient | undefined} sdk
585
- */
548
+ interface MessagingGetMessageRequestParams {
549
+ messageId: string;
550
+ overrideForCli?: boolean;
551
+ parseOutput?: boolean;
552
+ sdk?: Client;
553
+ console?: boolean;
554
+ }
586
555
 
587
- /**
588
- * @param {MessagingGetMessageRequestParams} params
589
- */
590
- const messagingGetMessage = async ({messageId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
556
+ export const messagingGetMessage = async ({messageId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingGetMessageRequestParams): Promise<any> => {
591
557
  let client = !sdk ? await sdkForProject() :
592
558
  sdk;
593
559
  let apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
@@ -599,7 +565,7 @@ const messagingGetMessage = async ({messageId,parseOutput = true, overrideForCli
599
565
  }, payload);
600
566
 
601
567
  if (parseOutput) {
602
- if(console) {
568
+ if(showConsole) {
603
569
  showConsoleLink('messaging', 'getMessage', messageId);
604
570
  } else {
605
571
  parse(response)
@@ -609,18 +575,14 @@ const messagingGetMessage = async ({messageId,parseOutput = true, overrideForCli
609
575
  return response;
610
576
 
611
577
  }
612
- /**
613
- * @typedef {Object} MessagingDeleteRequestParams
614
- * @property {string} messageId Message ID.
615
- * @property {boolean} overrideForCli
616
- * @property {boolean} parseOutput
617
- * @property {libClient | undefined} sdk
618
- */
578
+ interface MessagingDeleteRequestParams {
579
+ messageId: string;
580
+ overrideForCli?: boolean;
581
+ parseOutput?: boolean;
582
+ sdk?: Client;
583
+ }
619
584
 
620
- /**
621
- * @param {MessagingDeleteRequestParams} params
622
- */
623
- const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
585
+ export const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingDeleteRequestParams): Promise<any> => {
624
586
  let client = !sdk ? await sdkForProject() :
625
587
  sdk;
626
588
  let apiPath = '/messaging/messages/{messageId}'.replace('{messageId}', messageId);
@@ -639,20 +601,17 @@ const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = f
639
601
  return response;
640
602
 
641
603
  }
642
- /**
643
- * @typedef {Object} MessagingListMessageLogsRequestParams
644
- * @property {string} messageId Message ID.
645
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
646
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
647
- * @property {boolean} overrideForCli
648
- * @property {boolean} parseOutput
649
- * @property {libClient | undefined} sdk
650
- */
651
-
652
- /**
653
- * @param {MessagingListMessageLogsRequestParams} params
654
- */
655
- const messagingListMessageLogs = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
604
+ interface MessagingListMessageLogsRequestParams {
605
+ messageId: string;
606
+ queries?: string[];
607
+ total?: boolean;
608
+ overrideForCli?: boolean;
609
+ parseOutput?: boolean;
610
+ sdk?: Client;
611
+ console?: boolean;
612
+ }
613
+
614
+ export const messagingListMessageLogs = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingListMessageLogsRequestParams): Promise<any> => {
656
615
  let client = !sdk ? await sdkForProject() :
657
616
  sdk;
658
617
  let apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId);
@@ -670,7 +629,7 @@ const messagingListMessageLogs = async ({messageId,queries,total,parseOutput = t
670
629
  }, payload);
671
630
 
672
631
  if (parseOutput) {
673
- if(console) {
632
+ if(showConsole) {
674
633
  showConsoleLink('messaging', 'listMessageLogs', messageId);
675
634
  } else {
676
635
  parse(response)
@@ -680,20 +639,16 @@ const messagingListMessageLogs = async ({messageId,queries,total,parseOutput = t
680
639
  return response;
681
640
 
682
641
  }
683
- /**
684
- * @typedef {Object} MessagingListTargetsRequestParams
685
- * @property {string} messageId Message ID.
686
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType
687
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
688
- * @property {boolean} overrideForCli
689
- * @property {boolean} parseOutput
690
- * @property {libClient | undefined} sdk
691
- */
692
-
693
- /**
694
- * @param {MessagingListTargetsRequestParams} params
695
- */
696
- const messagingListTargets = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
642
+ interface MessagingListTargetsRequestParams {
643
+ messageId: string;
644
+ queries?: string[];
645
+ total?: boolean;
646
+ overrideForCli?: boolean;
647
+ parseOutput?: boolean;
648
+ sdk?: Client;
649
+ }
650
+
651
+ export const messagingListTargets = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingListTargetsRequestParams): Promise<any> => {
697
652
  let client = !sdk ? await sdkForProject() :
698
653
  sdk;
699
654
  let apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId);
@@ -717,20 +672,17 @@ const messagingListTargets = async ({messageId,queries,total,parseOutput = true,
717
672
  return response;
718
673
 
719
674
  }
720
- /**
721
- * @typedef {Object} MessagingListProvidersRequestParams
722
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
723
- * @property {string} search Search term to filter your list results. Max length: 256 chars.
724
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
725
- * @property {boolean} overrideForCli
726
- * @property {boolean} parseOutput
727
- * @property {libClient | undefined} sdk
728
- */
729
-
730
- /**
731
- * @param {MessagingListProvidersRequestParams} params
732
- */
733
- const messagingListProviders = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
675
+ interface MessagingListProvidersRequestParams {
676
+ queries?: string[];
677
+ search?: string;
678
+ total?: boolean;
679
+ overrideForCli?: boolean;
680
+ parseOutput?: boolean;
681
+ sdk?: Client;
682
+ console?: boolean;
683
+ }
684
+
685
+ export const messagingListProviders = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingListProvidersRequestParams): Promise<any> => {
734
686
  let client = !sdk ? await sdkForProject() :
735
687
  sdk;
736
688
  let apiPath = '/messaging/providers';
@@ -751,7 +703,7 @@ const messagingListProviders = async ({queries,search,total,parseOutput = true,
751
703
  }, payload);
752
704
 
753
705
  if (parseOutput) {
754
- if(console) {
706
+ if(showConsole) {
755
707
  showConsoleLink('messaging', 'listProviders');
756
708
  } else {
757
709
  parse(response)
@@ -761,25 +713,21 @@ const messagingListProviders = async ({queries,search,total,parseOutput = true,
761
713
  return response;
762
714
 
763
715
  }
764
- /**
765
- * @typedef {Object} MessagingCreateAPNSProviderRequestParams
766
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
767
- * @property {string} name Provider name.
768
- * @property {string} authKey APNS authentication key.
769
- * @property {string} authKeyId APNS authentication key ID.
770
- * @property {string} teamId APNS team ID.
771
- * @property {string} bundleId APNS bundle ID.
772
- * @property {boolean} sandbox Use APNS sandbox environment.
773
- * @property {boolean} enabled Set as enabled.
774
- * @property {boolean} overrideForCli
775
- * @property {boolean} parseOutput
776
- * @property {libClient | undefined} sdk
777
- */
778
-
779
- /**
780
- * @param {MessagingCreateAPNSProviderRequestParams} params
781
- */
782
- const messagingCreateAPNSProvider = async ({providerId,name,authKey,authKeyId,teamId,bundleId,sandbox,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
716
+ interface MessagingCreateAPNSProviderRequestParams {
717
+ providerId: string;
718
+ name: string;
719
+ authKey?: string;
720
+ authKeyId?: string;
721
+ teamId?: string;
722
+ bundleId?: string;
723
+ sandbox?: boolean;
724
+ enabled?: boolean;
725
+ overrideForCli?: boolean;
726
+ parseOutput?: boolean;
727
+ sdk?: Client;
728
+ }
729
+
730
+ export const messagingCreateAPNSProvider = async ({providerId,name,authKey,authKeyId,teamId,bundleId,sandbox,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateAPNSProviderRequestParams): Promise<any> => {
783
731
  let client = !sdk ? await sdkForProject() :
784
732
  sdk;
785
733
  let apiPath = '/messaging/providers/apns';
@@ -822,25 +770,21 @@ const messagingCreateAPNSProvider = async ({providerId,name,authKey,authKeyId,te
822
770
  return response;
823
771
 
824
772
  }
825
- /**
826
- * @typedef {Object} MessagingUpdateAPNSProviderRequestParams
827
- * @property {string} providerId Provider ID.
828
- * @property {string} name Provider name.
829
- * @property {boolean} enabled Set as enabled.
830
- * @property {string} authKey APNS authentication key.
831
- * @property {string} authKeyId APNS authentication key ID.
832
- * @property {string} teamId APNS team ID.
833
- * @property {string} bundleId APNS bundle ID.
834
- * @property {boolean} sandbox Use APNS sandbox environment.
835
- * @property {boolean} overrideForCli
836
- * @property {boolean} parseOutput
837
- * @property {libClient | undefined} sdk
838
- */
839
-
840
- /**
841
- * @param {MessagingUpdateAPNSProviderRequestParams} params
842
- */
843
- const messagingUpdateAPNSProvider = async ({providerId,name,enabled,authKey,authKeyId,teamId,bundleId,sandbox,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
773
+ interface MessagingUpdateAPNSProviderRequestParams {
774
+ providerId: string;
775
+ name?: string;
776
+ enabled?: boolean;
777
+ authKey?: string;
778
+ authKeyId?: string;
779
+ teamId?: string;
780
+ bundleId?: string;
781
+ sandbox?: boolean;
782
+ overrideForCli?: boolean;
783
+ parseOutput?: boolean;
784
+ sdk?: Client;
785
+ }
786
+
787
+ export const messagingUpdateAPNSProvider = async ({providerId,name,enabled,authKey,authKeyId,teamId,bundleId,sandbox,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateAPNSProviderRequestParams): Promise<any> => {
844
788
  let client = !sdk ? await sdkForProject() :
845
789
  sdk;
846
790
  let apiPath = '/messaging/providers/apns/{providerId}'.replace('{providerId}', providerId);
@@ -880,21 +824,17 @@ const messagingUpdateAPNSProvider = async ({providerId,name,enabled,authKey,auth
880
824
  return response;
881
825
 
882
826
  }
883
- /**
884
- * @typedef {Object} MessagingCreateFCMProviderRequestParams
885
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
886
- * @property {string} name Provider name.
887
- * @property {object} serviceAccountJSON FCM service account JSON.
888
- * @property {boolean} enabled Set as enabled.
889
- * @property {boolean} overrideForCli
890
- * @property {boolean} parseOutput
891
- * @property {libClient | undefined} sdk
892
- */
893
-
894
- /**
895
- * @param {MessagingCreateFCMProviderRequestParams} params
896
- */
897
- const messagingCreateFCMProvider = async ({providerId,name,serviceAccountJSON,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
827
+ interface MessagingCreateFCMProviderRequestParams {
828
+ providerId: string;
829
+ name: string;
830
+ serviceAccountJSON?: object;
831
+ enabled?: boolean;
832
+ overrideForCli?: boolean;
833
+ parseOutput?: boolean;
834
+ sdk?: Client;
835
+ }
836
+
837
+ export const messagingCreateFCMProvider = async ({providerId,name,serviceAccountJSON,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateFCMProviderRequestParams): Promise<any> => {
898
838
  let client = !sdk ? await sdkForProject() :
899
839
  sdk;
900
840
  let apiPath = '/messaging/providers/fcm';
@@ -925,21 +865,17 @@ const messagingCreateFCMProvider = async ({providerId,name,serviceAccountJSON,en
925
865
  return response;
926
866
 
927
867
  }
928
- /**
929
- * @typedef {Object} MessagingUpdateFCMProviderRequestParams
930
- * @property {string} providerId Provider ID.
931
- * @property {string} name Provider name.
932
- * @property {boolean} enabled Set as enabled.
933
- * @property {object} serviceAccountJSON FCM service account JSON.
934
- * @property {boolean} overrideForCli
935
- * @property {boolean} parseOutput
936
- * @property {libClient | undefined} sdk
937
- */
938
-
939
- /**
940
- * @param {MessagingUpdateFCMProviderRequestParams} params
941
- */
942
- const messagingUpdateFCMProvider = async ({providerId,name,enabled,serviceAccountJSON,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
868
+ interface MessagingUpdateFCMProviderRequestParams {
869
+ providerId: string;
870
+ name?: string;
871
+ enabled?: boolean;
872
+ serviceAccountJSON?: object;
873
+ overrideForCli?: boolean;
874
+ parseOutput?: boolean;
875
+ sdk?: Client;
876
+ }
877
+
878
+ export const messagingUpdateFCMProvider = async ({providerId,name,enabled,serviceAccountJSON,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateFCMProviderRequestParams): Promise<any> => {
943
879
  let client = !sdk ? await sdkForProject() :
944
880
  sdk;
945
881
  let apiPath = '/messaging/providers/fcm/{providerId}'.replace('{providerId}', providerId);
@@ -967,27 +903,23 @@ const messagingUpdateFCMProvider = async ({providerId,name,enabled,serviceAccoun
967
903
  return response;
968
904
 
969
905
  }
970
- /**
971
- * @typedef {Object} MessagingCreateMailgunProviderRequestParams
972
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
973
- * @property {string} name Provider name.
974
- * @property {string} apiKey Mailgun API Key.
975
- * @property {string} domain Mailgun Domain.
976
- * @property {boolean} isEuRegion Set as EU region.
977
- * @property {string} fromName Sender Name.
978
- * @property {string} fromEmail Sender email address.
979
- * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.
980
- * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.
981
- * @property {boolean} enabled Set as enabled.
982
- * @property {boolean} overrideForCli
983
- * @property {boolean} parseOutput
984
- * @property {libClient | undefined} sdk
985
- */
986
-
987
- /**
988
- * @param {MessagingCreateMailgunProviderRequestParams} params
989
- */
990
- const messagingCreateMailgunProvider = async ({providerId,name,apiKey,domain,isEuRegion,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
906
+ interface MessagingCreateMailgunProviderRequestParams {
907
+ providerId: string;
908
+ name: string;
909
+ apiKey?: string;
910
+ domain?: string;
911
+ isEuRegion?: boolean;
912
+ fromName?: string;
913
+ fromEmail?: string;
914
+ replyToName?: string;
915
+ replyToEmail?: string;
916
+ enabled?: boolean;
917
+ overrideForCli?: boolean;
918
+ parseOutput?: boolean;
919
+ sdk?: Client;
920
+ }
921
+
922
+ export const messagingCreateMailgunProvider = async ({providerId,name,apiKey,domain,isEuRegion,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateMailgunProviderRequestParams): Promise<any> => {
991
923
  let client = !sdk ? await sdkForProject() :
992
924
  sdk;
993
925
  let apiPath = '/messaging/providers/mailgun';
@@ -1036,27 +968,23 @@ const messagingCreateMailgunProvider = async ({providerId,name,apiKey,domain,isE
1036
968
  return response;
1037
969
 
1038
970
  }
1039
- /**
1040
- * @typedef {Object} MessagingUpdateMailgunProviderRequestParams
1041
- * @property {string} providerId Provider ID.
1042
- * @property {string} name Provider name.
1043
- * @property {string} apiKey Mailgun API Key.
1044
- * @property {string} domain Mailgun Domain.
1045
- * @property {boolean} isEuRegion Set as EU region.
1046
- * @property {boolean} enabled Set as enabled.
1047
- * @property {string} fromName Sender Name.
1048
- * @property {string} fromEmail Sender email address.
1049
- * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
1050
- * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
1051
- * @property {boolean} overrideForCli
1052
- * @property {boolean} parseOutput
1053
- * @property {libClient | undefined} sdk
1054
- */
1055
-
1056
- /**
1057
- * @param {MessagingUpdateMailgunProviderRequestParams} params
1058
- */
1059
- const messagingUpdateMailgunProvider = async ({providerId,name,apiKey,domain,isEuRegion,enabled,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
971
+ interface MessagingUpdateMailgunProviderRequestParams {
972
+ providerId: string;
973
+ name?: string;
974
+ apiKey?: string;
975
+ domain?: string;
976
+ isEuRegion?: boolean;
977
+ enabled?: boolean;
978
+ fromName?: string;
979
+ fromEmail?: string;
980
+ replyToName?: string;
981
+ replyToEmail?: string;
982
+ overrideForCli?: boolean;
983
+ parseOutput?: boolean;
984
+ sdk?: Client;
985
+ }
986
+
987
+ export const messagingUpdateMailgunProvider = async ({providerId,name,apiKey,domain,isEuRegion,enabled,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateMailgunProviderRequestParams): Promise<any> => {
1060
988
  let client = !sdk ? await sdkForProject() :
1061
989
  sdk;
1062
990
  let apiPath = '/messaging/providers/mailgun/{providerId}'.replace('{providerId}', providerId);
@@ -1102,23 +1030,19 @@ const messagingUpdateMailgunProvider = async ({providerId,name,apiKey,domain,isE
1102
1030
  return response;
1103
1031
 
1104
1032
  }
1105
- /**
1106
- * @typedef {Object} MessagingCreateMsg91ProviderRequestParams
1107
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1108
- * @property {string} name Provider name.
1109
- * @property {string} templateId Msg91 template ID
1110
- * @property {string} senderId Msg91 sender ID.
1111
- * @property {string} authKey Msg91 auth key.
1112
- * @property {boolean} enabled Set as enabled.
1113
- * @property {boolean} overrideForCli
1114
- * @property {boolean} parseOutput
1115
- * @property {libClient | undefined} sdk
1116
- */
1117
-
1118
- /**
1119
- * @param {MessagingCreateMsg91ProviderRequestParams} params
1120
- */
1121
- const messagingCreateMsg91Provider = async ({providerId,name,templateId,senderId,authKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1033
+ interface MessagingCreateMsg91ProviderRequestParams {
1034
+ providerId: string;
1035
+ name: string;
1036
+ templateId?: string;
1037
+ senderId?: string;
1038
+ authKey?: string;
1039
+ enabled?: boolean;
1040
+ overrideForCli?: boolean;
1041
+ parseOutput?: boolean;
1042
+ sdk?: Client;
1043
+ }
1044
+
1045
+ export const messagingCreateMsg91Provider = async ({providerId,name,templateId,senderId,authKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateMsg91ProviderRequestParams): Promise<any> => {
1122
1046
  let client = !sdk ? await sdkForProject() :
1123
1047
  sdk;
1124
1048
  let apiPath = '/messaging/providers/msg91';
@@ -1155,23 +1079,19 @@ const messagingCreateMsg91Provider = async ({providerId,name,templateId,senderId
1155
1079
  return response;
1156
1080
 
1157
1081
  }
1158
- /**
1159
- * @typedef {Object} MessagingUpdateMsg91ProviderRequestParams
1160
- * @property {string} providerId Provider ID.
1161
- * @property {string} name Provider name.
1162
- * @property {boolean} enabled Set as enabled.
1163
- * @property {string} templateId Msg91 template ID.
1164
- * @property {string} senderId Msg91 sender ID.
1165
- * @property {string} authKey Msg91 auth key.
1166
- * @property {boolean} overrideForCli
1167
- * @property {boolean} parseOutput
1168
- * @property {libClient | undefined} sdk
1169
- */
1170
-
1171
- /**
1172
- * @param {MessagingUpdateMsg91ProviderRequestParams} params
1173
- */
1174
- const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,senderId,authKey,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1082
+ interface MessagingUpdateMsg91ProviderRequestParams {
1083
+ providerId: string;
1084
+ name?: string;
1085
+ enabled?: boolean;
1086
+ templateId?: string;
1087
+ senderId?: string;
1088
+ authKey?: string;
1089
+ overrideForCli?: boolean;
1090
+ parseOutput?: boolean;
1091
+ sdk?: Client;
1092
+ }
1093
+
1094
+ export const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,senderId,authKey,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateMsg91ProviderRequestParams): Promise<any> => {
1175
1095
  let client = !sdk ? await sdkForProject() :
1176
1096
  sdk;
1177
1097
  let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId);
@@ -1205,25 +1125,21 @@ const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,
1205
1125
  return response;
1206
1126
 
1207
1127
  }
1208
- /**
1209
- * @typedef {Object} MessagingCreateResendProviderRequestParams
1210
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1211
- * @property {string} name Provider name.
1212
- * @property {string} apiKey Resend API key.
1213
- * @property {string} fromName Sender Name.
1214
- * @property {string} fromEmail Sender email address.
1215
- * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
1216
- * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
1217
- * @property {boolean} enabled Set as enabled.
1218
- * @property {boolean} overrideForCli
1219
- * @property {boolean} parseOutput
1220
- * @property {libClient | undefined} sdk
1221
- */
1222
-
1223
- /**
1224
- * @param {MessagingCreateResendProviderRequestParams} params
1225
- */
1226
- const messagingCreateResendProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1128
+ interface MessagingCreateResendProviderRequestParams {
1129
+ providerId: string;
1130
+ name: string;
1131
+ apiKey?: string;
1132
+ fromName?: string;
1133
+ fromEmail?: string;
1134
+ replyToName?: string;
1135
+ replyToEmail?: string;
1136
+ enabled?: boolean;
1137
+ overrideForCli?: boolean;
1138
+ parseOutput?: boolean;
1139
+ sdk?: Client;
1140
+ }
1141
+
1142
+ export const messagingCreateResendProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateResendProviderRequestParams): Promise<any> => {
1227
1143
  let client = !sdk ? await sdkForProject() :
1228
1144
  sdk;
1229
1145
  let apiPath = '/messaging/providers/resend';
@@ -1266,25 +1182,21 @@ const messagingCreateResendProvider = async ({providerId,name,apiKey,fromName,fr
1266
1182
  return response;
1267
1183
 
1268
1184
  }
1269
- /**
1270
- * @typedef {Object} MessagingUpdateResendProviderRequestParams
1271
- * @property {string} providerId Provider ID.
1272
- * @property {string} name Provider name.
1273
- * @property {boolean} enabled Set as enabled.
1274
- * @property {string} apiKey Resend API key.
1275
- * @property {string} fromName Sender Name.
1276
- * @property {string} fromEmail Sender email address.
1277
- * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
1278
- * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
1279
- * @property {boolean} overrideForCli
1280
- * @property {boolean} parseOutput
1281
- * @property {libClient | undefined} sdk
1282
- */
1283
-
1284
- /**
1285
- * @param {MessagingUpdateResendProviderRequestParams} params
1286
- */
1287
- const messagingUpdateResendProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1185
+ interface MessagingUpdateResendProviderRequestParams {
1186
+ providerId: string;
1187
+ name?: string;
1188
+ enabled?: boolean;
1189
+ apiKey?: string;
1190
+ fromName?: string;
1191
+ fromEmail?: string;
1192
+ replyToName?: string;
1193
+ replyToEmail?: string;
1194
+ overrideForCli?: boolean;
1195
+ parseOutput?: boolean;
1196
+ sdk?: Client;
1197
+ }
1198
+
1199
+ export const messagingUpdateResendProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateResendProviderRequestParams): Promise<any> => {
1288
1200
  let client = !sdk ? await sdkForProject() :
1289
1201
  sdk;
1290
1202
  let apiPath = '/messaging/providers/resend/{providerId}'.replace('{providerId}', providerId);
@@ -1324,25 +1236,21 @@ const messagingUpdateResendProvider = async ({providerId,name,enabled,apiKey,fro
1324
1236
  return response;
1325
1237
 
1326
1238
  }
1327
- /**
1328
- * @typedef {Object} MessagingCreateSendgridProviderRequestParams
1329
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1330
- * @property {string} name Provider name.
1331
- * @property {string} apiKey Sendgrid API key.
1332
- * @property {string} fromName Sender Name.
1333
- * @property {string} fromEmail Sender email address.
1334
- * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
1335
- * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
1336
- * @property {boolean} enabled Set as enabled.
1337
- * @property {boolean} overrideForCli
1338
- * @property {boolean} parseOutput
1339
- * @property {libClient | undefined} sdk
1340
- */
1341
-
1342
- /**
1343
- * @param {MessagingCreateSendgridProviderRequestParams} params
1344
- */
1345
- const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1239
+ interface MessagingCreateSendgridProviderRequestParams {
1240
+ providerId: string;
1241
+ name: string;
1242
+ apiKey?: string;
1243
+ fromName?: string;
1244
+ fromEmail?: string;
1245
+ replyToName?: string;
1246
+ replyToEmail?: string;
1247
+ enabled?: boolean;
1248
+ overrideForCli?: boolean;
1249
+ parseOutput?: boolean;
1250
+ sdk?: Client;
1251
+ }
1252
+
1253
+ export const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateSendgridProviderRequestParams): Promise<any> => {
1346
1254
  let client = !sdk ? await sdkForProject() :
1347
1255
  sdk;
1348
1256
  let apiPath = '/messaging/providers/sendgrid';
@@ -1385,25 +1293,21 @@ const messagingCreateSendgridProvider = async ({providerId,name,apiKey,fromName,
1385
1293
  return response;
1386
1294
 
1387
1295
  }
1388
- /**
1389
- * @typedef {Object} MessagingUpdateSendgridProviderRequestParams
1390
- * @property {string} providerId Provider ID.
1391
- * @property {string} name Provider name.
1392
- * @property {boolean} enabled Set as enabled.
1393
- * @property {string} apiKey Sendgrid API key.
1394
- * @property {string} fromName Sender Name.
1395
- * @property {string} fromEmail Sender email address.
1396
- * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
1397
- * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
1398
- * @property {boolean} overrideForCli
1399
- * @property {boolean} parseOutput
1400
- * @property {libClient | undefined} sdk
1401
- */
1402
-
1403
- /**
1404
- * @param {MessagingUpdateSendgridProviderRequestParams} params
1405
- */
1406
- const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1296
+ interface MessagingUpdateSendgridProviderRequestParams {
1297
+ providerId: string;
1298
+ name?: string;
1299
+ enabled?: boolean;
1300
+ apiKey?: string;
1301
+ fromName?: string;
1302
+ fromEmail?: string;
1303
+ replyToName?: string;
1304
+ replyToEmail?: string;
1305
+ overrideForCli?: boolean;
1306
+ parseOutput?: boolean;
1307
+ sdk?: Client;
1308
+ }
1309
+
1310
+ export const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateSendgridProviderRequestParams): Promise<any> => {
1407
1311
  let client = !sdk ? await sdkForProject() :
1408
1312
  sdk;
1409
1313
  let apiPath = '/messaging/providers/sendgrid/{providerId}'.replace('{providerId}', providerId);
@@ -1443,31 +1347,27 @@ const messagingUpdateSendgridProvider = async ({providerId,name,enabled,apiKey,f
1443
1347
  return response;
1444
1348
 
1445
1349
  }
1446
- /**
1447
- * @typedef {Object} MessagingCreateSMTPProviderRequestParams
1448
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1449
- * @property {string} name Provider name.
1450
- * @property {string} host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as &#039;smtp1.example.com:25;smtp2.example.com&#039;. You can also specify encryption type, for example: &#039;tls://smtp1.example.com:587;ssl://smtp2.example.com:465&quot;&#039;. Hosts will be tried in order.
1451
- * @property {number} port The default SMTP server port.
1452
- * @property {string} username Authentication username.
1453
- * @property {string} password Authentication password.
1454
- * @property {SmtpEncryption} encryption Encryption type. Can be omitted, &#039;ssl&#039;, or &#039;tls&#039;
1455
- * @property {boolean} autoTLS Enable SMTP AutoTLS feature.
1456
- * @property {string} mailer The value to use for the X-Mailer header.
1457
- * @property {string} fromName Sender Name.
1458
- * @property {string} fromEmail Sender email address.
1459
- * @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
1460
- * @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
1461
- * @property {boolean} enabled Set as enabled.
1462
- * @property {boolean} overrideForCli
1463
- * @property {boolean} parseOutput
1464
- * @property {libClient | undefined} sdk
1465
- */
1466
-
1467
- /**
1468
- * @param {MessagingCreateSMTPProviderRequestParams} params
1469
- */
1470
- const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1350
+ interface MessagingCreateSMTPProviderRequestParams {
1351
+ providerId: string;
1352
+ name: string;
1353
+ host: string;
1354
+ port?: number;
1355
+ username?: string;
1356
+ password?: string;
1357
+ encryption?: SmtpEncryption;
1358
+ autoTLS?: boolean;
1359
+ mailer?: string;
1360
+ fromName?: string;
1361
+ fromEmail?: string;
1362
+ replyToName?: string;
1363
+ replyToEmail?: string;
1364
+ enabled?: boolean;
1365
+ overrideForCli?: boolean;
1366
+ parseOutput?: boolean;
1367
+ sdk?: Client;
1368
+ }
1369
+
1370
+ export const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateSMTPProviderRequestParams): Promise<any> => {
1471
1371
  let client = !sdk ? await sdkForProject() :
1472
1372
  sdk;
1473
1373
  let apiPath = '/messaging/providers/smtp';
@@ -1528,31 +1428,27 @@ const messagingCreateSMTPProvider = async ({providerId,name,host,port,username,p
1528
1428
  return response;
1529
1429
 
1530
1430
  }
1531
- /**
1532
- * @typedef {Object} MessagingUpdateSMTPProviderRequestParams
1533
- * @property {string} providerId Provider ID.
1534
- * @property {string} name Provider name.
1535
- * @property {string} host SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as &#039;smtp1.example.com:25;smtp2.example.com&#039;. You can also specify encryption type, for example: &#039;tls://smtp1.example.com:587;ssl://smtp2.example.com:465&quot;&#039;. Hosts will be tried in order.
1536
- * @property {number} port SMTP port.
1537
- * @property {string} username Authentication username.
1538
- * @property {string} password Authentication password.
1539
- * @property {SmtpEncryption} encryption Encryption type. Can be &#039;ssl&#039; or &#039;tls&#039;
1540
- * @property {boolean} autoTLS Enable SMTP AutoTLS feature.
1541
- * @property {string} mailer The value to use for the X-Mailer header.
1542
- * @property {string} fromName Sender Name.
1543
- * @property {string} fromEmail Sender email address.
1544
- * @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
1545
- * @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
1546
- * @property {boolean} enabled Set as enabled.
1547
- * @property {boolean} overrideForCli
1548
- * @property {boolean} parseOutput
1549
- * @property {libClient | undefined} sdk
1550
- */
1551
-
1552
- /**
1553
- * @param {MessagingUpdateSMTPProviderRequestParams} params
1554
- */
1555
- const messagingUpdateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1431
+ interface MessagingUpdateSMTPProviderRequestParams {
1432
+ providerId: string;
1433
+ name?: string;
1434
+ host?: string;
1435
+ port?: number;
1436
+ username?: string;
1437
+ password?: string;
1438
+ encryption?: SmtpEncryption;
1439
+ autoTLS?: boolean;
1440
+ mailer?: string;
1441
+ fromName?: string;
1442
+ fromEmail?: string;
1443
+ replyToName?: string;
1444
+ replyToEmail?: string;
1445
+ enabled?: boolean;
1446
+ overrideForCli?: boolean;
1447
+ parseOutput?: boolean;
1448
+ sdk?: Client;
1449
+ }
1450
+
1451
+ export const messagingUpdateSMTPProvider = async ({providerId,name,host,port,username,password,encryption,autoTLS,mailer,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateSMTPProviderRequestParams): Promise<any> => {
1556
1452
  let client = !sdk ? await sdkForProject() :
1557
1453
  sdk;
1558
1454
  let apiPath = '/messaging/providers/smtp/{providerId}'.replace('{providerId}', providerId);
@@ -1610,23 +1506,19 @@ const messagingUpdateSMTPProvider = async ({providerId,name,host,port,username,p
1610
1506
  return response;
1611
1507
 
1612
1508
  }
1613
- /**
1614
- * @typedef {Object} MessagingCreateTelesignProviderRequestParams
1615
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1616
- * @property {string} name Provider name.
1617
- * @property {string} from Sender Phone number. Format this number with a leading &#039;+&#039; and a country code, e.g., +16175551212.
1618
- * @property {string} customerId Telesign customer ID.
1619
- * @property {string} apiKey Telesign API key.
1620
- * @property {boolean} enabled Set as enabled.
1621
- * @property {boolean} overrideForCli
1622
- * @property {boolean} parseOutput
1623
- * @property {libClient | undefined} sdk
1624
- */
1625
-
1626
- /**
1627
- * @param {MessagingCreateTelesignProviderRequestParams} params
1628
- */
1629
- const messagingCreateTelesignProvider = async ({providerId,name,from,customerId,apiKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1509
+ interface MessagingCreateTelesignProviderRequestParams {
1510
+ providerId: string;
1511
+ name: string;
1512
+ from?: string;
1513
+ customerId?: string;
1514
+ apiKey?: string;
1515
+ enabled?: boolean;
1516
+ overrideForCli?: boolean;
1517
+ parseOutput?: boolean;
1518
+ sdk?: Client;
1519
+ }
1520
+
1521
+ export const messagingCreateTelesignProvider = async ({providerId,name,from,customerId,apiKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateTelesignProviderRequestParams): Promise<any> => {
1630
1522
  let client = !sdk ? await sdkForProject() :
1631
1523
  sdk;
1632
1524
  let apiPath = '/messaging/providers/telesign';
@@ -1663,23 +1555,19 @@ const messagingCreateTelesignProvider = async ({providerId,name,from,customerId,
1663
1555
  return response;
1664
1556
 
1665
1557
  }
1666
- /**
1667
- * @typedef {Object} MessagingUpdateTelesignProviderRequestParams
1668
- * @property {string} providerId Provider ID.
1669
- * @property {string} name Provider name.
1670
- * @property {boolean} enabled Set as enabled.
1671
- * @property {string} customerId Telesign customer ID.
1672
- * @property {string} apiKey Telesign API key.
1673
- * @property {string} from Sender number.
1674
- * @property {boolean} overrideForCli
1675
- * @property {boolean} parseOutput
1676
- * @property {libClient | undefined} sdk
1677
- */
1678
-
1679
- /**
1680
- * @param {MessagingUpdateTelesignProviderRequestParams} params
1681
- */
1682
- const messagingUpdateTelesignProvider = async ({providerId,name,enabled,customerId,apiKey,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1558
+ interface MessagingUpdateTelesignProviderRequestParams {
1559
+ providerId: string;
1560
+ name?: string;
1561
+ enabled?: boolean;
1562
+ customerId?: string;
1563
+ apiKey?: string;
1564
+ from?: string;
1565
+ overrideForCli?: boolean;
1566
+ parseOutput?: boolean;
1567
+ sdk?: Client;
1568
+ }
1569
+
1570
+ export const messagingUpdateTelesignProvider = async ({providerId,name,enabled,customerId,apiKey,from,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateTelesignProviderRequestParams): Promise<any> => {
1683
1571
  let client = !sdk ? await sdkForProject() :
1684
1572
  sdk;
1685
1573
  let apiPath = '/messaging/providers/telesign/{providerId}'.replace('{providerId}', providerId);
@@ -1713,23 +1601,19 @@ const messagingUpdateTelesignProvider = async ({providerId,name,enabled,customer
1713
1601
  return response;
1714
1602
 
1715
1603
  }
1716
- /**
1717
- * @typedef {Object} MessagingCreateTextmagicProviderRequestParams
1718
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1719
- * @property {string} name Provider name.
1720
- * @property {string} from Sender Phone number. Format this number with a leading &#039;+&#039; and a country code, e.g., +16175551212.
1721
- * @property {string} username Textmagic username.
1722
- * @property {string} apiKey Textmagic apiKey.
1723
- * @property {boolean} enabled Set as enabled.
1724
- * @property {boolean} overrideForCli
1725
- * @property {boolean} parseOutput
1726
- * @property {libClient | undefined} sdk
1727
- */
1728
-
1729
- /**
1730
- * @param {MessagingCreateTextmagicProviderRequestParams} params
1731
- */
1732
- const messagingCreateTextmagicProvider = async ({providerId,name,from,username,apiKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1604
+ interface MessagingCreateTextmagicProviderRequestParams {
1605
+ providerId: string;
1606
+ name: string;
1607
+ from?: string;
1608
+ username?: string;
1609
+ apiKey?: string;
1610
+ enabled?: boolean;
1611
+ overrideForCli?: boolean;
1612
+ parseOutput?: boolean;
1613
+ sdk?: Client;
1614
+ }
1615
+
1616
+ export const messagingCreateTextmagicProvider = async ({providerId,name,from,username,apiKey,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateTextmagicProviderRequestParams): Promise<any> => {
1733
1617
  let client = !sdk ? await sdkForProject() :
1734
1618
  sdk;
1735
1619
  let apiPath = '/messaging/providers/textmagic';
@@ -1766,23 +1650,19 @@ const messagingCreateTextmagicProvider = async ({providerId,name,from,username,a
1766
1650
  return response;
1767
1651
 
1768
1652
  }
1769
- /**
1770
- * @typedef {Object} MessagingUpdateTextmagicProviderRequestParams
1771
- * @property {string} providerId Provider ID.
1772
- * @property {string} name Provider name.
1773
- * @property {boolean} enabled Set as enabled.
1774
- * @property {string} username Textmagic username.
1775
- * @property {string} apiKey Textmagic apiKey.
1776
- * @property {string} from Sender number.
1777
- * @property {boolean} overrideForCli
1778
- * @property {boolean} parseOutput
1779
- * @property {libClient | undefined} sdk
1780
- */
1781
-
1782
- /**
1783
- * @param {MessagingUpdateTextmagicProviderRequestParams} params
1784
- */
1785
- const messagingUpdateTextmagicProvider = async ({providerId,name,enabled,username,apiKey,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1653
+ interface MessagingUpdateTextmagicProviderRequestParams {
1654
+ providerId: string;
1655
+ name?: string;
1656
+ enabled?: boolean;
1657
+ username?: string;
1658
+ apiKey?: string;
1659
+ from?: string;
1660
+ overrideForCli?: boolean;
1661
+ parseOutput?: boolean;
1662
+ sdk?: Client;
1663
+ }
1664
+
1665
+ export const messagingUpdateTextmagicProvider = async ({providerId,name,enabled,username,apiKey,from,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateTextmagicProviderRequestParams): Promise<any> => {
1786
1666
  let client = !sdk ? await sdkForProject() :
1787
1667
  sdk;
1788
1668
  let apiPath = '/messaging/providers/textmagic/{providerId}'.replace('{providerId}', providerId);
@@ -1816,23 +1696,19 @@ const messagingUpdateTextmagicProvider = async ({providerId,name,enabled,usernam
1816
1696
  return response;
1817
1697
 
1818
1698
  }
1819
- /**
1820
- * @typedef {Object} MessagingCreateTwilioProviderRequestParams
1821
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1822
- * @property {string} name Provider name.
1823
- * @property {string} from Sender Phone number. Format this number with a leading &#039;+&#039; and a country code, e.g., +16175551212.
1824
- * @property {string} accountSid Twilio account secret ID.
1825
- * @property {string} authToken Twilio authentication token.
1826
- * @property {boolean} enabled Set as enabled.
1827
- * @property {boolean} overrideForCli
1828
- * @property {boolean} parseOutput
1829
- * @property {libClient | undefined} sdk
1830
- */
1831
-
1832
- /**
1833
- * @param {MessagingCreateTwilioProviderRequestParams} params
1834
- */
1835
- const messagingCreateTwilioProvider = async ({providerId,name,from,accountSid,authToken,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1699
+ interface MessagingCreateTwilioProviderRequestParams {
1700
+ providerId: string;
1701
+ name: string;
1702
+ from?: string;
1703
+ accountSid?: string;
1704
+ authToken?: string;
1705
+ enabled?: boolean;
1706
+ overrideForCli?: boolean;
1707
+ parseOutput?: boolean;
1708
+ sdk?: Client;
1709
+ }
1710
+
1711
+ export const messagingCreateTwilioProvider = async ({providerId,name,from,accountSid,authToken,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateTwilioProviderRequestParams): Promise<any> => {
1836
1712
  let client = !sdk ? await sdkForProject() :
1837
1713
  sdk;
1838
1714
  let apiPath = '/messaging/providers/twilio';
@@ -1869,23 +1745,19 @@ const messagingCreateTwilioProvider = async ({providerId,name,from,accountSid,au
1869
1745
  return response;
1870
1746
 
1871
1747
  }
1872
- /**
1873
- * @typedef {Object} MessagingUpdateTwilioProviderRequestParams
1874
- * @property {string} providerId Provider ID.
1875
- * @property {string} name Provider name.
1876
- * @property {boolean} enabled Set as enabled.
1877
- * @property {string} accountSid Twilio account secret ID.
1878
- * @property {string} authToken Twilio authentication token.
1879
- * @property {string} from Sender number.
1880
- * @property {boolean} overrideForCli
1881
- * @property {boolean} parseOutput
1882
- * @property {libClient | undefined} sdk
1883
- */
1884
-
1885
- /**
1886
- * @param {MessagingUpdateTwilioProviderRequestParams} params
1887
- */
1888
- const messagingUpdateTwilioProvider = async ({providerId,name,enabled,accountSid,authToken,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1748
+ interface MessagingUpdateTwilioProviderRequestParams {
1749
+ providerId: string;
1750
+ name?: string;
1751
+ enabled?: boolean;
1752
+ accountSid?: string;
1753
+ authToken?: string;
1754
+ from?: string;
1755
+ overrideForCli?: boolean;
1756
+ parseOutput?: boolean;
1757
+ sdk?: Client;
1758
+ }
1759
+
1760
+ export const messagingUpdateTwilioProvider = async ({providerId,name,enabled,accountSid,authToken,from,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateTwilioProviderRequestParams): Promise<any> => {
1889
1761
  let client = !sdk ? await sdkForProject() :
1890
1762
  sdk;
1891
1763
  let apiPath = '/messaging/providers/twilio/{providerId}'.replace('{providerId}', providerId);
@@ -1919,23 +1791,19 @@ const messagingUpdateTwilioProvider = async ({providerId,name,enabled,accountSid
1919
1791
  return response;
1920
1792
 
1921
1793
  }
1922
- /**
1923
- * @typedef {Object} MessagingCreateVonageProviderRequestParams
1924
- * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1925
- * @property {string} name Provider name.
1926
- * @property {string} from Sender Phone number. Format this number with a leading &#039;+&#039; and a country code, e.g., +16175551212.
1927
- * @property {string} apiKey Vonage API key.
1928
- * @property {string} apiSecret Vonage API secret.
1929
- * @property {boolean} enabled Set as enabled.
1930
- * @property {boolean} overrideForCli
1931
- * @property {boolean} parseOutput
1932
- * @property {libClient | undefined} sdk
1933
- */
1934
-
1935
- /**
1936
- * @param {MessagingCreateVonageProviderRequestParams} params
1937
- */
1938
- const messagingCreateVonageProvider = async ({providerId,name,from,apiKey,apiSecret,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1794
+ interface MessagingCreateVonageProviderRequestParams {
1795
+ providerId: string;
1796
+ name: string;
1797
+ from?: string;
1798
+ apiKey?: string;
1799
+ apiSecret?: string;
1800
+ enabled?: boolean;
1801
+ overrideForCli?: boolean;
1802
+ parseOutput?: boolean;
1803
+ sdk?: Client;
1804
+ }
1805
+
1806
+ export const messagingCreateVonageProvider = async ({providerId,name,from,apiKey,apiSecret,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateVonageProviderRequestParams): Promise<any> => {
1939
1807
  let client = !sdk ? await sdkForProject() :
1940
1808
  sdk;
1941
1809
  let apiPath = '/messaging/providers/vonage';
@@ -1972,23 +1840,19 @@ const messagingCreateVonageProvider = async ({providerId,name,from,apiKey,apiSec
1972
1840
  return response;
1973
1841
 
1974
1842
  }
1975
- /**
1976
- * @typedef {Object} MessagingUpdateVonageProviderRequestParams
1977
- * @property {string} providerId Provider ID.
1978
- * @property {string} name Provider name.
1979
- * @property {boolean} enabled Set as enabled.
1980
- * @property {string} apiKey Vonage API key.
1981
- * @property {string} apiSecret Vonage API secret.
1982
- * @property {string} from Sender number.
1983
- * @property {boolean} overrideForCli
1984
- * @property {boolean} parseOutput
1985
- * @property {libClient | undefined} sdk
1986
- */
1987
-
1988
- /**
1989
- * @param {MessagingUpdateVonageProviderRequestParams} params
1990
- */
1991
- const messagingUpdateVonageProvider = async ({providerId,name,enabled,apiKey,apiSecret,from,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1843
+ interface MessagingUpdateVonageProviderRequestParams {
1844
+ providerId: string;
1845
+ name?: string;
1846
+ enabled?: boolean;
1847
+ apiKey?: string;
1848
+ apiSecret?: string;
1849
+ from?: string;
1850
+ overrideForCli?: boolean;
1851
+ parseOutput?: boolean;
1852
+ sdk?: Client;
1853
+ }
1854
+
1855
+ export const messagingUpdateVonageProvider = async ({providerId,name,enabled,apiKey,apiSecret,from,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateVonageProviderRequestParams): Promise<any> => {
1992
1856
  let client = !sdk ? await sdkForProject() :
1993
1857
  sdk;
1994
1858
  let apiPath = '/messaging/providers/vonage/{providerId}'.replace('{providerId}', providerId);
@@ -2022,18 +1886,15 @@ const messagingUpdateVonageProvider = async ({providerId,name,enabled,apiKey,api
2022
1886
  return response;
2023
1887
 
2024
1888
  }
2025
- /**
2026
- * @typedef {Object} MessagingGetProviderRequestParams
2027
- * @property {string} providerId Provider ID.
2028
- * @property {boolean} overrideForCli
2029
- * @property {boolean} parseOutput
2030
- * @property {libClient | undefined} sdk
2031
- */
1889
+ interface MessagingGetProviderRequestParams {
1890
+ providerId: string;
1891
+ overrideForCli?: boolean;
1892
+ parseOutput?: boolean;
1893
+ sdk?: Client;
1894
+ console?: boolean;
1895
+ }
2032
1896
 
2033
- /**
2034
- * @param {MessagingGetProviderRequestParams} params
2035
- */
2036
- const messagingGetProvider = async ({providerId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1897
+ export const messagingGetProvider = async ({providerId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingGetProviderRequestParams): Promise<any> => {
2037
1898
  let client = !sdk ? await sdkForProject() :
2038
1899
  sdk;
2039
1900
  let apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
@@ -2045,7 +1906,7 @@ const messagingGetProvider = async ({providerId,parseOutput = true, overrideForC
2045
1906
  }, payload);
2046
1907
 
2047
1908
  if (parseOutput) {
2048
- if(console) {
1909
+ if(showConsole) {
2049
1910
  showConsoleLink('messaging', 'getProvider', providerId);
2050
1911
  } else {
2051
1912
  parse(response)
@@ -2055,18 +1916,14 @@ const messagingGetProvider = async ({providerId,parseOutput = true, overrideForC
2055
1916
  return response;
2056
1917
 
2057
1918
  }
2058
- /**
2059
- * @typedef {Object} MessagingDeleteProviderRequestParams
2060
- * @property {string} providerId Provider ID.
2061
- * @property {boolean} overrideForCli
2062
- * @property {boolean} parseOutput
2063
- * @property {libClient | undefined} sdk
2064
- */
1919
+ interface MessagingDeleteProviderRequestParams {
1920
+ providerId: string;
1921
+ overrideForCli?: boolean;
1922
+ parseOutput?: boolean;
1923
+ sdk?: Client;
1924
+ }
2065
1925
 
2066
- /**
2067
- * @param {MessagingDeleteProviderRequestParams} params
2068
- */
2069
- const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1926
+ export const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingDeleteProviderRequestParams): Promise<any> => {
2070
1927
  let client = !sdk ? await sdkForProject() :
2071
1928
  sdk;
2072
1929
  let apiPath = '/messaging/providers/{providerId}'.replace('{providerId}', providerId);
@@ -2085,20 +1942,16 @@ const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideF
2085
1942
  return response;
2086
1943
 
2087
1944
  }
2088
- /**
2089
- * @typedef {Object} MessagingListProviderLogsRequestParams
2090
- * @property {string} providerId Provider ID.
2091
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
2092
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
2093
- * @property {boolean} overrideForCli
2094
- * @property {boolean} parseOutput
2095
- * @property {libClient | undefined} sdk
2096
- */
2097
-
2098
- /**
2099
- * @param {MessagingListProviderLogsRequestParams} params
2100
- */
2101
- const messagingListProviderLogs = async ({providerId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1945
+ interface MessagingListProviderLogsRequestParams {
1946
+ providerId: string;
1947
+ queries?: string[];
1948
+ total?: boolean;
1949
+ overrideForCli?: boolean;
1950
+ parseOutput?: boolean;
1951
+ sdk?: Client;
1952
+ }
1953
+
1954
+ export const messagingListProviderLogs = async ({providerId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingListProviderLogsRequestParams): Promise<any> => {
2102
1955
  let client = !sdk ? await sdkForProject() :
2103
1956
  sdk;
2104
1957
  let apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId);
@@ -2122,20 +1975,16 @@ const messagingListProviderLogs = async ({providerId,queries,total,parseOutput =
2122
1975
  return response;
2123
1976
 
2124
1977
  }
2125
- /**
2126
- * @typedef {Object} MessagingListSubscriberLogsRequestParams
2127
- * @property {string} subscriberId Subscriber ID.
2128
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
2129
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
2130
- * @property {boolean} overrideForCli
2131
- * @property {boolean} parseOutput
2132
- * @property {libClient | undefined} sdk
2133
- */
2134
-
2135
- /**
2136
- * @param {MessagingListSubscriberLogsRequestParams} params
2137
- */
2138
- const messagingListSubscriberLogs = async ({subscriberId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1978
+ interface MessagingListSubscriberLogsRequestParams {
1979
+ subscriberId: string;
1980
+ queries?: string[];
1981
+ total?: boolean;
1982
+ overrideForCli?: boolean;
1983
+ parseOutput?: boolean;
1984
+ sdk?: Client;
1985
+ }
1986
+
1987
+ export const messagingListSubscriberLogs = async ({subscriberId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingListSubscriberLogsRequestParams): Promise<any> => {
2139
1988
  let client = !sdk ? await sdkForProject() :
2140
1989
  sdk;
2141
1990
  let apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId);
@@ -2159,20 +2008,17 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,total,parseOutp
2159
2008
  return response;
2160
2009
 
2161
2010
  }
2162
- /**
2163
- * @typedef {Object} MessagingListTopicsRequestParams
2164
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal
2165
- * @property {string} search Search term to filter your list results. Max length: 256 chars.
2166
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
2167
- * @property {boolean} overrideForCli
2168
- * @property {boolean} parseOutput
2169
- * @property {libClient | undefined} sdk
2170
- */
2171
-
2172
- /**
2173
- * @param {MessagingListTopicsRequestParams} params
2174
- */
2175
- const messagingListTopics = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
2011
+ interface MessagingListTopicsRequestParams {
2012
+ queries?: string[];
2013
+ search?: string;
2014
+ total?: boolean;
2015
+ overrideForCli?: boolean;
2016
+ parseOutput?: boolean;
2017
+ sdk?: Client;
2018
+ console?: boolean;
2019
+ }
2020
+
2021
+ export const messagingListTopics = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingListTopicsRequestParams): Promise<any> => {
2176
2022
  let client = !sdk ? await sdkForProject() :
2177
2023
  sdk;
2178
2024
  let apiPath = '/messaging/topics';
@@ -2193,7 +2039,7 @@ const messagingListTopics = async ({queries,search,total,parseOutput = true, ove
2193
2039
  }, payload);
2194
2040
 
2195
2041
  if (parseOutput) {
2196
- if(console) {
2042
+ if(showConsole) {
2197
2043
  showConsoleLink('messaging', 'listTopics');
2198
2044
  } else {
2199
2045
  parse(response)
@@ -2203,20 +2049,16 @@ const messagingListTopics = async ({queries,search,total,parseOutput = true, ove
2203
2049
  return response;
2204
2050
 
2205
2051
  }
2206
- /**
2207
- * @typedef {Object} MessagingCreateTopicRequestParams
2208
- * @property {string} topicId Topic ID. Choose a custom Topic ID or a new Topic ID.
2209
- * @property {string} name Topic Name.
2210
- * @property {string[]} subscribe An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
2211
- * @property {boolean} overrideForCli
2212
- * @property {boolean} parseOutput
2213
- * @property {libClient | undefined} sdk
2214
- */
2215
-
2216
- /**
2217
- * @param {MessagingCreateTopicRequestParams} params
2218
- */
2219
- const messagingCreateTopic = async ({topicId,name,subscribe,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2052
+ interface MessagingCreateTopicRequestParams {
2053
+ topicId: string;
2054
+ name: string;
2055
+ subscribe?: string[];
2056
+ overrideForCli?: boolean;
2057
+ parseOutput?: boolean;
2058
+ sdk?: Client;
2059
+ }
2060
+
2061
+ export const messagingCreateTopic = async ({topicId,name,subscribe,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateTopicRequestParams): Promise<any> => {
2220
2062
  let client = !sdk ? await sdkForProject() :
2221
2063
  sdk;
2222
2064
  let apiPath = '/messaging/topics';
@@ -2245,18 +2087,15 @@ const messagingCreateTopic = async ({topicId,name,subscribe,parseOutput = true,
2245
2087
  return response;
2246
2088
 
2247
2089
  }
2248
- /**
2249
- * @typedef {Object} MessagingGetTopicRequestParams
2250
- * @property {string} topicId Topic ID.
2251
- * @property {boolean} overrideForCli
2252
- * @property {boolean} parseOutput
2253
- * @property {libClient | undefined} sdk
2254
- */
2090
+ interface MessagingGetTopicRequestParams {
2091
+ topicId: string;
2092
+ overrideForCli?: boolean;
2093
+ parseOutput?: boolean;
2094
+ sdk?: Client;
2095
+ console?: boolean;
2096
+ }
2255
2097
 
2256
- /**
2257
- * @param {MessagingGetTopicRequestParams} params
2258
- */
2259
- const messagingGetTopic = async ({topicId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
2098
+ export const messagingGetTopic = async ({topicId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingGetTopicRequestParams): Promise<any> => {
2260
2099
  let client = !sdk ? await sdkForProject() :
2261
2100
  sdk;
2262
2101
  let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
@@ -2268,7 +2107,7 @@ const messagingGetTopic = async ({topicId,parseOutput = true, overrideForCli = f
2268
2107
  }, payload);
2269
2108
 
2270
2109
  if (parseOutput) {
2271
- if(console) {
2110
+ if(showConsole) {
2272
2111
  showConsoleLink('messaging', 'getTopic', topicId);
2273
2112
  } else {
2274
2113
  parse(response)
@@ -2278,20 +2117,16 @@ const messagingGetTopic = async ({topicId,parseOutput = true, overrideForCli = f
2278
2117
  return response;
2279
2118
 
2280
2119
  }
2281
- /**
2282
- * @typedef {Object} MessagingUpdateTopicRequestParams
2283
- * @property {string} topicId Topic ID.
2284
- * @property {string} name Topic Name.
2285
- * @property {string[]} subscribe An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
2286
- * @property {boolean} overrideForCli
2287
- * @property {boolean} parseOutput
2288
- * @property {libClient | undefined} sdk
2289
- */
2290
-
2291
- /**
2292
- * @param {MessagingUpdateTopicRequestParams} params
2293
- */
2294
- const messagingUpdateTopic = async ({topicId,name,subscribe,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2120
+ interface MessagingUpdateTopicRequestParams {
2121
+ topicId: string;
2122
+ name?: string;
2123
+ subscribe?: string[];
2124
+ overrideForCli?: boolean;
2125
+ parseOutput?: boolean;
2126
+ sdk?: Client;
2127
+ }
2128
+
2129
+ export const messagingUpdateTopic = async ({topicId,name,subscribe,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingUpdateTopicRequestParams): Promise<any> => {
2295
2130
  let client = !sdk ? await sdkForProject() :
2296
2131
  sdk;
2297
2132
  let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
@@ -2317,18 +2152,14 @@ const messagingUpdateTopic = async ({topicId,name,subscribe,parseOutput = true,
2317
2152
  return response;
2318
2153
 
2319
2154
  }
2320
- /**
2321
- * @typedef {Object} MessagingDeleteTopicRequestParams
2322
- * @property {string} topicId Topic ID.
2323
- * @property {boolean} overrideForCli
2324
- * @property {boolean} parseOutput
2325
- * @property {libClient | undefined} sdk
2326
- */
2155
+ interface MessagingDeleteTopicRequestParams {
2156
+ topicId: string;
2157
+ overrideForCli?: boolean;
2158
+ parseOutput?: boolean;
2159
+ sdk?: Client;
2160
+ }
2327
2161
 
2328
- /**
2329
- * @param {MessagingDeleteTopicRequestParams} params
2330
- */
2331
- const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2162
+ export const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingDeleteTopicRequestParams): Promise<any> => {
2332
2163
  let client = !sdk ? await sdkForProject() :
2333
2164
  sdk;
2334
2165
  let apiPath = '/messaging/topics/{topicId}'.replace('{topicId}', topicId);
@@ -2347,20 +2178,16 @@ const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli
2347
2178
  return response;
2348
2179
 
2349
2180
  }
2350
- /**
2351
- * @typedef {Object} MessagingListTopicLogsRequestParams
2352
- * @property {string} topicId Topic ID.
2353
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
2354
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
2355
- * @property {boolean} overrideForCli
2356
- * @property {boolean} parseOutput
2357
- * @property {libClient | undefined} sdk
2358
- */
2359
-
2360
- /**
2361
- * @param {MessagingListTopicLogsRequestParams} params
2362
- */
2363
- const messagingListTopicLogs = async ({topicId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2181
+ interface MessagingListTopicLogsRequestParams {
2182
+ topicId: string;
2183
+ queries?: string[];
2184
+ total?: boolean;
2185
+ overrideForCli?: boolean;
2186
+ parseOutput?: boolean;
2187
+ sdk?: Client;
2188
+ }
2189
+
2190
+ export const messagingListTopicLogs = async ({topicId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingListTopicLogsRequestParams): Promise<any> => {
2364
2191
  let client = !sdk ? await sdkForProject() :
2365
2192
  sdk;
2366
2193
  let apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId);
@@ -2384,21 +2211,18 @@ const messagingListTopicLogs = async ({topicId,queries,total,parseOutput = true,
2384
2211
  return response;
2385
2212
 
2386
2213
  }
2387
- /**
2388
- * @typedef {Object} MessagingListSubscribersRequestParams
2389
- * @property {string} topicId Topic ID. The topic ID subscribed to.
2390
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
2391
- * @property {string} search Search term to filter your list results. Max length: 256 chars.
2392
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
2393
- * @property {boolean} overrideForCli
2394
- * @property {boolean} parseOutput
2395
- * @property {libClient | undefined} sdk
2396
- */
2397
-
2398
- /**
2399
- * @param {MessagingListSubscribersRequestParams} params
2400
- */
2401
- const messagingListSubscribers = async ({topicId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
2214
+ interface MessagingListSubscribersRequestParams {
2215
+ topicId: string;
2216
+ queries?: string[];
2217
+ search?: string;
2218
+ total?: boolean;
2219
+ overrideForCli?: boolean;
2220
+ parseOutput?: boolean;
2221
+ sdk?: Client;
2222
+ console?: boolean;
2223
+ }
2224
+
2225
+ export const messagingListSubscribers = async ({topicId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: MessagingListSubscribersRequestParams): Promise<any> => {
2402
2226
  let client = !sdk ? await sdkForProject() :
2403
2227
  sdk;
2404
2228
  let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
@@ -2419,7 +2243,7 @@ const messagingListSubscribers = async ({topicId,queries,search,total,parseOutpu
2419
2243
  }, payload);
2420
2244
 
2421
2245
  if (parseOutput) {
2422
- if(console) {
2246
+ if(showConsole) {
2423
2247
  showConsoleLink('messaging', 'listSubscribers', topicId);
2424
2248
  } else {
2425
2249
  parse(response)
@@ -2429,20 +2253,16 @@ const messagingListSubscribers = async ({topicId,queries,search,total,parseOutpu
2429
2253
  return response;
2430
2254
 
2431
2255
  }
2432
- /**
2433
- * @typedef {Object} MessagingCreateSubscriberRequestParams
2434
- * @property {string} topicId Topic ID. The topic ID to subscribe to.
2435
- * @property {string} subscriberId Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.
2436
- * @property {string} targetId Target ID. The target ID to link to the specified Topic ID.
2437
- * @property {boolean} overrideForCli
2438
- * @property {boolean} parseOutput
2439
- * @property {libClient | undefined} sdk
2440
- */
2441
-
2442
- /**
2443
- * @param {MessagingCreateSubscriberRequestParams} params
2444
- */
2445
- const messagingCreateSubscriber = async ({topicId,subscriberId,targetId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2256
+ interface MessagingCreateSubscriberRequestParams {
2257
+ topicId: string;
2258
+ subscriberId: string;
2259
+ targetId: string;
2260
+ overrideForCli?: boolean;
2261
+ parseOutput?: boolean;
2262
+ sdk?: Client;
2263
+ }
2264
+
2265
+ export const messagingCreateSubscriber = async ({topicId,subscriberId,targetId,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingCreateSubscriberRequestParams): Promise<any> => {
2446
2266
  let client = !sdk ? await sdkForProject() :
2447
2267
  sdk;
2448
2268
  let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
@@ -2467,19 +2287,15 @@ const messagingCreateSubscriber = async ({topicId,subscriberId,targetId,parseOut
2467
2287
  return response;
2468
2288
 
2469
2289
  }
2470
- /**
2471
- * @typedef {Object} MessagingGetSubscriberRequestParams
2472
- * @property {string} topicId Topic ID. The topic ID subscribed to.
2473
- * @property {string} subscriberId Subscriber ID.
2474
- * @property {boolean} overrideForCli
2475
- * @property {boolean} parseOutput
2476
- * @property {libClient | undefined} sdk
2477
- */
2290
+ interface MessagingGetSubscriberRequestParams {
2291
+ topicId: string;
2292
+ subscriberId: string;
2293
+ overrideForCli?: boolean;
2294
+ parseOutput?: boolean;
2295
+ sdk?: Client;
2296
+ }
2478
2297
 
2479
- /**
2480
- * @param {MessagingGetSubscriberRequestParams} params
2481
- */
2482
- const messagingGetSubscriber = async ({topicId,subscriberId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2298
+ export const messagingGetSubscriber = async ({topicId,subscriberId,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingGetSubscriberRequestParams): Promise<any> => {
2483
2299
  let client = !sdk ? await sdkForProject() :
2484
2300
  sdk;
2485
2301
  let apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
@@ -2497,19 +2313,15 @@ const messagingGetSubscriber = async ({topicId,subscriberId,parseOutput = true,
2497
2313
  return response;
2498
2314
 
2499
2315
  }
2500
- /**
2501
- * @typedef {Object} MessagingDeleteSubscriberRequestParams
2502
- * @property {string} topicId Topic ID. The topic ID subscribed to.
2503
- * @property {string} subscriberId Subscriber ID.
2504
- * @property {boolean} overrideForCli
2505
- * @property {boolean} parseOutput
2506
- * @property {libClient | undefined} sdk
2507
- */
2316
+ interface MessagingDeleteSubscriberRequestParams {
2317
+ topicId: string;
2318
+ subscriberId: string;
2319
+ overrideForCli?: boolean;
2320
+ parseOutput?: boolean;
2321
+ sdk?: Client;
2322
+ }
2508
2323
 
2509
- /**
2510
- * @param {MessagingDeleteSubscriberRequestParams} params
2511
- */
2512
- const messagingDeleteSubscriber = async ({topicId,subscriberId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
2324
+ export const messagingDeleteSubscriber = async ({topicId,subscriberId,parseOutput = true, overrideForCli = false, sdk = undefined}: MessagingDeleteSubscriberRequestParams): Promise<any> => {
2513
2325
  let client = !sdk ? await sdkForProject() :
2514
2326
  sdk;
2515
2327
  let apiPath = '/messaging/topics/{topicId}/subscribers/{subscriberId}'.replace('{topicId}', topicId).replace('{subscriberId}', subscriberId);
@@ -2533,7 +2345,7 @@ messaging
2533
2345
  .description(`Get a list of all messages from the current Appwrite project.`)
2534
2346
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`)
2535
2347
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
2536
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2348
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2537
2349
  .option(`--console`, `Get the resource console url`)
2538
2350
  .action(actionRunner(messagingListMessages))
2539
2351
 
@@ -2549,8 +2361,8 @@ messaging
2549
2361
  .option(`--cc [cc...]`, `Array of target IDs to be added as CC.`)
2550
2362
  .option(`--bcc [bcc...]`, `Array of target IDs to be added as BCC.`)
2551
2363
  .option(`--attachments [attachments...]`, `Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.`)
2552
- .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value))
2553
- .option(`--html [value]`, `Is content of type HTML`, (value) => value === undefined ? true : parseBool(value))
2364
+ .option(`--draft [value]`, `Is message a draft`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2365
+ .option(`--html [value]`, `Is content of type HTML`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2554
2366
  .option(`--scheduled-at <scheduled-at>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
2555
2367
  .action(actionRunner(messagingCreateEmail))
2556
2368
 
@@ -2563,8 +2375,8 @@ messaging
2563
2375
  .option(`--targets [targets...]`, `List of Targets IDs.`)
2564
2376
  .option(`--subject <subject>`, `Email Subject.`)
2565
2377
  .option(`--content <content>`, `Email Content.`)
2566
- .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value))
2567
- .option(`--html [value]`, `Is content of type HTML`, (value) => value === undefined ? true : parseBool(value))
2378
+ .option(`--draft [value]`, `Is message a draft`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2379
+ .option(`--html [value]`, `Is content of type HTML`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2568
2380
  .option(`--cc [cc...]`, `Array of target IDs to be added as CC.`)
2569
2381
  .option(`--bcc [bcc...]`, `Array of target IDs to be added as BCC.`)
2570
2382
  .option(`--scheduled-at <scheduled-at>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
@@ -2588,10 +2400,10 @@ messaging
2588
2400
  .option(`--color <color>`, `Color for push notification. Available only for Android Platform.`)
2589
2401
  .option(`--tag <tag>`, `Tag for push notification. Available only for Android Platform.`)
2590
2402
  .option(`--badge <badge>`, `Badge for push notification. Available only for iOS Platform.`, parseInteger)
2591
- .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value))
2403
+ .option(`--draft [value]`, `Is message a draft`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2592
2404
  .option(`--scheduled-at <scheduled-at>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
2593
- .option(`--content-available [value]`, `If set to true, the notification will be delivered in the background. Available only for iOS Platform.`, (value) => value === undefined ? true : parseBool(value))
2594
- .option(`--critical [value]`, `If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.`, (value) => value === undefined ? true : parseBool(value))
2405
+ .option(`--content-available [value]`, `If set to true, the notification will be delivered in the background. Available only for iOS Platform.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2406
+ .option(`--critical [value]`, `If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2595
2407
  .option(`--priority <priority>`, `Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.`)
2596
2408
  .action(actionRunner(messagingCreatePush))
2597
2409
 
@@ -2612,10 +2424,10 @@ messaging
2612
2424
  .option(`--color <color>`, `Color for push notification. Available only for Android platforms.`)
2613
2425
  .option(`--tag <tag>`, `Tag for push notification. Available only for Android platforms.`)
2614
2426
  .option(`--badge <badge>`, `Badge for push notification. Available only for iOS platforms.`, parseInteger)
2615
- .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value))
2427
+ .option(`--draft [value]`, `Is message a draft`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2616
2428
  .option(`--scheduled-at <scheduled-at>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
2617
- .option(`--content-available [value]`, `If set to true, the notification will be delivered in the background. Available only for iOS Platform.`, (value) => value === undefined ? true : parseBool(value))
2618
- .option(`--critical [value]`, `If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.`, (value) => value === undefined ? true : parseBool(value))
2429
+ .option(`--content-available [value]`, `If set to true, the notification will be delivered in the background. Available only for iOS Platform.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2430
+ .option(`--critical [value]`, `If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2619
2431
  .option(`--priority <priority>`, `Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.`)
2620
2432
  .action(actionRunner(messagingUpdatePush))
2621
2433
 
@@ -2627,7 +2439,7 @@ messaging
2627
2439
  .option(`--topics [topics...]`, `List of Topic IDs.`)
2628
2440
  .option(`--users [users...]`, `List of User IDs.`)
2629
2441
  .option(`--targets [targets...]`, `List of Targets IDs.`)
2630
- .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value))
2442
+ .option(`--draft [value]`, `Is message a draft`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2631
2443
  .option(`--scheduled-at <scheduled-at>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
2632
2444
  .action(actionRunner(messagingCreateSMS))
2633
2445
 
@@ -2639,7 +2451,7 @@ messaging
2639
2451
  .option(`--users [users...]`, `List of User IDs.`)
2640
2452
  .option(`--targets [targets...]`, `List of Targets IDs.`)
2641
2453
  .option(`--content <content>`, `Email Content.`)
2642
- .option(`--draft [value]`, `Is message a draft`, (value) => value === undefined ? true : parseBool(value))
2454
+ .option(`--draft [value]`, `Is message a draft`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2643
2455
  .option(`--scheduled-at <scheduled-at>`, `Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`)
2644
2456
  .action(actionRunner(messagingUpdateSMS))
2645
2457
 
@@ -2661,7 +2473,7 @@ messaging
2661
2473
  .description(`Get the message activity logs listed by its unique ID.`)
2662
2474
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2663
2475
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
2664
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2476
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2665
2477
  .option(`--console`, `Get the resource console url`)
2666
2478
  .action(actionRunner(messagingListMessageLogs))
2667
2479
 
@@ -2670,7 +2482,7 @@ messaging
2670
2482
  .description(`Get a list of the targets associated with a message.`)
2671
2483
  .requiredOption(`--message-id <message-id>`, `Message ID.`)
2672
2484
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`)
2673
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2485
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2674
2486
  .action(actionRunner(messagingListTargets))
2675
2487
 
2676
2488
  messaging
@@ -2678,7 +2490,7 @@ messaging
2678
2490
  .description(`Get a list of all providers from the current Appwrite project.`)
2679
2491
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`)
2680
2492
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
2681
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2493
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2682
2494
  .option(`--console`, `Get the resource console url`)
2683
2495
  .action(actionRunner(messagingListProviders))
2684
2496
 
@@ -2691,8 +2503,8 @@ messaging
2691
2503
  .option(`--auth-key-id <auth-key-id>`, `APNS authentication key ID.`)
2692
2504
  .option(`--team-id <team-id>`, `APNS team ID.`)
2693
2505
  .option(`--bundle-id <bundle-id>`, `APNS bundle ID.`)
2694
- .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value))
2695
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2506
+ .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2507
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2696
2508
  .action(actionRunner(messagingCreateAPNSProvider))
2697
2509
 
2698
2510
  messaging
@@ -2700,12 +2512,12 @@ messaging
2700
2512
  .description(`Update a Apple Push Notification service provider by its unique ID.`)
2701
2513
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2702
2514
  .option(`--name <name>`, `Provider name.`)
2703
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2515
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2704
2516
  .option(`--auth-key <auth-key>`, `APNS authentication key.`)
2705
2517
  .option(`--auth-key-id <auth-key-id>`, `APNS authentication key ID.`)
2706
2518
  .option(`--team-id <team-id>`, `APNS team ID.`)
2707
2519
  .option(`--bundle-id <bundle-id>`, `APNS bundle ID.`)
2708
- .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value) => value === undefined ? true : parseBool(value))
2520
+ .option(`--sandbox [value]`, `Use APNS sandbox environment.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2709
2521
  .action(actionRunner(messagingUpdateAPNSProvider))
2710
2522
 
2711
2523
  messaging
@@ -2714,7 +2526,7 @@ messaging
2714
2526
  .requiredOption(`--provider-id <provider-id>`, `Provider ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
2715
2527
  .requiredOption(`--name <name>`, `Provider name.`)
2716
2528
  .option(`--service-account-json <service-account-json>`, `FCM service account JSON.`)
2717
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2529
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2718
2530
  .action(actionRunner(messagingCreateFCMProvider))
2719
2531
 
2720
2532
  messaging
@@ -2722,7 +2534,7 @@ messaging
2722
2534
  .description(`Update a Firebase Cloud Messaging provider by its unique ID.`)
2723
2535
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2724
2536
  .option(`--name <name>`, `Provider name.`)
2725
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2537
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2726
2538
  .option(`--service-account-json <service-account-json>`, `FCM service account JSON.`)
2727
2539
  .action(actionRunner(messagingUpdateFCMProvider))
2728
2540
 
@@ -2733,12 +2545,12 @@ messaging
2733
2545
  .requiredOption(`--name <name>`, `Provider name.`)
2734
2546
  .option(`--api-key <api-key>`, `Mailgun API Key.`)
2735
2547
  .option(`--domain <domain>`, `Mailgun Domain.`)
2736
- .option(`--is-eu-region [value]`, `Set as EU region.`, (value) => value === undefined ? true : parseBool(value))
2548
+ .option(`--is-eu-region [value]`, `Set as EU region.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2737
2549
  .option(`--from-name <from-name>`, `Sender Name.`)
2738
2550
  .option(`--from-email <from-email>`, `Sender email address.`)
2739
2551
  .option(`--reply-to-name <reply-to-name>`, `Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.`)
2740
2552
  .option(`--reply-to-email <reply-to-email>`, `Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.`)
2741
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2553
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2742
2554
  .action(actionRunner(messagingCreateMailgunProvider))
2743
2555
 
2744
2556
  messaging
@@ -2748,8 +2560,8 @@ messaging
2748
2560
  .option(`--name <name>`, `Provider name.`)
2749
2561
  .option(`--api-key <api-key>`, `Mailgun API Key.`)
2750
2562
  .option(`--domain <domain>`, `Mailgun Domain.`)
2751
- .option(`--is-eu-region [value]`, `Set as EU region.`, (value) => value === undefined ? true : parseBool(value))
2752
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2563
+ .option(`--is-eu-region [value]`, `Set as EU region.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2564
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2753
2565
  .option(`--from-name <from-name>`, `Sender Name.`)
2754
2566
  .option(`--from-email <from-email>`, `Sender email address.`)
2755
2567
  .option(`--reply-to-name <reply-to-name>`, `Name set in the reply to field for the mail. Default value is sender name.`)
@@ -2764,7 +2576,7 @@ messaging
2764
2576
  .option(`--template-id <template-id>`, `Msg91 template ID`)
2765
2577
  .option(`--sender-id <sender-id>`, `Msg91 sender ID.`)
2766
2578
  .option(`--auth-key <auth-key>`, `Msg91 auth key.`)
2767
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2579
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2768
2580
  .action(actionRunner(messagingCreateMsg91Provider))
2769
2581
 
2770
2582
  messaging
@@ -2772,7 +2584,7 @@ messaging
2772
2584
  .description(`Update a MSG91 provider by its unique ID.`)
2773
2585
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2774
2586
  .option(`--name <name>`, `Provider name.`)
2775
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2587
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2776
2588
  .option(`--template-id <template-id>`, `Msg91 template ID.`)
2777
2589
  .option(`--sender-id <sender-id>`, `Msg91 sender ID.`)
2778
2590
  .option(`--auth-key <auth-key>`, `Msg91 auth key.`)
@@ -2788,7 +2600,7 @@ messaging
2788
2600
  .option(`--from-email <from-email>`, `Sender email address.`)
2789
2601
  .option(`--reply-to-name <reply-to-name>`, `Name set in the reply to field for the mail. Default value is sender name.`)
2790
2602
  .option(`--reply-to-email <reply-to-email>`, `Email set in the reply to field for the mail. Default value is sender email.`)
2791
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2603
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2792
2604
  .action(actionRunner(messagingCreateResendProvider))
2793
2605
 
2794
2606
  messaging
@@ -2796,7 +2608,7 @@ messaging
2796
2608
  .description(`Update a Resend provider by its unique ID.`)
2797
2609
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2798
2610
  .option(`--name <name>`, `Provider name.`)
2799
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2611
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2800
2612
  .option(`--api-key <api-key>`, `Resend API key.`)
2801
2613
  .option(`--from-name <from-name>`, `Sender Name.`)
2802
2614
  .option(`--from-email <from-email>`, `Sender email address.`)
@@ -2814,7 +2626,7 @@ messaging
2814
2626
  .option(`--from-email <from-email>`, `Sender email address.`)
2815
2627
  .option(`--reply-to-name <reply-to-name>`, `Name set in the reply to field for the mail. Default value is sender name.`)
2816
2628
  .option(`--reply-to-email <reply-to-email>`, `Email set in the reply to field for the mail. Default value is sender email.`)
2817
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2629
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2818
2630
  .action(actionRunner(messagingCreateSendgridProvider))
2819
2631
 
2820
2632
  messaging
@@ -2822,7 +2634,7 @@ messaging
2822
2634
  .description(`Update a Sendgrid provider by its unique ID.`)
2823
2635
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2824
2636
  .option(`--name <name>`, `Provider name.`)
2825
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2637
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2826
2638
  .option(`--api-key <api-key>`, `Sendgrid API key.`)
2827
2639
  .option(`--from-name <from-name>`, `Sender Name.`)
2828
2640
  .option(`--from-email <from-email>`, `Sender email address.`)
@@ -2840,13 +2652,13 @@ messaging
2840
2652
  .option(`--username <username>`, `Authentication username.`)
2841
2653
  .option(`--password <password>`, `Authentication password.`)
2842
2654
  .option(`--encryption <encryption>`, `Encryption type. Can be omitted, 'ssl', or 'tls'`)
2843
- .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value) => value === undefined ? true : parseBool(value))
2655
+ .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2844
2656
  .option(`--mailer <mailer>`, `The value to use for the X-Mailer header.`)
2845
2657
  .option(`--from-name <from-name>`, `Sender Name.`)
2846
2658
  .option(`--from-email <from-email>`, `Sender email address.`)
2847
2659
  .option(`--reply-to-name <reply-to-name>`, `Name set in the reply to field for the mail. Default value is sender name.`)
2848
2660
  .option(`--reply-to-email <reply-to-email>`, `Email set in the reply to field for the mail. Default value is sender email.`)
2849
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2661
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2850
2662
  .action(actionRunner(messagingCreateSMTPProvider))
2851
2663
 
2852
2664
  messaging
@@ -2859,13 +2671,13 @@ messaging
2859
2671
  .option(`--username <username>`, `Authentication username.`)
2860
2672
  .option(`--password <password>`, `Authentication password.`)
2861
2673
  .option(`--encryption <encryption>`, `Encryption type. Can be 'ssl' or 'tls'`)
2862
- .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value) => value === undefined ? true : parseBool(value))
2674
+ .option(`--auto-tls [value]`, `Enable SMTP AutoTLS feature.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2863
2675
  .option(`--mailer <mailer>`, `The value to use for the X-Mailer header.`)
2864
2676
  .option(`--from-name <from-name>`, `Sender Name.`)
2865
2677
  .option(`--from-email <from-email>`, `Sender email address.`)
2866
2678
  .option(`--reply-to-name <reply-to-name>`, `Name set in the Reply To field for the mail. Default value is Sender Name.`)
2867
2679
  .option(`--reply-to-email <reply-to-email>`, `Email set in the Reply To field for the mail. Default value is Sender Email.`)
2868
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2680
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2869
2681
  .action(actionRunner(messagingUpdateSMTPProvider))
2870
2682
 
2871
2683
  messaging
@@ -2876,7 +2688,7 @@ messaging
2876
2688
  .option(`--from <from>`, `Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
2877
2689
  .option(`--customer-id <customer-id>`, `Telesign customer ID.`)
2878
2690
  .option(`--api-key <api-key>`, `Telesign API key.`)
2879
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2691
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2880
2692
  .action(actionRunner(messagingCreateTelesignProvider))
2881
2693
 
2882
2694
  messaging
@@ -2884,7 +2696,7 @@ messaging
2884
2696
  .description(`Update a Telesign provider by its unique ID.`)
2885
2697
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2886
2698
  .option(`--name <name>`, `Provider name.`)
2887
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2699
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2888
2700
  .option(`--customer-id <customer-id>`, `Telesign customer ID.`)
2889
2701
  .option(`--api-key <api-key>`, `Telesign API key.`)
2890
2702
  .option(`--from <from>`, `Sender number.`)
@@ -2898,7 +2710,7 @@ messaging
2898
2710
  .option(`--from <from>`, `Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
2899
2711
  .option(`--username <username>`, `Textmagic username.`)
2900
2712
  .option(`--api-key <api-key>`, `Textmagic apiKey.`)
2901
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2713
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2902
2714
  .action(actionRunner(messagingCreateTextmagicProvider))
2903
2715
 
2904
2716
  messaging
@@ -2906,7 +2718,7 @@ messaging
2906
2718
  .description(`Update a Textmagic provider by its unique ID.`)
2907
2719
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2908
2720
  .option(`--name <name>`, `Provider name.`)
2909
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2721
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2910
2722
  .option(`--username <username>`, `Textmagic username.`)
2911
2723
  .option(`--api-key <api-key>`, `Textmagic apiKey.`)
2912
2724
  .option(`--from <from>`, `Sender number.`)
@@ -2920,7 +2732,7 @@ messaging
2920
2732
  .option(`--from <from>`, `Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
2921
2733
  .option(`--account-sid <account-sid>`, `Twilio account secret ID.`)
2922
2734
  .option(`--auth-token <auth-token>`, `Twilio authentication token.`)
2923
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2735
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2924
2736
  .action(actionRunner(messagingCreateTwilioProvider))
2925
2737
 
2926
2738
  messaging
@@ -2928,7 +2740,7 @@ messaging
2928
2740
  .description(`Update a Twilio provider by its unique ID.`)
2929
2741
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2930
2742
  .option(`--name <name>`, `Provider name.`)
2931
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2743
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2932
2744
  .option(`--account-sid <account-sid>`, `Twilio account secret ID.`)
2933
2745
  .option(`--auth-token <auth-token>`, `Twilio authentication token.`)
2934
2746
  .option(`--from <from>`, `Sender number.`)
@@ -2942,7 +2754,7 @@ messaging
2942
2754
  .option(`--from <from>`, `Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
2943
2755
  .option(`--api-key <api-key>`, `Vonage API key.`)
2944
2756
  .option(`--api-secret <api-secret>`, `Vonage API secret.`)
2945
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2757
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2946
2758
  .action(actionRunner(messagingCreateVonageProvider))
2947
2759
 
2948
2760
  messaging
@@ -2950,7 +2762,7 @@ messaging
2950
2762
  .description(`Update a Vonage provider by its unique ID.`)
2951
2763
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2952
2764
  .option(`--name <name>`, `Provider name.`)
2953
- .option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
2765
+ .option(`--enabled [value]`, `Set as enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2954
2766
  .option(`--api-key <api-key>`, `Vonage API key.`)
2955
2767
  .option(`--api-secret <api-secret>`, `Vonage API secret.`)
2956
2768
  .option(`--from <from>`, `Sender number.`)
@@ -2974,7 +2786,7 @@ messaging
2974
2786
  .description(`Get the provider activity logs listed by its unique ID.`)
2975
2787
  .requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
2976
2788
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
2977
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2789
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2978
2790
  .action(actionRunner(messagingListProviderLogs))
2979
2791
 
2980
2792
  messaging
@@ -2982,7 +2794,7 @@ messaging
2982
2794
  .description(`Get the subscriber activity logs listed by its unique ID.`)
2983
2795
  .requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID.`)
2984
2796
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
2985
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2797
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2986
2798
  .action(actionRunner(messagingListSubscriberLogs))
2987
2799
 
2988
2800
  messaging
@@ -2990,7 +2802,7 @@ messaging
2990
2802
  .description(`Get a list of all topics from the current Appwrite project.`)
2991
2803
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal`)
2992
2804
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
2993
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2805
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2994
2806
  .option(`--console`, `Get the resource console url`)
2995
2807
  .action(actionRunner(messagingListTopics))
2996
2808
 
@@ -3028,7 +2840,7 @@ messaging
3028
2840
  .description(`Get the topic activity logs listed by its unique ID.`)
3029
2841
  .requiredOption(`--topic-id <topic-id>`, `Topic ID.`)
3030
2842
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
3031
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2843
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
3032
2844
  .action(actionRunner(messagingListTopicLogs))
3033
2845
 
3034
2846
  messaging
@@ -3037,7 +2849,7 @@ messaging
3037
2849
  .requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`)
3038
2850
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`)
3039
2851
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
3040
- .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
2852
+ .option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
3041
2853
  .option(`--console`, `Get the resource console url`)
3042
2854
  .action(actionRunner(messagingListSubscribers))
3043
2855
 
@@ -3063,54 +2875,4 @@ messaging
3063
2875
  .requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID.`)
3064
2876
  .action(actionRunner(messagingDeleteSubscriber))
3065
2877
 
3066
- module.exports = {
3067
- messaging,
3068
- messagingListMessages,
3069
- messagingCreateEmail,
3070
- messagingUpdateEmail,
3071
- messagingCreatePush,
3072
- messagingUpdatePush,
3073
- messagingCreateSMS,
3074
- messagingUpdateSMS,
3075
- messagingGetMessage,
3076
- messagingDelete,
3077
- messagingListMessageLogs,
3078
- messagingListTargets,
3079
- messagingListProviders,
3080
- messagingCreateAPNSProvider,
3081
- messagingUpdateAPNSProvider,
3082
- messagingCreateFCMProvider,
3083
- messagingUpdateFCMProvider,
3084
- messagingCreateMailgunProvider,
3085
- messagingUpdateMailgunProvider,
3086
- messagingCreateMsg91Provider,
3087
- messagingUpdateMsg91Provider,
3088
- messagingCreateResendProvider,
3089
- messagingUpdateResendProvider,
3090
- messagingCreateSendgridProvider,
3091
- messagingUpdateSendgridProvider,
3092
- messagingCreateSMTPProvider,
3093
- messagingUpdateSMTPProvider,
3094
- messagingCreateTelesignProvider,
3095
- messagingUpdateTelesignProvider,
3096
- messagingCreateTextmagicProvider,
3097
- messagingUpdateTextmagicProvider,
3098
- messagingCreateTwilioProvider,
3099
- messagingUpdateTwilioProvider,
3100
- messagingCreateVonageProvider,
3101
- messagingUpdateVonageProvider,
3102
- messagingGetProvider,
3103
- messagingDeleteProvider,
3104
- messagingListProviderLogs,
3105
- messagingListSubscriberLogs,
3106
- messagingListTopics,
3107
- messagingCreateTopic,
3108
- messagingGetTopic,
3109
- messagingUpdateTopic,
3110
- messagingDeleteTopic,
3111
- messagingListTopicLogs,
3112
- messagingListSubscribers,
3113
- messagingCreateSubscriber,
3114
- messagingGetSubscriber,
3115
- messagingDeleteSubscriber
3116
- };
2878
+