node-appwrite 20.2.1 → 21.0.0

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 (147) hide show
  1. package/dist/client.js +2 -2
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +2 -2
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/enums/build-runtime.d.mts +3 -1
  6. package/dist/enums/build-runtime.d.ts +3 -1
  7. package/dist/enums/build-runtime.js +2 -0
  8. package/dist/enums/build-runtime.js.map +1 -1
  9. package/dist/enums/build-runtime.mjs +2 -0
  10. package/dist/enums/build-runtime.mjs.map +1 -1
  11. package/dist/enums/execution-status.d.mts +2 -1
  12. package/dist/enums/execution-status.d.ts +2 -1
  13. package/dist/enums/execution-status.js +1 -0
  14. package/dist/enums/execution-status.js.map +1 -1
  15. package/dist/enums/execution-status.mjs +1 -0
  16. package/dist/enums/execution-status.mjs.map +1 -1
  17. package/dist/enums/framework.d.mts +1 -0
  18. package/dist/enums/framework.d.ts +1 -0
  19. package/dist/enums/framework.js +1 -0
  20. package/dist/enums/framework.js.map +1 -1
  21. package/dist/enums/framework.mjs +1 -0
  22. package/dist/enums/framework.mjs.map +1 -1
  23. package/dist/enums/output.d.mts +11 -0
  24. package/dist/enums/output.d.ts +11 -0
  25. package/dist/enums/output.js +16 -0
  26. package/dist/enums/output.js.map +1 -0
  27. package/dist/enums/output.mjs +15 -0
  28. package/dist/enums/output.mjs.map +1 -0
  29. package/dist/enums/runtime.d.mts +3 -1
  30. package/dist/enums/runtime.d.ts +3 -1
  31. package/dist/enums/runtime.js +2 -0
  32. package/dist/enums/runtime.js.map +1 -1
  33. package/dist/enums/runtime.mjs +2 -0
  34. package/dist/enums/runtime.mjs.map +1 -1
  35. package/dist/enums/template-reference-type.d.mts +7 -0
  36. package/dist/enums/template-reference-type.d.ts +7 -0
  37. package/dist/enums/template-reference-type.js +12 -0
  38. package/dist/enums/template-reference-type.js.map +1 -0
  39. package/dist/enums/template-reference-type.mjs +11 -0
  40. package/dist/enums/template-reference-type.mjs.map +1 -0
  41. package/dist/enums/theme.d.mts +6 -0
  42. package/dist/enums/theme.d.ts +6 -0
  43. package/dist/enums/theme.js +11 -0
  44. package/dist/enums/theme.js.map +1 -0
  45. package/dist/enums/theme.mjs +10 -0
  46. package/dist/enums/theme.mjs.map +1 -0
  47. package/dist/enums/timezone.d.mts +423 -0
  48. package/dist/enums/timezone.d.ts +423 -0
  49. package/dist/enums/timezone.js +428 -0
  50. package/dist/enums/timezone.js.map +1 -0
  51. package/dist/enums/timezone.mjs +427 -0
  52. package/dist/enums/timezone.mjs.map +1 -0
  53. package/dist/enums/{vcs-deployment-type.d.mts → vcs-reference-type.d.mts} +2 -2
  54. package/dist/enums/{vcs-deployment-type.d.ts → vcs-reference-type.d.ts} +2 -2
  55. package/dist/enums/vcs-reference-type.js +12 -0
  56. package/dist/enums/vcs-reference-type.js.map +1 -0
  57. package/dist/enums/vcs-reference-type.mjs +11 -0
  58. package/dist/enums/vcs-reference-type.mjs.map +1 -0
  59. package/dist/index.d.mts +6 -1
  60. package/dist/index.d.ts +6 -1
  61. package/dist/index.js +32 -3
  62. package/dist/index.js.map +1 -1
  63. package/dist/index.mjs +6 -1
  64. package/dist/index.mjs.map +1 -1
  65. package/dist/models.d.mts +5 -1
  66. package/dist/models.d.ts +5 -1
  67. package/dist/operator.d.mts +181 -0
  68. package/dist/operator.d.ts +181 -0
  69. package/dist/operator.js +268 -0
  70. package/dist/operator.js.map +1 -0
  71. package/dist/operator.mjs +266 -0
  72. package/dist/operator.mjs.map +1 -0
  73. package/dist/query.js +6 -6
  74. package/dist/query.js.map +1 -1
  75. package/dist/query.mjs +6 -6
  76. package/dist/query.mjs.map +1 -1
  77. package/dist/services/account.d.mts +8 -2
  78. package/dist/services/account.d.ts +8 -2
  79. package/dist/services/account.js +18 -8
  80. package/dist/services/account.js.map +1 -1
  81. package/dist/services/account.mjs +18 -8
  82. package/dist/services/account.mjs.map +1 -1
  83. package/dist/services/avatars.d.mts +87 -0
  84. package/dist/services/avatars.d.ts +87 -0
  85. package/dist/services/avatars.js +123 -0
  86. package/dist/services/avatars.js.map +1 -1
  87. package/dist/services/avatars.mjs +123 -0
  88. package/dist/services/avatars.mjs.map +1 -1
  89. package/dist/services/databases.d.mts +20 -5
  90. package/dist/services/databases.d.ts +20 -5
  91. package/dist/services/databases.js +30 -5
  92. package/dist/services/databases.js.map +1 -1
  93. package/dist/services/databases.mjs +30 -5
  94. package/dist/services/databases.mjs.map +1 -1
  95. package/dist/services/functions.d.mts +25 -12
  96. package/dist/services/functions.d.ts +25 -12
  97. package/dist/services/functions.js +33 -10
  98. package/dist/services/functions.js.map +1 -1
  99. package/dist/services/functions.mjs +33 -10
  100. package/dist/services/functions.mjs.map +1 -1
  101. package/dist/services/messaging.d.mts +116 -9
  102. package/dist/services/messaging.d.ts +116 -9
  103. package/dist/services/messaging.js +182 -9
  104. package/dist/services/messaging.js.map +1 -1
  105. package/dist/services/messaging.mjs +182 -9
  106. package/dist/services/messaging.mjs.map +1 -1
  107. package/dist/services/sites.d.mts +27 -14
  108. package/dist/services/sites.d.ts +27 -14
  109. package/dist/services/sites.js +33 -10
  110. package/dist/services/sites.js.map +1 -1
  111. package/dist/services/sites.mjs +33 -10
  112. package/dist/services/sites.mjs.map +1 -1
  113. package/dist/services/storage.d.mts +18 -6
  114. package/dist/services/storage.d.ts +18 -6
  115. package/dist/services/storage.js +24 -4
  116. package/dist/services/storage.js.map +1 -1
  117. package/dist/services/storage.mjs +24 -4
  118. package/dist/services/storage.mjs.map +1 -1
  119. package/dist/services/tables-db.d.mts +22 -7
  120. package/dist/services/tables-db.d.ts +22 -7
  121. package/dist/services/tables-db.js +30 -5
  122. package/dist/services/tables-db.js.map +1 -1
  123. package/dist/services/tables-db.mjs +30 -5
  124. package/dist/services/tables-db.mjs.map +1 -1
  125. package/dist/services/teams.d.mts +8 -2
  126. package/dist/services/teams.d.ts +8 -2
  127. package/dist/services/teams.js +12 -2
  128. package/dist/services/teams.js.map +1 -1
  129. package/dist/services/teams.mjs +12 -2
  130. package/dist/services/teams.mjs.map +1 -1
  131. package/dist/services/tokens.d.mts +4 -1
  132. package/dist/services/tokens.d.ts +4 -1
  133. package/dist/services/tokens.js +6 -1
  134. package/dist/services/tokens.js.map +1 -1
  135. package/dist/services/tokens.mjs +6 -1
  136. package/dist/services/tokens.mjs.map +1 -1
  137. package/dist/services/users.d.mts +24 -6
  138. package/dist/services/users.d.ts +24 -6
  139. package/dist/services/users.js +37 -7
  140. package/dist/services/users.js.map +1 -1
  141. package/dist/services/users.mjs +37 -7
  142. package/dist/services/users.mjs.map +1 -1
  143. package/package.json +1 -1
  144. package/dist/enums/vcs-deployment-type.js +0 -12
  145. package/dist/enums/vcs-deployment-type.js.map +0 -1
  146. package/dist/enums/vcs-deployment-type.mjs +0 -11
  147. package/dist/enums/vcs-deployment-type.mjs.map +0 -1
@@ -274,6 +274,129 @@ var Avatars = class {
274
274
  "arrayBuffer"
275
275
  );
276
276
  }
277
+ getScreenshot(paramsOrFirst, ...rest) {
278
+ let params;
279
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
280
+ params = paramsOrFirst || {};
281
+ } else {
282
+ params = {
283
+ url: paramsOrFirst,
284
+ headers: rest[0],
285
+ viewportWidth: rest[1],
286
+ viewportHeight: rest[2],
287
+ scale: rest[3],
288
+ theme: rest[4],
289
+ userAgent: rest[5],
290
+ fullpage: rest[6],
291
+ locale: rest[7],
292
+ timezone: rest[8],
293
+ latitude: rest[9],
294
+ longitude: rest[10],
295
+ accuracy: rest[11],
296
+ touch: rest[12],
297
+ permissions: rest[13],
298
+ sleep: rest[14],
299
+ width: rest[15],
300
+ height: rest[16],
301
+ quality: rest[17],
302
+ output: rest[18]
303
+ };
304
+ }
305
+ const url = params.url;
306
+ const headers = params.headers;
307
+ const viewportWidth = params.viewportWidth;
308
+ const viewportHeight = params.viewportHeight;
309
+ const scale = params.scale;
310
+ const theme = params.theme;
311
+ const userAgent = params.userAgent;
312
+ const fullpage = params.fullpage;
313
+ const locale = params.locale;
314
+ const timezone = params.timezone;
315
+ const latitude = params.latitude;
316
+ const longitude = params.longitude;
317
+ const accuracy = params.accuracy;
318
+ const touch = params.touch;
319
+ const permissions = params.permissions;
320
+ const sleep = params.sleep;
321
+ const width = params.width;
322
+ const height = params.height;
323
+ const quality = params.quality;
324
+ const output = params.output;
325
+ if (typeof url === "undefined") {
326
+ throw new AppwriteException('Missing required parameter: "url"');
327
+ }
328
+ const apiPath = "/avatars/screenshots";
329
+ const payload = {};
330
+ if (typeof url !== "undefined") {
331
+ payload["url"] = url;
332
+ }
333
+ if (typeof headers !== "undefined") {
334
+ payload["headers"] = headers;
335
+ }
336
+ if (typeof viewportWidth !== "undefined") {
337
+ payload["viewportWidth"] = viewportWidth;
338
+ }
339
+ if (typeof viewportHeight !== "undefined") {
340
+ payload["viewportHeight"] = viewportHeight;
341
+ }
342
+ if (typeof scale !== "undefined") {
343
+ payload["scale"] = scale;
344
+ }
345
+ if (typeof theme !== "undefined") {
346
+ payload["theme"] = theme;
347
+ }
348
+ if (typeof userAgent !== "undefined") {
349
+ payload["userAgent"] = userAgent;
350
+ }
351
+ if (typeof fullpage !== "undefined") {
352
+ payload["fullpage"] = fullpage;
353
+ }
354
+ if (typeof locale !== "undefined") {
355
+ payload["locale"] = locale;
356
+ }
357
+ if (typeof timezone !== "undefined") {
358
+ payload["timezone"] = timezone;
359
+ }
360
+ if (typeof latitude !== "undefined") {
361
+ payload["latitude"] = latitude;
362
+ }
363
+ if (typeof longitude !== "undefined") {
364
+ payload["longitude"] = longitude;
365
+ }
366
+ if (typeof accuracy !== "undefined") {
367
+ payload["accuracy"] = accuracy;
368
+ }
369
+ if (typeof touch !== "undefined") {
370
+ payload["touch"] = touch;
371
+ }
372
+ if (typeof permissions !== "undefined") {
373
+ payload["permissions"] = permissions;
374
+ }
375
+ if (typeof sleep !== "undefined") {
376
+ payload["sleep"] = sleep;
377
+ }
378
+ if (typeof width !== "undefined") {
379
+ payload["width"] = width;
380
+ }
381
+ if (typeof height !== "undefined") {
382
+ payload["height"] = height;
383
+ }
384
+ if (typeof quality !== "undefined") {
385
+ payload["quality"] = quality;
386
+ }
387
+ if (typeof output !== "undefined") {
388
+ payload["output"] = output;
389
+ }
390
+ const uri = new URL(this.client.config.endpoint + apiPath);
391
+ const apiHeaders = {};
392
+ return this.client.call(
393
+ "get",
394
+ uri,
395
+ apiHeaders,
396
+ payload,
397
+ "arrayBuffer"
398
+ );
399
+ }
277
400
  };
278
401
 
279
402
  export { Avatars };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/avatars.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAOjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EA6BA,WACI,kBACG,MACiB;AACpB,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,KAAK,UAAU,eAAgB;AAClH,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,MAAM;AAAA,QACN,OAAO,KAAK,CAAC;AAAA,QACb,QAAQ,KAAK,CAAC;AAAA,QACd,SAAS,KAAK,CAAC;AAAA,MACnB;AAAA,IACJ;AAEA,UAAM,OAAO,OAAO;AACpB,UAAM,QAAQ,OAAO;AACrB,UAAM,SAAS,OAAO;AACtB,UAAM,UAAU,OAAO;AAEvB,QAAI,OAAO,SAAS,aAAa;AAC7B,YAAM,IAAI,kBAAkB,oCAAoC;AAAA,IACpE;AAEA,UAAM,UAAU,2BAA2B,QAAQ,UAAU,IAAI;AACjE,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AA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OAAO;AACtB,UAAM,WAAW,OAAO;AAExB,QAAI,OAAO,SAAS,aAAa;AAC7B,YAAM,IAAI,kBAAkB,oCAAoC;AAAA,IACpE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,SAAS,aAAa;AAC7B,cAAQ,MAAM,IAAI;AAAA,IACtB;AACA,QAAI,OAAO,SAAS,aAAa;AAC7B,cAAQ,MAAM,IAAI;AAAA,IACtB;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,QAAI,OAAO,aAAa,aAAa;AACjC,cAAQ,UAAU,IAAI;AAAA,IAC1B;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Browser } from '../enums/browser';\nimport { CreditCard } from '../enums/credit-card';\nimport { Flag } from '../enums/flag';\n\nexport class Avatars {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n *\n * @param {Browser} params.code - Browser Code.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getBrowser(params: { code: Browser, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;\n /**\n * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n *\n * @param {Browser} code - Browser Code.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBrowser(code: Browser, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;\n getBrowser(\n paramsOrFirst: { code: Browser, width?: number, height?: number, quality?: number } | Browser,\n ...rest: [(number)?, (number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { code: Browser, width?: number, height?: number, quality?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { code: Browser, width?: number, height?: number, quality?: number };\n } else {\n params = {\n code: paramsOrFirst as Browser,\n width: rest[0] as number,\n height: rest[1] as number,\n quality: rest[2] as number \n };\n }\n \n const code = params.code;\n const width = params.width;\n const height = params.height;\n const quality = params.quality;\n\n if (typeof code === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/avatars/browsers/{code}'.replace('{code}', code);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {CreditCard} params.code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getCreditCard(params: { code: CreditCard, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;\n /**\n * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {CreditCard} code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getCreditCard(code: CreditCard, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;\n getCreditCard(\n paramsOrFirst: { code: CreditCard, width?: number, height?: number, quality?: number } | CreditCard,\n ...rest: [(number)?, (number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { code: CreditCard, width?: number, height?: number, quality?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { code: CreditCard, width?: number, height?: number, quality?: number };\n } else {\n params = {\n code: paramsOrFirst as CreditCard,\n width: rest[0] as number,\n height: rest[1] as number,\n quality: rest[2] as number \n };\n }\n \n const code = params.code;\n const width = params.width;\n const height = params.height;\n const quality = params.quality;\n\n if (typeof code === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', code);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} params.url - Website URL which you want to fetch the favicon from.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFavicon(params: { url: string }): Promise<ArrayBuffer>;\n /**\n * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} url - Website URL which you want to fetch the favicon from.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFavicon(url: string): Promise<ArrayBuffer>;\n getFavicon(\n paramsOrFirst: { url: string } | string \n ): Promise<ArrayBuffer> {\n let params: { url: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { url: string };\n } else {\n params = {\n url: paramsOrFirst as string \n };\n }\n \n const url = params.url;\n\n if (typeof url === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"url\"');\n }\n\n const apiPath = '/avatars/favicon';\n const payload: Payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {Flag} params.code - Country Code. ISO Alpha-2 country code format.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFlag(params: { code: Flag, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;\n /**\n * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {Flag} code - Country Code. ISO Alpha-2 country code format.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFlag(code: Flag, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;\n getFlag(\n paramsOrFirst: { code: Flag, width?: number, height?: number, quality?: number } | Flag,\n ...rest: [(number)?, (number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { code: Flag, width?: number, height?: number, quality?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { code: Flag, width?: number, height?: number, quality?: number };\n } else {\n params = {\n code: paramsOrFirst as Flag,\n width: rest[0] as number,\n height: rest[1] as number,\n quality: rest[2] as number \n };\n }\n \n const code = params.code;\n const width = params.width;\n const height = params.height;\n const quality = params.quality;\n\n if (typeof code === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/avatars/flags/{code}'.replace('{code}', code);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} params.url - Image URL which you want to crop.\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getImage(params: { url: string, width?: number, height?: number }): Promise<ArrayBuffer>;\n /**\n * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} url - Image URL which you want to crop.\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getImage(url: string, width?: number, height?: number): Promise<ArrayBuffer>;\n getImage(\n paramsOrFirst: { url: string, width?: number, height?: number } | string,\n ...rest: [(number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { url: string, width?: number, height?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { url: string, width?: number, height?: number };\n } else {\n params = {\n url: paramsOrFirst as string,\n width: rest[0] as number,\n height: rest[1] as number \n };\n }\n \n const url = params.url;\n const width = params.width;\n const height = params.height;\n\n if (typeof url === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"url\"');\n }\n\n const apiPath = '/avatars/image';\n const payload: Payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n * \n * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {string} params.name - Full Name. When empty, current user name or email will be used. Max length: 128 chars.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {string} params.background - Changes background color. By default a random color will be picked and stay will persistent to the given name.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getInitials(params?: { name?: string, width?: number, height?: number, background?: string }): Promise<ArrayBuffer>;\n /**\n * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n * \n * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {string} name - Full Name. When empty, current user name or email will be used. Max length: 128 chars.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {string} background - Changes background color. By default a random color will be picked and stay will persistent to the given name.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getInitials(name?: string, width?: number, height?: number, background?: string): Promise<ArrayBuffer>;\n getInitials(\n paramsOrFirst?: { name?: string, width?: number, height?: number, background?: string } | string,\n ...rest: [(number)?, (number)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { name?: string, width?: number, height?: number, background?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { name?: string, width?: number, height?: number, background?: string };\n } else {\n params = {\n name: paramsOrFirst as string,\n width: rest[0] as number,\n height: rest[1] as number,\n background: rest[2] as string \n };\n }\n \n const name = params.name;\n const width = params.width;\n const height = params.height;\n const background = params.background;\n\n\n const apiPath = '/avatars/initials';\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n * \n *\n * @param {string} params.text - Plain text to be converted to QR code image.\n * @param {number} params.size - QR code size. Pass an integer between 1 to 1000. Defaults to 400.\n * @param {number} params.margin - Margin from edge. Pass an integer between 0 to 10. Defaults to 1.\n * @param {boolean} params.download - Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getQR(params: { text: string, size?: number, margin?: number, download?: boolean }): Promise<ArrayBuffer>;\n /**\n * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n * \n *\n * @param {string} text - Plain text to be converted to QR code image.\n * @param {number} size - QR code size. Pass an integer between 1 to 1000. Defaults to 400.\n * @param {number} margin - Margin from edge. Pass an integer between 0 to 10. Defaults to 1.\n * @param {boolean} download - Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<ArrayBuffer>;\n getQR(\n paramsOrFirst: { text: string, size?: number, margin?: number, download?: boolean } | string,\n ...rest: [(number)?, (number)?, (boolean)?] \n ): Promise<ArrayBuffer> {\n let params: { text: string, size?: number, margin?: number, download?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { text: string, size?: number, margin?: number, download?: boolean };\n } else {\n params = {\n text: paramsOrFirst as string,\n size: rest[0] as number,\n margin: rest[1] as number,\n download: rest[2] as boolean \n };\n }\n \n const text = params.text;\n const size = params.size;\n const margin = params.margin;\n const download = params.download;\n\n if (typeof text === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"text\"');\n }\n\n const apiPath = '/avatars/qr';\n const payload: Payload = {};\n if (typeof text !== 'undefined') {\n payload['text'] = text;\n }\n if (typeof size !== 'undefined') {\n payload['size'] = size;\n }\n if (typeof margin !== 'undefined') {\n payload['margin'] = margin;\n }\n if (typeof download !== 'undefined') {\n payload['download'] = download;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/avatars.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAUjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK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,aAAa;AACpC,cAAQ,aAAa,IAAI;AAAA,IAC7B;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,QAAI,OAAO,YAAY,aAAa;AAChC,cAAQ,SAAS,IAAI;AAAA,IACzB;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Browser } from '../enums/browser';\nimport { CreditCard } from '../enums/credit-card';\nimport { Flag } from '../enums/flag';\nimport { Theme } from '../enums/theme';\nimport { Timezone } from '../enums/timezone';\nimport { Output } from '../enums/output';\n\nexport class Avatars {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n *\n * @param {Browser} params.code - Browser Code.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getBrowser(params: { code: Browser, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;\n /**\n * You can use this endpoint to show different browser icons to your users. The code argument receives the browser code as it appears in your user [GET /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions) endpoint. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n *\n * @param {Browser} code - Browser Code.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBrowser(code: Browser, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;\n getBrowser(\n paramsOrFirst: { code: Browser, width?: number, height?: number, quality?: number } | Browser,\n ...rest: [(number)?, (number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { code: Browser, width?: number, height?: number, quality?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { code: Browser, width?: number, height?: number, quality?: number };\n } else {\n params = {\n code: paramsOrFirst as Browser,\n width: rest[0] as number,\n height: rest[1] as number,\n quality: rest[2] as number \n };\n }\n \n const code = params.code;\n const width = params.width;\n const height = params.height;\n const quality = params.quality;\n\n if (typeof code === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/avatars/browsers/{code}'.replace('{code}', code);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {CreditCard} params.code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getCreditCard(params: { code: CreditCard, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;\n /**\n * The credit card endpoint will return you the icon of the credit card provider you need. Use width, height and quality arguments to change the output settings.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {CreditCard} code - Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getCreditCard(code: CreditCard, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;\n getCreditCard(\n paramsOrFirst: { code: CreditCard, width?: number, height?: number, quality?: number } | CreditCard,\n ...rest: [(number)?, (number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { code: CreditCard, width?: number, height?: number, quality?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { code: CreditCard, width?: number, height?: number, quality?: number };\n } else {\n params = {\n code: paramsOrFirst as CreditCard,\n width: rest[0] as number,\n height: rest[1] as number,\n quality: rest[2] as number \n };\n }\n \n const code = params.code;\n const width = params.width;\n const height = params.height;\n const quality = params.quality;\n\n if (typeof code === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/avatars/credit-cards/{code}'.replace('{code}', code);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} params.url - Website URL which you want to fetch the favicon from.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFavicon(params: { url: string }): Promise<ArrayBuffer>;\n /**\n * Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} url - Website URL which you want to fetch the favicon from.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFavicon(url: string): Promise<ArrayBuffer>;\n getFavicon(\n paramsOrFirst: { url: string } | string \n ): Promise<ArrayBuffer> {\n let params: { url: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { url: string };\n } else {\n params = {\n url: paramsOrFirst as string \n };\n }\n \n const url = params.url;\n\n if (typeof url === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"url\"');\n }\n\n const apiPath = '/avatars/favicon';\n const payload: Payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {Flag} params.code - Country Code. ISO Alpha-2 country code format.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFlag(params: { code: Flag, width?: number, height?: number, quality?: number }): Promise<ArrayBuffer>;\n /**\n * You can use this endpoint to show different country flags icons to your users. The code argument receives the 2 letter country code. Use width, height and quality arguments to change the output settings. Country codes follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {Flag} code - Country Code. ISO Alpha-2 country code format.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} quality - Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFlag(code: Flag, width?: number, height?: number, quality?: number): Promise<ArrayBuffer>;\n getFlag(\n paramsOrFirst: { code: Flag, width?: number, height?: number, quality?: number } | Flag,\n ...rest: [(number)?, (number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { code: Flag, width?: number, height?: number, quality?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'code' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { code: Flag, width?: number, height?: number, quality?: number };\n } else {\n params = {\n code: paramsOrFirst as Flag,\n width: rest[0] as number,\n height: rest[1] as number,\n quality: rest[2] as number \n };\n }\n \n const code = params.code;\n const width = params.width;\n const height = params.height;\n const quality = params.quality;\n\n if (typeof code === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"code\"');\n }\n\n const apiPath = '/avatars/flags/{code}'.replace('{code}', code);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} params.url - Image URL which you want to crop.\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getImage(params: { url: string, width?: number, height?: number }): Promise<ArrayBuffer>;\n /**\n * Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.\n * \n * This endpoint does not follow HTTP redirects.\n *\n * @param {string} url - Image URL which you want to crop.\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 2000. Defaults to 400.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 2000. Defaults to 400.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getImage(url: string, width?: number, height?: number): Promise<ArrayBuffer>;\n getImage(\n paramsOrFirst: { url: string, width?: number, height?: number } | string,\n ...rest: [(number)?, (number)?] \n ): Promise<ArrayBuffer> {\n let params: { url: string, width?: number, height?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { url: string, width?: number, height?: number };\n } else {\n params = {\n url: paramsOrFirst as string,\n width: rest[0] as number,\n height: rest[1] as number \n };\n }\n \n const url = params.url;\n const width = params.width;\n const height = params.height;\n\n if (typeof url === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"url\"');\n }\n\n const apiPath = '/avatars/image';\n const payload: Payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n * \n * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {string} params.name - Full Name. When empty, current user name or email will be used. Max length: 128 chars.\n * @param {number} params.width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} params.height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {string} params.background - Changes background color. By default a random color will be picked and stay will persistent to the given name.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getInitials(params?: { name?: string, width?: number, height?: number, background?: string }): Promise<ArrayBuffer>;\n /**\n * Use this endpoint to show your user initials avatar icon on your website or app. By default, this route will try to print your logged-in user name or email initials. You can also overwrite the user name if you pass the 'name' parameter. If no name is given and no user is logged, an empty avatar will be returned.\n * \n * You can use the color and background params to change the avatar colors. By default, a random theme will be selected. The random theme will persist for the user's initials when reloading the same theme will always return for the same initials.\n * \n * When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 100x100px.\n * \n *\n * @param {string} name - Full Name. When empty, current user name or email will be used. Max length: 128 chars.\n * @param {number} width - Image width. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {number} height - Image height. Pass an integer between 0 to 2000. Defaults to 100.\n * @param {string} background - Changes background color. By default a random color will be picked and stay will persistent to the given name.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getInitials(name?: string, width?: number, height?: number, background?: string): Promise<ArrayBuffer>;\n getInitials(\n paramsOrFirst?: { name?: string, width?: number, height?: number, background?: string } | string,\n ...rest: [(number)?, (number)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { name?: string, width?: number, height?: number, background?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { name?: string, width?: number, height?: number, background?: string };\n } else {\n params = {\n name: paramsOrFirst as string,\n width: rest[0] as number,\n height: rest[1] as number,\n background: rest[2] as string \n };\n }\n \n const name = params.name;\n const width = params.width;\n const height = params.height;\n const background = params.background;\n\n\n const apiPath = '/avatars/initials';\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n * \n *\n * @param {string} params.text - Plain text to be converted to QR code image.\n * @param {number} params.size - QR code size. Pass an integer between 1 to 1000. Defaults to 400.\n * @param {number} params.margin - Margin from edge. Pass an integer between 0 to 10. Defaults to 1.\n * @param {boolean} params.download - Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getQR(params: { text: string, size?: number, margin?: number, download?: boolean }): Promise<ArrayBuffer>;\n /**\n * Converts a given plain text to a QR code image. You can use the query parameters to change the size and style of the resulting image.\n * \n *\n * @param {string} text - Plain text to be converted to QR code image.\n * @param {number} size - QR code size. Pass an integer between 1 to 1000. Defaults to 400.\n * @param {number} margin - Margin from edge. Pass an integer between 0 to 10. Defaults to 1.\n * @param {boolean} download - Return resulting image with 'Content-Disposition: attachment ' headers for the browser to start downloading it. Pass 0 for no header, or 1 for otherwise. Default value is set to 0.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQR(text: string, size?: number, margin?: number, download?: boolean): Promise<ArrayBuffer>;\n getQR(\n paramsOrFirst: { text: string, size?: number, margin?: number, download?: boolean } | string,\n ...rest: [(number)?, (number)?, (boolean)?] \n ): Promise<ArrayBuffer> {\n let params: { text: string, size?: number, margin?: number, download?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { text: string, size?: number, margin?: number, download?: boolean };\n } else {\n params = {\n text: paramsOrFirst as string,\n size: rest[0] as number,\n margin: rest[1] as number,\n download: rest[2] as boolean \n };\n }\n \n const text = params.text;\n const size = params.size;\n const margin = params.margin;\n const download = params.download;\n\n if (typeof text === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"text\"');\n }\n\n const apiPath = '/avatars/qr';\n const payload: Payload = {};\n if (typeof text !== 'undefined') {\n payload['text'] = text;\n }\n if (typeof size !== 'undefined') {\n payload['size'] = size;\n }\n if (typeof margin !== 'undefined') {\n payload['margin'] = margin;\n }\n if (typeof download !== 'undefined') {\n payload['download'] = download;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n * \n * You can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n * \n * When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.\n *\n * @param {string} params.url - Website URL which you want to capture.\n * @param {object} params.headers - HTTP headers to send with the browser request. Defaults to empty.\n * @param {number} params.viewportWidth - Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.\n * @param {number} params.viewportHeight - Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.\n * @param {number} params.scale - Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.\n * @param {Theme} params.theme - Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".\n * @param {string} params.userAgent - Custom user agent string. Defaults to browser default.\n * @param {boolean} params.fullpage - Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.\n * @param {string} params.locale - Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.\n * @param {Timezone} params.timezone - IANA timezone identifier (e.g., \"America/New_York\", \"Europe/London\"). Defaults to browser default.\n * @param {number} params.latitude - Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.\n * @param {number} params.longitude - Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.\n * @param {number} params.accuracy - Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.\n * @param {boolean} params.touch - Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.\n * @param {string[]} params.permissions - Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.\n * @param {number} params.sleep - Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.\n * @param {number} params.width - Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).\n * @param {number} params.height - Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).\n * @param {number} params.quality - Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {Output} params.output - Output format type (jpeg, jpg, png, gif and webp).\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getScreenshot(params: { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: Theme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: string[], sleep?: number, width?: number, height?: number, quality?: number, output?: Output }): Promise<ArrayBuffer>;\n /**\n * Use this endpoint to capture a screenshot of any website URL. This endpoint uses a headless browser to render the webpage and capture it as an image.\n * \n * You can configure the browser viewport size, theme, user agent, geolocation, permissions, and more. Capture either just the viewport or the full page scroll.\n * \n * When width and height are specified, the image is resized accordingly. If both dimensions are 0, the API provides an image at original size. If dimensions are not specified, the default viewport size is 1280x720px.\n *\n * @param {string} url - Website URL which you want to capture.\n * @param {object} headers - HTTP headers to send with the browser request. Defaults to empty.\n * @param {number} viewportWidth - Browser viewport width. Pass an integer between 1 to 1920. Defaults to 1280.\n * @param {number} viewportHeight - Browser viewport height. Pass an integer between 1 to 1080. Defaults to 720.\n * @param {number} scale - Browser scale factor. Pass a number between 0.1 to 3. Defaults to 1.\n * @param {Theme} theme - Browser theme. Pass \"light\" or \"dark\". Defaults to \"light\".\n * @param {string} userAgent - Custom user agent string. Defaults to browser default.\n * @param {boolean} fullpage - Capture full page scroll. Pass 0 for viewport only, or 1 for full page. Defaults to 0.\n * @param {string} locale - Browser locale (e.g., \"en-US\", \"fr-FR\"). Defaults to browser default.\n * @param {Timezone} timezone - IANA timezone identifier (e.g., \"America/New_York\", \"Europe/London\"). Defaults to browser default.\n * @param {number} latitude - Geolocation latitude. Pass a number between -90 to 90. Defaults to 0.\n * @param {number} longitude - Geolocation longitude. Pass a number between -180 to 180. Defaults to 0.\n * @param {number} accuracy - Geolocation accuracy in meters. Pass a number between 0 to 100000. Defaults to 0.\n * @param {boolean} touch - Enable touch support. Pass 0 for no touch, or 1 for touch enabled. Defaults to 0.\n * @param {string[]} permissions - Browser permissions to grant. Pass an array of permission names like [\"geolocation\", \"camera\", \"microphone\"]. Defaults to empty.\n * @param {number} sleep - Wait time in seconds before taking the screenshot. Pass an integer between 0 to 10. Defaults to 0.\n * @param {number} width - Output image width. Pass 0 to use original width, or an integer between 1 to 2000. Defaults to 0 (original width).\n * @param {number} height - Output image height. Pass 0 to use original height, or an integer between 1 to 2000. Defaults to 0 (original height).\n * @param {number} quality - Screenshot quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {Output} output - Output format type (jpeg, jpg, png, gif and webp).\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getScreenshot(url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: Theme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: string[], sleep?: number, width?: number, height?: number, quality?: number, output?: Output): Promise<ArrayBuffer>;\n getScreenshot(\n paramsOrFirst: { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: Theme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: string[], sleep?: number, width?: number, height?: number, quality?: number, output?: Output } | string,\n ...rest: [(object)?, (number)?, (number)?, (number)?, (Theme)?, (string)?, (boolean)?, (string)?, (Timezone)?, (number)?, (number)?, (number)?, (boolean)?, (string[])?, (number)?, (number)?, (number)?, (number)?, (Output)?] \n ): Promise<ArrayBuffer> {\n let params: { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: Theme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: string[], sleep?: number, width?: number, height?: number, quality?: number, output?: Output };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { url: string, headers?: object, viewportWidth?: number, viewportHeight?: number, scale?: number, theme?: Theme, userAgent?: string, fullpage?: boolean, locale?: string, timezone?: Timezone, latitude?: number, longitude?: number, accuracy?: number, touch?: boolean, permissions?: string[], sleep?: number, width?: number, height?: number, quality?: number, output?: Output };\n } else {\n params = {\n url: paramsOrFirst as string,\n headers: rest[0] as object,\n viewportWidth: rest[1] as number,\n viewportHeight: rest[2] as number,\n scale: rest[3] as number,\n theme: rest[4] as Theme,\n userAgent: rest[5] as string,\n fullpage: rest[6] as boolean,\n locale: rest[7] as string,\n timezone: rest[8] as Timezone,\n latitude: rest[9] as number,\n longitude: rest[10] as number,\n accuracy: rest[11] as number,\n touch: rest[12] as boolean,\n permissions: rest[13] as string[],\n sleep: rest[14] as number,\n width: rest[15] as number,\n height: rest[16] as number,\n quality: rest[17] as number,\n output: rest[18] as Output \n };\n }\n \n const url = params.url;\n const headers = params.headers;\n const viewportWidth = params.viewportWidth;\n const viewportHeight = params.viewportHeight;\n const scale = params.scale;\n const theme = params.theme;\n const userAgent = params.userAgent;\n const fullpage = params.fullpage;\n const locale = params.locale;\n const timezone = params.timezone;\n const latitude = params.latitude;\n const longitude = params.longitude;\n const accuracy = params.accuracy;\n const touch = params.touch;\n const permissions = params.permissions;\n const sleep = params.sleep;\n const width = params.width;\n const height = params.height;\n const quality = params.quality;\n const output = params.output;\n\n if (typeof url === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"url\"');\n }\n\n const apiPath = '/avatars/screenshots';\n const payload: Payload = {};\n if (typeof url !== 'undefined') {\n payload['url'] = url;\n }\n if (typeof headers !== 'undefined') {\n payload['headers'] = headers;\n }\n if (typeof viewportWidth !== 'undefined') {\n payload['viewportWidth'] = viewportWidth;\n }\n if (typeof viewportHeight !== 'undefined') {\n payload['viewportHeight'] = viewportHeight;\n }\n if (typeof scale !== 'undefined') {\n payload['scale'] = scale;\n }\n if (typeof theme !== 'undefined') {\n payload['theme'] = theme;\n }\n if (typeof userAgent !== 'undefined') {\n payload['userAgent'] = userAgent;\n }\n if (typeof fullpage !== 'undefined') {\n payload['fullpage'] = fullpage;\n }\n if (typeof locale !== 'undefined') {\n payload['locale'] = locale;\n }\n if (typeof timezone !== 'undefined') {\n payload['timezone'] = timezone;\n }\n if (typeof latitude !== 'undefined') {\n payload['latitude'] = latitude;\n }\n if (typeof longitude !== 'undefined') {\n payload['longitude'] = longitude;\n }\n if (typeof accuracy !== 'undefined') {\n payload['accuracy'] = accuracy;\n }\n if (typeof touch !== 'undefined') {\n payload['touch'] = touch;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof sleep !== 'undefined') {\n payload['sleep'] = sleep;\n }\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
@@ -23,6 +23,7 @@ declare class Databases {
23
23
  *
24
24
  * @param {string[]} params.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
25
25
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
26
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
26
27
  * @throws {AppwriteException}
27
28
  * @returns {Promise<Models.DatabaseList>}
28
29
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
@@ -30,17 +31,19 @@ declare class Databases {
30
31
  list(params?: {
31
32
  queries?: string[];
32
33
  search?: string;
34
+ total?: boolean;
33
35
  }): Promise<Models.DatabaseList>;
34
36
  /**
35
37
  * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
36
38
  *
37
39
  * @param {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
38
40
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
41
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
39
42
  * @throws {AppwriteException}
40
43
  * @returns {Promise<Models.DatabaseList>}
41
44
  * @deprecated Use the object parameter style method for a better developer experience.
42
45
  */
43
- list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
46
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
44
47
  /**
45
48
  * Create a new Database.
46
49
  *
@@ -264,6 +267,7 @@ declare class Databases {
264
267
  * @param {string} params.databaseId - Database ID.
265
268
  * @param {string[]} params.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, enabled, documentSecurity
266
269
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
270
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
267
271
  * @throws {AppwriteException}
268
272
  * @returns {Promise<Models.CollectionList>}
269
273
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
@@ -272,6 +276,7 @@ declare class Databases {
272
276
  databaseId: string;
273
277
  queries?: string[];
274
278
  search?: string;
279
+ total?: boolean;
275
280
  }): Promise<Models.CollectionList>;
276
281
  /**
277
282
  * Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
@@ -279,11 +284,12 @@ declare class Databases {
279
284
  * @param {string} databaseId - Database ID.
280
285
  * @param {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, enabled, documentSecurity
281
286
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
287
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
282
288
  * @throws {AppwriteException}
283
289
  * @returns {Promise<Models.CollectionList>}
284
290
  * @deprecated Use the object parameter style method for a better developer experience.
285
291
  */
286
- listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
292
+ listCollections(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.CollectionList>;
287
293
  /**
288
294
  * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
289
295
  *
@@ -406,6 +412,7 @@ declare class Databases {
406
412
  * @param {string} params.databaseId - Database ID.
407
413
  * @param {string} params.collectionId - Collection ID.
408
414
  * @param {string[]} params.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: key, type, size, required, array, status, error
415
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
409
416
  * @throws {AppwriteException}
410
417
  * @returns {Promise<Models.AttributeList>}
411
418
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
@@ -414,6 +421,7 @@ declare class Databases {
414
421
  databaseId: string;
415
422
  collectionId: string;
416
423
  queries?: string[];
424
+ total?: boolean;
417
425
  }): Promise<Models.AttributeList>;
418
426
  /**
419
427
  * List attributes in the collection.
@@ -421,11 +429,12 @@ declare class Databases {
421
429
  * @param {string} databaseId - Database ID.
422
430
  * @param {string} collectionId - Collection ID.
423
431
  * @param {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: key, type, size, required, array, status, error
432
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
424
433
  * @throws {AppwriteException}
425
434
  * @returns {Promise<Models.AttributeList>}
426
435
  * @deprecated Use the object parameter style method for a better developer experience.
427
436
  */
428
- listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
437
+ listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
429
438
  /**
430
439
  * Create a boolean attribute.
431
440
  *
@@ -1462,6 +1471,7 @@ declare class Databases {
1462
1471
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1463
1472
  * @param {string[]} params.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.
1464
1473
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1474
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1465
1475
  * @throws {AppwriteException}
1466
1476
  * @returns {Promise<Models.DocumentList<Document>>}
1467
1477
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
@@ -1471,6 +1481,7 @@ declare class Databases {
1471
1481
  collectionId: string;
1472
1482
  queries?: string[];
1473
1483
  transactionId?: string;
1484
+ total?: boolean;
1474
1485
  }): Promise<Models.DocumentList<Document>>;
1475
1486
  /**
1476
1487
  * Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
@@ -1479,11 +1490,12 @@ declare class Databases {
1479
1490
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1480
1491
  * @param {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.
1481
1492
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1493
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1482
1494
  * @throws {AppwriteException}
1483
1495
  * @returns {Promise<Models.DocumentList<Document>>}
1484
1496
  * @deprecated Use the object parameter style method for a better developer experience.
1485
1497
  */
1486
- listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
1498
+ listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
1487
1499
  /**
1488
1500
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1489
1501
  *
@@ -1853,6 +1865,7 @@ declare class Databases {
1853
1865
  * @param {string} params.databaseId - Database ID.
1854
1866
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1855
1867
  * @param {string[]} params.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: key, type, status, attributes, error
1868
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1856
1869
  * @throws {AppwriteException}
1857
1870
  * @returns {Promise<Models.IndexList>}
1858
1871
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
@@ -1861,6 +1874,7 @@ declare class Databases {
1861
1874
  databaseId: string;
1862
1875
  collectionId: string;
1863
1876
  queries?: string[];
1877
+ total?: boolean;
1864
1878
  }): Promise<Models.IndexList>;
1865
1879
  /**
1866
1880
  * List indexes in the collection.
@@ -1868,11 +1882,12 @@ declare class Databases {
1868
1882
  * @param {string} databaseId - Database ID.
1869
1883
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1870
1884
  * @param {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: key, type, status, attributes, error
1885
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1871
1886
  * @throws {AppwriteException}
1872
1887
  * @returns {Promise<Models.IndexList>}
1873
1888
  * @deprecated Use the object parameter style method for a better developer experience.
1874
1889
  */
1875
- listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
1890
+ listIndexes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.IndexList>;
1876
1891
  /**
1877
1892
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
1878
1893
  * Attributes can be `key`, `fulltext`, and `unique`.
@@ -23,6 +23,7 @@ declare class Databases {
23
23
  *
24
24
  * @param {string[]} params.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
25
25
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
26
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
26
27
  * @throws {AppwriteException}
27
28
  * @returns {Promise<Models.DatabaseList>}
28
29
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
@@ -30,17 +31,19 @@ declare class Databases {
30
31
  list(params?: {
31
32
  queries?: string[];
32
33
  search?: string;
34
+ total?: boolean;
33
35
  }): Promise<Models.DatabaseList>;
34
36
  /**
35
37
  * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
36
38
  *
37
39
  * @param {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
38
40
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
41
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
39
42
  * @throws {AppwriteException}
40
43
  * @returns {Promise<Models.DatabaseList>}
41
44
  * @deprecated Use the object parameter style method for a better developer experience.
42
45
  */
43
- list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
46
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
44
47
  /**
45
48
  * Create a new Database.
46
49
  *
@@ -264,6 +267,7 @@ declare class Databases {
264
267
  * @param {string} params.databaseId - Database ID.
265
268
  * @param {string[]} params.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, enabled, documentSecurity
266
269
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
270
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
267
271
  * @throws {AppwriteException}
268
272
  * @returns {Promise<Models.CollectionList>}
269
273
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
@@ -272,6 +276,7 @@ declare class Databases {
272
276
  databaseId: string;
273
277
  queries?: string[];
274
278
  search?: string;
279
+ total?: boolean;
275
280
  }): Promise<Models.CollectionList>;
276
281
  /**
277
282
  * Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
@@ -279,11 +284,12 @@ declare class Databases {
279
284
  * @param {string} databaseId - Database ID.
280
285
  * @param {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, enabled, documentSecurity
281
286
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
287
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
282
288
  * @throws {AppwriteException}
283
289
  * @returns {Promise<Models.CollectionList>}
284
290
  * @deprecated Use the object parameter style method for a better developer experience.
285
291
  */
286
- listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
292
+ listCollections(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.CollectionList>;
287
293
  /**
288
294
  * Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
289
295
  *
@@ -406,6 +412,7 @@ declare class Databases {
406
412
  * @param {string} params.databaseId - Database ID.
407
413
  * @param {string} params.collectionId - Collection ID.
408
414
  * @param {string[]} params.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: key, type, size, required, array, status, error
415
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
409
416
  * @throws {AppwriteException}
410
417
  * @returns {Promise<Models.AttributeList>}
411
418
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
@@ -414,6 +421,7 @@ declare class Databases {
414
421
  databaseId: string;
415
422
  collectionId: string;
416
423
  queries?: string[];
424
+ total?: boolean;
417
425
  }): Promise<Models.AttributeList>;
418
426
  /**
419
427
  * List attributes in the collection.
@@ -421,11 +429,12 @@ declare class Databases {
421
429
  * @param {string} databaseId - Database ID.
422
430
  * @param {string} collectionId - Collection ID.
423
431
  * @param {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: key, type, size, required, array, status, error
432
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
424
433
  * @throws {AppwriteException}
425
434
  * @returns {Promise<Models.AttributeList>}
426
435
  * @deprecated Use the object parameter style method for a better developer experience.
427
436
  */
428
- listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
437
+ listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
429
438
  /**
430
439
  * Create a boolean attribute.
431
440
  *
@@ -1462,6 +1471,7 @@ declare class Databases {
1462
1471
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1463
1472
  * @param {string[]} params.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.
1464
1473
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1474
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1465
1475
  * @throws {AppwriteException}
1466
1476
  * @returns {Promise<Models.DocumentList<Document>>}
1467
1477
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
@@ -1471,6 +1481,7 @@ declare class Databases {
1471
1481
  collectionId: string;
1472
1482
  queries?: string[];
1473
1483
  transactionId?: string;
1484
+ total?: boolean;
1474
1485
  }): Promise<Models.DocumentList<Document>>;
1475
1486
  /**
1476
1487
  * Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
@@ -1479,11 +1490,12 @@ declare class Databases {
1479
1490
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1480
1491
  * @param {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.
1481
1492
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1493
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1482
1494
  * @throws {AppwriteException}
1483
1495
  * @returns {Promise<Models.DocumentList<Document>>}
1484
1496
  * @deprecated Use the object parameter style method for a better developer experience.
1485
1497
  */
1486
- listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string): Promise<Models.DocumentList<Document>>;
1498
+ listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
1487
1499
  /**
1488
1500
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1489
1501
  *
@@ -1853,6 +1865,7 @@ declare class Databases {
1853
1865
  * @param {string} params.databaseId - Database ID.
1854
1866
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1855
1867
  * @param {string[]} params.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: key, type, status, attributes, error
1868
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1856
1869
  * @throws {AppwriteException}
1857
1870
  * @returns {Promise<Models.IndexList>}
1858
1871
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
@@ -1861,6 +1874,7 @@ declare class Databases {
1861
1874
  databaseId: string;
1862
1875
  collectionId: string;
1863
1876
  queries?: string[];
1877
+ total?: boolean;
1864
1878
  }): Promise<Models.IndexList>;
1865
1879
  /**
1866
1880
  * List indexes in the collection.
@@ -1868,11 +1882,12 @@ declare class Databases {
1868
1882
  * @param {string} databaseId - Database ID.
1869
1883
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1870
1884
  * @param {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: key, type, status, attributes, error
1885
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1871
1886
  * @throws {AppwriteException}
1872
1887
  * @returns {Promise<Models.IndexList>}
1873
1888
  * @deprecated Use the object parameter style method for a better developer experience.
1874
1889
  */
1875
- listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
1890
+ listIndexes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.IndexList>;
1876
1891
  /**
1877
1892
  * Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
1878
1893
  * Attributes can be `key`, `fulltext`, and `unique`.