node-appwrite 15.0.0 → 15.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/client.js +7 -4
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +7 -4
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/models.d.mts +2 -2
  6. package/dist/models.d.ts +2 -2
  7. package/dist/services/account.d.mts +0 -86
  8. package/dist/services/account.d.ts +0 -86
  9. package/dist/services/account.js +86 -172
  10. package/dist/services/account.js.map +1 -1
  11. package/dist/services/account.mjs +86 -172
  12. package/dist/services/account.mjs.map +1 -1
  13. package/dist/services/avatars.d.mts +0 -14
  14. package/dist/services/avatars.d.ts +0 -14
  15. package/dist/services/avatars.js +14 -28
  16. package/dist/services/avatars.js.map +1 -1
  17. package/dist/services/avatars.mjs +14 -28
  18. package/dist/services/avatars.mjs.map +1 -1
  19. package/dist/services/databases.d.mts +0 -84
  20. package/dist/services/databases.d.ts +0 -84
  21. package/dist/services/databases.js +84 -168
  22. package/dist/services/databases.js.map +1 -1
  23. package/dist/services/databases.mjs +84 -168
  24. package/dist/services/databases.mjs.map +1 -1
  25. package/dist/services/functions.d.mts +0 -48
  26. package/dist/services/functions.d.ts +0 -48
  27. package/dist/services/functions.js +48 -96
  28. package/dist/services/functions.js.map +1 -1
  29. package/dist/services/functions.mjs +48 -96
  30. package/dist/services/functions.mjs.map +1 -1
  31. package/dist/services/graphql.d.mts +0 -4
  32. package/dist/services/graphql.d.ts +0 -4
  33. package/dist/services/graphql.js +4 -8
  34. package/dist/services/graphql.js.map +1 -1
  35. package/dist/services/graphql.mjs +4 -8
  36. package/dist/services/graphql.mjs.map +1 -1
  37. package/dist/services/health.d.mts +0 -46
  38. package/dist/services/health.d.ts +0 -46
  39. package/dist/services/health.js +46 -92
  40. package/dist/services/health.js.map +1 -1
  41. package/dist/services/health.mjs +46 -92
  42. package/dist/services/health.mjs.map +1 -1
  43. package/dist/services/locale.d.mts +0 -16
  44. package/dist/services/locale.d.ts +0 -16
  45. package/dist/services/locale.js +16 -32
  46. package/dist/services/locale.js.map +1 -1
  47. package/dist/services/locale.mjs +16 -32
  48. package/dist/services/locale.mjs.map +1 -1
  49. package/dist/services/messaging.d.mts +3 -95
  50. package/dist/services/messaging.d.ts +3 -95
  51. package/dist/services/messaging.js +95 -187
  52. package/dist/services/messaging.js.map +1 -1
  53. package/dist/services/messaging.mjs +95 -187
  54. package/dist/services/messaging.mjs.map +1 -1
  55. package/dist/services/storage.d.mts +0 -26
  56. package/dist/services/storage.d.ts +0 -26
  57. package/dist/services/storage.js +26 -52
  58. package/dist/services/storage.js.map +1 -1
  59. package/dist/services/storage.mjs +26 -52
  60. package/dist/services/storage.mjs.map +1 -1
  61. package/dist/services/teams.d.mts +0 -26
  62. package/dist/services/teams.d.ts +0 -26
  63. package/dist/services/teams.js +26 -52
  64. package/dist/services/teams.js.map +1 -1
  65. package/dist/services/teams.mjs +26 -52
  66. package/dist/services/teams.mjs.map +1 -1
  67. package/dist/services/users.d.mts +0 -84
  68. package/dist/services/users.d.ts +0 -84
  69. package/dist/services/users.js +84 -168
  70. package/dist/services/users.js.map +1 -1
  71. package/dist/services/users.mjs +84 -168
  72. package/dist/services/users.mjs.map +1 -1
  73. package/package.json +1 -1
@@ -7,8 +7,6 @@ class Functions {
7
7
  this.client = client;
8
8
  }
9
9
  /**
10
- * List functions
11
- *
12
10
  * Get a list of all the project's functions. You can use the query params to filter your results.
13
11
  *
14
12
  * @param {string[]} queries
@@ -16,7 +14,7 @@ class Functions {
16
14
  * @throws {AppwriteException}
17
15
  * @returns {Promise<Models.FunctionList>}
18
16
  */
19
- async list(queries, search) {
17
+ list(queries, search) {
20
18
  const apiPath = "/functions";
21
19
  const payload = {};
22
20
  if (typeof queries !== "undefined") {
@@ -29,7 +27,7 @@ class Functions {
29
27
  const apiHeaders = {
30
28
  "content-type": "application/json"
31
29
  };
32
- return await this.client.call(
30
+ return this.client.call(
33
31
  "get",
34
32
  uri,
35
33
  apiHeaders,
@@ -37,8 +35,6 @@ class Functions {
37
35
  );
38
36
  }
39
37
  /**
40
- * Create function
41
- *
42
38
  * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
43
39
  *
44
40
  * @param {string} functionId
@@ -66,7 +62,7 @@ class Functions {
66
62
  * @throws {AppwriteException}
67
63
  * @returns {Promise<Models.Function>}
68
64
  */
69
- async create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateVersion, specification) {
65
+ create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, templateRepository, templateOwner, templateRootDirectory, templateVersion, specification) {
70
66
  if (typeof functionId === "undefined") {
71
67
  throw new client.AppwriteException('Missing required parameter: "functionId"');
72
68
  }
@@ -148,7 +144,7 @@ class Functions {
148
144
  const apiHeaders = {
149
145
  "content-type": "application/json"
150
146
  };
151
- return await this.client.call(
147
+ return this.client.call(
152
148
  "post",
153
149
  uri,
154
150
  apiHeaders,
@@ -156,21 +152,19 @@ class Functions {
156
152
  );
157
153
  }
158
154
  /**
159
- * List runtimes
160
- *
161
155
  * Get a list of all runtimes that are currently active on your instance.
162
156
  *
163
157
  * @throws {AppwriteException}
164
158
  * @returns {Promise<Models.RuntimeList>}
165
159
  */
166
- async listRuntimes() {
160
+ listRuntimes() {
167
161
  const apiPath = "/functions/runtimes";
168
162
  const payload = {};
169
163
  const uri = new URL(this.client.config.endpoint + apiPath);
170
164
  const apiHeaders = {
171
165
  "content-type": "application/json"
172
166
  };
173
- return await this.client.call(
167
+ return this.client.call(
174
168
  "get",
175
169
  uri,
176
170
  apiHeaders,
@@ -178,22 +172,20 @@ class Functions {
178
172
  );
179
173
  }
180
174
  /**
181
- * List available function runtime specifications
182
- *
183
175
  * List allowed function specifications for this instance.
184
176
 
185
177
  *
186
178
  * @throws {AppwriteException}
187
179
  * @returns {Promise<Models.SpecificationList>}
188
180
  */
189
- async listSpecifications() {
181
+ listSpecifications() {
190
182
  const apiPath = "/functions/specifications";
191
183
  const payload = {};
192
184
  const uri = new URL(this.client.config.endpoint + apiPath);
193
185
  const apiHeaders = {
194
186
  "content-type": "application/json"
195
187
  };
196
- return await this.client.call(
188
+ return this.client.call(
197
189
  "get",
198
190
  uri,
199
191
  apiHeaders,
@@ -201,15 +193,13 @@ class Functions {
201
193
  );
202
194
  }
203
195
  /**
204
- * Get function
205
- *
206
196
  * Get a function by its unique ID.
207
197
  *
208
198
  * @param {string} functionId
209
199
  * @throws {AppwriteException}
210
200
  * @returns {Promise<Models.Function>}
211
201
  */
212
- async get(functionId) {
202
+ get(functionId) {
213
203
  if (typeof functionId === "undefined") {
214
204
  throw new client.AppwriteException('Missing required parameter: "functionId"');
215
205
  }
@@ -219,7 +209,7 @@ class Functions {
219
209
  const apiHeaders = {
220
210
  "content-type": "application/json"
221
211
  };
222
- return await this.client.call(
212
+ return this.client.call(
223
213
  "get",
224
214
  uri,
225
215
  apiHeaders,
@@ -227,8 +217,6 @@ class Functions {
227
217
  );
228
218
  }
229
219
  /**
230
- * Update function
231
- *
232
220
  * Update function by its unique ID.
233
221
  *
234
222
  * @param {string} functionId
@@ -252,7 +240,7 @@ class Functions {
252
240
  * @throws {AppwriteException}
253
241
  * @returns {Promise<Models.Function>}
254
242
  */
255
- async update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification) {
243
+ update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, specification) {
256
244
  if (typeof functionId === "undefined") {
257
245
  throw new client.AppwriteException('Missing required parameter: "functionId"');
258
246
  }
@@ -316,7 +304,7 @@ class Functions {
316
304
  const apiHeaders = {
317
305
  "content-type": "application/json"
318
306
  };
319
- return await this.client.call(
307
+ return this.client.call(
320
308
  "put",
321
309
  uri,
322
310
  apiHeaders,
@@ -324,15 +312,13 @@ class Functions {
324
312
  );
325
313
  }
326
314
  /**
327
- * Delete function
328
- *
329
315
  * Delete a function by its unique ID.
330
316
  *
331
317
  * @param {string} functionId
332
318
  * @throws {AppwriteException}
333
319
  * @returns {Promise<{}>}
334
320
  */
335
- async delete(functionId) {
321
+ delete(functionId) {
336
322
  if (typeof functionId === "undefined") {
337
323
  throw new client.AppwriteException('Missing required parameter: "functionId"');
338
324
  }
@@ -342,7 +328,7 @@ class Functions {
342
328
  const apiHeaders = {
343
329
  "content-type": "application/json"
344
330
  };
345
- return await this.client.call(
331
+ return this.client.call(
346
332
  "delete",
347
333
  uri,
348
334
  apiHeaders,
@@ -350,8 +336,6 @@ class Functions {
350
336
  );
351
337
  }
352
338
  /**
353
- * List deployments
354
- *
355
339
  * Get a list of all the project&#039;s code deployments. You can use the query params to filter your results.
356
340
  *
357
341
  * @param {string} functionId
@@ -360,7 +344,7 @@ class Functions {
360
344
  * @throws {AppwriteException}
361
345
  * @returns {Promise<Models.DeploymentList>}
362
346
  */
363
- async listDeployments(functionId, queries, search) {
347
+ listDeployments(functionId, queries, search) {
364
348
  if (typeof functionId === "undefined") {
365
349
  throw new client.AppwriteException('Missing required parameter: "functionId"');
366
350
  }
@@ -376,7 +360,7 @@ class Functions {
376
360
  const apiHeaders = {
377
361
  "content-type": "application/json"
378
362
  };
379
- return await this.client.call(
363
+ return this.client.call(
380
364
  "get",
381
365
  uri,
382
366
  apiHeaders,
@@ -384,8 +368,6 @@ class Functions {
384
368
  );
385
369
  }
386
370
  /**
387
- * Create deployment
388
- *
389
371
  * Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you&#039;ll need to update the function&#039;s deployment to use your new deployment UID.
390
372
 
391
373
  This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
@@ -400,7 +382,7 @@ class Functions {
400
382
  * @throws {AppwriteException}
401
383
  * @returns {Promise<Models.Deployment>}
402
384
  */
403
- async createDeployment(functionId, code, activate, entrypoint, commands, onProgress = (progress) => {
385
+ createDeployment(functionId, code, activate, entrypoint, commands, onProgress = (progress) => {
404
386
  }) {
405
387
  if (typeof functionId === "undefined") {
406
388
  throw new client.AppwriteException('Missing required parameter: "functionId"');
@@ -429,7 +411,7 @@ class Functions {
429
411
  const apiHeaders = {
430
412
  "content-type": "multipart/form-data"
431
413
  };
432
- return await this.client.chunkedUpload(
414
+ return this.client.chunkedUpload(
433
415
  "post",
434
416
  uri,
435
417
  apiHeaders,
@@ -438,8 +420,6 @@ class Functions {
438
420
  );
439
421
  }
440
422
  /**
441
- * Get deployment
442
- *
443
423
  * Get a code deployment by its unique ID.
444
424
  *
445
425
  * @param {string} functionId
@@ -447,7 +427,7 @@ class Functions {
447
427
  * @throws {AppwriteException}
448
428
  * @returns {Promise<Models.Deployment>}
449
429
  */
450
- async getDeployment(functionId, deploymentId) {
430
+ getDeployment(functionId, deploymentId) {
451
431
  if (typeof functionId === "undefined") {
452
432
  throw new client.AppwriteException('Missing required parameter: "functionId"');
453
433
  }
@@ -460,7 +440,7 @@ class Functions {
460
440
  const apiHeaders = {
461
441
  "content-type": "application/json"
462
442
  };
463
- return await this.client.call(
443
+ return this.client.call(
464
444
  "get",
465
445
  uri,
466
446
  apiHeaders,
@@ -468,8 +448,6 @@ class Functions {
468
448
  );
469
449
  }
470
450
  /**
471
- * Update deployment
472
- *
473
451
  * Update the function code deployment ID using the unique function ID. Use this endpoint to switch the code deployment that should be executed by the execution endpoint.
474
452
  *
475
453
  * @param {string} functionId
@@ -477,7 +455,7 @@ class Functions {
477
455
  * @throws {AppwriteException}
478
456
  * @returns {Promise<Models.Function>}
479
457
  */
480
- async updateDeployment(functionId, deploymentId) {
458
+ updateDeployment(functionId, deploymentId) {
481
459
  if (typeof functionId === "undefined") {
482
460
  throw new client.AppwriteException('Missing required parameter: "functionId"');
483
461
  }
@@ -490,7 +468,7 @@ class Functions {
490
468
  const apiHeaders = {
491
469
  "content-type": "application/json"
492
470
  };
493
- return await this.client.call(
471
+ return this.client.call(
494
472
  "patch",
495
473
  uri,
496
474
  apiHeaders,
@@ -498,8 +476,6 @@ class Functions {
498
476
  );
499
477
  }
500
478
  /**
501
- * Delete deployment
502
- *
503
479
  * Delete a code deployment by its unique ID.
504
480
  *
505
481
  * @param {string} functionId
@@ -507,7 +483,7 @@ class Functions {
507
483
  * @throws {AppwriteException}
508
484
  * @returns {Promise<{}>}
509
485
  */
510
- async deleteDeployment(functionId, deploymentId) {
486
+ deleteDeployment(functionId, deploymentId) {
511
487
  if (typeof functionId === "undefined") {
512
488
  throw new client.AppwriteException('Missing required parameter: "functionId"');
513
489
  }
@@ -520,7 +496,7 @@ class Functions {
520
496
  const apiHeaders = {
521
497
  "content-type": "application/json"
522
498
  };
523
- return await this.client.call(
499
+ return this.client.call(
524
500
  "delete",
525
501
  uri,
526
502
  apiHeaders,
@@ -528,8 +504,6 @@ class Functions {
528
504
  );
529
505
  }
530
506
  /**
531
- * Rebuild deployment
532
- *
533
507
  * Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified The build process will be queued and executed asynchronously. The original deployment&#039;s code will be preserved and used for the new build.
534
508
  *
535
509
  * @param {string} functionId
@@ -538,7 +512,7 @@ class Functions {
538
512
  * @throws {AppwriteException}
539
513
  * @returns {Promise<{}>}
540
514
  */
541
- async createBuild(functionId, deploymentId, buildId) {
515
+ createBuild(functionId, deploymentId, buildId) {
542
516
  if (typeof functionId === "undefined") {
543
517
  throw new client.AppwriteException('Missing required parameter: "functionId"');
544
518
  }
@@ -554,7 +528,7 @@ class Functions {
554
528
  const apiHeaders = {
555
529
  "content-type": "application/json"
556
530
  };
557
- return await this.client.call(
531
+ return this.client.call(
558
532
  "post",
559
533
  uri,
560
534
  apiHeaders,
@@ -562,8 +536,6 @@ class Functions {
562
536
  );
563
537
  }
564
538
  /**
565
- * Cancel deployment
566
- *
567
539
  * Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn&#039;t started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status &#039;ready&#039;) or failed. The response includes the final build status and details.
568
540
  *
569
541
  * @param {string} functionId
@@ -571,7 +543,7 @@ class Functions {
571
543
  * @throws {AppwriteException}
572
544
  * @returns {Promise<Models.Build>}
573
545
  */
574
- async updateDeploymentBuild(functionId, deploymentId) {
546
+ updateDeploymentBuild(functionId, deploymentId) {
575
547
  if (typeof functionId === "undefined") {
576
548
  throw new client.AppwriteException('Missing required parameter: "functionId"');
577
549
  }
@@ -584,7 +556,7 @@ class Functions {
584
556
  const apiHeaders = {
585
557
  "content-type": "application/json"
586
558
  };
587
- return await this.client.call(
559
+ return this.client.call(
588
560
  "patch",
589
561
  uri,
590
562
  apiHeaders,
@@ -592,8 +564,6 @@ class Functions {
592
564
  );
593
565
  }
594
566
  /**
595
- * Download deployment
596
- *
597
567
  * Get a Deployment&#039;s contents by its unique ID. This endpoint supports range requests for partial or streaming file download.
598
568
  *
599
569
  * @param {string} functionId
@@ -601,7 +571,7 @@ class Functions {
601
571
  * @throws {AppwriteException}
602
572
  * @returns {Promise<ArrayBuffer>}
603
573
  */
604
- async getDeploymentDownload(functionId, deploymentId) {
574
+ getDeploymentDownload(functionId, deploymentId) {
605
575
  if (typeof functionId === "undefined") {
606
576
  throw new client.AppwriteException('Missing required parameter: "functionId"');
607
577
  }
@@ -614,7 +584,7 @@ class Functions {
614
584
  const apiHeaders = {
615
585
  "content-type": "application/json"
616
586
  };
617
- return await this.client.call(
587
+ return this.client.call(
618
588
  "get",
619
589
  uri,
620
590
  apiHeaders,
@@ -623,8 +593,6 @@ class Functions {
623
593
  );
624
594
  }
625
595
  /**
626
- * List executions
627
- *
628
596
  * Get a list of all the current user function execution logs. You can use the query params to filter your results.
629
597
  *
630
598
  * @param {string} functionId
@@ -633,7 +601,7 @@ class Functions {
633
601
  * @throws {AppwriteException}
634
602
  * @returns {Promise<Models.ExecutionList>}
635
603
  */
636
- async listExecutions(functionId, queries, search) {
604
+ listExecutions(functionId, queries, search) {
637
605
  if (typeof functionId === "undefined") {
638
606
  throw new client.AppwriteException('Missing required parameter: "functionId"');
639
607
  }
@@ -649,7 +617,7 @@ class Functions {
649
617
  const apiHeaders = {
650
618
  "content-type": "application/json"
651
619
  };
652
- return await this.client.call(
620
+ return this.client.call(
653
621
  "get",
654
622
  uri,
655
623
  apiHeaders,
@@ -657,8 +625,6 @@ class Functions {
657
625
  );
658
626
  }
659
627
  /**
660
- * Create execution
661
- *
662
628
  * Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
663
629
  *
664
630
  * @param {string} functionId
@@ -671,7 +637,7 @@ class Functions {
671
637
  * @throws {AppwriteException}
672
638
  * @returns {Promise<Models.Execution>}
673
639
  */
674
- async createExecution(functionId, body, async, xpath, method, headers, scheduledAt) {
640
+ createExecution(functionId, body, async, xpath, method, headers, scheduledAt) {
675
641
  if (typeof functionId === "undefined") {
676
642
  throw new client.AppwriteException('Missing required parameter: "functionId"');
677
643
  }
@@ -699,7 +665,7 @@ class Functions {
699
665
  const apiHeaders = {
700
666
  "content-type": "application/json"
701
667
  };
702
- return await this.client.call(
668
+ return this.client.call(
703
669
  "post",
704
670
  uri,
705
671
  apiHeaders,
@@ -707,8 +673,6 @@ class Functions {
707
673
  );
708
674
  }
709
675
  /**
710
- * Get execution
711
- *
712
676
  * Get a function execution log by its unique ID.
713
677
  *
714
678
  * @param {string} functionId
@@ -716,7 +680,7 @@ class Functions {
716
680
  * @throws {AppwriteException}
717
681
  * @returns {Promise<Models.Execution>}
718
682
  */
719
- async getExecution(functionId, executionId) {
683
+ getExecution(functionId, executionId) {
720
684
  if (typeof functionId === "undefined") {
721
685
  throw new client.AppwriteException('Missing required parameter: "functionId"');
722
686
  }
@@ -729,7 +693,7 @@ class Functions {
729
693
  const apiHeaders = {
730
694
  "content-type": "application/json"
731
695
  };
732
- return await this.client.call(
696
+ return this.client.call(
733
697
  "get",
734
698
  uri,
735
699
  apiHeaders,
@@ -737,8 +701,6 @@ class Functions {
737
701
  );
738
702
  }
739
703
  /**
740
- * Delete execution
741
- *
742
704
  * Delete a function execution by its unique ID.
743
705
 
744
706
  *
@@ -747,7 +709,7 @@ class Functions {
747
709
  * @throws {AppwriteException}
748
710
  * @returns {Promise<{}>}
749
711
  */
750
- async deleteExecution(functionId, executionId) {
712
+ deleteExecution(functionId, executionId) {
751
713
  if (typeof functionId === "undefined") {
752
714
  throw new client.AppwriteException('Missing required parameter: "functionId"');
753
715
  }
@@ -760,7 +722,7 @@ class Functions {
760
722
  const apiHeaders = {
761
723
  "content-type": "application/json"
762
724
  };
763
- return await this.client.call(
725
+ return this.client.call(
764
726
  "delete",
765
727
  uri,
766
728
  apiHeaders,
@@ -768,15 +730,13 @@ class Functions {
768
730
  );
769
731
  }
770
732
  /**
771
- * List variables
772
- *
773
733
  * Get a list of all variables of a specific function.
774
734
  *
775
735
  * @param {string} functionId
776
736
  * @throws {AppwriteException}
777
737
  * @returns {Promise<Models.VariableList>}
778
738
  */
779
- async listVariables(functionId) {
739
+ listVariables(functionId) {
780
740
  if (typeof functionId === "undefined") {
781
741
  throw new client.AppwriteException('Missing required parameter: "functionId"');
782
742
  }
@@ -786,7 +746,7 @@ class Functions {
786
746
  const apiHeaders = {
787
747
  "content-type": "application/json"
788
748
  };
789
- return await this.client.call(
749
+ return this.client.call(
790
750
  "get",
791
751
  uri,
792
752
  apiHeaders,
@@ -794,8 +754,6 @@ class Functions {
794
754
  );
795
755
  }
796
756
  /**
797
- * Create variable
798
- *
799
757
  * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
800
758
  *
801
759
  * @param {string} functionId
@@ -804,7 +762,7 @@ class Functions {
804
762
  * @throws {AppwriteException}
805
763
  * @returns {Promise<Models.Variable>}
806
764
  */
807
- async createVariable(functionId, key, value) {
765
+ createVariable(functionId, key, value) {
808
766
  if (typeof functionId === "undefined") {
809
767
  throw new client.AppwriteException('Missing required parameter: "functionId"');
810
768
  }
@@ -826,7 +784,7 @@ class Functions {
826
784
  const apiHeaders = {
827
785
  "content-type": "application/json"
828
786
  };
829
- return await this.client.call(
787
+ return this.client.call(
830
788
  "post",
831
789
  uri,
832
790
  apiHeaders,
@@ -834,8 +792,6 @@ class Functions {
834
792
  );
835
793
  }
836
794
  /**
837
- * Get variable
838
- *
839
795
  * Get a variable by its unique ID.
840
796
  *
841
797
  * @param {string} functionId
@@ -843,7 +799,7 @@ class Functions {
843
799
  * @throws {AppwriteException}
844
800
  * @returns {Promise<Models.Variable>}
845
801
  */
846
- async getVariable(functionId, variableId) {
802
+ getVariable(functionId, variableId) {
847
803
  if (typeof functionId === "undefined") {
848
804
  throw new client.AppwriteException('Missing required parameter: "functionId"');
849
805
  }
@@ -856,7 +812,7 @@ class Functions {
856
812
  const apiHeaders = {
857
813
  "content-type": "application/json"
858
814
  };
859
- return await this.client.call(
815
+ return this.client.call(
860
816
  "get",
861
817
  uri,
862
818
  apiHeaders,
@@ -864,8 +820,6 @@ class Functions {
864
820
  );
865
821
  }
866
822
  /**
867
- * Update variable
868
- *
869
823
  * Update variable by its unique ID.
870
824
  *
871
825
  * @param {string} functionId
@@ -875,7 +829,7 @@ class Functions {
875
829
  * @throws {AppwriteException}
876
830
  * @returns {Promise<Models.Variable>}
877
831
  */
878
- async updateVariable(functionId, variableId, key, value) {
832
+ updateVariable(functionId, variableId, key, value) {
879
833
  if (typeof functionId === "undefined") {
880
834
  throw new client.AppwriteException('Missing required parameter: "functionId"');
881
835
  }
@@ -897,7 +851,7 @@ class Functions {
897
851
  const apiHeaders = {
898
852
  "content-type": "application/json"
899
853
  };
900
- return await this.client.call(
854
+ return this.client.call(
901
855
  "put",
902
856
  uri,
903
857
  apiHeaders,
@@ -905,8 +859,6 @@ class Functions {
905
859
  );
906
860
  }
907
861
  /**
908
- * Delete variable
909
- *
910
862
  * Delete a variable by its unique ID.
911
863
  *
912
864
  * @param {string} functionId
@@ -914,7 +866,7 @@ class Functions {
914
866
  * @throws {AppwriteException}
915
867
  * @returns {Promise<{}>}
916
868
  */
917
- async deleteVariable(functionId, variableId) {
869
+ deleteVariable(functionId, variableId) {
918
870
  if (typeof functionId === "undefined") {
919
871
  throw new client.AppwriteException('Missing required parameter: "functionId"');
920
872
  }
@@ -927,7 +879,7 @@ class Functions {
927
879
  const apiHeaders = {
928
880
  "content-type": "application/json"
929
881
  };
930
- return await this.client.call(
882
+ return this.client.call(
931
883
  "delete",
932
884
  uri,
933
885
  apiHeaders,