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 projects = new Command("projects").description(commandDescriptions['projects'] ?? '').configureHelp({
34
+ export const projects = new Command("projects").description(commandDescriptions['projects'] ?? '').configureHelp({
39
35
  helpWidth: process.stdout.columns || 80
40
36
  })
41
37
 
42
- /**
43
- * @typedef {Object} ProjectsListRequestParams
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: name, teamId
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 {ProjectsListRequestParams} params
54
- */
55
- const projectsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
38
+ interface ProjectsListRequestParams {
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 projectsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsListRequestParams): Promise<any> => {
56
49
  let client = !sdk ? await sdkForConsole() :
57
50
  sdk;
58
51
  let apiPath = '/projects';
@@ -73,7 +66,7 @@ const projectsList = async ({queries,search,total,parseOutput = true, overrideFo
73
66
  }, payload);
74
67
 
75
68
  if (parseOutput) {
76
- if(console) {
69
+ if(showConsole) {
77
70
  showConsoleLink('projects', 'list');
78
71
  } else {
79
72
  parse(response)
@@ -83,30 +76,26 @@ const projectsList = async ({queries,search,total,parseOutput = true, overrideFo
83
76
  return response;
84
77
 
85
78
  }
86
- /**
87
- * @typedef {Object} ProjectsCreateRequestParams
88
- * @property {string} projectId Unique Id. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, and hyphen. Can&#039;t start with a special char. Max length is 36 chars.
89
- * @property {string} name Project name. Max length: 128 chars.
90
- * @property {string} teamId Team unique ID.
91
- * @property {Region} region Project Region.
92
- * @property {string} description Project description. Max length: 256 chars.
93
- * @property {string} logo Project logo.
94
- * @property {string} url Project URL.
95
- * @property {string} legalName Project legal Name. Max length: 256 chars.
96
- * @property {string} legalCountry Project legal Country. Max length: 256 chars.
97
- * @property {string} legalState Project legal State. Max length: 256 chars.
98
- * @property {string} legalCity Project legal City. Max length: 256 chars.
99
- * @property {string} legalAddress Project legal Address. Max length: 256 chars.
100
- * @property {string} legalTaxId Project legal Tax ID. Max length: 256 chars.
101
- * @property {boolean} overrideForCli
102
- * @property {boolean} parseOutput
103
- * @property {libClient | undefined} sdk
104
- */
105
-
106
- /**
107
- * @param {ProjectsCreateRequestParams} params
108
- */
109
- const projectsCreate = async ({projectId,name,teamId,region,description,logo,url,legalName,legalCountry,legalState,legalCity,legalAddress,legalTaxId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
79
+ interface ProjectsCreateRequestParams {
80
+ projectId: string;
81
+ name: string;
82
+ teamId: string;
83
+ region?: Region;
84
+ description?: string;
85
+ logo?: string;
86
+ url?: string;
87
+ legalName?: string;
88
+ legalCountry?: string;
89
+ legalState?: string;
90
+ legalCity?: string;
91
+ legalAddress?: string;
92
+ legalTaxId?: string;
93
+ overrideForCli?: boolean;
94
+ parseOutput?: boolean;
95
+ sdk?: Client;
96
+ }
97
+
98
+ export const projectsCreate = async ({projectId,name,teamId,region,description,logo,url,legalName,legalCountry,legalState,legalCity,legalAddress,legalTaxId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsCreateRequestParams): Promise<any> => {
110
99
  let client = !sdk ? await sdkForConsole() :
111
100
  sdk;
112
101
  let apiPath = '/projects';
@@ -164,18 +153,15 @@ const projectsCreate = async ({projectId,name,teamId,region,description,logo,url
164
153
  return response;
165
154
 
166
155
  }
167
- /**
168
- * @typedef {Object} ProjectsGetRequestParams
169
- * @property {string} projectId Project unique ID.
170
- * @property {boolean} overrideForCli
171
- * @property {boolean} parseOutput
172
- * @property {libClient | undefined} sdk
173
- */
156
+ interface ProjectsGetRequestParams {
157
+ projectId: string;
158
+ overrideForCli?: boolean;
159
+ parseOutput?: boolean;
160
+ sdk?: Client;
161
+ console?: boolean;
162
+ }
174
163
 
175
- /**
176
- * @param {ProjectsGetRequestParams} params
177
- */
178
- const projectsGet = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
164
+ export const projectsGet = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsGetRequestParams): Promise<any> => {
179
165
  let client = !sdk ? await sdkForConsole() :
180
166
  sdk;
181
167
  let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
@@ -187,7 +173,7 @@ const projectsGet = async ({projectId,parseOutput = true, overrideForCli = false
187
173
  }, payload);
188
174
 
189
175
  if (parseOutput) {
190
- if(console) {
176
+ if(showConsole) {
191
177
  showConsoleLink('projects', 'get', projectId);
192
178
  } else {
193
179
  parse(response)
@@ -197,28 +183,24 @@ const projectsGet = async ({projectId,parseOutput = true, overrideForCli = false
197
183
  return response;
198
184
 
199
185
  }
200
- /**
201
- * @typedef {Object} ProjectsUpdateRequestParams
202
- * @property {string} projectId Project unique ID.
203
- * @property {string} name Project name. Max length: 128 chars.
204
- * @property {string} description Project description. Max length: 256 chars.
205
- * @property {string} logo Project logo.
206
- * @property {string} url Project URL.
207
- * @property {string} legalName Project legal name. Max length: 256 chars.
208
- * @property {string} legalCountry Project legal country. Max length: 256 chars.
209
- * @property {string} legalState Project legal state. Max length: 256 chars.
210
- * @property {string} legalCity Project legal city. Max length: 256 chars.
211
- * @property {string} legalAddress Project legal address. Max length: 256 chars.
212
- * @property {string} legalTaxId Project legal tax ID. Max length: 256 chars.
213
- * @property {boolean} overrideForCli
214
- * @property {boolean} parseOutput
215
- * @property {libClient | undefined} sdk
216
- */
217
-
218
- /**
219
- * @param {ProjectsUpdateRequestParams} params
220
- */
221
- const projectsUpdate = async ({projectId,name,description,logo,url,legalName,legalCountry,legalState,legalCity,legalAddress,legalTaxId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
186
+ interface ProjectsUpdateRequestParams {
187
+ projectId: string;
188
+ name: string;
189
+ description?: string;
190
+ logo?: string;
191
+ url?: string;
192
+ legalName?: string;
193
+ legalCountry?: string;
194
+ legalState?: string;
195
+ legalCity?: string;
196
+ legalAddress?: string;
197
+ legalTaxId?: string;
198
+ overrideForCli?: boolean;
199
+ parseOutput?: boolean;
200
+ sdk?: Client;
201
+ }
202
+
203
+ export const projectsUpdate = async ({projectId,name,description,logo,url,legalName,legalCountry,legalState,legalCity,legalAddress,legalTaxId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateRequestParams): Promise<any> => {
222
204
  let client = !sdk ? await sdkForConsole() :
223
205
  sdk;
224
206
  let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
@@ -267,18 +249,14 @@ const projectsUpdate = async ({projectId,name,description,logo,url,legalName,leg
267
249
  return response;
268
250
 
269
251
  }
270
- /**
271
- * @typedef {Object} ProjectsDeleteRequestParams
272
- * @property {string} projectId Project unique ID.
273
- * @property {boolean} overrideForCli
274
- * @property {boolean} parseOutput
275
- * @property {libClient | undefined} sdk
276
- */
252
+ interface ProjectsDeleteRequestParams {
253
+ projectId: string;
254
+ overrideForCli?: boolean;
255
+ parseOutput?: boolean;
256
+ sdk?: Client;
257
+ }
277
258
 
278
- /**
279
- * @param {ProjectsDeleteRequestParams} params
280
- */
281
- const projectsDelete = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
259
+ export const projectsDelete = async ({projectId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsDeleteRequestParams): Promise<any> => {
282
260
  let client = !sdk ? await sdkForConsole() :
283
261
  sdk;
284
262
  let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
@@ -297,20 +275,16 @@ const projectsDelete = async ({projectId,parseOutput = true, overrideForCli = fa
297
275
  return response;
298
276
 
299
277
  }
300
- /**
301
- * @typedef {Object} ProjectsUpdateAPIStatusRequestParams
302
- * @property {string} projectId Project unique ID.
303
- * @property {Api} api API name.
304
- * @property {boolean} status API status.
305
- * @property {boolean} overrideForCli
306
- * @property {boolean} parseOutput
307
- * @property {libClient | undefined} sdk
308
- */
309
-
310
- /**
311
- * @param {ProjectsUpdateAPIStatusRequestParams} params
312
- */
313
- const projectsUpdateAPIStatus = async ({projectId,api,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
278
+ interface ProjectsUpdateAPIStatusRequestParams {
279
+ projectId: string;
280
+ api: Api;
281
+ status: boolean;
282
+ overrideForCli?: boolean;
283
+ parseOutput?: boolean;
284
+ sdk?: Client;
285
+ }
286
+
287
+ export const projectsUpdateAPIStatus = async ({projectId,api,status,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAPIStatusRequestParams): Promise<any> => {
314
288
  let client = !sdk ? await sdkForConsole() :
315
289
  sdk;
316
290
  let apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
@@ -335,19 +309,15 @@ const projectsUpdateAPIStatus = async ({projectId,api,status,parseOutput = true,
335
309
  return response;
336
310
 
337
311
  }
338
- /**
339
- * @typedef {Object} ProjectsUpdateAPIStatusAllRequestParams
340
- * @property {string} projectId Project unique ID.
341
- * @property {boolean} status API status.
342
- * @property {boolean} overrideForCli
343
- * @property {boolean} parseOutput
344
- * @property {libClient | undefined} sdk
345
- */
312
+ interface ProjectsUpdateAPIStatusAllRequestParams {
313
+ projectId: string;
314
+ status: boolean;
315
+ overrideForCli?: boolean;
316
+ parseOutput?: boolean;
317
+ sdk?: Client;
318
+ }
346
319
 
347
- /**
348
- * @param {ProjectsUpdateAPIStatusAllRequestParams} params
349
- */
350
- const projectsUpdateAPIStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
320
+ export const projectsUpdateAPIStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAPIStatusAllRequestParams): Promise<any> => {
351
321
  let client = !sdk ? await sdkForConsole() :
352
322
  sdk;
353
323
  let apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
@@ -369,19 +339,15 @@ const projectsUpdateAPIStatusAll = async ({projectId,status,parseOutput = true,
369
339
  return response;
370
340
 
371
341
  }
372
- /**
373
- * @typedef {Object} ProjectsUpdateAuthDurationRequestParams
374
- * @property {string} projectId Project unique ID.
375
- * @property {number} duration Project session length in seconds. Max length: 31536000 seconds.
376
- * @property {boolean} overrideForCli
377
- * @property {boolean} parseOutput
378
- * @property {libClient | undefined} sdk
379
- */
342
+ interface ProjectsUpdateAuthDurationRequestParams {
343
+ projectId: string;
344
+ duration: number;
345
+ overrideForCli?: boolean;
346
+ parseOutput?: boolean;
347
+ sdk?: Client;
348
+ }
380
349
 
381
- /**
382
- * @param {ProjectsUpdateAuthDurationRequestParams} params
383
- */
384
- const projectsUpdateAuthDuration = async ({projectId,duration,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
350
+ export const projectsUpdateAuthDuration = async ({projectId,duration,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAuthDurationRequestParams): Promise<any> => {
385
351
  let client = !sdk ? await sdkForConsole() :
386
352
  sdk;
387
353
  let apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
@@ -403,19 +369,15 @@ const projectsUpdateAuthDuration = async ({projectId,duration,parseOutput = true
403
369
  return response;
404
370
 
405
371
  }
406
- /**
407
- * @typedef {Object} ProjectsUpdateAuthLimitRequestParams
408
- * @property {string} projectId Project unique ID.
409
- * @property {number} limit Set the max number of users allowed in this project. Use 0 for unlimited.
410
- * @property {boolean} overrideForCli
411
- * @property {boolean} parseOutput
412
- * @property {libClient | undefined} sdk
413
- */
372
+ interface ProjectsUpdateAuthLimitRequestParams {
373
+ projectId: string;
374
+ limit: number;
375
+ overrideForCli?: boolean;
376
+ parseOutput?: boolean;
377
+ sdk?: Client;
378
+ }
414
379
 
415
- /**
416
- * @param {ProjectsUpdateAuthLimitRequestParams} params
417
- */
418
- const projectsUpdateAuthLimit = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
380
+ export const projectsUpdateAuthLimit = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAuthLimitRequestParams): Promise<any> => {
419
381
  let client = !sdk ? await sdkForConsole() :
420
382
  sdk;
421
383
  let apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
@@ -437,19 +399,15 @@ const projectsUpdateAuthLimit = async ({projectId,limit,parseOutput = true, over
437
399
  return response;
438
400
 
439
401
  }
440
- /**
441
- * @typedef {Object} ProjectsUpdateAuthSessionsLimitRequestParams
442
- * @property {string} projectId Project unique ID.
443
- * @property {number} limit Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
444
- * @property {boolean} overrideForCli
445
- * @property {boolean} parseOutput
446
- * @property {libClient | undefined} sdk
447
- */
402
+ interface ProjectsUpdateAuthSessionsLimitRequestParams {
403
+ projectId: string;
404
+ limit: number;
405
+ overrideForCli?: boolean;
406
+ parseOutput?: boolean;
407
+ sdk?: Client;
408
+ }
448
409
 
449
- /**
450
- * @param {ProjectsUpdateAuthSessionsLimitRequestParams} params
451
- */
452
- const projectsUpdateAuthSessionsLimit = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
410
+ export const projectsUpdateAuthSessionsLimit = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAuthSessionsLimitRequestParams): Promise<any> => {
453
411
  let client = !sdk ? await sdkForConsole() :
454
412
  sdk;
455
413
  let apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
@@ -471,21 +429,17 @@ const projectsUpdateAuthSessionsLimit = async ({projectId,limit,parseOutput = tr
471
429
  return response;
472
430
 
473
431
  }
474
- /**
475
- * @typedef {Object} ProjectsUpdateMembershipsPrivacyRequestParams
476
- * @property {string} projectId Project unique ID.
477
- * @property {boolean} userName Set to true to show userName to members of a team.
478
- * @property {boolean} userEmail Set to true to show email to members of a team.
479
- * @property {boolean} mfa Set to true to show mfa to members of a team.
480
- * @property {boolean} overrideForCli
481
- * @property {boolean} parseOutput
482
- * @property {libClient | undefined} sdk
483
- */
484
-
485
- /**
486
- * @param {ProjectsUpdateMembershipsPrivacyRequestParams} params
487
- */
488
- const projectsUpdateMembershipsPrivacy = async ({projectId,userName,userEmail,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
432
+ interface ProjectsUpdateMembershipsPrivacyRequestParams {
433
+ projectId: string;
434
+ userName: boolean;
435
+ userEmail: boolean;
436
+ mfa: boolean;
437
+ overrideForCli?: boolean;
438
+ parseOutput?: boolean;
439
+ sdk?: Client;
440
+ }
441
+
442
+ export const projectsUpdateMembershipsPrivacy = async ({projectId,userName,userEmail,mfa,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateMembershipsPrivacyRequestParams): Promise<any> => {
489
443
  let client = !sdk ? await sdkForConsole() :
490
444
  sdk;
491
445
  let apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
@@ -513,19 +467,15 @@ const projectsUpdateMembershipsPrivacy = async ({projectId,userName,userEmail,mf
513
467
  return response;
514
468
 
515
469
  }
516
- /**
517
- * @typedef {Object} ProjectsUpdateMockNumbersRequestParams
518
- * @property {string} projectId Project unique ID.
519
- * @property {object[]} numbers An array of mock numbers and their corresponding verification codes (OTPs). Each number should be a valid E.164 formatted phone number. Maximum of 10 numbers are allowed.
520
- * @property {boolean} overrideForCli
521
- * @property {boolean} parseOutput
522
- * @property {libClient | undefined} sdk
523
- */
470
+ interface ProjectsUpdateMockNumbersRequestParams {
471
+ projectId: string;
472
+ numbers: object[];
473
+ overrideForCli?: boolean;
474
+ parseOutput?: boolean;
475
+ sdk?: Client;
476
+ }
524
477
 
525
- /**
526
- * @param {ProjectsUpdateMockNumbersRequestParams} params
527
- */
528
- const projectsUpdateMockNumbers = async ({projectId,numbers,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
478
+ export const projectsUpdateMockNumbers = async ({projectId,numbers,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateMockNumbersRequestParams): Promise<any> => {
529
479
  let client = !sdk ? await sdkForConsole() :
530
480
  sdk;
531
481
  let apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
@@ -548,19 +498,15 @@ const projectsUpdateMockNumbers = async ({projectId,numbers,parseOutput = true,
548
498
  return response;
549
499
 
550
500
  }
551
- /**
552
- * @typedef {Object} ProjectsUpdateAuthPasswordDictionaryRequestParams
553
- * @property {string} projectId Project unique ID.
554
- * @property {boolean} enabled Set whether or not to enable checking user&#039;s password against most commonly used passwords. Default is false.
555
- * @property {boolean} overrideForCli
556
- * @property {boolean} parseOutput
557
- * @property {libClient | undefined} sdk
558
- */
501
+ interface ProjectsUpdateAuthPasswordDictionaryRequestParams {
502
+ projectId: string;
503
+ enabled: boolean;
504
+ overrideForCli?: boolean;
505
+ parseOutput?: boolean;
506
+ sdk?: Client;
507
+ }
559
508
 
560
- /**
561
- * @param {ProjectsUpdateAuthPasswordDictionaryRequestParams} params
562
- */
563
- const projectsUpdateAuthPasswordDictionary = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
509
+ export const projectsUpdateAuthPasswordDictionary = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAuthPasswordDictionaryRequestParams): Promise<any> => {
564
510
  let client = !sdk ? await sdkForConsole() :
565
511
  sdk;
566
512
  let apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
@@ -582,19 +528,15 @@ const projectsUpdateAuthPasswordDictionary = async ({projectId,enabled,parseOutp
582
528
  return response;
583
529
 
584
530
  }
585
- /**
586
- * @typedef {Object} ProjectsUpdateAuthPasswordHistoryRequestParams
587
- * @property {string} projectId Project unique ID.
588
- * @property {number} limit Set the max number of passwords to store in user history. User can&#039;t choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
589
- * @property {boolean} overrideForCli
590
- * @property {boolean} parseOutput
591
- * @property {libClient | undefined} sdk
592
- */
531
+ interface ProjectsUpdateAuthPasswordHistoryRequestParams {
532
+ projectId: string;
533
+ limit: number;
534
+ overrideForCli?: boolean;
535
+ parseOutput?: boolean;
536
+ sdk?: Client;
537
+ }
593
538
 
594
- /**
595
- * @param {ProjectsUpdateAuthPasswordHistoryRequestParams} params
596
- */
597
- const projectsUpdateAuthPasswordHistory = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
539
+ export const projectsUpdateAuthPasswordHistory = async ({projectId,limit,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAuthPasswordHistoryRequestParams): Promise<any> => {
598
540
  let client = !sdk ? await sdkForConsole() :
599
541
  sdk;
600
542
  let apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
@@ -616,19 +558,15 @@ const projectsUpdateAuthPasswordHistory = async ({projectId,limit,parseOutput =
616
558
  return response;
617
559
 
618
560
  }
619
- /**
620
- * @typedef {Object} ProjectsUpdatePersonalDataCheckRequestParams
621
- * @property {string} projectId Project unique ID.
622
- * @property {boolean} enabled Set whether or not to check a password for similarity with personal data. Default is false.
623
- * @property {boolean} overrideForCli
624
- * @property {boolean} parseOutput
625
- * @property {libClient | undefined} sdk
626
- */
561
+ interface ProjectsUpdatePersonalDataCheckRequestParams {
562
+ projectId: string;
563
+ enabled: boolean;
564
+ overrideForCli?: boolean;
565
+ parseOutput?: boolean;
566
+ sdk?: Client;
567
+ }
627
568
 
628
- /**
629
- * @param {ProjectsUpdatePersonalDataCheckRequestParams} params
630
- */
631
- const projectsUpdatePersonalDataCheck = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
569
+ export const projectsUpdatePersonalDataCheck = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdatePersonalDataCheckRequestParams): Promise<any> => {
632
570
  let client = !sdk ? await sdkForConsole() :
633
571
  sdk;
634
572
  let apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
@@ -650,19 +588,15 @@ const projectsUpdatePersonalDataCheck = async ({projectId,enabled,parseOutput =
650
588
  return response;
651
589
 
652
590
  }
653
- /**
654
- * @typedef {Object} ProjectsUpdateSessionAlertsRequestParams
655
- * @property {string} projectId Project unique ID.
656
- * @property {boolean} alerts Set to true to enable session emails.
657
- * @property {boolean} overrideForCli
658
- * @property {boolean} parseOutput
659
- * @property {libClient | undefined} sdk
660
- */
591
+ interface ProjectsUpdateSessionAlertsRequestParams {
592
+ projectId: string;
593
+ alerts: boolean;
594
+ overrideForCli?: boolean;
595
+ parseOutput?: boolean;
596
+ sdk?: Client;
597
+ }
661
598
 
662
- /**
663
- * @param {ProjectsUpdateSessionAlertsRequestParams} params
664
- */
665
- const projectsUpdateSessionAlerts = async ({projectId,alerts,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
599
+ export const projectsUpdateSessionAlerts = async ({projectId,alerts,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateSessionAlertsRequestParams): Promise<any> => {
666
600
  let client = !sdk ? await sdkForConsole() :
667
601
  sdk;
668
602
  let apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
@@ -684,19 +618,15 @@ const projectsUpdateSessionAlerts = async ({projectId,alerts,parseOutput = true,
684
618
  return response;
685
619
 
686
620
  }
687
- /**
688
- * @typedef {Object} ProjectsUpdateSessionInvalidationRequestParams
689
- * @property {string} projectId Project unique ID.
690
- * @property {boolean} enabled Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change
691
- * @property {boolean} overrideForCli
692
- * @property {boolean} parseOutput
693
- * @property {libClient | undefined} sdk
694
- */
621
+ interface ProjectsUpdateSessionInvalidationRequestParams {
622
+ projectId: string;
623
+ enabled: boolean;
624
+ overrideForCli?: boolean;
625
+ parseOutput?: boolean;
626
+ sdk?: Client;
627
+ }
695
628
 
696
- /**
697
- * @param {ProjectsUpdateSessionInvalidationRequestParams} params
698
- */
699
- const projectsUpdateSessionInvalidation = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
629
+ export const projectsUpdateSessionInvalidation = async ({projectId,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateSessionInvalidationRequestParams): Promise<any> => {
700
630
  let client = !sdk ? await sdkForConsole() :
701
631
  sdk;
702
632
  let apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
@@ -718,20 +648,16 @@ const projectsUpdateSessionInvalidation = async ({projectId,enabled,parseOutput
718
648
  return response;
719
649
 
720
650
  }
721
- /**
722
- * @typedef {Object} ProjectsUpdateAuthStatusRequestParams
723
- * @property {string} projectId Project unique ID.
724
- * @property {AuthMethod} method Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone
725
- * @property {boolean} status Set the status of this auth method.
726
- * @property {boolean} overrideForCli
727
- * @property {boolean} parseOutput
728
- * @property {libClient | undefined} sdk
729
- */
730
-
731
- /**
732
- * @param {ProjectsUpdateAuthStatusRequestParams} params
733
- */
734
- const projectsUpdateAuthStatus = async ({projectId,method,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
651
+ interface ProjectsUpdateAuthStatusRequestParams {
652
+ projectId: string;
653
+ method: AuthMethod;
654
+ status: boolean;
655
+ overrideForCli?: boolean;
656
+ parseOutput?: boolean;
657
+ sdk?: Client;
658
+ }
659
+
660
+ export const projectsUpdateAuthStatus = async ({projectId,method,status,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateAuthStatusRequestParams): Promise<any> => {
735
661
  let client = !sdk ? await sdkForConsole() :
736
662
  sdk;
737
663
  let apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
@@ -753,19 +679,16 @@ const projectsUpdateAuthStatus = async ({projectId,method,status,parseOutput = t
753
679
  return response;
754
680
 
755
681
  }
756
- /**
757
- * @typedef {Object} ProjectsListDevKeysRequestParams
758
- * @property {string} projectId Project unique ID.
759
- * @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: accessedAt, expire
760
- * @property {boolean} overrideForCli
761
- * @property {boolean} parseOutput
762
- * @property {libClient | undefined} sdk
763
- */
682
+ interface ProjectsListDevKeysRequestParams {
683
+ projectId: string;
684
+ queries?: string[];
685
+ overrideForCli?: boolean;
686
+ parseOutput?: boolean;
687
+ sdk?: Client;
688
+ console?: boolean;
689
+ }
764
690
 
765
- /**
766
- * @param {ProjectsListDevKeysRequestParams} params
767
- */
768
- const projectsListDevKeys = async ({projectId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
691
+ export const projectsListDevKeys = async ({projectId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsListDevKeysRequestParams): Promise<any> => {
769
692
  let client = !sdk ? await sdkForConsole() :
770
693
  sdk;
771
694
  let apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
@@ -780,7 +703,7 @@ const projectsListDevKeys = async ({projectId,queries,parseOutput = true, overri
780
703
  }, payload);
781
704
 
782
705
  if (parseOutput) {
783
- if(console) {
706
+ if(showConsole) {
784
707
  showConsoleLink('projects', 'listDevKeys', projectId);
785
708
  } else {
786
709
  parse(response)
@@ -790,20 +713,16 @@ const projectsListDevKeys = async ({projectId,queries,parseOutput = true, overri
790
713
  return response;
791
714
 
792
715
  }
793
- /**
794
- * @typedef {Object} ProjectsCreateDevKeyRequestParams
795
- * @property {string} projectId Project unique ID.
796
- * @property {string} name Key name. Max length: 128 chars.
797
- * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
798
- * @property {boolean} overrideForCli
799
- * @property {boolean} parseOutput
800
- * @property {libClient | undefined} sdk
801
- */
802
-
803
- /**
804
- * @param {ProjectsCreateDevKeyRequestParams} params
805
- */
806
- const projectsCreateDevKey = async ({projectId,name,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
716
+ interface ProjectsCreateDevKeyRequestParams {
717
+ projectId: string;
718
+ name: string;
719
+ expire: string;
720
+ overrideForCli?: boolean;
721
+ parseOutput?: boolean;
722
+ sdk?: Client;
723
+ }
724
+
725
+ export const projectsCreateDevKey = async ({projectId,name,expire,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsCreateDevKeyRequestParams): Promise<any> => {
807
726
  let client = !sdk ? await sdkForConsole() :
808
727
  sdk;
809
728
  let apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
@@ -828,19 +747,16 @@ const projectsCreateDevKey = async ({projectId,name,expire,parseOutput = true, o
828
747
  return response;
829
748
 
830
749
  }
831
- /**
832
- * @typedef {Object} ProjectsGetDevKeyRequestParams
833
- * @property {string} projectId Project unique ID.
834
- * @property {string} keyId Key unique ID.
835
- * @property {boolean} overrideForCli
836
- * @property {boolean} parseOutput
837
- * @property {libClient | undefined} sdk
838
- */
750
+ interface ProjectsGetDevKeyRequestParams {
751
+ projectId: string;
752
+ keyId: string;
753
+ overrideForCli?: boolean;
754
+ parseOutput?: boolean;
755
+ sdk?: Client;
756
+ console?: boolean;
757
+ }
839
758
 
840
- /**
841
- * @param {ProjectsGetDevKeyRequestParams} params
842
- */
843
- const projectsGetDevKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
759
+ export const projectsGetDevKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsGetDevKeyRequestParams): Promise<any> => {
844
760
  let client = !sdk ? await sdkForConsole() :
845
761
  sdk;
846
762
  let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
@@ -852,7 +768,7 @@ const projectsGetDevKey = async ({projectId,keyId,parseOutput = true, overrideFo
852
768
  }, payload);
853
769
 
854
770
  if (parseOutput) {
855
- if(console) {
771
+ if(showConsole) {
856
772
  showConsoleLink('projects', 'getDevKey', projectId, keyId);
857
773
  } else {
858
774
  parse(response)
@@ -862,21 +778,17 @@ const projectsGetDevKey = async ({projectId,keyId,parseOutput = true, overrideFo
862
778
  return response;
863
779
 
864
780
  }
865
- /**
866
- * @typedef {Object} ProjectsUpdateDevKeyRequestParams
867
- * @property {string} projectId Project unique ID.
868
- * @property {string} keyId Key unique ID.
869
- * @property {string} name Key name. Max length: 128 chars.
870
- * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
871
- * @property {boolean} overrideForCli
872
- * @property {boolean} parseOutput
873
- * @property {libClient | undefined} sdk
874
- */
875
-
876
- /**
877
- * @param {ProjectsUpdateDevKeyRequestParams} params
878
- */
879
- const projectsUpdateDevKey = async ({projectId,keyId,name,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
781
+ interface ProjectsUpdateDevKeyRequestParams {
782
+ projectId: string;
783
+ keyId: string;
784
+ name: string;
785
+ expire: string;
786
+ overrideForCli?: boolean;
787
+ parseOutput?: boolean;
788
+ sdk?: Client;
789
+ }
790
+
791
+ export const projectsUpdateDevKey = async ({projectId,keyId,name,expire,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateDevKeyRequestParams): Promise<any> => {
880
792
  let client = !sdk ? await sdkForConsole() :
881
793
  sdk;
882
794
  let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
@@ -901,19 +813,15 @@ const projectsUpdateDevKey = async ({projectId,keyId,name,expire,parseOutput = t
901
813
  return response;
902
814
 
903
815
  }
904
- /**
905
- * @typedef {Object} ProjectsDeleteDevKeyRequestParams
906
- * @property {string} projectId Project unique ID.
907
- * @property {string} keyId Key unique ID.
908
- * @property {boolean} overrideForCli
909
- * @property {boolean} parseOutput
910
- * @property {libClient | undefined} sdk
911
- */
816
+ interface ProjectsDeleteDevKeyRequestParams {
817
+ projectId: string;
818
+ keyId: string;
819
+ overrideForCli?: boolean;
820
+ parseOutput?: boolean;
821
+ sdk?: Client;
822
+ }
912
823
 
913
- /**
914
- * @param {ProjectsDeleteDevKeyRequestParams} params
915
- */
916
- const projectsDeleteDevKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
824
+ export const projectsDeleteDevKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsDeleteDevKeyRequestParams): Promise<any> => {
917
825
  let client = !sdk ? await sdkForConsole() :
918
826
  sdk;
919
827
  let apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
@@ -932,20 +840,16 @@ const projectsDeleteDevKey = async ({projectId,keyId,parseOutput = true, overrid
932
840
  return response;
933
841
 
934
842
  }
935
- /**
936
- * @typedef {Object} ProjectsCreateJWTRequestParams
937
- * @property {string} projectId Project unique ID.
938
- * @property {string[]} scopes List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
939
- * @property {number} duration Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
940
- * @property {boolean} overrideForCli
941
- * @property {boolean} parseOutput
942
- * @property {libClient | undefined} sdk
943
- */
944
-
945
- /**
946
- * @param {ProjectsCreateJWTRequestParams} params
947
- */
948
- const projectsCreateJWT = async ({projectId,scopes,duration,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
843
+ interface ProjectsCreateJWTRequestParams {
844
+ projectId: string;
845
+ scopes: string[];
846
+ duration?: number;
847
+ overrideForCli?: boolean;
848
+ parseOutput?: boolean;
849
+ sdk?: Client;
850
+ }
851
+
852
+ export const projectsCreateJWT = async ({projectId,scopes,duration,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsCreateJWTRequestParams): Promise<any> => {
949
853
  let client = !sdk ? await sdkForConsole() :
950
854
  sdk;
951
855
  let apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
@@ -971,19 +875,16 @@ const projectsCreateJWT = async ({projectId,scopes,duration,parseOutput = true,
971
875
  return response;
972
876
 
973
877
  }
974
- /**
975
- * @typedef {Object} ProjectsListKeysRequestParams
976
- * @property {string} projectId Project unique ID.
977
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
978
- * @property {boolean} overrideForCli
979
- * @property {boolean} parseOutput
980
- * @property {libClient | undefined} sdk
981
- */
878
+ interface ProjectsListKeysRequestParams {
879
+ projectId: string;
880
+ total?: boolean;
881
+ overrideForCli?: boolean;
882
+ parseOutput?: boolean;
883
+ sdk?: Client;
884
+ console?: boolean;
885
+ }
982
886
 
983
- /**
984
- * @param {ProjectsListKeysRequestParams} params
985
- */
986
- const projectsListKeys = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
887
+ export const projectsListKeys = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsListKeysRequestParams): Promise<any> => {
987
888
  let client = !sdk ? await sdkForConsole() :
988
889
  sdk;
989
890
  let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
@@ -998,7 +899,7 @@ const projectsListKeys = async ({projectId,total,parseOutput = true, overrideFor
998
899
  }, payload);
999
900
 
1000
901
  if (parseOutput) {
1001
- if(console) {
902
+ if(showConsole) {
1002
903
  showConsoleLink('projects', 'listKeys', projectId);
1003
904
  } else {
1004
905
  parse(response)
@@ -1008,21 +909,17 @@ const projectsListKeys = async ({projectId,total,parseOutput = true, overrideFor
1008
909
  return response;
1009
910
 
1010
911
  }
1011
- /**
1012
- * @typedef {Object} ProjectsCreateKeyRequestParams
1013
- * @property {string} projectId Project unique ID.
1014
- * @property {string} name Key name. Max length: 128 chars.
1015
- * @property {string[]} scopes Key scopes list. Maximum of 100 scopes are allowed.
1016
- * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
1017
- * @property {boolean} overrideForCli
1018
- * @property {boolean} parseOutput
1019
- * @property {libClient | undefined} sdk
1020
- */
1021
-
1022
- /**
1023
- * @param {ProjectsCreateKeyRequestParams} params
1024
- */
1025
- const projectsCreateKey = async ({projectId,name,scopes,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
912
+ interface ProjectsCreateKeyRequestParams {
913
+ projectId: string;
914
+ name: string;
915
+ scopes: string[];
916
+ expire?: string;
917
+ overrideForCli?: boolean;
918
+ parseOutput?: boolean;
919
+ sdk?: Client;
920
+ }
921
+
922
+ export const projectsCreateKey = async ({projectId,name,scopes,expire,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsCreateKeyRequestParams): Promise<any> => {
1026
923
  let client = !sdk ? await sdkForConsole() :
1027
924
  sdk;
1028
925
  let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
@@ -1051,19 +948,16 @@ const projectsCreateKey = async ({projectId,name,scopes,expire,parseOutput = tru
1051
948
  return response;
1052
949
 
1053
950
  }
1054
- /**
1055
- * @typedef {Object} ProjectsGetKeyRequestParams
1056
- * @property {string} projectId Project unique ID.
1057
- * @property {string} keyId Key unique ID.
1058
- * @property {boolean} overrideForCli
1059
- * @property {boolean} parseOutput
1060
- * @property {libClient | undefined} sdk
1061
- */
951
+ interface ProjectsGetKeyRequestParams {
952
+ projectId: string;
953
+ keyId: string;
954
+ overrideForCli?: boolean;
955
+ parseOutput?: boolean;
956
+ sdk?: Client;
957
+ console?: boolean;
958
+ }
1062
959
 
1063
- /**
1064
- * @param {ProjectsGetKeyRequestParams} params
1065
- */
1066
- const projectsGetKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
960
+ export const projectsGetKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsGetKeyRequestParams): Promise<any> => {
1067
961
  let client = !sdk ? await sdkForConsole() :
1068
962
  sdk;
1069
963
  let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
@@ -1075,7 +969,7 @@ const projectsGetKey = async ({projectId,keyId,parseOutput = true, overrideForCl
1075
969
  }, payload);
1076
970
 
1077
971
  if (parseOutput) {
1078
- if(console) {
972
+ if(showConsole) {
1079
973
  showConsoleLink('projects', 'getKey', projectId, keyId);
1080
974
  } else {
1081
975
  parse(response)
@@ -1085,22 +979,18 @@ const projectsGetKey = async ({projectId,keyId,parseOutput = true, overrideForCl
1085
979
  return response;
1086
980
 
1087
981
  }
1088
- /**
1089
- * @typedef {Object} ProjectsUpdateKeyRequestParams
1090
- * @property {string} projectId Project unique ID.
1091
- * @property {string} keyId Key unique ID.
1092
- * @property {string} name Key name. Max length: 128 chars.
1093
- * @property {string[]} scopes Key scopes list. Maximum of 100 events are allowed.
1094
- * @property {string} expire Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
1095
- * @property {boolean} overrideForCli
1096
- * @property {boolean} parseOutput
1097
- * @property {libClient | undefined} sdk
1098
- */
1099
-
1100
- /**
1101
- * @param {ProjectsUpdateKeyRequestParams} params
1102
- */
1103
- const projectsUpdateKey = async ({projectId,keyId,name,scopes,expire,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
982
+ interface ProjectsUpdateKeyRequestParams {
983
+ projectId: string;
984
+ keyId: string;
985
+ name: string;
986
+ scopes: string[];
987
+ expire?: string;
988
+ overrideForCli?: boolean;
989
+ parseOutput?: boolean;
990
+ sdk?: Client;
991
+ }
992
+
993
+ export const projectsUpdateKey = async ({projectId,keyId,name,scopes,expire,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateKeyRequestParams): Promise<any> => {
1104
994
  let client = !sdk ? await sdkForConsole() :
1105
995
  sdk;
1106
996
  let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
@@ -1129,19 +1019,15 @@ const projectsUpdateKey = async ({projectId,keyId,name,scopes,expire,parseOutput
1129
1019
  return response;
1130
1020
 
1131
1021
  }
1132
- /**
1133
- * @typedef {Object} ProjectsDeleteKeyRequestParams
1134
- * @property {string} projectId Project unique ID.
1135
- * @property {string} keyId Key unique ID.
1136
- * @property {boolean} overrideForCli
1137
- * @property {boolean} parseOutput
1138
- * @property {libClient | undefined} sdk
1139
- */
1022
+ interface ProjectsDeleteKeyRequestParams {
1023
+ projectId: string;
1024
+ keyId: string;
1025
+ overrideForCli?: boolean;
1026
+ parseOutput?: boolean;
1027
+ sdk?: Client;
1028
+ }
1140
1029
 
1141
- /**
1142
- * @param {ProjectsDeleteKeyRequestParams} params
1143
- */
1144
- const projectsDeleteKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1030
+ export const projectsDeleteKey = async ({projectId,keyId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsDeleteKeyRequestParams): Promise<any> => {
1145
1031
  let client = !sdk ? await sdkForConsole() :
1146
1032
  sdk;
1147
1033
  let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
@@ -1160,22 +1046,18 @@ const projectsDeleteKey = async ({projectId,keyId,parseOutput = true, overrideFo
1160
1046
  return response;
1161
1047
 
1162
1048
  }
1163
- /**
1164
- * @typedef {Object} ProjectsUpdateOAuth2RequestParams
1165
- * @property {string} projectId Project unique ID.
1166
- * @property {OAuthProvider} provider Provider Name
1167
- * @property {string} appId Provider app ID. Max length: 256 chars.
1168
- * @property {string} secret Provider secret key. Max length: 512 chars.
1169
- * @property {boolean} enabled Provider status. Set to &#039;false&#039; to disable new session creation.
1170
- * @property {boolean} overrideForCli
1171
- * @property {boolean} parseOutput
1172
- * @property {libClient | undefined} sdk
1173
- */
1174
-
1175
- /**
1176
- * @param {ProjectsUpdateOAuth2RequestParams} params
1177
- */
1178
- const projectsUpdateOAuth2 = async ({projectId,provider,appId,secret,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1049
+ interface ProjectsUpdateOAuth2RequestParams {
1050
+ projectId: string;
1051
+ provider: OAuthProvider;
1052
+ appId?: string;
1053
+ secret?: string;
1054
+ enabled?: boolean;
1055
+ overrideForCli?: boolean;
1056
+ parseOutput?: boolean;
1057
+ sdk?: Client;
1058
+ }
1059
+
1060
+ export const projectsUpdateOAuth2 = async ({projectId,provider,appId,secret,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateOAuth2RequestParams): Promise<any> => {
1179
1061
  let client = !sdk ? await sdkForConsole() :
1180
1062
  sdk;
1181
1063
  let apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
@@ -1206,19 +1088,16 @@ const projectsUpdateOAuth2 = async ({projectId,provider,appId,secret,enabled,par
1206
1088
  return response;
1207
1089
 
1208
1090
  }
1209
- /**
1210
- * @typedef {Object} ProjectsListPlatformsRequestParams
1211
- * @property {string} projectId Project unique ID.
1212
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
1213
- * @property {boolean} overrideForCli
1214
- * @property {boolean} parseOutput
1215
- * @property {libClient | undefined} sdk
1216
- */
1091
+ interface ProjectsListPlatformsRequestParams {
1092
+ projectId: string;
1093
+ total?: boolean;
1094
+ overrideForCli?: boolean;
1095
+ parseOutput?: boolean;
1096
+ sdk?: Client;
1097
+ console?: boolean;
1098
+ }
1217
1099
 
1218
- /**
1219
- * @param {ProjectsListPlatformsRequestParams} params
1220
- */
1221
- const projectsListPlatforms = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1100
+ export const projectsListPlatforms = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsListPlatformsRequestParams): Promise<any> => {
1222
1101
  let client = !sdk ? await sdkForConsole() :
1223
1102
  sdk;
1224
1103
  let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
@@ -1233,7 +1112,7 @@ const projectsListPlatforms = async ({projectId,total,parseOutput = true, overri
1233
1112
  }, payload);
1234
1113
 
1235
1114
  if (parseOutput) {
1236
- if(console) {
1115
+ if(showConsole) {
1237
1116
  showConsoleLink('projects', 'listPlatforms', projectId);
1238
1117
  } else {
1239
1118
  parse(response)
@@ -1243,23 +1122,19 @@ const projectsListPlatforms = async ({projectId,total,parseOutput = true, overri
1243
1122
  return response;
1244
1123
 
1245
1124
  }
1246
- /**
1247
- * @typedef {Object} ProjectsCreatePlatformRequestParams
1248
- * @property {string} projectId Project unique ID.
1249
- * @property {PlatformType} type Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.
1250
- * @property {string} name Platform name. Max length: 128 chars.
1251
- * @property {string} key Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.
1252
- * @property {string} store App store or Google Play store ID. Max length: 256 chars.
1253
- * @property {string} hostname Platform client hostname. Max length: 256 chars.
1254
- * @property {boolean} overrideForCli
1255
- * @property {boolean} parseOutput
1256
- * @property {libClient | undefined} sdk
1257
- */
1258
-
1259
- /**
1260
- * @param {ProjectsCreatePlatformRequestParams} params
1261
- */
1262
- const projectsCreatePlatform = async ({projectId,type,name,key,store,hostname,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1125
+ interface ProjectsCreatePlatformRequestParams {
1126
+ projectId: string;
1127
+ type: PlatformType;
1128
+ name: string;
1129
+ key?: string;
1130
+ store?: string;
1131
+ hostname?: string;
1132
+ overrideForCli?: boolean;
1133
+ parseOutput?: boolean;
1134
+ sdk?: Client;
1135
+ }
1136
+
1137
+ export const projectsCreatePlatform = async ({projectId,type,name,key,store,hostname,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsCreatePlatformRequestParams): Promise<any> => {
1263
1138
  let client = !sdk ? await sdkForConsole() :
1264
1139
  sdk;
1265
1140
  let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
@@ -1293,19 +1168,16 @@ const projectsCreatePlatform = async ({projectId,type,name,key,store,hostname,pa
1293
1168
  return response;
1294
1169
 
1295
1170
  }
1296
- /**
1297
- * @typedef {Object} ProjectsGetPlatformRequestParams
1298
- * @property {string} projectId Project unique ID.
1299
- * @property {string} platformId Platform unique ID.
1300
- * @property {boolean} overrideForCli
1301
- * @property {boolean} parseOutput
1302
- * @property {libClient | undefined} sdk
1303
- */
1171
+ interface ProjectsGetPlatformRequestParams {
1172
+ projectId: string;
1173
+ platformId: string;
1174
+ overrideForCli?: boolean;
1175
+ parseOutput?: boolean;
1176
+ sdk?: Client;
1177
+ console?: boolean;
1178
+ }
1304
1179
 
1305
- /**
1306
- * @param {ProjectsGetPlatformRequestParams} params
1307
- */
1308
- const projectsGetPlatform = async ({projectId,platformId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1180
+ export const projectsGetPlatform = async ({projectId,platformId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsGetPlatformRequestParams): Promise<any> => {
1309
1181
  let client = !sdk ? await sdkForConsole() :
1310
1182
  sdk;
1311
1183
  let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
@@ -1317,7 +1189,7 @@ const projectsGetPlatform = async ({projectId,platformId,parseOutput = true, ove
1317
1189
  }, payload);
1318
1190
 
1319
1191
  if (parseOutput) {
1320
- if(console) {
1192
+ if(showConsole) {
1321
1193
  showConsoleLink('projects', 'getPlatform', projectId, platformId);
1322
1194
  } else {
1323
1195
  parse(response)
@@ -1327,23 +1199,19 @@ const projectsGetPlatform = async ({projectId,platformId,parseOutput = true, ove
1327
1199
  return response;
1328
1200
 
1329
1201
  }
1330
- /**
1331
- * @typedef {Object} ProjectsUpdatePlatformRequestParams
1332
- * @property {string} projectId Project unique ID.
1333
- * @property {string} platformId Platform unique ID.
1334
- * @property {string} name Platform name. Max length: 128 chars.
1335
- * @property {string} key Package name for android or bundle ID for iOS. Max length: 256 chars.
1336
- * @property {string} store App store or Google Play store ID. Max length: 256 chars.
1337
- * @property {string} hostname Platform client URL. Max length: 256 chars.
1338
- * @property {boolean} overrideForCli
1339
- * @property {boolean} parseOutput
1340
- * @property {libClient | undefined} sdk
1341
- */
1342
-
1343
- /**
1344
- * @param {ProjectsUpdatePlatformRequestParams} params
1345
- */
1346
- const projectsUpdatePlatform = async ({projectId,platformId,name,key,store,hostname,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1202
+ interface ProjectsUpdatePlatformRequestParams {
1203
+ projectId: string;
1204
+ platformId: string;
1205
+ name: string;
1206
+ key?: string;
1207
+ store?: string;
1208
+ hostname?: string;
1209
+ overrideForCli?: boolean;
1210
+ parseOutput?: boolean;
1211
+ sdk?: Client;
1212
+ }
1213
+
1214
+ export const projectsUpdatePlatform = async ({projectId,platformId,name,key,store,hostname,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdatePlatformRequestParams): Promise<any> => {
1347
1215
  let client = !sdk ? await sdkForConsole() :
1348
1216
  sdk;
1349
1217
  let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
@@ -1374,19 +1242,15 @@ const projectsUpdatePlatform = async ({projectId,platformId,name,key,store,hostn
1374
1242
  return response;
1375
1243
 
1376
1244
  }
1377
- /**
1378
- * @typedef {Object} ProjectsDeletePlatformRequestParams
1379
- * @property {string} projectId Project unique ID.
1380
- * @property {string} platformId Platform unique ID.
1381
- * @property {boolean} overrideForCli
1382
- * @property {boolean} parseOutput
1383
- * @property {libClient | undefined} sdk
1384
- */
1245
+ interface ProjectsDeletePlatformRequestParams {
1246
+ projectId: string;
1247
+ platformId: string;
1248
+ overrideForCli?: boolean;
1249
+ parseOutput?: boolean;
1250
+ sdk?: Client;
1251
+ }
1385
1252
 
1386
- /**
1387
- * @param {ProjectsDeletePlatformRequestParams} params
1388
- */
1389
- const projectsDeletePlatform = async ({projectId,platformId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1253
+ export const projectsDeletePlatform = async ({projectId,platformId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsDeletePlatformRequestParams): Promise<any> => {
1390
1254
  let client = !sdk ? await sdkForConsole() :
1391
1255
  sdk;
1392
1256
  let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
@@ -1405,20 +1269,16 @@ const projectsDeletePlatform = async ({projectId,platformId,parseOutput = true,
1405
1269
  return response;
1406
1270
 
1407
1271
  }
1408
- /**
1409
- * @typedef {Object} ProjectsUpdateServiceStatusRequestParams
1410
- * @property {string} projectId Project unique ID.
1411
- * @property {ApiService} service Service name.
1412
- * @property {boolean} status Service status.
1413
- * @property {boolean} overrideForCli
1414
- * @property {boolean} parseOutput
1415
- * @property {libClient | undefined} sdk
1416
- */
1417
-
1418
- /**
1419
- * @param {ProjectsUpdateServiceStatusRequestParams} params
1420
- */
1421
- const projectsUpdateServiceStatus = async ({projectId,service,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1272
+ interface ProjectsUpdateServiceStatusRequestParams {
1273
+ projectId: string;
1274
+ service: ApiService;
1275
+ status: boolean;
1276
+ overrideForCli?: boolean;
1277
+ parseOutput?: boolean;
1278
+ sdk?: Client;
1279
+ }
1280
+
1281
+ export const projectsUpdateServiceStatus = async ({projectId,service,status,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateServiceStatusRequestParams): Promise<any> => {
1422
1282
  let client = !sdk ? await sdkForConsole() :
1423
1283
  sdk;
1424
1284
  let apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
@@ -1443,19 +1303,15 @@ const projectsUpdateServiceStatus = async ({projectId,service,status,parseOutput
1443
1303
  return response;
1444
1304
 
1445
1305
  }
1446
- /**
1447
- * @typedef {Object} ProjectsUpdateServiceStatusAllRequestParams
1448
- * @property {string} projectId Project unique ID.
1449
- * @property {boolean} status Service status.
1450
- * @property {boolean} overrideForCli
1451
- * @property {boolean} parseOutput
1452
- * @property {libClient | undefined} sdk
1453
- */
1306
+ interface ProjectsUpdateServiceStatusAllRequestParams {
1307
+ projectId: string;
1308
+ status: boolean;
1309
+ overrideForCli?: boolean;
1310
+ parseOutput?: boolean;
1311
+ sdk?: Client;
1312
+ }
1454
1313
 
1455
- /**
1456
- * @param {ProjectsUpdateServiceStatusAllRequestParams} params
1457
- */
1458
- const projectsUpdateServiceStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1314
+ export const projectsUpdateServiceStatusAll = async ({projectId,status,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateServiceStatusAllRequestParams): Promise<any> => {
1459
1315
  let client = !sdk ? await sdkForConsole() :
1460
1316
  sdk;
1461
1317
  let apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
@@ -1477,27 +1333,23 @@ const projectsUpdateServiceStatusAll = async ({projectId,status,parseOutput = tr
1477
1333
  return response;
1478
1334
 
1479
1335
  }
1480
- /**
1481
- * @typedef {Object} ProjectsUpdateSMTPRequestParams
1482
- * @property {string} projectId Project unique ID.
1483
- * @property {boolean} enabled Enable custom SMTP service
1484
- * @property {string} senderName Name of the email sender
1485
- * @property {string} senderEmail Email of the sender
1486
- * @property {string} replyTo Reply to email
1487
- * @property {string} host SMTP server host name
1488
- * @property {number} port SMTP server port
1489
- * @property {string} username SMTP server username
1490
- * @property {string} password SMTP server password
1491
- * @property {SMTPSecure} secure Does SMTP server use secure connection
1492
- * @property {boolean} overrideForCli
1493
- * @property {boolean} parseOutput
1494
- * @property {libClient | undefined} sdk
1495
- */
1496
-
1497
- /**
1498
- * @param {ProjectsUpdateSMTPRequestParams} params
1499
- */
1500
- const projectsUpdateSMTP = async ({projectId,enabled,senderName,senderEmail,replyTo,host,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1336
+ interface ProjectsUpdateSMTPRequestParams {
1337
+ projectId: string;
1338
+ enabled: boolean;
1339
+ senderName?: string;
1340
+ senderEmail?: string;
1341
+ replyTo?: string;
1342
+ host?: string;
1343
+ port?: number;
1344
+ username?: string;
1345
+ password?: string;
1346
+ secure?: SMTPSecure;
1347
+ overrideForCli?: boolean;
1348
+ parseOutput?: boolean;
1349
+ sdk?: Client;
1350
+ }
1351
+
1352
+ export const projectsUpdateSMTP = async ({projectId,enabled,senderName,senderEmail,replyTo,host,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateSMTPRequestParams): Promise<any> => {
1501
1353
  let client = !sdk ? await sdkForConsole() :
1502
1354
  sdk;
1503
1355
  let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
@@ -1543,27 +1395,23 @@ const projectsUpdateSMTP = async ({projectId,enabled,senderName,senderEmail,repl
1543
1395
  return response;
1544
1396
 
1545
1397
  }
1546
- /**
1547
- * @typedef {Object} ProjectsCreateSMTPTestRequestParams
1548
- * @property {string} projectId Project unique ID.
1549
- * @property {string[]} emails Array of emails to send test email to. Maximum of 10 emails are allowed.
1550
- * @property {string} senderName Name of the email sender
1551
- * @property {string} senderEmail Email of the sender
1552
- * @property {string} host SMTP server host name
1553
- * @property {string} replyTo Reply to email
1554
- * @property {number} port SMTP server port
1555
- * @property {string} username SMTP server username
1556
- * @property {string} password SMTP server password
1557
- * @property {SMTPSecure} secure Does SMTP server use secure connection
1558
- * @property {boolean} overrideForCli
1559
- * @property {boolean} parseOutput
1560
- * @property {libClient | undefined} sdk
1561
- */
1562
-
1563
- /**
1564
- * @param {ProjectsCreateSMTPTestRequestParams} params
1565
- */
1566
- const projectsCreateSMTPTest = async ({projectId,emails,senderName,senderEmail,host,replyTo,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1398
+ interface ProjectsCreateSMTPTestRequestParams {
1399
+ projectId: string;
1400
+ emails: string[];
1401
+ senderName: string;
1402
+ senderEmail: string;
1403
+ host: string;
1404
+ replyTo?: string;
1405
+ port?: number;
1406
+ username?: string;
1407
+ password?: string;
1408
+ secure?: SMTPSecure;
1409
+ overrideForCli?: boolean;
1410
+ parseOutput?: boolean;
1411
+ sdk?: Client;
1412
+ }
1413
+
1414
+ export const projectsCreateSMTPTest = async ({projectId,emails,senderName,senderEmail,host,replyTo,port,username,password,secure,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsCreateSMTPTestRequestParams): Promise<any> => {
1567
1415
  let client = !sdk ? await sdkForConsole() :
1568
1416
  sdk;
1569
1417
  let apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
@@ -1610,19 +1458,15 @@ const projectsCreateSMTPTest = async ({projectId,emails,senderName,senderEmail,h
1610
1458
  return response;
1611
1459
 
1612
1460
  }
1613
- /**
1614
- * @typedef {Object} ProjectsUpdateTeamRequestParams
1615
- * @property {string} projectId Project unique ID.
1616
- * @property {string} teamId Team ID of the team to transfer project to.
1617
- * @property {boolean} overrideForCli
1618
- * @property {boolean} parseOutput
1619
- * @property {libClient | undefined} sdk
1620
- */
1461
+ interface ProjectsUpdateTeamRequestParams {
1462
+ projectId: string;
1463
+ teamId: string;
1464
+ overrideForCli?: boolean;
1465
+ parseOutput?: boolean;
1466
+ sdk?: Client;
1467
+ }
1621
1468
 
1622
- /**
1623
- * @param {ProjectsUpdateTeamRequestParams} params
1624
- */
1625
- const projectsUpdateTeam = async ({projectId,teamId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1469
+ export const projectsUpdateTeam = async ({projectId,teamId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateTeamRequestParams): Promise<any> => {
1626
1470
  let client = !sdk ? await sdkForConsole() :
1627
1471
  sdk;
1628
1472
  let apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
@@ -1644,20 +1488,16 @@ const projectsUpdateTeam = async ({projectId,teamId,parseOutput = true, override
1644
1488
  return response;
1645
1489
 
1646
1490
  }
1647
- /**
1648
- * @typedef {Object} ProjectsGetEmailTemplateRequestParams
1649
- * @property {string} projectId Project unique ID.
1650
- * @property {EmailTemplateType} type Template type
1651
- * @property {EmailTemplateLocale} locale Template locale
1652
- * @property {boolean} overrideForCli
1653
- * @property {boolean} parseOutput
1654
- * @property {libClient | undefined} sdk
1655
- */
1656
-
1657
- /**
1658
- * @param {ProjectsGetEmailTemplateRequestParams} params
1659
- */
1660
- const projectsGetEmailTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1491
+ interface ProjectsGetEmailTemplateRequestParams {
1492
+ projectId: string;
1493
+ type: EmailTemplateType;
1494
+ locale: EmailTemplateLocale;
1495
+ overrideForCli?: boolean;
1496
+ parseOutput?: boolean;
1497
+ sdk?: Client;
1498
+ }
1499
+
1500
+ export const projectsGetEmailTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsGetEmailTemplateRequestParams): Promise<any> => {
1661
1501
  let client = !sdk ? await sdkForConsole() :
1662
1502
  sdk;
1663
1503
  let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
@@ -1675,25 +1515,21 @@ const projectsGetEmailTemplate = async ({projectId,type,locale,parseOutput = tru
1675
1515
  return response;
1676
1516
 
1677
1517
  }
1678
- /**
1679
- * @typedef {Object} ProjectsUpdateEmailTemplateRequestParams
1680
- * @property {string} projectId Project unique ID.
1681
- * @property {EmailTemplateType} type Template type
1682
- * @property {EmailTemplateLocale} locale Template locale
1683
- * @property {string} subject Email Subject
1684
- * @property {string} message Template message
1685
- * @property {string} senderName Name of the email sender
1686
- * @property {string} senderEmail Email of the sender
1687
- * @property {string} replyTo Reply to email
1688
- * @property {boolean} overrideForCli
1689
- * @property {boolean} parseOutput
1690
- * @property {libClient | undefined} sdk
1691
- */
1692
-
1693
- /**
1694
- * @param {ProjectsUpdateEmailTemplateRequestParams} params
1695
- */
1696
- const projectsUpdateEmailTemplate = async ({projectId,type,locale,subject,message,senderName,senderEmail,replyTo,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1518
+ interface ProjectsUpdateEmailTemplateRequestParams {
1519
+ projectId: string;
1520
+ type: EmailTemplateType;
1521
+ locale: EmailTemplateLocale;
1522
+ subject: string;
1523
+ message: string;
1524
+ senderName?: string;
1525
+ senderEmail?: string;
1526
+ replyTo?: string;
1527
+ overrideForCli?: boolean;
1528
+ parseOutput?: boolean;
1529
+ sdk?: Client;
1530
+ }
1531
+
1532
+ export const projectsUpdateEmailTemplate = async ({projectId,type,locale,subject,message,senderName,senderEmail,replyTo,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateEmailTemplateRequestParams): Promise<any> => {
1697
1533
  let client = !sdk ? await sdkForConsole() :
1698
1534
  sdk;
1699
1535
  let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
@@ -1727,20 +1563,16 @@ const projectsUpdateEmailTemplate = async ({projectId,type,locale,subject,messag
1727
1563
  return response;
1728
1564
 
1729
1565
  }
1730
- /**
1731
- * @typedef {Object} ProjectsDeleteEmailTemplateRequestParams
1732
- * @property {string} projectId Project unique ID.
1733
- * @property {EmailTemplateType} type Template type
1734
- * @property {EmailTemplateLocale} locale Template locale
1735
- * @property {boolean} overrideForCli
1736
- * @property {boolean} parseOutput
1737
- * @property {libClient | undefined} sdk
1738
- */
1739
-
1740
- /**
1741
- * @param {ProjectsDeleteEmailTemplateRequestParams} params
1742
- */
1743
- const projectsDeleteEmailTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1566
+ interface ProjectsDeleteEmailTemplateRequestParams {
1567
+ projectId: string;
1568
+ type: EmailTemplateType;
1569
+ locale: EmailTemplateLocale;
1570
+ overrideForCli?: boolean;
1571
+ parseOutput?: boolean;
1572
+ sdk?: Client;
1573
+ }
1574
+
1575
+ export const projectsDeleteEmailTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsDeleteEmailTemplateRequestParams): Promise<any> => {
1744
1576
  let client = !sdk ? await sdkForConsole() :
1745
1577
  sdk;
1746
1578
  let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
@@ -1759,20 +1591,16 @@ const projectsDeleteEmailTemplate = async ({projectId,type,locale,parseOutput =
1759
1591
  return response;
1760
1592
 
1761
1593
  }
1762
- /**
1763
- * @typedef {Object} ProjectsGetSMSTemplateRequestParams
1764
- * @property {string} projectId Project unique ID.
1765
- * @property {SmsTemplateType} type Template type
1766
- * @property {SmsTemplateLocale} locale Template locale
1767
- * @property {boolean} overrideForCli
1768
- * @property {boolean} parseOutput
1769
- * @property {libClient | undefined} sdk
1770
- */
1771
-
1772
- /**
1773
- * @param {ProjectsGetSMSTemplateRequestParams} params
1774
- */
1775
- const projectsGetSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1594
+ interface ProjectsGetSMSTemplateRequestParams {
1595
+ projectId: string;
1596
+ type: SmsTemplateType;
1597
+ locale: SmsTemplateLocale;
1598
+ overrideForCli?: boolean;
1599
+ parseOutput?: boolean;
1600
+ sdk?: Client;
1601
+ }
1602
+
1603
+ export const projectsGetSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsGetSMSTemplateRequestParams): Promise<any> => {
1776
1604
  let client = !sdk ? await sdkForConsole() :
1777
1605
  sdk;
1778
1606
  let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
@@ -1790,21 +1618,17 @@ const projectsGetSMSTemplate = async ({projectId,type,locale,parseOutput = true,
1790
1618
  return response;
1791
1619
 
1792
1620
  }
1793
- /**
1794
- * @typedef {Object} ProjectsUpdateSMSTemplateRequestParams
1795
- * @property {string} projectId Project unique ID.
1796
- * @property {SmsTemplateType} type Template type
1797
- * @property {SmsTemplateLocale} locale Template locale
1798
- * @property {string} message Template message
1799
- * @property {boolean} overrideForCli
1800
- * @property {boolean} parseOutput
1801
- * @property {libClient | undefined} sdk
1802
- */
1803
-
1804
- /**
1805
- * @param {ProjectsUpdateSMSTemplateRequestParams} params
1806
- */
1807
- const projectsUpdateSMSTemplate = async ({projectId,type,locale,message,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1621
+ interface ProjectsUpdateSMSTemplateRequestParams {
1622
+ projectId: string;
1623
+ type: SmsTemplateType;
1624
+ locale: SmsTemplateLocale;
1625
+ message: string;
1626
+ overrideForCli?: boolean;
1627
+ parseOutput?: boolean;
1628
+ sdk?: Client;
1629
+ }
1630
+
1631
+ export const projectsUpdateSMSTemplate = async ({projectId,type,locale,message,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateSMSTemplateRequestParams): Promise<any> => {
1808
1632
  let client = !sdk ? await sdkForConsole() :
1809
1633
  sdk;
1810
1634
  let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
@@ -1826,20 +1650,16 @@ const projectsUpdateSMSTemplate = async ({projectId,type,locale,message,parseOut
1826
1650
  return response;
1827
1651
 
1828
1652
  }
1829
- /**
1830
- * @typedef {Object} ProjectsDeleteSMSTemplateRequestParams
1831
- * @property {string} projectId Project unique ID.
1832
- * @property {SmsTemplateType} type Template type
1833
- * @property {SmsTemplateLocale} locale Template locale
1834
- * @property {boolean} overrideForCli
1835
- * @property {boolean} parseOutput
1836
- * @property {libClient | undefined} sdk
1837
- */
1838
-
1839
- /**
1840
- * @param {ProjectsDeleteSMSTemplateRequestParams} params
1841
- */
1842
- const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1653
+ interface ProjectsDeleteSMSTemplateRequestParams {
1654
+ projectId: string;
1655
+ type: SmsTemplateType;
1656
+ locale: SmsTemplateLocale;
1657
+ overrideForCli?: boolean;
1658
+ parseOutput?: boolean;
1659
+ sdk?: Client;
1660
+ }
1661
+
1662
+ export const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsDeleteSMSTemplateRequestParams): Promise<any> => {
1843
1663
  let client = !sdk ? await sdkForConsole() :
1844
1664
  sdk;
1845
1665
  let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
@@ -1858,19 +1678,16 @@ const projectsDeleteSMSTemplate = async ({projectId,type,locale,parseOutput = tr
1858
1678
  return response;
1859
1679
 
1860
1680
  }
1861
- /**
1862
- * @typedef {Object} ProjectsListWebhooksRequestParams
1863
- * @property {string} projectId Project unique ID.
1864
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
1865
- * @property {boolean} overrideForCli
1866
- * @property {boolean} parseOutput
1867
- * @property {libClient | undefined} sdk
1868
- */
1681
+ interface ProjectsListWebhooksRequestParams {
1682
+ projectId: string;
1683
+ total?: boolean;
1684
+ overrideForCli?: boolean;
1685
+ parseOutput?: boolean;
1686
+ sdk?: Client;
1687
+ console?: boolean;
1688
+ }
1869
1689
 
1870
- /**
1871
- * @param {ProjectsListWebhooksRequestParams} params
1872
- */
1873
- const projectsListWebhooks = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1690
+ export const projectsListWebhooks = async ({projectId,total,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsListWebhooksRequestParams): Promise<any> => {
1874
1691
  let client = !sdk ? await sdkForConsole() :
1875
1692
  sdk;
1876
1693
  let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
@@ -1885,7 +1702,7 @@ const projectsListWebhooks = async ({projectId,total,parseOutput = true, overrid
1885
1702
  }, payload);
1886
1703
 
1887
1704
  if (parseOutput) {
1888
- if(console) {
1705
+ if(showConsole) {
1889
1706
  showConsoleLink('projects', 'listWebhooks', projectId);
1890
1707
  } else {
1891
1708
  parse(response)
@@ -1895,25 +1712,21 @@ const projectsListWebhooks = async ({projectId,total,parseOutput = true, overrid
1895
1712
  return response;
1896
1713
 
1897
1714
  }
1898
- /**
1899
- * @typedef {Object} ProjectsCreateWebhookRequestParams
1900
- * @property {string} projectId Project unique ID.
1901
- * @property {string} name Webhook name. Max length: 128 chars.
1902
- * @property {string[]} events Events list. Maximum of 100 events are allowed.
1903
- * @property {string} url Webhook URL.
1904
- * @property {boolean} security Certificate verification, false for disabled or true for enabled.
1905
- * @property {boolean} enabled Enable or disable a webhook.
1906
- * @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
1907
- * @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
1908
- * @property {boolean} overrideForCli
1909
- * @property {boolean} parseOutput
1910
- * @property {libClient | undefined} sdk
1911
- */
1912
-
1913
- /**
1914
- * @param {ProjectsCreateWebhookRequestParams} params
1915
- */
1916
- const projectsCreateWebhook = async ({projectId,name,events,url,security,enabled,httpUser,httpPass,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1715
+ interface ProjectsCreateWebhookRequestParams {
1716
+ projectId: string;
1717
+ name: string;
1718
+ events: string[];
1719
+ url: string;
1720
+ security: boolean;
1721
+ enabled?: boolean;
1722
+ httpUser?: string;
1723
+ httpPass?: string;
1724
+ overrideForCli?: boolean;
1725
+ parseOutput?: boolean;
1726
+ sdk?: Client;
1727
+ }
1728
+
1729
+ export const projectsCreateWebhook = async ({projectId,name,events,url,security,enabled,httpUser,httpPass,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsCreateWebhookRequestParams): Promise<any> => {
1917
1730
  let client = !sdk ? await sdkForConsole() :
1918
1731
  sdk;
1919
1732
  let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
@@ -1954,19 +1767,16 @@ const projectsCreateWebhook = async ({projectId,name,events,url,security,enabled
1954
1767
  return response;
1955
1768
 
1956
1769
  }
1957
- /**
1958
- * @typedef {Object} ProjectsGetWebhookRequestParams
1959
- * @property {string} projectId Project unique ID.
1960
- * @property {string} webhookId Webhook unique ID.
1961
- * @property {boolean} overrideForCli
1962
- * @property {boolean} parseOutput
1963
- * @property {libClient | undefined} sdk
1964
- */
1770
+ interface ProjectsGetWebhookRequestParams {
1771
+ projectId: string;
1772
+ webhookId: string;
1773
+ overrideForCli?: boolean;
1774
+ parseOutput?: boolean;
1775
+ sdk?: Client;
1776
+ console?: boolean;
1777
+ }
1965
1778
 
1966
- /**
1967
- * @param {ProjectsGetWebhookRequestParams} params
1968
- */
1969
- const projectsGetWebhook = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
1779
+ export const projectsGetWebhook = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: ProjectsGetWebhookRequestParams): Promise<any> => {
1970
1780
  let client = !sdk ? await sdkForConsole() :
1971
1781
  sdk;
1972
1782
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
@@ -1978,7 +1788,7 @@ const projectsGetWebhook = async ({projectId,webhookId,parseOutput = true, overr
1978
1788
  }, payload);
1979
1789
 
1980
1790
  if (parseOutput) {
1981
- if(console) {
1791
+ if(showConsole) {
1982
1792
  showConsoleLink('projects', 'getWebhook', projectId, webhookId);
1983
1793
  } else {
1984
1794
  parse(response)
@@ -1988,26 +1798,22 @@ const projectsGetWebhook = async ({projectId,webhookId,parseOutput = true, overr
1988
1798
  return response;
1989
1799
 
1990
1800
  }
1991
- /**
1992
- * @typedef {Object} ProjectsUpdateWebhookRequestParams
1993
- * @property {string} projectId Project unique ID.
1994
- * @property {string} webhookId Webhook unique ID.
1995
- * @property {string} name Webhook name. Max length: 128 chars.
1996
- * @property {string[]} events Events list. Maximum of 100 events are allowed.
1997
- * @property {string} url Webhook URL.
1998
- * @property {boolean} security Certificate verification, false for disabled or true for enabled.
1999
- * @property {boolean} enabled Enable or disable a webhook.
2000
- * @property {string} httpUser Webhook HTTP user. Max length: 256 chars.
2001
- * @property {string} httpPass Webhook HTTP password. Max length: 256 chars.
2002
- * @property {boolean} overrideForCli
2003
- * @property {boolean} parseOutput
2004
- * @property {libClient | undefined} sdk
2005
- */
2006
-
2007
- /**
2008
- * @param {ProjectsUpdateWebhookRequestParams} params
2009
- */
2010
- const projectsUpdateWebhook = async ({projectId,webhookId,name,events,url,security,enabled,httpUser,httpPass,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1801
+ interface ProjectsUpdateWebhookRequestParams {
1802
+ projectId: string;
1803
+ webhookId: string;
1804
+ name: string;
1805
+ events: string[];
1806
+ url: string;
1807
+ security: boolean;
1808
+ enabled?: boolean;
1809
+ httpUser?: string;
1810
+ httpPass?: string;
1811
+ overrideForCli?: boolean;
1812
+ parseOutput?: boolean;
1813
+ sdk?: Client;
1814
+ }
1815
+
1816
+ export const projectsUpdateWebhook = async ({projectId,webhookId,name,events,url,security,enabled,httpUser,httpPass,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateWebhookRequestParams): Promise<any> => {
2011
1817
  let client = !sdk ? await sdkForConsole() :
2012
1818
  sdk;
2013
1819
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
@@ -2048,19 +1854,15 @@ const projectsUpdateWebhook = async ({projectId,webhookId,name,events,url,securi
2048
1854
  return response;
2049
1855
 
2050
1856
  }
2051
- /**
2052
- * @typedef {Object} ProjectsDeleteWebhookRequestParams
2053
- * @property {string} projectId Project unique ID.
2054
- * @property {string} webhookId Webhook unique ID.
2055
- * @property {boolean} overrideForCli
2056
- * @property {boolean} parseOutput
2057
- * @property {libClient | undefined} sdk
2058
- */
1857
+ interface ProjectsDeleteWebhookRequestParams {
1858
+ projectId: string;
1859
+ webhookId: string;
1860
+ overrideForCli?: boolean;
1861
+ parseOutput?: boolean;
1862
+ sdk?: Client;
1863
+ }
2059
1864
 
2060
- /**
2061
- * @param {ProjectsDeleteWebhookRequestParams} params
2062
- */
2063
- const projectsDeleteWebhook = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1865
+ export const projectsDeleteWebhook = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsDeleteWebhookRequestParams): Promise<any> => {
2064
1866
  let client = !sdk ? await sdkForConsole() :
2065
1867
  sdk;
2066
1868
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
@@ -2079,19 +1881,15 @@ const projectsDeleteWebhook = async ({projectId,webhookId,parseOutput = true, ov
2079
1881
  return response;
2080
1882
 
2081
1883
  }
2082
- /**
2083
- * @typedef {Object} ProjectsUpdateWebhookSignatureRequestParams
2084
- * @property {string} projectId Project unique ID.
2085
- * @property {string} webhookId Webhook unique ID.
2086
- * @property {boolean} overrideForCli
2087
- * @property {boolean} parseOutput
2088
- * @property {libClient | undefined} sdk
2089
- */
1884
+ interface ProjectsUpdateWebhookSignatureRequestParams {
1885
+ projectId: string;
1886
+ webhookId: string;
1887
+ overrideForCli?: boolean;
1888
+ parseOutput?: boolean;
1889
+ sdk?: Client;
1890
+ }
2090
1891
 
2091
- /**
2092
- * @param {ProjectsUpdateWebhookSignatureRequestParams} params
2093
- */
2094
- const projectsUpdateWebhookSignature = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1892
+ export const projectsUpdateWebhookSignature = async ({projectId,webhookId,parseOutput = true, overrideForCli = false, sdk = undefined}: ProjectsUpdateWebhookSignatureRequestParams): Promise<any> => {
2095
1893
  let client = !sdk ? await sdkForConsole() :
2096
1894
  sdk;
2097
1895
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
@@ -2115,7 +1913,7 @@ projects
2115
1913
  .description(`Get a list of all projects. You can use the query params to filter your results. `)
2116
1914
  .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, teamId`)
2117
1915
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
2118
- .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))
1916
+ .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))
2119
1917
  .option(`--console`, `Get the resource console url`)
2120
1918
  .action(actionRunner(projectsList))
2121
1919
 
@@ -2171,14 +1969,14 @@ projects
2171
1969
  .description(`Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.`)
2172
1970
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2173
1971
  .requiredOption(`--api <api>`, `API name.`)
2174
- .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value))
1972
+ .requiredOption(`--status [value]`, `API status.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2175
1973
  .action(actionRunner(projectsUpdateAPIStatus))
2176
1974
 
2177
1975
  projects
2178
1976
  .command(`update-api-status-all`)
2179
1977
  .description(`Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.`)
2180
1978
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2181
- .requiredOption(`--status [value]`, `API status.`, (value) => value === undefined ? true : parseBool(value))
1979
+ .requiredOption(`--status [value]`, `API status.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2182
1980
  .action(actionRunner(projectsUpdateAPIStatusAll))
2183
1981
 
2184
1982
  projects
@@ -2206,9 +2004,9 @@ projects
2206
2004
  .command(`update-memberships-privacy`)
2207
2005
  .description(`Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status. `)
2208
2006
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2209
- .requiredOption(`--user-name [value]`, `Set to true to show userName to members of a team.`, (value) => value === undefined ? true : parseBool(value))
2210
- .requiredOption(`--user-email [value]`, `Set to true to show email to members of a team.`, (value) => value === undefined ? true : parseBool(value))
2211
- .requiredOption(`--mfa [value]`, `Set to true to show mfa to members of a team.`, (value) => value === undefined ? true : parseBool(value))
2007
+ .requiredOption(`--user-name [value]`, `Set to true to show userName to members of a team.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2008
+ .requiredOption(`--user-email [value]`, `Set to true to show email to members of a team.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2009
+ .requiredOption(`--mfa [value]`, `Set to true to show mfa to members of a team.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2212
2010
  .action(actionRunner(projectsUpdateMembershipsPrivacy))
2213
2011
 
2214
2012
  projects
@@ -2222,7 +2020,7 @@ projects
2222
2020
  .command(`update-auth-password-dictionary`)
2223
2021
  .description(`Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don't use common and insecure passwords. `)
2224
2022
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2225
- .requiredOption(`--enabled [value]`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, (value) => value === undefined ? true : parseBool(value))
2023
+ .requiredOption(`--enabled [value]`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2226
2024
  .action(actionRunner(projectsUpdateAuthPasswordDictionary))
2227
2025
 
2228
2026
  projects
@@ -2236,21 +2034,21 @@ projects
2236
2034
  .command(`update-personal-data-check`)
2237
2035
  .description(`Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords. `)
2238
2036
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2239
- .requiredOption(`--enabled [value]`, `Set whether or not to check a password for similarity with personal data. Default is false.`, (value) => value === undefined ? true : parseBool(value))
2037
+ .requiredOption(`--enabled [value]`, `Set whether or not to check a password for similarity with personal data. Default is false.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2240
2038
  .action(actionRunner(projectsUpdatePersonalDataCheck))
2241
2039
 
2242
2040
  projects
2243
2041
  .command(`update-session-alerts`)
2244
2042
  .description(`Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.`)
2245
2043
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2246
- .requiredOption(`--alerts [value]`, `Set to true to enable session emails.`, (value) => value === undefined ? true : parseBool(value))
2044
+ .requiredOption(`--alerts [value]`, `Set to true to enable session emails.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2247
2045
  .action(actionRunner(projectsUpdateSessionAlerts))
2248
2046
 
2249
2047
  projects
2250
2048
  .command(`update-session-invalidation`)
2251
2049
  .description(`Invalidate all existing sessions. An optional auth security setting for projects, and enabled by default for console project.`)
2252
2050
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2253
- .requiredOption(`--enabled [value]`, `Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`, (value) => value === undefined ? true : parseBool(value))
2051
+ .requiredOption(`--enabled [value]`, `Update authentication session invalidation status. Use this endpoint to enable or disable session invalidation on password change`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2254
2052
  .action(actionRunner(projectsUpdateSessionInvalidation))
2255
2053
 
2256
2054
  projects
@@ -2258,7 +2056,7 @@ projects
2258
2056
  .description(`Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project. `)
2259
2057
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2260
2058
  .requiredOption(`--method <method>`, `Auth Method. Possible values: email-password,magic-url,email-otp,anonymous,invites,jwt,phone`)
2261
- .requiredOption(`--status [value]`, `Set the status of this auth method.`, (value) => value === undefined ? true : parseBool(value))
2059
+ .requiredOption(`--status [value]`, `Set the status of this auth method.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2262
2060
  .action(actionRunner(projectsUpdateAuthStatus))
2263
2061
 
2264
2062
  projects
@@ -2313,7 +2111,7 @@ projects
2313
2111
  .command(`list-keys`)
2314
2112
  .description(`Get a list of all API keys from the current project. `)
2315
2113
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2316
- .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))
2114
+ .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))
2317
2115
  .option(`--console`, `Get the resource console url`)
2318
2116
  .action(actionRunner(projectsListKeys))
2319
2117
 
@@ -2358,14 +2156,14 @@ projects
2358
2156
  .requiredOption(`--provider <provider>`, `Provider Name`)
2359
2157
  .option(`--app-id <app-id>`, `Provider app ID. Max length: 256 chars.`)
2360
2158
  .option(`--secret <secret>`, `Provider secret key. Max length: 512 chars.`)
2361
- .option(`--enabled [value]`, `Provider status. Set to 'false' to disable new session creation.`, (value) => value === undefined ? true : parseBool(value))
2159
+ .option(`--enabled [value]`, `Provider status. Set to 'false' to disable new session creation.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2362
2160
  .action(actionRunner(projectsUpdateOAuth2))
2363
2161
 
2364
2162
  projects
2365
2163
  .command(`list-platforms`)
2366
2164
  .description(`Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations. `)
2367
2165
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2368
- .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))
2166
+ .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))
2369
2167
  .option(`--console`, `Get the resource console url`)
2370
2168
  .action(actionRunner(projectsListPlatforms))
2371
2169
 
@@ -2411,21 +2209,21 @@ projects
2411
2209
  .description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `)
2412
2210
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2413
2211
  .requiredOption(`--service <service>`, `Service name.`)
2414
- .requiredOption(`--status [value]`, `Service status.`, (value) => value === undefined ? true : parseBool(value))
2212
+ .requiredOption(`--status [value]`, `Service status.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2415
2213
  .action(actionRunner(projectsUpdateServiceStatus))
2416
2214
 
2417
2215
  projects
2418
2216
  .command(`update-service-status-all`)
2419
2217
  .description(`Update the status of all services. Use this endpoint to enable or disable all optional services at once. `)
2420
2218
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2421
- .requiredOption(`--status [value]`, `Service status.`, (value) => value === undefined ? true : parseBool(value))
2219
+ .requiredOption(`--status [value]`, `Service status.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2422
2220
  .action(actionRunner(projectsUpdateServiceStatusAll))
2423
2221
 
2424
2222
  projects
2425
2223
  .command(`update-smtp`)
2426
2224
  .description(`Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails. `)
2427
2225
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2428
- .requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value) => value === undefined ? true : parseBool(value))
2226
+ .requiredOption(`--enabled [value]`, `Enable custom SMTP service`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2429
2227
  .option(`--sender-name <sender-name>`, `Name of the email sender`)
2430
2228
  .option(`--sender-email <sender-email>`, `Email of the sender`)
2431
2229
  .option(`--reply-to <reply-to>`, `Reply to email`)
@@ -2516,7 +2314,7 @@ projects
2516
2314
  .command(`list-webhooks`)
2517
2315
  .description(`Get a list of all webhooks belonging to the project. You can use the query params to filter your results. `)
2518
2316
  .requiredOption(`--project-id <project-id>`, `Project unique ID.`)
2519
- .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))
2317
+ .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))
2520
2318
  .option(`--console`, `Get the resource console url`)
2521
2319
  .action(actionRunner(projectsListWebhooks))
2522
2320
 
@@ -2527,8 +2325,8 @@ projects
2527
2325
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
2528
2326
  .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
2529
2327
  .requiredOption(`--url <url>`, `Webhook URL.`)
2530
- .requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value) => value === undefined ? true : parseBool(value))
2531
- .option(`--enabled [value]`, `Enable or disable a webhook.`, (value) => value === undefined ? true : parseBool(value))
2328
+ .requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2329
+ .option(`--enabled [value]`, `Enable or disable a webhook.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2532
2330
  .option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
2533
2331
  .option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
2534
2332
  .action(actionRunner(projectsCreateWebhook))
@@ -2549,8 +2347,8 @@ projects
2549
2347
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
2550
2348
  .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
2551
2349
  .requiredOption(`--url <url>`, `Webhook URL.`)
2552
- .requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value) => value === undefined ? true : parseBool(value))
2553
- .option(`--enabled [value]`, `Enable or disable a webhook.`, (value) => value === undefined ? true : parseBool(value))
2350
+ .requiredOption(`--security [value]`, `Certificate verification, false for disabled or true for enabled.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2351
+ .option(`--enabled [value]`, `Enable or disable a webhook.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2554
2352
  .option(`--http-user <http-user>`, `Webhook HTTP user. Max length: 256 chars.`)
2555
2353
  .option(`--http-pass <http-pass>`, `Webhook HTTP password. Max length: 256 chars.`)
2556
2354
  .action(actionRunner(projectsUpdateWebhook))
@@ -2569,58 +2367,4 @@ projects
2569
2367
  .requiredOption(`--webhook-id <webhook-id>`, `Webhook unique ID.`)
2570
2368
  .action(actionRunner(projectsUpdateWebhookSignature))
2571
2369
 
2572
- module.exports = {
2573
- projects,
2574
- projectsList,
2575
- projectsCreate,
2576
- projectsGet,
2577
- projectsUpdate,
2578
- projectsDelete,
2579
- projectsUpdateAPIStatus,
2580
- projectsUpdateAPIStatusAll,
2581
- projectsUpdateAuthDuration,
2582
- projectsUpdateAuthLimit,
2583
- projectsUpdateAuthSessionsLimit,
2584
- projectsUpdateMembershipsPrivacy,
2585
- projectsUpdateMockNumbers,
2586
- projectsUpdateAuthPasswordDictionary,
2587
- projectsUpdateAuthPasswordHistory,
2588
- projectsUpdatePersonalDataCheck,
2589
- projectsUpdateSessionAlerts,
2590
- projectsUpdateSessionInvalidation,
2591
- projectsUpdateAuthStatus,
2592
- projectsListDevKeys,
2593
- projectsCreateDevKey,
2594
- projectsGetDevKey,
2595
- projectsUpdateDevKey,
2596
- projectsDeleteDevKey,
2597
- projectsCreateJWT,
2598
- projectsListKeys,
2599
- projectsCreateKey,
2600
- projectsGetKey,
2601
- projectsUpdateKey,
2602
- projectsDeleteKey,
2603
- projectsUpdateOAuth2,
2604
- projectsListPlatforms,
2605
- projectsCreatePlatform,
2606
- projectsGetPlatform,
2607
- projectsUpdatePlatform,
2608
- projectsDeletePlatform,
2609
- projectsUpdateServiceStatus,
2610
- projectsUpdateServiceStatusAll,
2611
- projectsUpdateSMTP,
2612
- projectsCreateSMTPTest,
2613
- projectsUpdateTeam,
2614
- projectsGetEmailTemplate,
2615
- projectsUpdateEmailTemplate,
2616
- projectsDeleteEmailTemplate,
2617
- projectsGetSMSTemplate,
2618
- projectsUpdateSMSTemplate,
2619
- projectsDeleteSMSTemplate,
2620
- projectsListWebhooks,
2621
- projectsCreateWebhook,
2622
- projectsGetWebhook,
2623
- projectsUpdateWebhook,
2624
- projectsDeleteWebhook,
2625
- projectsUpdateWebhookSignature
2626
- };
2370
+