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,21 +31,18 @@ function convertReadStreamToReadableStream(readStream) {
35
31
  });
36
32
  }
37
33
 
38
- const account = new Command("account").description(commandDescriptions['account'] ?? '').configureHelp({
34
+ export const account = new Command("account").description(commandDescriptions['account'] ?? '').configureHelp({
39
35
  helpWidth: process.stdout.columns || 80
40
36
  })
41
37
 
42
- /**
43
- * @typedef {Object} AccountGetRequestParams
44
- * @property {boolean} overrideForCli
45
- * @property {boolean} parseOutput
46
- * @property {libClient | undefined} sdk
47
- */
48
-
49
- /**
50
- * @param {AccountGetRequestParams} params
51
- */
52
- const accountGet = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
38
+ interface AccountGetRequestParams {
39
+ overrideForCli?: boolean;
40
+ parseOutput?: boolean;
41
+ sdk?: Client;
42
+ console?: boolean;
43
+ }
44
+
45
+ export const accountGet = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: AccountGetRequestParams): Promise<any> => {
53
46
  let client = !sdk ? await sdkForProject() :
54
47
  sdk;
55
48
  let apiPath = '/account';
@@ -61,7 +54,7 @@ const accountGet = async ({parseOutput = true, overrideForCli = false, sdk = und
61
54
  }, payload);
62
55
 
63
56
  if (parseOutput) {
64
- if(console) {
57
+ if(showConsole) {
65
58
  showConsoleLink('account', 'get');
66
59
  } else {
67
60
  parse(response)
@@ -71,21 +64,17 @@ const accountGet = async ({parseOutput = true, overrideForCli = false, sdk = und
71
64
  return response;
72
65
 
73
66
  }
74
- /**
75
- * @typedef {Object} AccountCreateRequestParams
76
- * @property {string} userId User ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
77
- * @property {string} email User email.
78
- * @property {string} password New user password. Must be between 8 and 256 chars.
79
- * @property {string} name User name. Max length: 128 chars.
80
- * @property {boolean} overrideForCli
81
- * @property {boolean} parseOutput
82
- * @property {libClient | undefined} sdk
83
- */
84
-
85
- /**
86
- * @param {AccountCreateRequestParams} params
87
- */
88
- const accountCreate = async ({userId,email,password,name,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
67
+ interface AccountCreateRequestParams {
68
+ userId: string;
69
+ email: string;
70
+ password: string;
71
+ name?: string;
72
+ overrideForCli?: boolean;
73
+ parseOutput?: boolean;
74
+ sdk?: Client;
75
+ }
76
+
77
+ export const accountCreate = async ({userId,email,password,name,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateRequestParams): Promise<any> => {
89
78
  let client = !sdk ? await sdkForProject() :
90
79
  sdk;
91
80
  let apiPath = '/account';
@@ -116,17 +105,13 @@ const accountCreate = async ({userId,email,password,name,parseOutput = true, ove
116
105
  return response;
117
106
 
118
107
  }
119
- /**
120
- * @typedef {Object} AccountDeleteRequestParams
121
- * @property {boolean} overrideForCli
122
- * @property {boolean} parseOutput
123
- * @property {libClient | undefined} sdk
124
- */
108
+ interface AccountDeleteRequestParams {
109
+ overrideForCli?: boolean;
110
+ parseOutput?: boolean;
111
+ sdk?: Client;
112
+ }
125
113
 
126
- /**
127
- * @param {AccountDeleteRequestParams} params
128
- */
129
- const accountDelete = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
114
+ export const accountDelete = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountDeleteRequestParams): Promise<any> => {
130
115
  let client = !sdk ? await sdkForProject() :
131
116
  sdk;
132
117
  let apiPath = '/account';
@@ -145,19 +130,15 @@ const accountDelete = async ({parseOutput = true, overrideForCli = false, sdk =
145
130
  return response;
146
131
 
147
132
  }
148
- /**
149
- * @typedef {Object} AccountUpdateEmailRequestParams
150
- * @property {string} email User email.
151
- * @property {string} password User password. Must be at least 8 chars.
152
- * @property {boolean} overrideForCli
153
- * @property {boolean} parseOutput
154
- * @property {libClient | undefined} sdk
155
- */
133
+ interface AccountUpdateEmailRequestParams {
134
+ email: string;
135
+ password: string;
136
+ overrideForCli?: boolean;
137
+ parseOutput?: boolean;
138
+ sdk?: Client;
139
+ }
156
140
 
157
- /**
158
- * @param {AccountUpdateEmailRequestParams} params
159
- */
160
- const accountUpdateEmail = async ({email,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
141
+ export const accountUpdateEmail = async ({email,password,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateEmailRequestParams): Promise<any> => {
161
142
  let client = !sdk ? await sdkForProject() :
162
143
  sdk;
163
144
  let apiPath = '/account/email';
@@ -182,19 +163,15 @@ const accountUpdateEmail = async ({email,password,parseOutput = true, overrideFo
182
163
  return response;
183
164
 
184
165
  }
185
- /**
186
- * @typedef {Object} AccountListIdentitiesRequestParams
187
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
188
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
189
- * @property {boolean} overrideForCli
190
- * @property {boolean} parseOutput
191
- * @property {libClient | undefined} sdk
192
- */
166
+ interface AccountListIdentitiesRequestParams {
167
+ queries?: string[];
168
+ total?: boolean;
169
+ overrideForCli?: boolean;
170
+ parseOutput?: boolean;
171
+ sdk?: Client;
172
+ }
193
173
 
194
- /**
195
- * @param {AccountListIdentitiesRequestParams} params
196
- */
197
- const accountListIdentities = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
174
+ export const accountListIdentities = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountListIdentitiesRequestParams): Promise<any> => {
198
175
  let client = !sdk ? await sdkForProject() :
199
176
  sdk;
200
177
  let apiPath = '/account/identities';
@@ -218,18 +195,14 @@ const accountListIdentities = async ({queries,total,parseOutput = true, override
218
195
  return response;
219
196
 
220
197
  }
221
- /**
222
- * @typedef {Object} AccountDeleteIdentityRequestParams
223
- * @property {string} identityId Identity ID.
224
- * @property {boolean} overrideForCli
225
- * @property {boolean} parseOutput
226
- * @property {libClient | undefined} sdk
227
- */
198
+ interface AccountDeleteIdentityRequestParams {
199
+ identityId: string;
200
+ overrideForCli?: boolean;
201
+ parseOutput?: boolean;
202
+ sdk?: Client;
203
+ }
228
204
 
229
- /**
230
- * @param {AccountDeleteIdentityRequestParams} params
231
- */
232
- const accountDeleteIdentity = async ({identityId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
205
+ export const accountDeleteIdentity = async ({identityId,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountDeleteIdentityRequestParams): Promise<any> => {
233
206
  let client = !sdk ? await sdkForProject() :
234
207
  sdk;
235
208
  let apiPath = '/account/identities/{identityId}'.replace('{identityId}', identityId);
@@ -248,17 +221,13 @@ const accountDeleteIdentity = async ({identityId,parseOutput = true, overrideFor
248
221
  return response;
249
222
 
250
223
  }
251
- /**
252
- * @typedef {Object} AccountCreateJWTRequestParams
253
- * @property {boolean} overrideForCli
254
- * @property {boolean} parseOutput
255
- * @property {libClient | undefined} sdk
256
- */
224
+ interface AccountCreateJWTRequestParams {
225
+ overrideForCli?: boolean;
226
+ parseOutput?: boolean;
227
+ sdk?: Client;
228
+ }
257
229
 
258
- /**
259
- * @param {AccountCreateJWTRequestParams} params
260
- */
261
- const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
230
+ export const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateJWTRequestParams): Promise<any> => {
262
231
  let client = !sdk ? await sdkForProject() :
263
232
  sdk;
264
233
  let apiPath = '/account/jwts';
@@ -277,19 +246,15 @@ const accountCreateJWT = async ({parseOutput = true, overrideForCli = false, sdk
277
246
  return response;
278
247
 
279
248
  }
280
- /**
281
- * @typedef {Object} AccountListLogsRequestParams
282
- * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
283
- * @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
284
- * @property {boolean} overrideForCli
285
- * @property {boolean} parseOutput
286
- * @property {libClient | undefined} sdk
287
- */
249
+ interface AccountListLogsRequestParams {
250
+ queries?: string[];
251
+ total?: boolean;
252
+ overrideForCli?: boolean;
253
+ parseOutput?: boolean;
254
+ sdk?: Client;
255
+ }
288
256
 
289
- /**
290
- * @param {AccountListLogsRequestParams} params
291
- */
292
- const accountListLogs = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
257
+ export const accountListLogs = async ({queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountListLogsRequestParams): Promise<any> => {
293
258
  let client = !sdk ? await sdkForProject() :
294
259
  sdk;
295
260
  let apiPath = '/account/logs';
@@ -313,18 +278,14 @@ const accountListLogs = async ({queries,total,parseOutput = true, overrideForCli
313
278
  return response;
314
279
 
315
280
  }
316
- /**
317
- * @typedef {Object} AccountUpdateMFARequestParams
318
- * @property {boolean} mfa Enable or disable MFA.
319
- * @property {boolean} overrideForCli
320
- * @property {boolean} parseOutput
321
- * @property {libClient | undefined} sdk
322
- */
281
+ interface AccountUpdateMFARequestParams {
282
+ mfa: boolean;
283
+ overrideForCli?: boolean;
284
+ parseOutput?: boolean;
285
+ sdk?: Client;
286
+ }
323
287
 
324
- /**
325
- * @param {AccountUpdateMFARequestParams} params
326
- */
327
- const accountUpdateMFA = async ({mfa,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
288
+ export const accountUpdateMFA = async ({mfa,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateMFARequestParams): Promise<any> => {
328
289
  let client = !sdk ? await sdkForProject() :
329
290
  sdk;
330
291
  let apiPath = '/account/mfa';
@@ -346,18 +307,14 @@ const accountUpdateMFA = async ({mfa,parseOutput = true, overrideForCli = false,
346
307
  return response;
347
308
 
348
309
  }
349
- /**
350
- * @typedef {Object} AccountCreateMFAAuthenticatorRequestParams
351
- * @property {AuthenticatorType} type Type of authenticator. Must be &#039;totp&#039;
352
- * @property {boolean} overrideForCli
353
- * @property {boolean} parseOutput
354
- * @property {libClient | undefined} sdk
355
- */
310
+ interface AccountCreateMFAAuthenticatorRequestParams {
311
+ type: AuthenticatorType;
312
+ overrideForCli?: boolean;
313
+ parseOutput?: boolean;
314
+ sdk?: Client;
315
+ }
356
316
 
357
- /**
358
- * @param {AccountCreateMFAAuthenticatorRequestParams} params
359
- */
360
- const accountCreateMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
317
+ export const accountCreateMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateMFAAuthenticatorRequestParams): Promise<any> => {
361
318
  let client = !sdk ? await sdkForProject() :
362
319
  sdk;
363
320
  let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
@@ -376,19 +333,15 @@ const accountCreateMFAAuthenticator = async ({type,parseOutput = true, overrideF
376
333
  return response;
377
334
 
378
335
  }
379
- /**
380
- * @typedef {Object} AccountUpdateMFAAuthenticatorRequestParams
381
- * @property {AuthenticatorType} type Type of authenticator.
382
- * @property {string} otp Valid verification token.
383
- * @property {boolean} overrideForCli
384
- * @property {boolean} parseOutput
385
- * @property {libClient | undefined} sdk
386
- */
336
+ interface AccountUpdateMFAAuthenticatorRequestParams {
337
+ type: AuthenticatorType;
338
+ otp: string;
339
+ overrideForCli?: boolean;
340
+ parseOutput?: boolean;
341
+ sdk?: Client;
342
+ }
387
343
 
388
- /**
389
- * @param {AccountUpdateMFAAuthenticatorRequestParams} params
390
- */
391
- const accountUpdateMFAAuthenticator = async ({type,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
344
+ export const accountUpdateMFAAuthenticator = async ({type,otp,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateMFAAuthenticatorRequestParams): Promise<any> => {
392
345
  let client = !sdk ? await sdkForProject() :
393
346
  sdk;
394
347
  let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
@@ -410,18 +363,14 @@ const accountUpdateMFAAuthenticator = async ({type,otp,parseOutput = true, overr
410
363
  return response;
411
364
 
412
365
  }
413
- /**
414
- * @typedef {Object} AccountDeleteMFAAuthenticatorRequestParams
415
- * @property {AuthenticatorType} type Type of authenticator.
416
- * @property {boolean} overrideForCli
417
- * @property {boolean} parseOutput
418
- * @property {libClient | undefined} sdk
419
- */
366
+ interface AccountDeleteMFAAuthenticatorRequestParams {
367
+ type: AuthenticatorType;
368
+ overrideForCli?: boolean;
369
+ parseOutput?: boolean;
370
+ sdk?: Client;
371
+ }
420
372
 
421
- /**
422
- * @param {AccountDeleteMFAAuthenticatorRequestParams} params
423
- */
424
- const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
373
+ export const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountDeleteMFAAuthenticatorRequestParams): Promise<any> => {
425
374
  let client = !sdk ? await sdkForProject() :
426
375
  sdk;
427
376
  let apiPath = '/account/mfa/authenticators/{type}'.replace('{type}', type);
@@ -440,18 +389,14 @@ const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideF
440
389
  return response;
441
390
 
442
391
  }
443
- /**
444
- * @typedef {Object} AccountCreateMFAChallengeRequestParams
445
- * @property {AuthenticationFactor} factor Factor used for verification. Must be one of following: &#039;email&#039;, &#039;phone&#039;, &#039;totp&#039;, &#039;recoveryCode&#039;.
446
- * @property {boolean} overrideForCli
447
- * @property {boolean} parseOutput
448
- * @property {libClient | undefined} sdk
449
- */
392
+ interface AccountCreateMFAChallengeRequestParams {
393
+ factor: AuthenticationFactor;
394
+ overrideForCli?: boolean;
395
+ parseOutput?: boolean;
396
+ sdk?: Client;
397
+ }
450
398
 
451
- /**
452
- * @param {AccountCreateMFAChallengeRequestParams} params
453
- */
454
- const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
399
+ export const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateMFAChallengeRequestParams): Promise<any> => {
455
400
  let client = !sdk ? await sdkForProject() :
456
401
  sdk;
457
402
  let apiPath = '/account/mfa/challenges';
@@ -473,19 +418,15 @@ const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideFor
473
418
  return response;
474
419
 
475
420
  }
476
- /**
477
- * @typedef {Object} AccountUpdateMFAChallengeRequestParams
478
- * @property {string} challengeId ID of the challenge.
479
- * @property {string} otp Valid verification token.
480
- * @property {boolean} overrideForCli
481
- * @property {boolean} parseOutput
482
- * @property {libClient | undefined} sdk
483
- */
421
+ interface AccountUpdateMFAChallengeRequestParams {
422
+ challengeId: string;
423
+ otp: string;
424
+ overrideForCli?: boolean;
425
+ parseOutput?: boolean;
426
+ sdk?: Client;
427
+ }
484
428
 
485
- /**
486
- * @param {AccountUpdateMFAChallengeRequestParams} params
487
- */
488
- const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
429
+ export const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateMFAChallengeRequestParams): Promise<any> => {
489
430
  let client = !sdk ? await sdkForProject() :
490
431
  sdk;
491
432
  let apiPath = '/account/mfa/challenges';
@@ -510,17 +451,13 @@ const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, ov
510
451
  return response;
511
452
 
512
453
  }
513
- /**
514
- * @typedef {Object} AccountListMFAFactorsRequestParams
515
- * @property {boolean} overrideForCli
516
- * @property {boolean} parseOutput
517
- * @property {libClient | undefined} sdk
518
- */
454
+ interface AccountListMFAFactorsRequestParams {
455
+ overrideForCli?: boolean;
456
+ parseOutput?: boolean;
457
+ sdk?: Client;
458
+ }
519
459
 
520
- /**
521
- * @param {AccountListMFAFactorsRequestParams} params
522
- */
523
- const accountListMFAFactors = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
460
+ export const accountListMFAFactors = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountListMFAFactorsRequestParams): Promise<any> => {
524
461
  let client = !sdk ? await sdkForProject() :
525
462
  sdk;
526
463
  let apiPath = '/account/mfa/factors';
@@ -538,17 +475,13 @@ const accountListMFAFactors = async ({parseOutput = true, overrideForCli = false
538
475
  return response;
539
476
 
540
477
  }
541
- /**
542
- * @typedef {Object} AccountGetMFARecoveryCodesRequestParams
543
- * @property {boolean} overrideForCli
544
- * @property {boolean} parseOutput
545
- * @property {libClient | undefined} sdk
546
- */
478
+ interface AccountGetMFARecoveryCodesRequestParams {
479
+ overrideForCli?: boolean;
480
+ parseOutput?: boolean;
481
+ sdk?: Client;
482
+ }
547
483
 
548
- /**
549
- * @param {AccountGetMFARecoveryCodesRequestParams} params
550
- */
551
- const accountGetMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
484
+ export const accountGetMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountGetMFARecoveryCodesRequestParams): Promise<any> => {
552
485
  let client = !sdk ? await sdkForProject() :
553
486
  sdk;
554
487
  let apiPath = '/account/mfa/recovery-codes';
@@ -566,17 +499,13 @@ const accountGetMFARecoveryCodes = async ({parseOutput = true, overrideForCli =
566
499
  return response;
567
500
 
568
501
  }
569
- /**
570
- * @typedef {Object} AccountCreateMFARecoveryCodesRequestParams
571
- * @property {boolean} overrideForCli
572
- * @property {boolean} parseOutput
573
- * @property {libClient | undefined} sdk
574
- */
502
+ interface AccountCreateMFARecoveryCodesRequestParams {
503
+ overrideForCli?: boolean;
504
+ parseOutput?: boolean;
505
+ sdk?: Client;
506
+ }
575
507
 
576
- /**
577
- * @param {AccountCreateMFARecoveryCodesRequestParams} params
578
- */
579
- const accountCreateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
508
+ export const accountCreateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateMFARecoveryCodesRequestParams): Promise<any> => {
580
509
  let client = !sdk ? await sdkForProject() :
581
510
  sdk;
582
511
  let apiPath = '/account/mfa/recovery-codes';
@@ -595,17 +524,13 @@ const accountCreateMFARecoveryCodes = async ({parseOutput = true, overrideForCli
595
524
  return response;
596
525
 
597
526
  }
598
- /**
599
- * @typedef {Object} AccountUpdateMFARecoveryCodesRequestParams
600
- * @property {boolean} overrideForCli
601
- * @property {boolean} parseOutput
602
- * @property {libClient | undefined} sdk
603
- */
527
+ interface AccountUpdateMFARecoveryCodesRequestParams {
528
+ overrideForCli?: boolean;
529
+ parseOutput?: boolean;
530
+ sdk?: Client;
531
+ }
604
532
 
605
- /**
606
- * @param {AccountUpdateMFARecoveryCodesRequestParams} params
607
- */
608
- const accountUpdateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
533
+ export const accountUpdateMFARecoveryCodes = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateMFARecoveryCodesRequestParams): Promise<any> => {
609
534
  let client = !sdk ? await sdkForProject() :
610
535
  sdk;
611
536
  let apiPath = '/account/mfa/recovery-codes';
@@ -624,18 +549,14 @@ const accountUpdateMFARecoveryCodes = async ({parseOutput = true, overrideForCli
624
549
  return response;
625
550
 
626
551
  }
627
- /**
628
- * @typedef {Object} AccountUpdateNameRequestParams
629
- * @property {string} name User name. Max length: 128 chars.
630
- * @property {boolean} overrideForCli
631
- * @property {boolean} parseOutput
632
- * @property {libClient | undefined} sdk
633
- */
552
+ interface AccountUpdateNameRequestParams {
553
+ name: string;
554
+ overrideForCli?: boolean;
555
+ parseOutput?: boolean;
556
+ sdk?: Client;
557
+ }
634
558
 
635
- /**
636
- * @param {AccountUpdateNameRequestParams} params
637
- */
638
- const accountUpdateName = async ({name,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
559
+ export const accountUpdateName = async ({name,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateNameRequestParams): Promise<any> => {
639
560
  let client = !sdk ? await sdkForProject() :
640
561
  sdk;
641
562
  let apiPath = '/account/name';
@@ -657,19 +578,15 @@ const accountUpdateName = async ({name,parseOutput = true, overrideForCli = fals
657
578
  return response;
658
579
 
659
580
  }
660
- /**
661
- * @typedef {Object} AccountUpdatePasswordRequestParams
662
- * @property {string} password New user password. Must be at least 8 chars.
663
- * @property {string} oldPassword Current user password. Must be at least 8 chars.
664
- * @property {boolean} overrideForCli
665
- * @property {boolean} parseOutput
666
- * @property {libClient | undefined} sdk
667
- */
581
+ interface AccountUpdatePasswordRequestParams {
582
+ password: string;
583
+ oldPassword?: string;
584
+ overrideForCli?: boolean;
585
+ parseOutput?: boolean;
586
+ sdk?: Client;
587
+ }
668
588
 
669
- /**
670
- * @param {AccountUpdatePasswordRequestParams} params
671
- */
672
- const accountUpdatePassword = async ({password,oldPassword,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
589
+ export const accountUpdatePassword = async ({password,oldPassword,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdatePasswordRequestParams): Promise<any> => {
673
590
  let client = !sdk ? await sdkForProject() :
674
591
  sdk;
675
592
  let apiPath = '/account/password';
@@ -694,19 +611,15 @@ const accountUpdatePassword = async ({password,oldPassword,parseOutput = true, o
694
611
  return response;
695
612
 
696
613
  }
697
- /**
698
- * @typedef {Object} AccountUpdatePhoneRequestParams
699
- * @property {string} phone Phone number. Format this number with a leading &#039;+&#039; and a country code, e.g., +16175551212.
700
- * @property {string} password User password. Must be at least 8 chars.
701
- * @property {boolean} overrideForCli
702
- * @property {boolean} parseOutput
703
- * @property {libClient | undefined} sdk
704
- */
614
+ interface AccountUpdatePhoneRequestParams {
615
+ phone: string;
616
+ password: string;
617
+ overrideForCli?: boolean;
618
+ parseOutput?: boolean;
619
+ sdk?: Client;
620
+ }
705
621
 
706
- /**
707
- * @param {AccountUpdatePhoneRequestParams} params
708
- */
709
- const accountUpdatePhone = async ({phone,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
622
+ export const accountUpdatePhone = async ({phone,password,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdatePhoneRequestParams): Promise<any> => {
710
623
  let client = !sdk ? await sdkForProject() :
711
624
  sdk;
712
625
  let apiPath = '/account/phone';
@@ -731,17 +644,13 @@ const accountUpdatePhone = async ({phone,password,parseOutput = true, overrideFo
731
644
  return response;
732
645
 
733
646
  }
734
- /**
735
- * @typedef {Object} AccountGetPrefsRequestParams
736
- * @property {boolean} overrideForCli
737
- * @property {boolean} parseOutput
738
- * @property {libClient | undefined} sdk
739
- */
647
+ interface AccountGetPrefsRequestParams {
648
+ overrideForCli?: boolean;
649
+ parseOutput?: boolean;
650
+ sdk?: Client;
651
+ }
740
652
 
741
- /**
742
- * @param {AccountGetPrefsRequestParams} params
743
- */
744
- const accountGetPrefs = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
653
+ export const accountGetPrefs = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountGetPrefsRequestParams): Promise<any> => {
745
654
  let client = !sdk ? await sdkForProject() :
746
655
  sdk;
747
656
  let apiPath = '/account/prefs';
@@ -759,18 +668,14 @@ const accountGetPrefs = async ({parseOutput = true, overrideForCli = false, sdk
759
668
  return response;
760
669
 
761
670
  }
762
- /**
763
- * @typedef {Object} AccountUpdatePrefsRequestParams
764
- * @property {object} prefs Prefs key-value JSON object.
765
- * @property {boolean} overrideForCli
766
- * @property {boolean} parseOutput
767
- * @property {libClient | undefined} sdk
768
- */
671
+ interface AccountUpdatePrefsRequestParams {
672
+ prefs: object;
673
+ overrideForCli?: boolean;
674
+ parseOutput?: boolean;
675
+ sdk?: Client;
676
+ }
769
677
 
770
- /**
771
- * @param {AccountUpdatePrefsRequestParams} params
772
- */
773
- const accountUpdatePrefs = async ({prefs,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
678
+ export const accountUpdatePrefs = async ({prefs,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdatePrefsRequestParams): Promise<any> => {
774
679
  let client = !sdk ? await sdkForProject() :
775
680
  sdk;
776
681
  let apiPath = '/account/prefs';
@@ -792,19 +697,15 @@ const accountUpdatePrefs = async ({prefs,parseOutput = true, overrideForCli = fa
792
697
  return response;
793
698
 
794
699
  }
795
- /**
796
- * @typedef {Object} AccountCreateRecoveryRequestParams
797
- * @property {string} email User email.
798
- * @property {string} url URL to redirect the user back to your app from the recovery email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
799
- * @property {boolean} overrideForCli
800
- * @property {boolean} parseOutput
801
- * @property {libClient | undefined} sdk
802
- */
700
+ interface AccountCreateRecoveryRequestParams {
701
+ email: string;
702
+ url: string;
703
+ overrideForCli?: boolean;
704
+ parseOutput?: boolean;
705
+ sdk?: Client;
706
+ }
803
707
 
804
- /**
805
- * @param {AccountCreateRecoveryRequestParams} params
806
- */
807
- const accountCreateRecovery = async ({email,url,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
708
+ export const accountCreateRecovery = async ({email,url,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateRecoveryRequestParams): Promise<any> => {
808
709
  let client = !sdk ? await sdkForProject() :
809
710
  sdk;
810
711
  let apiPath = '/account/recovery';
@@ -829,20 +730,16 @@ const accountCreateRecovery = async ({email,url,parseOutput = true, overrideForC
829
730
  return response;
830
731
 
831
732
  }
832
- /**
833
- * @typedef {Object} AccountUpdateRecoveryRequestParams
834
- * @property {string} userId User ID.
835
- * @property {string} secret Valid reset token.
836
- * @property {string} password New user password. Must be between 8 and 256 chars.
837
- * @property {boolean} overrideForCli
838
- * @property {boolean} parseOutput
839
- * @property {libClient | undefined} sdk
840
- */
841
-
842
- /**
843
- * @param {AccountUpdateRecoveryRequestParams} params
844
- */
845
- const accountUpdateRecovery = async ({userId,secret,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
733
+ interface AccountUpdateRecoveryRequestParams {
734
+ userId: string;
735
+ secret: string;
736
+ password: string;
737
+ overrideForCli?: boolean;
738
+ parseOutput?: boolean;
739
+ sdk?: Client;
740
+ }
741
+
742
+ export const accountUpdateRecovery = async ({userId,secret,password,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateRecoveryRequestParams): Promise<any> => {
846
743
  let client = !sdk ? await sdkForProject() :
847
744
  sdk;
848
745
  let apiPath = '/account/recovery';
@@ -870,17 +767,14 @@ const accountUpdateRecovery = async ({userId,secret,password,parseOutput = true,
870
767
  return response;
871
768
 
872
769
  }
873
- /**
874
- * @typedef {Object} AccountListSessionsRequestParams
875
- * @property {boolean} overrideForCli
876
- * @property {boolean} parseOutput
877
- * @property {libClient | undefined} sdk
878
- */
770
+ interface AccountListSessionsRequestParams {
771
+ overrideForCli?: boolean;
772
+ parseOutput?: boolean;
773
+ sdk?: Client;
774
+ console?: boolean;
775
+ }
879
776
 
880
- /**
881
- * @param {AccountListSessionsRequestParams} params
882
- */
883
- const accountListSessions = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
777
+ export const accountListSessions = async ({parseOutput = true, overrideForCli = false, sdk = undefined, console: showConsole}: AccountListSessionsRequestParams): Promise<any> => {
884
778
  let client = !sdk ? await sdkForProject() :
885
779
  sdk;
886
780
  let apiPath = '/account/sessions';
@@ -892,7 +786,7 @@ const accountListSessions = async ({parseOutput = true, overrideForCli = false,
892
786
  }, payload);
893
787
 
894
788
  if (parseOutput) {
895
- if(console) {
789
+ if(showConsole) {
896
790
  showConsoleLink('account', 'listSessions');
897
791
  } else {
898
792
  parse(response)
@@ -902,17 +796,13 @@ const accountListSessions = async ({parseOutput = true, overrideForCli = false,
902
796
  return response;
903
797
 
904
798
  }
905
- /**
906
- * @typedef {Object} AccountDeleteSessionsRequestParams
907
- * @property {boolean} overrideForCli
908
- * @property {boolean} parseOutput
909
- * @property {libClient | undefined} sdk
910
- */
799
+ interface AccountDeleteSessionsRequestParams {
800
+ overrideForCli?: boolean;
801
+ parseOutput?: boolean;
802
+ sdk?: Client;
803
+ }
911
804
 
912
- /**
913
- * @param {AccountDeleteSessionsRequestParams} params
914
- */
915
- const accountDeleteSessions = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
805
+ export const accountDeleteSessions = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountDeleteSessionsRequestParams): Promise<any> => {
916
806
  let client = !sdk ? await sdkForProject() :
917
807
  sdk;
918
808
  let apiPath = '/account/sessions';
@@ -931,17 +821,13 @@ const accountDeleteSessions = async ({parseOutput = true, overrideForCli = false
931
821
  return response;
932
822
 
933
823
  }
934
- /**
935
- * @typedef {Object} AccountCreateAnonymousSessionRequestParams
936
- * @property {boolean} overrideForCli
937
- * @property {boolean} parseOutput
938
- * @property {libClient | undefined} sdk
939
- */
824
+ interface AccountCreateAnonymousSessionRequestParams {
825
+ overrideForCli?: boolean;
826
+ parseOutput?: boolean;
827
+ sdk?: Client;
828
+ }
940
829
 
941
- /**
942
- * @param {AccountCreateAnonymousSessionRequestParams} params
943
- */
944
- const accountCreateAnonymousSession = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
830
+ export const accountCreateAnonymousSession = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateAnonymousSessionRequestParams): Promise<any> => {
945
831
  let client = !sdk ? await sdkForProject() :
946
832
  sdk;
947
833
  let apiPath = '/account/sessions/anonymous';
@@ -960,19 +846,15 @@ const accountCreateAnonymousSession = async ({parseOutput = true, overrideForCli
960
846
  return response;
961
847
 
962
848
  }
963
- /**
964
- * @typedef {Object} AccountCreateEmailPasswordSessionRequestParams
965
- * @property {string} email User email.
966
- * @property {string} password User password. Must be at least 8 chars.
967
- * @property {boolean} overrideForCli
968
- * @property {boolean} parseOutput
969
- * @property {libClient | undefined} sdk
970
- */
849
+ interface AccountCreateEmailPasswordSessionRequestParams {
850
+ email: string;
851
+ password: string;
852
+ overrideForCli?: boolean;
853
+ parseOutput?: boolean;
854
+ sdk?: Client;
855
+ }
971
856
 
972
- /**
973
- * @param {AccountCreateEmailPasswordSessionRequestParams} params
974
- */
975
- const accountCreateEmailPasswordSession = async ({email,password,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
857
+ export const accountCreateEmailPasswordSession = async ({email,password,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateEmailPasswordSessionRequestParams): Promise<any> => {
976
858
  let client = !sdk ? await sdkForProject() :
977
859
  sdk;
978
860
  let apiPath = '/account/sessions/email';
@@ -997,19 +879,15 @@ const accountCreateEmailPasswordSession = async ({email,password,parseOutput = t
997
879
  return response;
998
880
 
999
881
  }
1000
- /**
1001
- * @typedef {Object} AccountUpdateMagicURLSessionRequestParams
1002
- * @property {string} userId User ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1003
- * @property {string} secret Valid verification token.
1004
- * @property {boolean} overrideForCli
1005
- * @property {boolean} parseOutput
1006
- * @property {libClient | undefined} sdk
1007
- */
882
+ interface AccountUpdateMagicURLSessionRequestParams {
883
+ userId: string;
884
+ secret: string;
885
+ overrideForCli?: boolean;
886
+ parseOutput?: boolean;
887
+ sdk?: Client;
888
+ }
1008
889
 
1009
- /**
1010
- * @param {AccountUpdateMagicURLSessionRequestParams} params
1011
- */
1012
- const accountUpdateMagicURLSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
890
+ export const accountUpdateMagicURLSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateMagicURLSessionRequestParams): Promise<any> => {
1013
891
  let client = !sdk ? await sdkForProject() :
1014
892
  sdk;
1015
893
  let apiPath = '/account/sessions/magic-url';
@@ -1034,21 +912,17 @@ const accountUpdateMagicURLSession = async ({userId,secret,parseOutput = true, o
1034
912
  return response;
1035
913
 
1036
914
  }
1037
- /**
1038
- * @typedef {Object} AccountCreateOAuth2SessionRequestParams
1039
- * @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
1040
- * @property {string} success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project&#039;s platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1041
- * @property {string} failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project&#039;s platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1042
- * @property {string[]} scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
1043
- * @property {boolean} overrideForCli
1044
- * @property {boolean} parseOutput
1045
- * @property {libClient | undefined} sdk
1046
- */
1047
-
1048
- /**
1049
- * @param {AccountCreateOAuth2SessionRequestParams} params
1050
- */
1051
- const accountCreateOAuth2Session = async ({provider,success,failure,scopes,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
915
+ interface AccountCreateOAuth2SessionRequestParams {
916
+ provider: OAuthProvider;
917
+ success?: string;
918
+ failure?: string;
919
+ scopes?: string[];
920
+ overrideForCli?: boolean;
921
+ parseOutput?: boolean;
922
+ sdk?: Client;
923
+ }
924
+
925
+ export const accountCreateOAuth2Session = async ({provider,success,failure,scopes,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateOAuth2SessionRequestParams): Promise<any> => {
1052
926
  let client = !sdk ? await sdkForProject() :
1053
927
  sdk;
1054
928
  let apiPath = '/account/sessions/oauth2/{provider}'.replace('{provider}', provider);
@@ -1075,19 +949,15 @@ const accountCreateOAuth2Session = async ({provider,success,failure,scopes,parse
1075
949
  return response;
1076
950
 
1077
951
  }
1078
- /**
1079
- * @typedef {Object} AccountUpdatePhoneSessionRequestParams
1080
- * @property {string} userId User ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1081
- * @property {string} secret Valid verification token.
1082
- * @property {boolean} overrideForCli
1083
- * @property {boolean} parseOutput
1084
- * @property {libClient | undefined} sdk
1085
- */
952
+ interface AccountUpdatePhoneSessionRequestParams {
953
+ userId: string;
954
+ secret: string;
955
+ overrideForCli?: boolean;
956
+ parseOutput?: boolean;
957
+ sdk?: Client;
958
+ }
1086
959
 
1087
- /**
1088
- * @param {AccountUpdatePhoneSessionRequestParams} params
1089
- */
1090
- const accountUpdatePhoneSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
960
+ export const accountUpdatePhoneSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdatePhoneSessionRequestParams): Promise<any> => {
1091
961
  let client = !sdk ? await sdkForProject() :
1092
962
  sdk;
1093
963
  let apiPath = '/account/sessions/phone';
@@ -1112,19 +982,15 @@ const accountUpdatePhoneSession = async ({userId,secret,parseOutput = true, over
1112
982
  return response;
1113
983
 
1114
984
  }
1115
- /**
1116
- * @typedef {Object} AccountCreateSessionRequestParams
1117
- * @property {string} userId User ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1118
- * @property {string} secret Secret of a token generated by login methods. For example, the &#039;createMagicURLToken&#039; or &#039;createPhoneToken&#039; methods.
1119
- * @property {boolean} overrideForCli
1120
- * @property {boolean} parseOutput
1121
- * @property {libClient | undefined} sdk
1122
- */
985
+ interface AccountCreateSessionRequestParams {
986
+ userId: string;
987
+ secret: string;
988
+ overrideForCli?: boolean;
989
+ parseOutput?: boolean;
990
+ sdk?: Client;
991
+ }
1123
992
 
1124
- /**
1125
- * @param {AccountCreateSessionRequestParams} params
1126
- */
1127
- const accountCreateSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
993
+ export const accountCreateSession = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateSessionRequestParams): Promise<any> => {
1128
994
  let client = !sdk ? await sdkForProject() :
1129
995
  sdk;
1130
996
  let apiPath = '/account/sessions/token';
@@ -1149,18 +1015,14 @@ const accountCreateSession = async ({userId,secret,parseOutput = true, overrideF
1149
1015
  return response;
1150
1016
 
1151
1017
  }
1152
- /**
1153
- * @typedef {Object} AccountGetSessionRequestParams
1154
- * @property {string} sessionId Session ID. Use the string &#039;current&#039; to get the current device session.
1155
- * @property {boolean} overrideForCli
1156
- * @property {boolean} parseOutput
1157
- * @property {libClient | undefined} sdk
1158
- */
1018
+ interface AccountGetSessionRequestParams {
1019
+ sessionId: string;
1020
+ overrideForCli?: boolean;
1021
+ parseOutput?: boolean;
1022
+ sdk?: Client;
1023
+ }
1159
1024
 
1160
- /**
1161
- * @param {AccountGetSessionRequestParams} params
1162
- */
1163
- const accountGetSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1025
+ export const accountGetSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountGetSessionRequestParams): Promise<any> => {
1164
1026
  let client = !sdk ? await sdkForProject() :
1165
1027
  sdk;
1166
1028
  let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
@@ -1178,18 +1040,14 @@ const accountGetSession = async ({sessionId,parseOutput = true, overrideForCli =
1178
1040
  return response;
1179
1041
 
1180
1042
  }
1181
- /**
1182
- * @typedef {Object} AccountUpdateSessionRequestParams
1183
- * @property {string} sessionId Session ID. Use the string &#039;current&#039; to update the current device session.
1184
- * @property {boolean} overrideForCli
1185
- * @property {boolean} parseOutput
1186
- * @property {libClient | undefined} sdk
1187
- */
1043
+ interface AccountUpdateSessionRequestParams {
1044
+ sessionId: string;
1045
+ overrideForCli?: boolean;
1046
+ parseOutput?: boolean;
1047
+ sdk?: Client;
1048
+ }
1188
1049
 
1189
- /**
1190
- * @param {AccountUpdateSessionRequestParams} params
1191
- */
1192
- const accountUpdateSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1050
+ export const accountUpdateSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateSessionRequestParams): Promise<any> => {
1193
1051
  let client = !sdk ? await sdkForProject() :
1194
1052
  sdk;
1195
1053
  let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
@@ -1208,18 +1066,14 @@ const accountUpdateSession = async ({sessionId,parseOutput = true, overrideForCl
1208
1066
  return response;
1209
1067
 
1210
1068
  }
1211
- /**
1212
- * @typedef {Object} AccountDeleteSessionRequestParams
1213
- * @property {string} sessionId Session ID. Use the string &#039;current&#039; to delete the current device session.
1214
- * @property {boolean} overrideForCli
1215
- * @property {boolean} parseOutput
1216
- * @property {libClient | undefined} sdk
1217
- */
1069
+ interface AccountDeleteSessionRequestParams {
1070
+ sessionId: string;
1071
+ overrideForCli?: boolean;
1072
+ parseOutput?: boolean;
1073
+ sdk?: Client;
1074
+ }
1218
1075
 
1219
- /**
1220
- * @param {AccountDeleteSessionRequestParams} params
1221
- */
1222
- const accountDeleteSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1076
+ export const accountDeleteSession = async ({sessionId,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountDeleteSessionRequestParams): Promise<any> => {
1223
1077
  let client = !sdk ? await sdkForProject() :
1224
1078
  sdk;
1225
1079
  let apiPath = '/account/sessions/{sessionId}'.replace('{sessionId}', sessionId);
@@ -1238,17 +1092,13 @@ const accountDeleteSession = async ({sessionId,parseOutput = true, overrideForCl
1238
1092
  return response;
1239
1093
 
1240
1094
  }
1241
- /**
1242
- * @typedef {Object} AccountUpdateStatusRequestParams
1243
- * @property {boolean} overrideForCli
1244
- * @property {boolean} parseOutput
1245
- * @property {libClient | undefined} sdk
1246
- */
1095
+ interface AccountUpdateStatusRequestParams {
1096
+ overrideForCli?: boolean;
1097
+ parseOutput?: boolean;
1098
+ sdk?: Client;
1099
+ }
1247
1100
 
1248
- /**
1249
- * @param {AccountUpdateStatusRequestParams} params
1250
- */
1251
- const accountUpdateStatus = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1101
+ export const accountUpdateStatus = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateStatusRequestParams): Promise<any> => {
1252
1102
  let client = !sdk ? await sdkForProject() :
1253
1103
  sdk;
1254
1104
  let apiPath = '/account/status';
@@ -1267,20 +1117,16 @@ const accountUpdateStatus = async ({parseOutput = true, overrideForCli = false,
1267
1117
  return response;
1268
1118
 
1269
1119
  }
1270
- /**
1271
- * @typedef {Object} AccountCreatePushTargetRequestParams
1272
- * @property {string} targetId Target ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1273
- * @property {string} identifier The target identifier (token, email, phone etc.)
1274
- * @property {string} providerId Provider ID. Message will be sent to this target from the specified provider ID. If no provider ID is set the first setup provider will be used.
1275
- * @property {boolean} overrideForCli
1276
- * @property {boolean} parseOutput
1277
- * @property {libClient | undefined} sdk
1278
- */
1279
-
1280
- /**
1281
- * @param {AccountCreatePushTargetRequestParams} params
1282
- */
1283
- const accountCreatePushTarget = async ({targetId,identifier,providerId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1120
+ interface AccountCreatePushTargetRequestParams {
1121
+ targetId: string;
1122
+ identifier: string;
1123
+ providerId?: string;
1124
+ overrideForCli?: boolean;
1125
+ parseOutput?: boolean;
1126
+ sdk?: Client;
1127
+ }
1128
+
1129
+ export const accountCreatePushTarget = async ({targetId,identifier,providerId,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreatePushTargetRequestParams): Promise<any> => {
1284
1130
  let client = !sdk ? await sdkForProject() :
1285
1131
  sdk;
1286
1132
  let apiPath = '/account/targets/push';
@@ -1308,19 +1154,15 @@ const accountCreatePushTarget = async ({targetId,identifier,providerId,parseOutp
1308
1154
  return response;
1309
1155
 
1310
1156
  }
1311
- /**
1312
- * @typedef {Object} AccountUpdatePushTargetRequestParams
1313
- * @property {string} targetId Target ID.
1314
- * @property {string} identifier The target identifier (token, email, phone etc.)
1315
- * @property {boolean} overrideForCli
1316
- * @property {boolean} parseOutput
1317
- * @property {libClient | undefined} sdk
1318
- */
1157
+ interface AccountUpdatePushTargetRequestParams {
1158
+ targetId: string;
1159
+ identifier: string;
1160
+ overrideForCli?: boolean;
1161
+ parseOutput?: boolean;
1162
+ sdk?: Client;
1163
+ }
1319
1164
 
1320
- /**
1321
- * @param {AccountUpdatePushTargetRequestParams} params
1322
- */
1323
- const accountUpdatePushTarget = async ({targetId,identifier,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1165
+ export const accountUpdatePushTarget = async ({targetId,identifier,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdatePushTargetRequestParams): Promise<any> => {
1324
1166
  let client = !sdk ? await sdkForProject() :
1325
1167
  sdk;
1326
1168
  let apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
@@ -1342,18 +1184,14 @@ const accountUpdatePushTarget = async ({targetId,identifier,parseOutput = true,
1342
1184
  return response;
1343
1185
 
1344
1186
  }
1345
- /**
1346
- * @typedef {Object} AccountDeletePushTargetRequestParams
1347
- * @property {string} targetId Target ID.
1348
- * @property {boolean} overrideForCli
1349
- * @property {boolean} parseOutput
1350
- * @property {libClient | undefined} sdk
1351
- */
1187
+ interface AccountDeletePushTargetRequestParams {
1188
+ targetId: string;
1189
+ overrideForCli?: boolean;
1190
+ parseOutput?: boolean;
1191
+ sdk?: Client;
1192
+ }
1352
1193
 
1353
- /**
1354
- * @param {AccountDeletePushTargetRequestParams} params
1355
- */
1356
- const accountDeletePushTarget = async ({targetId,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1194
+ export const accountDeletePushTarget = async ({targetId,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountDeletePushTargetRequestParams): Promise<any> => {
1357
1195
  let client = !sdk ? await sdkForProject() :
1358
1196
  sdk;
1359
1197
  let apiPath = '/account/targets/{targetId}/push'.replace('{targetId}', targetId);
@@ -1372,20 +1210,16 @@ const accountDeletePushTarget = async ({targetId,parseOutput = true, overrideFor
1372
1210
  return response;
1373
1211
 
1374
1212
  }
1375
- /**
1376
- * @typedef {Object} AccountCreateEmailTokenRequestParams
1377
- * @property {string} userId User ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
1378
- * @property {string} email User email.
1379
- * @property {boolean} phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
1380
- * @property {boolean} overrideForCli
1381
- * @property {boolean} parseOutput
1382
- * @property {libClient | undefined} sdk
1383
- */
1384
-
1385
- /**
1386
- * @param {AccountCreateEmailTokenRequestParams} params
1387
- */
1388
- const accountCreateEmailToken = async ({userId,email,phrase,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1213
+ interface AccountCreateEmailTokenRequestParams {
1214
+ userId: string;
1215
+ email: string;
1216
+ phrase?: boolean;
1217
+ overrideForCli?: boolean;
1218
+ parseOutput?: boolean;
1219
+ sdk?: Client;
1220
+ }
1221
+
1222
+ export const accountCreateEmailToken = async ({userId,email,phrase,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateEmailTokenRequestParams): Promise<any> => {
1389
1223
  let client = !sdk ? await sdkForProject() :
1390
1224
  sdk;
1391
1225
  let apiPath = '/account/tokens/email';
@@ -1413,21 +1247,17 @@ const accountCreateEmailToken = async ({userId,email,phrase,parseOutput = true,
1413
1247
  return response;
1414
1248
 
1415
1249
  }
1416
- /**
1417
- * @typedef {Object} AccountCreateMagicURLTokenRequestParams
1418
- * @property {string} userId Unique Id. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
1419
- * @property {string} email User email.
1420
- * @property {string} url URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1421
- * @property {boolean} phrase Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
1422
- * @property {boolean} overrideForCli
1423
- * @property {boolean} parseOutput
1424
- * @property {libClient | undefined} sdk
1425
- */
1426
-
1427
- /**
1428
- * @param {AccountCreateMagicURLTokenRequestParams} params
1429
- */
1430
- const accountCreateMagicURLToken = async ({userId,email,url,phrase,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1250
+ interface AccountCreateMagicURLTokenRequestParams {
1251
+ userId: string;
1252
+ email: string;
1253
+ url?: string;
1254
+ phrase?: boolean;
1255
+ overrideForCli?: boolean;
1256
+ parseOutput?: boolean;
1257
+ sdk?: Client;
1258
+ }
1259
+
1260
+ export const accountCreateMagicURLToken = async ({userId,email,url,phrase,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateMagicURLTokenRequestParams): Promise<any> => {
1431
1261
  let client = !sdk ? await sdkForProject() :
1432
1262
  sdk;
1433
1263
  let apiPath = '/account/tokens/magic-url';
@@ -1458,21 +1288,17 @@ const accountCreateMagicURLToken = async ({userId,email,url,phrase,parseOutput =
1458
1288
  return response;
1459
1289
 
1460
1290
  }
1461
- /**
1462
- * @typedef {Object} AccountCreateOAuth2TokenRequestParams
1463
- * @property {OAuthProvider} provider OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.
1464
- * @property {string} success URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project&#039;s platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1465
- * @property {string} failure URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project&#039;s platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1466
- * @property {string[]} scopes A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.
1467
- * @property {boolean} overrideForCli
1468
- * @property {boolean} parseOutput
1469
- * @property {libClient | undefined} sdk
1470
- */
1471
-
1472
- /**
1473
- * @param {AccountCreateOAuth2TokenRequestParams} params
1474
- */
1475
- const accountCreateOAuth2Token = async ({provider,success,failure,scopes,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1291
+ interface AccountCreateOAuth2TokenRequestParams {
1292
+ provider: OAuthProvider;
1293
+ success?: string;
1294
+ failure?: string;
1295
+ scopes?: string[];
1296
+ overrideForCli?: boolean;
1297
+ parseOutput?: boolean;
1298
+ sdk?: Client;
1299
+ }
1300
+
1301
+ export const accountCreateOAuth2Token = async ({provider,success,failure,scopes,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateOAuth2TokenRequestParams): Promise<any> => {
1476
1302
  let client = !sdk ? await sdkForProject() :
1477
1303
  sdk;
1478
1304
  let apiPath = '/account/tokens/oauth2/{provider}'.replace('{provider}', provider);
@@ -1499,19 +1325,15 @@ const accountCreateOAuth2Token = async ({provider,success,failure,scopes,parseOu
1499
1325
  return response;
1500
1326
 
1501
1327
  }
1502
- /**
1503
- * @typedef {Object} AccountCreatePhoneTokenRequestParams
1504
- * @property {string} userId Unique Id. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
1505
- * @property {string} phone Phone number. Format this number with a leading &#039;+&#039; and a country code, e.g., +16175551212.
1506
- * @property {boolean} overrideForCli
1507
- * @property {boolean} parseOutput
1508
- * @property {libClient | undefined} sdk
1509
- */
1328
+ interface AccountCreatePhoneTokenRequestParams {
1329
+ userId: string;
1330
+ phone: string;
1331
+ overrideForCli?: boolean;
1332
+ parseOutput?: boolean;
1333
+ sdk?: Client;
1334
+ }
1510
1335
 
1511
- /**
1512
- * @param {AccountCreatePhoneTokenRequestParams} params
1513
- */
1514
- const accountCreatePhoneToken = async ({userId,phone,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1336
+ export const accountCreatePhoneToken = async ({userId,phone,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreatePhoneTokenRequestParams): Promise<any> => {
1515
1337
  let client = !sdk ? await sdkForProject() :
1516
1338
  sdk;
1517
1339
  let apiPath = '/account/tokens/phone';
@@ -1536,18 +1358,14 @@ const accountCreatePhoneToken = async ({userId,phone,parseOutput = true, overrid
1536
1358
  return response;
1537
1359
 
1538
1360
  }
1539
- /**
1540
- * @typedef {Object} AccountCreateEmailVerificationRequestParams
1541
- * @property {string} url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1542
- * @property {boolean} overrideForCli
1543
- * @property {boolean} parseOutput
1544
- * @property {libClient | undefined} sdk
1545
- */
1361
+ interface AccountCreateEmailVerificationRequestParams {
1362
+ url: string;
1363
+ overrideForCli?: boolean;
1364
+ parseOutput?: boolean;
1365
+ sdk?: Client;
1366
+ }
1546
1367
 
1547
- /**
1548
- * @param {AccountCreateEmailVerificationRequestParams} params
1549
- */
1550
- const accountCreateEmailVerification = async ({url,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1368
+ export const accountCreateEmailVerification = async ({url,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateEmailVerificationRequestParams): Promise<any> => {
1551
1369
  let client = !sdk ? await sdkForProject() :
1552
1370
  sdk;
1553
1371
  let apiPath = '/account/verifications/email';
@@ -1569,18 +1387,14 @@ const accountCreateEmailVerification = async ({url,parseOutput = true, overrideF
1569
1387
  return response;
1570
1388
 
1571
1389
  }
1572
- /**
1573
- * @typedef {Object} AccountCreateVerificationRequestParams
1574
- * @property {string} url URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.
1575
- * @property {boolean} overrideForCli
1576
- * @property {boolean} parseOutput
1577
- * @property {libClient | undefined} sdk
1578
- */
1390
+ interface AccountCreateVerificationRequestParams {
1391
+ url: string;
1392
+ overrideForCli?: boolean;
1393
+ parseOutput?: boolean;
1394
+ sdk?: Client;
1395
+ }
1579
1396
 
1580
- /**
1581
- * @param {AccountCreateVerificationRequestParams} params
1582
- */
1583
- const accountCreateVerification = async ({url,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1397
+ export const accountCreateVerification = async ({url,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreateVerificationRequestParams): Promise<any> => {
1584
1398
  let client = !sdk ? await sdkForProject() :
1585
1399
  sdk;
1586
1400
  let apiPath = '/account/verifications/email';
@@ -1602,19 +1416,15 @@ const accountCreateVerification = async ({url,parseOutput = true, overrideForCli
1602
1416
  return response;
1603
1417
 
1604
1418
  }
1605
- /**
1606
- * @typedef {Object} AccountUpdateEmailVerificationRequestParams
1607
- * @property {string} userId User ID.
1608
- * @property {string} secret Valid verification token.
1609
- * @property {boolean} overrideForCli
1610
- * @property {boolean} parseOutput
1611
- * @property {libClient | undefined} sdk
1612
- */
1419
+ interface AccountUpdateEmailVerificationRequestParams {
1420
+ userId: string;
1421
+ secret: string;
1422
+ overrideForCli?: boolean;
1423
+ parseOutput?: boolean;
1424
+ sdk?: Client;
1425
+ }
1613
1426
 
1614
- /**
1615
- * @param {AccountUpdateEmailVerificationRequestParams} params
1616
- */
1617
- const accountUpdateEmailVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1427
+ export const accountUpdateEmailVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateEmailVerificationRequestParams): Promise<any> => {
1618
1428
  let client = !sdk ? await sdkForProject() :
1619
1429
  sdk;
1620
1430
  let apiPath = '/account/verifications/email';
@@ -1639,19 +1449,15 @@ const accountUpdateEmailVerification = async ({userId,secret,parseOutput = true,
1639
1449
  return response;
1640
1450
 
1641
1451
  }
1642
- /**
1643
- * @typedef {Object} AccountUpdateVerificationRequestParams
1644
- * @property {string} userId User ID.
1645
- * @property {string} secret Valid verification token.
1646
- * @property {boolean} overrideForCli
1647
- * @property {boolean} parseOutput
1648
- * @property {libClient | undefined} sdk
1649
- */
1452
+ interface AccountUpdateVerificationRequestParams {
1453
+ userId: string;
1454
+ secret: string;
1455
+ overrideForCli?: boolean;
1456
+ parseOutput?: boolean;
1457
+ sdk?: Client;
1458
+ }
1650
1459
 
1651
- /**
1652
- * @param {AccountUpdateVerificationRequestParams} params
1653
- */
1654
- const accountUpdateVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1460
+ export const accountUpdateVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdateVerificationRequestParams): Promise<any> => {
1655
1461
  let client = !sdk ? await sdkForProject() :
1656
1462
  sdk;
1657
1463
  let apiPath = '/account/verifications/email';
@@ -1676,17 +1482,13 @@ const accountUpdateVerification = async ({userId,secret,parseOutput = true, over
1676
1482
  return response;
1677
1483
 
1678
1484
  }
1679
- /**
1680
- * @typedef {Object} AccountCreatePhoneVerificationRequestParams
1681
- * @property {boolean} overrideForCli
1682
- * @property {boolean} parseOutput
1683
- * @property {libClient | undefined} sdk
1684
- */
1485
+ interface AccountCreatePhoneVerificationRequestParams {
1486
+ overrideForCli?: boolean;
1487
+ parseOutput?: boolean;
1488
+ sdk?: Client;
1489
+ }
1685
1490
 
1686
- /**
1687
- * @param {AccountCreatePhoneVerificationRequestParams} params
1688
- */
1689
- const accountCreatePhoneVerification = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1491
+ export const accountCreatePhoneVerification = async ({parseOutput = true, overrideForCli = false, sdk = undefined}: AccountCreatePhoneVerificationRequestParams): Promise<any> => {
1690
1492
  let client = !sdk ? await sdkForProject() :
1691
1493
  sdk;
1692
1494
  let apiPath = '/account/verifications/phone';
@@ -1705,19 +1507,15 @@ const accountCreatePhoneVerification = async ({parseOutput = true, overrideForCl
1705
1507
  return response;
1706
1508
 
1707
1509
  }
1708
- /**
1709
- * @typedef {Object} AccountUpdatePhoneVerificationRequestParams
1710
- * @property {string} userId User ID.
1711
- * @property {string} secret Valid verification token.
1712
- * @property {boolean} overrideForCli
1713
- * @property {boolean} parseOutput
1714
- * @property {libClient | undefined} sdk
1715
- */
1510
+ interface AccountUpdatePhoneVerificationRequestParams {
1511
+ userId: string;
1512
+ secret: string;
1513
+ overrideForCli?: boolean;
1514
+ parseOutput?: boolean;
1515
+ sdk?: Client;
1516
+ }
1716
1517
 
1717
- /**
1718
- * @param {AccountUpdatePhoneVerificationRequestParams} params
1719
- */
1720
- const accountUpdatePhoneVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
1518
+ export const accountUpdatePhoneVerification = async ({userId,secret,parseOutput = true, overrideForCli = false, sdk = undefined}: AccountUpdatePhoneVerificationRequestParams): Promise<any> => {
1721
1519
  let client = !sdk ? await sdkForProject() :
1722
1520
  sdk;
1723
1521
  let apiPath = '/account/verifications/phone';
@@ -1773,7 +1571,7 @@ account
1773
1571
  .command(`list-identities`)
1774
1572
  .description(`Get the list of identities for the currently logged in user.`)
1775
1573
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry`)
1776
- .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))
1574
+ .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))
1777
1575
  .action(actionRunner(accountListIdentities))
1778
1576
 
1779
1577
  account
@@ -1791,13 +1589,13 @@ account
1791
1589
  .command(`list-logs`)
1792
1590
  .description(`Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.`)
1793
1591
  .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
1794
- .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))
1592
+ .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))
1795
1593
  .action(actionRunner(accountListLogs))
1796
1594
 
1797
1595
  account
1798
1596
  .command(`update-mfa`)
1799
1597
  .description(`Enable or disable MFA on an account.`)
1800
- .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value) => value === undefined ? true : parseBool(value))
1598
+ .requiredOption(`--mfa [value]`, `Enable or disable MFA.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
1801
1599
  .action(actionRunner(accountUpdateMFA))
1802
1600
 
1803
1601
  account
@@ -2000,7 +1798,7 @@ account
2000
1798
  .description(`Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided 'userId'. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes. A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits). `)
2001
1799
  .requiredOption(`--user-id <user-id>`, `User ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`)
2002
1800
  .requiredOption(`--email <email>`, `User email.`)
2003
- .option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : parseBool(value))
1801
+ .option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2004
1802
  .action(actionRunner(accountCreateEmailToken))
2005
1803
 
2006
1804
  account
@@ -2009,7 +1807,7 @@ account
2009
1807
  .requiredOption(`--user-id <user-id>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.`)
2010
1808
  .requiredOption(`--email <email>`, `User email.`)
2011
1809
  .option(`--url <url>`, `URL to redirect the user back to your app from the magic URL login. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`)
2012
- .option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value) => value === undefined ? true : parseBool(value))
1810
+ .option(`--phrase [value]`, `Toggle for security phrase. If enabled, email will be send with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.`, (value: string | undefined) => value === undefined ? true : parseBool(value))
2013
1811
  .action(actionRunner(accountCreateMagicURLToken))
2014
1812
 
2015
1813
  account
@@ -2066,56 +1864,4 @@ account
2066
1864
  .requiredOption(`--secret <secret>`, `Valid verification token.`)
2067
1865
  .action(actionRunner(accountUpdatePhoneVerification))
2068
1866
 
2069
- module.exports = {
2070
- account,
2071
- accountGet,
2072
- accountCreate,
2073
- accountDelete,
2074
- accountUpdateEmail,
2075
- accountListIdentities,
2076
- accountDeleteIdentity,
2077
- accountCreateJWT,
2078
- accountListLogs,
2079
- accountUpdateMFA,
2080
- accountCreateMFAAuthenticator,
2081
- accountUpdateMFAAuthenticator,
2082
- accountDeleteMFAAuthenticator,
2083
- accountCreateMFAChallenge,
2084
- accountUpdateMFAChallenge,
2085
- accountListMFAFactors,
2086
- accountGetMFARecoveryCodes,
2087
- accountCreateMFARecoveryCodes,
2088
- accountUpdateMFARecoveryCodes,
2089
- accountUpdateName,
2090
- accountUpdatePassword,
2091
- accountUpdatePhone,
2092
- accountGetPrefs,
2093
- accountUpdatePrefs,
2094
- accountCreateRecovery,
2095
- accountUpdateRecovery,
2096
- accountListSessions,
2097
- accountDeleteSessions,
2098
- accountCreateAnonymousSession,
2099
- accountCreateEmailPasswordSession,
2100
- accountUpdateMagicURLSession,
2101
- accountCreateOAuth2Session,
2102
- accountUpdatePhoneSession,
2103
- accountCreateSession,
2104
- accountGetSession,
2105
- accountUpdateSession,
2106
- accountDeleteSession,
2107
- accountUpdateStatus,
2108
- accountCreatePushTarget,
2109
- accountUpdatePushTarget,
2110
- accountDeletePushTarget,
2111
- accountCreateEmailToken,
2112
- accountCreateMagicURLToken,
2113
- accountCreateOAuth2Token,
2114
- accountCreatePhoneToken,
2115
- accountCreateEmailVerification,
2116
- accountCreateVerification,
2117
- accountUpdateEmailVerification,
2118
- accountUpdateVerification,
2119
- accountCreatePhoneVerification,
2120
- accountUpdatePhoneVerification
2121
- };
1867
+