node-appwrite 20.3.0 → 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.
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/enums/build-runtime.d.mts +3 -1
- package/dist/enums/build-runtime.d.ts +3 -1
- package/dist/enums/build-runtime.js +2 -0
- package/dist/enums/build-runtime.js.map +1 -1
- package/dist/enums/build-runtime.mjs +2 -0
- package/dist/enums/build-runtime.mjs.map +1 -1
- package/dist/enums/output.d.mts +11 -0
- package/dist/enums/output.d.ts +11 -0
- package/dist/enums/output.js +16 -0
- package/dist/enums/output.js.map +1 -0
- package/dist/enums/output.mjs +15 -0
- package/dist/enums/output.mjs.map +1 -0
- package/dist/enums/runtime.d.mts +3 -1
- package/dist/enums/runtime.d.ts +3 -1
- package/dist/enums/runtime.js +2 -0
- package/dist/enums/runtime.js.map +1 -1
- package/dist/enums/runtime.mjs +2 -0
- package/dist/enums/runtime.mjs.map +1 -1
- package/dist/enums/template-reference-type.d.mts +7 -0
- package/dist/enums/template-reference-type.d.ts +7 -0
- package/dist/enums/template-reference-type.js +12 -0
- package/dist/enums/template-reference-type.js.map +1 -0
- package/dist/enums/template-reference-type.mjs +11 -0
- package/dist/enums/template-reference-type.mjs.map +1 -0
- package/dist/enums/theme.d.mts +6 -0
- package/dist/enums/theme.d.ts +6 -0
- package/dist/enums/theme.js +11 -0
- package/dist/enums/theme.js.map +1 -0
- package/dist/enums/theme.mjs +10 -0
- package/dist/enums/theme.mjs.map +1 -0
- package/dist/enums/timezone.d.mts +423 -0
- package/dist/enums/timezone.d.ts +423 -0
- package/dist/enums/timezone.js +428 -0
- package/dist/enums/timezone.js.map +1 -0
- package/dist/enums/timezone.mjs +427 -0
- package/dist/enums/timezone.mjs.map +1 -0
- package/dist/enums/{vcs-deployment-type.d.mts → vcs-reference-type.d.mts} +2 -2
- package/dist/enums/{vcs-deployment-type.d.ts → vcs-reference-type.d.ts} +2 -2
- package/dist/enums/vcs-reference-type.js +12 -0
- package/dist/enums/vcs-reference-type.js.map +1 -0
- package/dist/enums/vcs-reference-type.mjs +11 -0
- package/dist/enums/vcs-reference-type.mjs.map +1 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +4 -0
- package/dist/models.d.ts +4 -0
- package/dist/services/account.js +4 -4
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +4 -4
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +87 -0
- package/dist/services/avatars.d.ts +87 -0
- package/dist/services/avatars.js +123 -0
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +123 -0
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/functions.d.mts +13 -9
- package/dist/services/functions.d.ts +13 -9
- package/dist/services/functions.js +15 -7
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +15 -7
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/sites.d.mts +15 -11
- package/dist/services/sites.d.ts +15 -11
- package/dist/services/sites.js +15 -7
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +15 -7
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +10 -4
- package/dist/services/storage.d.ts +10 -4
- package/dist/services/storage.js +12 -2
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +12 -2
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +2 -2
- package/dist/services/tables-db.d.ts +2 -2
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/vcs-deployment-type.js +0 -12
- package/dist/enums/vcs-deployment-type.js.map +0 -1
- package/dist/enums/vcs-deployment-type.mjs +0 -11
- 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,CAA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AA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,EA2BA,MACI,kBACG,MACiB;AACpB,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACvF,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,MAAM;AAAA,QACN,MAAM,KAAK,CAAC;AAAA,QACZ,QAAQ,KAAK,CAAC;AAAA,QACd,UAAU,KAAK,CAAC;AAAA,MACpB;AAAA,IACJ;AAEA,UAAM,OAAO,OAAO;AACpB,UAAM,OAAO,OAAO;AACpB,UAAM,SAAS,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,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;AAAA,IACxB;AACA,QAAI,OAAO,YAAY,aAAa;AAChC,cAAQ,SAAS,IAAI;AAAA,IACzB;AACA,UAA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A,IAC1B;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,QAAI,OAAO,aAAa,aAAa;AACjC,cAAQ,UAAU,IAAI;AAAA,IAC1B;AACA,QAAI,OAAO,aAAa,aAAa;AACjC,cAAQ,UAAU,IAAI;AAAA,IAC1B;AACA,QAAI,OAAO,cAAc,aAAa;AAClC,cAAQ,WAAW,IAAI;AAAA,IAC3B;AACA,QAAI,OAAO,aAAa,aAAa;AACjC,cAAQ,UAAU,IAAI;AAAA,IAC1B;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,QAAI,OAAO,gBAAgB,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"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Client, UploadProgress } from '../client.mjs';
|
|
2
2
|
import { Models } from '../models.mjs';
|
|
3
3
|
import { Runtime } from '../enums/runtime.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { TemplateReferenceType } from '../enums/template-reference-type.mjs';
|
|
5
|
+
import { VCSReferenceType } from '../enums/vcs-reference-type.mjs';
|
|
5
6
|
import { DeploymentDownloadType } from '../enums/deployment-download-type.mjs';
|
|
6
7
|
import { ExecutionMethod } from '../enums/execution-method.mjs';
|
|
7
8
|
import '../query.mjs';
|
|
@@ -360,7 +361,8 @@ declare class Functions {
|
|
|
360
361
|
* @param {string} params.repository - Repository name of the template.
|
|
361
362
|
* @param {string} params.owner - The name of the owner of the template.
|
|
362
363
|
* @param {string} params.rootDirectory - Path to function code in the template repo.
|
|
363
|
-
* @param {
|
|
364
|
+
* @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
|
|
365
|
+
* @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
|
|
364
366
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
365
367
|
* @throws {AppwriteException}
|
|
366
368
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -370,7 +372,8 @@ declare class Functions {
|
|
|
370
372
|
repository: string;
|
|
371
373
|
owner: string;
|
|
372
374
|
rootDirectory: string;
|
|
373
|
-
|
|
375
|
+
type: TemplateReferenceType;
|
|
376
|
+
reference: string;
|
|
374
377
|
activate?: boolean;
|
|
375
378
|
}): Promise<Models.Deployment>;
|
|
376
379
|
/**
|
|
@@ -382,20 +385,21 @@ declare class Functions {
|
|
|
382
385
|
* @param {string} repository - Repository name of the template.
|
|
383
386
|
* @param {string} owner - The name of the owner of the template.
|
|
384
387
|
* @param {string} rootDirectory - Path to function code in the template repo.
|
|
385
|
-
* @param {
|
|
388
|
+
* @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
|
|
389
|
+
* @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
|
|
386
390
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
387
391
|
* @throws {AppwriteException}
|
|
388
392
|
* @returns {Promise<Models.Deployment>}
|
|
389
393
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
390
394
|
*/
|
|
391
|
-
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string,
|
|
395
|
+
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
392
396
|
/**
|
|
393
397
|
* Create a deployment when a function is connected to VCS.
|
|
394
398
|
*
|
|
395
399
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
396
400
|
*
|
|
397
401
|
* @param {string} params.functionId - Function ID.
|
|
398
|
-
* @param {
|
|
402
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
399
403
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
400
404
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
401
405
|
* @throws {AppwriteException}
|
|
@@ -403,7 +407,7 @@ declare class Functions {
|
|
|
403
407
|
*/
|
|
404
408
|
createVcsDeployment(params: {
|
|
405
409
|
functionId: string;
|
|
406
|
-
type:
|
|
410
|
+
type: VCSReferenceType;
|
|
407
411
|
reference: string;
|
|
408
412
|
activate?: boolean;
|
|
409
413
|
}): Promise<Models.Deployment>;
|
|
@@ -413,14 +417,14 @@ declare class Functions {
|
|
|
413
417
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
414
418
|
*
|
|
415
419
|
* @param {string} functionId - Function ID.
|
|
416
|
-
* @param {
|
|
420
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
417
421
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
418
422
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
419
423
|
* @throws {AppwriteException}
|
|
420
424
|
* @returns {Promise<Models.Deployment>}
|
|
421
425
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
422
426
|
*/
|
|
423
|
-
createVcsDeployment(functionId: string, type:
|
|
427
|
+
createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
424
428
|
/**
|
|
425
429
|
* Get a function deployment by its unique ID.
|
|
426
430
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Client, UploadProgress } from '../client.js';
|
|
2
2
|
import { Models } from '../models.js';
|
|
3
3
|
import { Runtime } from '../enums/runtime.js';
|
|
4
|
-
import {
|
|
4
|
+
import { TemplateReferenceType } from '../enums/template-reference-type.js';
|
|
5
|
+
import { VCSReferenceType } from '../enums/vcs-reference-type.js';
|
|
5
6
|
import { DeploymentDownloadType } from '../enums/deployment-download-type.js';
|
|
6
7
|
import { ExecutionMethod } from '../enums/execution-method.js';
|
|
7
8
|
import '../query.js';
|
|
@@ -360,7 +361,8 @@ declare class Functions {
|
|
|
360
361
|
* @param {string} params.repository - Repository name of the template.
|
|
361
362
|
* @param {string} params.owner - The name of the owner of the template.
|
|
362
363
|
* @param {string} params.rootDirectory - Path to function code in the template repo.
|
|
363
|
-
* @param {
|
|
364
|
+
* @param {TemplateReferenceType} params.type - Type for the reference provided. Can be commit, branch, or tag
|
|
365
|
+
* @param {string} params.reference - Reference value, can be a commit hash, branch name, or release tag
|
|
364
366
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
365
367
|
* @throws {AppwriteException}
|
|
366
368
|
* @returns {Promise<Models.Deployment>}
|
|
@@ -370,7 +372,8 @@ declare class Functions {
|
|
|
370
372
|
repository: string;
|
|
371
373
|
owner: string;
|
|
372
374
|
rootDirectory: string;
|
|
373
|
-
|
|
375
|
+
type: TemplateReferenceType;
|
|
376
|
+
reference: string;
|
|
374
377
|
activate?: boolean;
|
|
375
378
|
}): Promise<Models.Deployment>;
|
|
376
379
|
/**
|
|
@@ -382,20 +385,21 @@ declare class Functions {
|
|
|
382
385
|
* @param {string} repository - Repository name of the template.
|
|
383
386
|
* @param {string} owner - The name of the owner of the template.
|
|
384
387
|
* @param {string} rootDirectory - Path to function code in the template repo.
|
|
385
|
-
* @param {
|
|
388
|
+
* @param {TemplateReferenceType} type - Type for the reference provided. Can be commit, branch, or tag
|
|
389
|
+
* @param {string} reference - Reference value, can be a commit hash, branch name, or release tag
|
|
386
390
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
387
391
|
* @throws {AppwriteException}
|
|
388
392
|
* @returns {Promise<Models.Deployment>}
|
|
389
393
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
390
394
|
*/
|
|
391
|
-
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string,
|
|
395
|
+
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
392
396
|
/**
|
|
393
397
|
* Create a deployment when a function is connected to VCS.
|
|
394
398
|
*
|
|
395
399
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
396
400
|
*
|
|
397
401
|
* @param {string} params.functionId - Function ID.
|
|
398
|
-
* @param {
|
|
402
|
+
* @param {VCSReferenceType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
399
403
|
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
400
404
|
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
401
405
|
* @throws {AppwriteException}
|
|
@@ -403,7 +407,7 @@ declare class Functions {
|
|
|
403
407
|
*/
|
|
404
408
|
createVcsDeployment(params: {
|
|
405
409
|
functionId: string;
|
|
406
|
-
type:
|
|
410
|
+
type: VCSReferenceType;
|
|
407
411
|
reference: string;
|
|
408
412
|
activate?: boolean;
|
|
409
413
|
}): Promise<Models.Deployment>;
|
|
@@ -413,14 +417,14 @@ declare class Functions {
|
|
|
413
417
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
414
418
|
*
|
|
415
419
|
* @param {string} functionId - Function ID.
|
|
416
|
-
* @param {
|
|
420
|
+
* @param {VCSReferenceType} type - Type of reference passed. Allowed values are: branch, commit
|
|
417
421
|
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
418
422
|
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
419
423
|
* @throws {AppwriteException}
|
|
420
424
|
* @returns {Promise<Models.Deployment>}
|
|
421
425
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
422
426
|
*/
|
|
423
|
-
createVcsDeployment(functionId: string, type:
|
|
427
|
+
createVcsDeployment(functionId: string, type: VCSReferenceType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
424
428
|
/**
|
|
425
429
|
* Get a function deployment by its unique ID.
|
|
426
430
|
*
|
|
@@ -538,15 +538,17 @@ class Functions {
|
|
|
538
538
|
repository: rest[0],
|
|
539
539
|
owner: rest[1],
|
|
540
540
|
rootDirectory: rest[2],
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
type: rest[3],
|
|
542
|
+
reference: rest[4],
|
|
543
|
+
activate: rest[5]
|
|
543
544
|
};
|
|
544
545
|
}
|
|
545
546
|
const functionId = params.functionId;
|
|
546
547
|
const repository = params.repository;
|
|
547
548
|
const owner = params.owner;
|
|
548
549
|
const rootDirectory = params.rootDirectory;
|
|
549
|
-
const
|
|
550
|
+
const type = params.type;
|
|
551
|
+
const reference = params.reference;
|
|
550
552
|
const activate = params.activate;
|
|
551
553
|
if (typeof functionId === "undefined") {
|
|
552
554
|
throw new client.AppwriteException('Missing required parameter: "functionId"');
|
|
@@ -560,8 +562,11 @@ class Functions {
|
|
|
560
562
|
if (typeof rootDirectory === "undefined") {
|
|
561
563
|
throw new client.AppwriteException('Missing required parameter: "rootDirectory"');
|
|
562
564
|
}
|
|
563
|
-
if (typeof
|
|
564
|
-
throw new client.AppwriteException('Missing required parameter: "
|
|
565
|
+
if (typeof type === "undefined") {
|
|
566
|
+
throw new client.AppwriteException('Missing required parameter: "type"');
|
|
567
|
+
}
|
|
568
|
+
if (typeof reference === "undefined") {
|
|
569
|
+
throw new client.AppwriteException('Missing required parameter: "reference"');
|
|
565
570
|
}
|
|
566
571
|
const apiPath = "/functions/{functionId}/deployments/template".replace("{functionId}", functionId);
|
|
567
572
|
const payload = {};
|
|
@@ -574,8 +579,11 @@ class Functions {
|
|
|
574
579
|
if (typeof rootDirectory !== "undefined") {
|
|
575
580
|
payload["rootDirectory"] = rootDirectory;
|
|
576
581
|
}
|
|
577
|
-
if (typeof
|
|
578
|
-
payload["
|
|
582
|
+
if (typeof type !== "undefined") {
|
|
583
|
+
payload["type"] = type;
|
|
584
|
+
}
|
|
585
|
+
if (typeof reference !== "undefined") {
|
|
586
|
+
payload["reference"] = reference;
|
|
579
587
|
}
|
|
580
588
|
if (typeof activate !== "undefined") {
|
|
581
589
|
payload["activate"] = activate;
|