@appwrite.io/console 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/sdk.js +7714 -9758
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +7714 -9758
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +7714 -9758
  7. package/docs/examples/databases/update-float-attribute.md +2 -2
  8. package/docs/examples/databases/update-integer-attribute.md +2 -2
  9. package/docs/examples/health/{get-queue-usage-count.md → get-queue-stats-resources.md} +1 -1
  10. package/docs/examples/health/{get-queue-usage-dump.md → get-queue-stats-usage-dump.md} +1 -1
  11. package/docs/examples/organizations/create.md +5 -1
  12. package/docs/examples/organizations/update-plan.md +5 -1
  13. package/docs/examples/organizations/validate-invoice.md +14 -0
  14. package/package.json +1 -1
  15. package/src/client.ts +21 -4
  16. package/src/enums/credit-card.ts +1 -0
  17. package/src/enums/name.ts +3 -2
  18. package/src/enums/o-auth-provider.ts +1 -0
  19. package/src/enums/runtime.ts +3 -0
  20. package/src/models.ts +202 -5
  21. package/src/services/account.ts +126 -430
  22. package/src/services/assistant.ts +2 -7
  23. package/src/services/avatars.ts +7 -21
  24. package/src/services/backups.ts +24 -84
  25. package/src/services/console.ts +14 -49
  26. package/src/services/databases.ts +99 -350
  27. package/src/services/functions.ts +55 -192
  28. package/src/services/graphql.ts +4 -14
  29. package/src/services/health.ts +55 -207
  30. package/src/services/locale.ts +16 -56
  31. package/src/services/messaging.ts +92 -322
  32. package/src/services/migrations.ts +24 -84
  33. package/src/services/organizations.ts +118 -196
  34. package/src/services/project.ts +12 -42
  35. package/src/services/projects.ts +92 -322
  36. package/src/services/proxy.ts +10 -35
  37. package/src/services/storage.ts +27 -93
  38. package/src/services/teams.ts +28 -98
  39. package/src/services/users.ts +86 -301
  40. package/src/services/vcs.ts +20 -70
  41. package/types/enums/credit-card.d.ts +2 -1
  42. package/types/enums/name.d.ts +3 -2
  43. package/types/enums/o-auth-provider.d.ts +1 -0
  44. package/types/enums/runtime.d.ts +3 -0
  45. package/types/models.d.ts +202 -5
  46. package/types/services/account.d.ts +4 -128
  47. package/types/services/assistant.d.ts +0 -2
  48. package/types/services/avatars.d.ts +0 -14
  49. package/types/services/backups.d.ts +0 -24
  50. package/types/services/console.d.ts +0 -14
  51. package/types/services/databases.d.ts +5 -100
  52. package/types/services/functions.d.ts +0 -56
  53. package/types/services/graphql.d.ts +0 -4
  54. package/types/services/health.d.ts +5 -64
  55. package/types/services/locale.d.ts +0 -16
  56. package/types/services/messaging.d.ts +0 -92
  57. package/types/services/migrations.d.ts +0 -24
  58. package/types/services/organizations.d.ts +21 -60
  59. package/types/services/project.d.ts +0 -12
  60. package/types/services/projects.d.ts +0 -92
  61. package/types/services/proxy.d.ts +0 -10
  62. package/types/services/storage.d.ts +0 -30
  63. package/types/services/teams.d.ts +0 -28
  64. package/types/services/users.d.ts +0 -86
  65. package/types/services/vcs.d.ts +0 -20
  66. package/docs/examples/health/get-queue.md +0 -11
@@ -13,8 +13,6 @@ export class Functions {
13
13
  }
14
14
 
15
15
  /**
16
- * List functions
17
- *
18
16
  * Get a list of all the project's functions. You can use the query params to filter your results.
19
17
  *
20
18
  * @param {string[]} queries
@@ -22,7 +20,7 @@ export class Functions {
22
20
  * @throws {AppwriteException}
23
21
  * @returns {Promise<Models.FunctionList>}
24
22
  */
25
- async list(queries?: string[], search?: string): Promise<Models.FunctionList> {
23
+ list(queries?: string[], search?: string): Promise<Models.FunctionList> {
26
24
  const apiPath = '/functions';
27
25
  const payload: Payload = {};
28
26
  if (typeof queries !== 'undefined') {
@@ -37,10 +35,7 @@ export class Functions {
37
35
  'content-type': 'application/json',
38
36
  }
39
37
 
40
- payload['project'] = this.client.config.project;
41
-
42
-
43
- return await this.client.call(
38
+ return this.client.call(
44
39
  'get',
45
40
  uri,
46
41
  apiHeaders,
@@ -48,8 +43,6 @@ export class Functions {
48
43
  );
49
44
  }
50
45
  /**
51
- * Create function
52
- *
53
46
  * 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.
54
47
  *
55
48
  * @param {string} functionId
@@ -77,7 +70,7 @@ export class Functions {
77
70
  * @throws {AppwriteException}
78
71
  * @returns {Promise<Models.Function>}
79
72
  */
80
- async create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateVersion?: string, specification?: string): Promise<Models.Function> {
73
+ create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, templateRepository?: string, templateOwner?: string, templateRootDirectory?: string, templateVersion?: string, specification?: string): Promise<Models.Function> {
81
74
  if (typeof functionId === 'undefined') {
82
75
  throw new AppwriteException('Missing required parameter: "functionId"');
83
76
  }
@@ -161,10 +154,7 @@ export class Functions {
161
154
  'content-type': 'application/json',
162
155
  }
163
156
 
164
- payload['project'] = this.client.config.project;
165
-
166
-
167
- return await this.client.call(
157
+ return this.client.call(
168
158
  'post',
169
159
  uri,
170
160
  apiHeaders,
@@ -172,14 +162,12 @@ export class Functions {
172
162
  );
173
163
  }
174
164
  /**
175
- * List runtimes
176
- *
177
165
  * Get a list of all runtimes that are currently active on your instance.
178
166
  *
179
167
  * @throws {AppwriteException}
180
168
  * @returns {Promise<Models.RuntimeList>}
181
169
  */
182
- async listRuntimes(): Promise<Models.RuntimeList> {
170
+ listRuntimes(): Promise<Models.RuntimeList> {
183
171
  const apiPath = '/functions/runtimes';
184
172
  const payload: Payload = {};
185
173
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -188,10 +176,7 @@ export class Functions {
188
176
  'content-type': 'application/json',
189
177
  }
190
178
 
191
- payload['project'] = this.client.config.project;
192
-
193
-
194
- return await this.client.call(
179
+ return this.client.call(
195
180
  'get',
196
181
  uri,
197
182
  apiHeaders,
@@ -199,15 +184,13 @@ export class Functions {
199
184
  );
200
185
  }
201
186
  /**
202
- * List available function runtime specifications
203
- *
204
187
  * List allowed function specifications for this instance.
205
188
 
206
189
  *
207
190
  * @throws {AppwriteException}
208
191
  * @returns {Promise<Models.SpecificationList>}
209
192
  */
210
- async listSpecifications(): Promise<Models.SpecificationList> {
193
+ listSpecifications(): Promise<Models.SpecificationList> {
211
194
  const apiPath = '/functions/specifications';
212
195
  const payload: Payload = {};
213
196
  const uri = new URL(this.client.config.endpoint + apiPath);
@@ -216,10 +199,7 @@ export class Functions {
216
199
  'content-type': 'application/json',
217
200
  }
218
201
 
219
- payload['project'] = this.client.config.project;
220
-
221
-
222
- return await this.client.call(
202
+ return this.client.call(
223
203
  'get',
224
204
  uri,
225
205
  apiHeaders,
@@ -227,8 +207,6 @@ export class Functions {
227
207
  );
228
208
  }
229
209
  /**
230
- * List function templates
231
- *
232
210
  * List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
233
211
  *
234
212
  * @param {string[]} runtimes
@@ -238,7 +216,7 @@ export class Functions {
238
216
  * @throws {AppwriteException}
239
217
  * @returns {Promise<Models.TemplateFunctionList>}
240
218
  */
241
- async listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateFunctionList> {
219
+ listTemplates(runtimes?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateFunctionList> {
242
220
  const apiPath = '/functions/templates';
243
221
  const payload: Payload = {};
244
222
  if (typeof runtimes !== 'undefined') {
@@ -259,10 +237,7 @@ export class Functions {
259
237
  'content-type': 'application/json',
260
238
  }
261
239
 
262
- payload['project'] = this.client.config.project;
263
-
264
-
265
- return await this.client.call(
240
+ return this.client.call(
266
241
  'get',
267
242
  uri,
268
243
  apiHeaders,
@@ -270,15 +245,13 @@ export class Functions {
270
245
  );
271
246
  }
272
247
  /**
273
- * Get function template
274
- *
275
248
  * Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
276
249
  *
277
250
  * @param {string} templateId
278
251
  * @throws {AppwriteException}
279
252
  * @returns {Promise<Models.TemplateFunction>}
280
253
  */
281
- async getTemplate(templateId: string): Promise<Models.TemplateFunction> {
254
+ getTemplate(templateId: string): Promise<Models.TemplateFunction> {
282
255
  if (typeof templateId === 'undefined') {
283
256
  throw new AppwriteException('Missing required parameter: "templateId"');
284
257
  }
@@ -290,10 +263,7 @@ export class Functions {
290
263
  'content-type': 'application/json',
291
264
  }
292
265
 
293
- payload['project'] = this.client.config.project;
294
-
295
-
296
- return await this.client.call(
266
+ return this.client.call(
297
267
  'get',
298
268
  uri,
299
269
  apiHeaders,
@@ -301,15 +271,13 @@ export class Functions {
301
271
  );
302
272
  }
303
273
  /**
304
- * Get functions usage
305
- *
306
274
  * Get usage metrics and statistics for a for all functions. View statistics including total functions, deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
307
275
  *
308
276
  * @param {FunctionUsageRange} range
309
277
  * @throws {AppwriteException}
310
278
  * @returns {Promise<Models.UsageFunctions>}
311
279
  */
312
- async getUsage(range?: FunctionUsageRange): Promise<Models.UsageFunctions> {
280
+ getUsage(range?: FunctionUsageRange): Promise<Models.UsageFunctions> {
313
281
  const apiPath = '/functions/usage';
314
282
  const payload: Payload = {};
315
283
  if (typeof range !== 'undefined') {
@@ -321,10 +289,7 @@ export class Functions {
321
289
  'content-type': 'application/json',
322
290
  }
323
291
 
324
- payload['project'] = this.client.config.project;
325
-
326
-
327
- return await this.client.call(
292
+ return this.client.call(
328
293
  'get',
329
294
  uri,
330
295
  apiHeaders,
@@ -332,15 +297,13 @@ export class Functions {
332
297
  );
333
298
  }
334
299
  /**
335
- * Get function
336
- *
337
300
  * Get a function by its unique ID.
338
301
  *
339
302
  * @param {string} functionId
340
303
  * @throws {AppwriteException}
341
304
  * @returns {Promise<Models.Function>}
342
305
  */
343
- async get(functionId: string): Promise<Models.Function> {
306
+ get(functionId: string): Promise<Models.Function> {
344
307
  if (typeof functionId === 'undefined') {
345
308
  throw new AppwriteException('Missing required parameter: "functionId"');
346
309
  }
@@ -352,10 +315,7 @@ export class Functions {
352
315
  'content-type': 'application/json',
353
316
  }
354
317
 
355
- payload['project'] = this.client.config.project;
356
-
357
-
358
- return await this.client.call(
318
+ return this.client.call(
359
319
  'get',
360
320
  uri,
361
321
  apiHeaders,
@@ -363,8 +323,6 @@ export class Functions {
363
323
  );
364
324
  }
365
325
  /**
366
- * Update function
367
- *
368
326
  * Update function by its unique ID.
369
327
  *
370
328
  * @param {string} functionId
@@ -388,7 +346,7 @@ export class Functions {
388
346
  * @throws {AppwriteException}
389
347
  * @returns {Promise<Models.Function>}
390
348
  */
391
- async update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function> {
349
+ update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function> {
392
350
  if (typeof functionId === 'undefined') {
393
351
  throw new AppwriteException('Missing required parameter: "functionId"');
394
352
  }
@@ -454,10 +412,7 @@ export class Functions {
454
412
  'content-type': 'application/json',
455
413
  }
456
414
 
457
- payload['project'] = this.client.config.project;
458
-
459
-
460
- return await this.client.call(
415
+ return this.client.call(
461
416
  'put',
462
417
  uri,
463
418
  apiHeaders,
@@ -465,15 +420,13 @@ export class Functions {
465
420
  );
466
421
  }
467
422
  /**
468
- * Delete function
469
- *
470
423
  * Delete a function by its unique ID.
471
424
  *
472
425
  * @param {string} functionId
473
426
  * @throws {AppwriteException}
474
427
  * @returns {Promise<{}>}
475
428
  */
476
- async delete(functionId: string): Promise<{}> {
429
+ delete(functionId: string): Promise<{}> {
477
430
  if (typeof functionId === 'undefined') {
478
431
  throw new AppwriteException('Missing required parameter: "functionId"');
479
432
  }
@@ -485,10 +438,7 @@ export class Functions {
485
438
  'content-type': 'application/json',
486
439
  }
487
440
 
488
- payload['project'] = this.client.config.project;
489
-
490
-
491
- return await this.client.call(
441
+ return this.client.call(
492
442
  'delete',
493
443
  uri,
494
444
  apiHeaders,
@@ -496,8 +446,6 @@ export class Functions {
496
446
  );
497
447
  }
498
448
  /**
499
- * List deployments
500
- *
501
449
  * Get a list of all the project&#039;s code deployments. You can use the query params to filter your results.
502
450
  *
503
451
  * @param {string} functionId
@@ -506,7 +454,7 @@ export class Functions {
506
454
  * @throws {AppwriteException}
507
455
  * @returns {Promise<Models.DeploymentList>}
508
456
  */
509
- async listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList> {
457
+ listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList> {
510
458
  if (typeof functionId === 'undefined') {
511
459
  throw new AppwriteException('Missing required parameter: "functionId"');
512
460
  }
@@ -524,10 +472,7 @@ export class Functions {
524
472
  'content-type': 'application/json',
525
473
  }
526
474
 
527
- payload['project'] = this.client.config.project;
528
-
529
-
530
- return await this.client.call(
475
+ return this.client.call(
531
476
  'get',
532
477
  uri,
533
478
  apiHeaders,
@@ -535,8 +480,6 @@ export class Functions {
535
480
  );
536
481
  }
537
482
  /**
538
- * Create deployment
539
- *
540
483
  * 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.
541
484
 
542
485
  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).
@@ -551,7 +494,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
551
494
  * @throws {AppwriteException}
552
495
  * @returns {Promise<Models.Deployment>}
553
496
  */
554
- async createDeployment(functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress = (progress: UploadProgress) => {}): Promise<Models.Deployment> {
497
+ createDeployment(functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress = (progress: UploadProgress) => {}): Promise<Models.Deployment> {
555
498
  if (typeof functionId === 'undefined') {
556
499
  throw new AppwriteException('Missing required parameter: "functionId"');
557
500
  }
@@ -581,10 +524,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
581
524
  'content-type': 'multipart/form-data',
582
525
  }
583
526
 
584
- payload['project'] = this.client.config.project;
585
-
586
-
587
- return await this.client.chunkedUpload(
527
+ return this.client.chunkedUpload(
588
528
  'post',
589
529
  uri,
590
530
  apiHeaders,
@@ -593,8 +533,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
593
533
  );
594
534
  }
595
535
  /**
596
- * Get deployment
597
- *
598
536
  * Get a code deployment by its unique ID.
599
537
  *
600
538
  * @param {string} functionId
@@ -602,7 +540,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
602
540
  * @throws {AppwriteException}
603
541
  * @returns {Promise<Models.Deployment>}
604
542
  */
605
- async getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment> {
543
+ getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment> {
606
544
  if (typeof functionId === 'undefined') {
607
545
  throw new AppwriteException('Missing required parameter: "functionId"');
608
546
  }
@@ -617,10 +555,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
617
555
  'content-type': 'application/json',
618
556
  }
619
557
 
620
- payload['project'] = this.client.config.project;
621
-
622
-
623
- return await this.client.call(
558
+ return this.client.call(
624
559
  'get',
625
560
  uri,
626
561
  apiHeaders,
@@ -628,8 +563,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
628
563
  );
629
564
  }
630
565
  /**
631
- * Update deployment
632
- *
633
566
  * 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.
634
567
  *
635
568
  * @param {string} functionId
@@ -637,7 +570,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
637
570
  * @throws {AppwriteException}
638
571
  * @returns {Promise<Models.Function>}
639
572
  */
640
- async updateDeployment(functionId: string, deploymentId: string): Promise<Models.Function> {
573
+ updateDeployment(functionId: string, deploymentId: string): Promise<Models.Function> {
641
574
  if (typeof functionId === 'undefined') {
642
575
  throw new AppwriteException('Missing required parameter: "functionId"');
643
576
  }
@@ -652,10 +585,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
652
585
  'content-type': 'application/json',
653
586
  }
654
587
 
655
- payload['project'] = this.client.config.project;
656
-
657
-
658
- return await this.client.call(
588
+ return this.client.call(
659
589
  'patch',
660
590
  uri,
661
591
  apiHeaders,
@@ -663,8 +593,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
663
593
  );
664
594
  }
665
595
  /**
666
- * Delete deployment
667
- *
668
596
  * Delete a code deployment by its unique ID.
669
597
  *
670
598
  * @param {string} functionId
@@ -672,7 +600,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
672
600
  * @throws {AppwriteException}
673
601
  * @returns {Promise<{}>}
674
602
  */
675
- async deleteDeployment(functionId: string, deploymentId: string): Promise<{}> {
603
+ deleteDeployment(functionId: string, deploymentId: string): Promise<{}> {
676
604
  if (typeof functionId === 'undefined') {
677
605
  throw new AppwriteException('Missing required parameter: "functionId"');
678
606
  }
@@ -687,10 +615,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
687
615
  'content-type': 'application/json',
688
616
  }
689
617
 
690
- payload['project'] = this.client.config.project;
691
-
692
-
693
- return await this.client.call(
618
+ return this.client.call(
694
619
  'delete',
695
620
  uri,
696
621
  apiHeaders,
@@ -698,8 +623,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
698
623
  );
699
624
  }
700
625
  /**
701
- * Rebuild deployment
702
- *
703
626
  * 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.
704
627
  *
705
628
  * @param {string} functionId
@@ -708,7 +631,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
708
631
  * @throws {AppwriteException}
709
632
  * @returns {Promise<{}>}
710
633
  */
711
- async createBuild(functionId: string, deploymentId: string, buildId?: string): Promise<{}> {
634
+ createBuild(functionId: string, deploymentId: string, buildId?: string): Promise<{}> {
712
635
  if (typeof functionId === 'undefined') {
713
636
  throw new AppwriteException('Missing required parameter: "functionId"');
714
637
  }
@@ -726,10 +649,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
726
649
  'content-type': 'application/json',
727
650
  }
728
651
 
729
- payload['project'] = this.client.config.project;
730
-
731
-
732
- return await this.client.call(
652
+ return this.client.call(
733
653
  'post',
734
654
  uri,
735
655
  apiHeaders,
@@ -737,8 +657,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
737
657
  );
738
658
  }
739
659
  /**
740
- * Cancel deployment
741
- *
742
660
  * 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.
743
661
  *
744
662
  * @param {string} functionId
@@ -746,7 +664,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
746
664
  * @throws {AppwriteException}
747
665
  * @returns {Promise<Models.Build>}
748
666
  */
749
- async updateDeploymentBuild(functionId: string, deploymentId: string): Promise<Models.Build> {
667
+ updateDeploymentBuild(functionId: string, deploymentId: string): Promise<Models.Build> {
750
668
  if (typeof functionId === 'undefined') {
751
669
  throw new AppwriteException('Missing required parameter: "functionId"');
752
670
  }
@@ -761,10 +679,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
761
679
  'content-type': 'application/json',
762
680
  }
763
681
 
764
- payload['project'] = this.client.config.project;
765
-
766
-
767
- return await this.client.call(
682
+ return this.client.call(
768
683
  'patch',
769
684
  uri,
770
685
  apiHeaders,
@@ -772,8 +687,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
772
687
  );
773
688
  }
774
689
  /**
775
- * Download deployment
776
- *
777
690
  * Get a Deployment&#039;s contents by its unique ID. This endpoint supports range requests for partial or streaming file download.
778
691
  *
779
692
  * @param {string} functionId
@@ -801,12 +714,10 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
801
714
  for (const [key, value] of Object.entries(Service.flatten(payload))) {
802
715
  uri.searchParams.append(key, value);
803
716
  }
804
-
717
+
805
718
  return uri.toString();
806
719
  }
807
720
  /**
808
- * List executions
809
- *
810
721
  * Get a list of all the current user function execution logs. You can use the query params to filter your results.
811
722
  *
812
723
  * @param {string} functionId
@@ -815,7 +726,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
815
726
  * @throws {AppwriteException}
816
727
  * @returns {Promise<Models.ExecutionList>}
817
728
  */
818
- async listExecutions(functionId: string, queries?: string[], search?: string): Promise<Models.ExecutionList> {
729
+ listExecutions(functionId: string, queries?: string[], search?: string): Promise<Models.ExecutionList> {
819
730
  if (typeof functionId === 'undefined') {
820
731
  throw new AppwriteException('Missing required parameter: "functionId"');
821
732
  }
@@ -833,10 +744,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
833
744
  'content-type': 'application/json',
834
745
  }
835
746
 
836
- payload['project'] = this.client.config.project;
837
-
838
-
839
- return await this.client.call(
747
+ return this.client.call(
840
748
  'get',
841
749
  uri,
842
750
  apiHeaders,
@@ -844,8 +752,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
844
752
  );
845
753
  }
846
754
  /**
847
- * Create execution
848
- *
849
755
  * 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.
850
756
  *
851
757
  * @param {string} functionId
@@ -858,7 +764,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
858
764
  * @throws {AppwriteException}
859
765
  * @returns {Promise<Models.Execution>}
860
766
  */
861
- async createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution> {
767
+ createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution> {
862
768
  if (typeof functionId === 'undefined') {
863
769
  throw new AppwriteException('Missing required parameter: "functionId"');
864
770
  }
@@ -888,10 +794,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
888
794
  'content-type': 'application/json',
889
795
  }
890
796
 
891
- payload['project'] = this.client.config.project;
892
-
893
-
894
- return await this.client.call(
797
+ return this.client.call(
895
798
  'post',
896
799
  uri,
897
800
  apiHeaders,
@@ -899,8 +802,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
899
802
  );
900
803
  }
901
804
  /**
902
- * Get execution
903
- *
904
805
  * Get a function execution log by its unique ID.
905
806
  *
906
807
  * @param {string} functionId
@@ -908,7 +809,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
908
809
  * @throws {AppwriteException}
909
810
  * @returns {Promise<Models.Execution>}
910
811
  */
911
- async getExecution(functionId: string, executionId: string): Promise<Models.Execution> {
812
+ getExecution(functionId: string, executionId: string): Promise<Models.Execution> {
912
813
  if (typeof functionId === 'undefined') {
913
814
  throw new AppwriteException('Missing required parameter: "functionId"');
914
815
  }
@@ -923,10 +824,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
923
824
  'content-type': 'application/json',
924
825
  }
925
826
 
926
- payload['project'] = this.client.config.project;
927
-
928
-
929
- return await this.client.call(
827
+ return this.client.call(
930
828
  'get',
931
829
  uri,
932
830
  apiHeaders,
@@ -934,8 +832,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
934
832
  );
935
833
  }
936
834
  /**
937
- * Delete execution
938
- *
939
835
  * Delete a function execution by its unique ID.
940
836
 
941
837
  *
@@ -944,7 +840,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
944
840
  * @throws {AppwriteException}
945
841
  * @returns {Promise<{}>}
946
842
  */
947
- async deleteExecution(functionId: string, executionId: string): Promise<{}> {
843
+ deleteExecution(functionId: string, executionId: string): Promise<{}> {
948
844
  if (typeof functionId === 'undefined') {
949
845
  throw new AppwriteException('Missing required parameter: "functionId"');
950
846
  }
@@ -959,10 +855,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
959
855
  'content-type': 'application/json',
960
856
  }
961
857
 
962
- payload['project'] = this.client.config.project;
963
-
964
-
965
- return await this.client.call(
858
+ return this.client.call(
966
859
  'delete',
967
860
  uri,
968
861
  apiHeaders,
@@ -970,8 +863,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
970
863
  );
971
864
  }
972
865
  /**
973
- * Get function usage
974
- *
975
866
  * Get usage metrics and statistics for a for a specific function. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
976
867
  *
977
868
  * @param {string} functionId
@@ -979,7 +870,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
979
870
  * @throws {AppwriteException}
980
871
  * @returns {Promise<Models.UsageFunction>}
981
872
  */
982
- async getFunctionUsage(functionId: string, range?: FunctionUsageRange): Promise<Models.UsageFunction> {
873
+ getFunctionUsage(functionId: string, range?: FunctionUsageRange): Promise<Models.UsageFunction> {
983
874
  if (typeof functionId === 'undefined') {
984
875
  throw new AppwriteException('Missing required parameter: "functionId"');
985
876
  }
@@ -994,10 +885,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
994
885
  'content-type': 'application/json',
995
886
  }
996
887
 
997
- payload['project'] = this.client.config.project;
998
-
999
-
1000
- return await this.client.call(
888
+ return this.client.call(
1001
889
  'get',
1002
890
  uri,
1003
891
  apiHeaders,
@@ -1005,15 +893,13 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1005
893
  );
1006
894
  }
1007
895
  /**
1008
- * List variables
1009
- *
1010
896
  * Get a list of all variables of a specific function.
1011
897
  *
1012
898
  * @param {string} functionId
1013
899
  * @throws {AppwriteException}
1014
900
  * @returns {Promise<Models.VariableList>}
1015
901
  */
1016
- async listVariables(functionId: string): Promise<Models.VariableList> {
902
+ listVariables(functionId: string): Promise<Models.VariableList> {
1017
903
  if (typeof functionId === 'undefined') {
1018
904
  throw new AppwriteException('Missing required parameter: "functionId"');
1019
905
  }
@@ -1025,10 +911,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1025
911
  'content-type': 'application/json',
1026
912
  }
1027
913
 
1028
- payload['project'] = this.client.config.project;
1029
-
1030
-
1031
- return await this.client.call(
914
+ return this.client.call(
1032
915
  'get',
1033
916
  uri,
1034
917
  apiHeaders,
@@ -1036,8 +919,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1036
919
  );
1037
920
  }
1038
921
  /**
1039
- * Create variable
1040
- *
1041
922
  * Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
1042
923
  *
1043
924
  * @param {string} functionId
@@ -1046,7 +927,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1046
927
  * @throws {AppwriteException}
1047
928
  * @returns {Promise<Models.Variable>}
1048
929
  */
1049
- async createVariable(functionId: string, key: string, value: string): Promise<Models.Variable> {
930
+ createVariable(functionId: string, key: string, value: string): Promise<Models.Variable> {
1050
931
  if (typeof functionId === 'undefined') {
1051
932
  throw new AppwriteException('Missing required parameter: "functionId"');
1052
933
  }
@@ -1070,10 +951,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1070
951
  'content-type': 'application/json',
1071
952
  }
1072
953
 
1073
- payload['project'] = this.client.config.project;
1074
-
1075
-
1076
- return await this.client.call(
954
+ return this.client.call(
1077
955
  'post',
1078
956
  uri,
1079
957
  apiHeaders,
@@ -1081,8 +959,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1081
959
  );
1082
960
  }
1083
961
  /**
1084
- * Get variable
1085
- *
1086
962
  * Get a variable by its unique ID.
1087
963
  *
1088
964
  * @param {string} functionId
@@ -1090,7 +966,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1090
966
  * @throws {AppwriteException}
1091
967
  * @returns {Promise<Models.Variable>}
1092
968
  */
1093
- async getVariable(functionId: string, variableId: string): Promise<Models.Variable> {
969
+ getVariable(functionId: string, variableId: string): Promise<Models.Variable> {
1094
970
  if (typeof functionId === 'undefined') {
1095
971
  throw new AppwriteException('Missing required parameter: "functionId"');
1096
972
  }
@@ -1105,10 +981,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1105
981
  'content-type': 'application/json',
1106
982
  }
1107
983
 
1108
- payload['project'] = this.client.config.project;
1109
-
1110
-
1111
- return await this.client.call(
984
+ return this.client.call(
1112
985
  'get',
1113
986
  uri,
1114
987
  apiHeaders,
@@ -1116,8 +989,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1116
989
  );
1117
990
  }
1118
991
  /**
1119
- * Update variable
1120
- *
1121
992
  * Update variable by its unique ID.
1122
993
  *
1123
994
  * @param {string} functionId
@@ -1127,7 +998,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1127
998
  * @throws {AppwriteException}
1128
999
  * @returns {Promise<Models.Variable>}
1129
1000
  */
1130
- async updateVariable(functionId: string, variableId: string, key: string, value?: string): Promise<Models.Variable> {
1001
+ updateVariable(functionId: string, variableId: string, key: string, value?: string): Promise<Models.Variable> {
1131
1002
  if (typeof functionId === 'undefined') {
1132
1003
  throw new AppwriteException('Missing required parameter: "functionId"');
1133
1004
  }
@@ -1151,10 +1022,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1151
1022
  'content-type': 'application/json',
1152
1023
  }
1153
1024
 
1154
- payload['project'] = this.client.config.project;
1155
-
1156
-
1157
- return await this.client.call(
1025
+ return this.client.call(
1158
1026
  'put',
1159
1027
  uri,
1160
1028
  apiHeaders,
@@ -1162,8 +1030,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1162
1030
  );
1163
1031
  }
1164
1032
  /**
1165
- * Delete variable
1166
- *
1167
1033
  * Delete a variable by its unique ID.
1168
1034
  *
1169
1035
  * @param {string} functionId
@@ -1171,7 +1037,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1171
1037
  * @throws {AppwriteException}
1172
1038
  * @returns {Promise<{}>}
1173
1039
  */
1174
- async deleteVariable(functionId: string, variableId: string): Promise<{}> {
1040
+ deleteVariable(functionId: string, variableId: string): Promise<{}> {
1175
1041
  if (typeof functionId === 'undefined') {
1176
1042
  throw new AppwriteException('Missing required parameter: "functionId"');
1177
1043
  }
@@ -1186,10 +1052,7 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod
1186
1052
  'content-type': 'application/json',
1187
1053
  }
1188
1054
 
1189
- payload['project'] = this.client.config.project;
1190
-
1191
-
1192
- return await this.client.call(
1055
+ return this.client.call(
1193
1056
  'delete',
1194
1057
  uri,
1195
1058
  apiHeaders,