@appwrite.io/console 1.5.2 → 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 (53) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +7673 -9723
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +7673 -9723
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +7673 -9723
  7. package/docs/examples/organizations/validate-invoice.md +14 -0
  8. package/package.json +1 -1
  9. package/src/client.ts +21 -4
  10. package/src/enums/o-auth-provider.ts +1 -0
  11. package/src/models.ts +118 -6
  12. package/src/services/account.ts +126 -430
  13. package/src/services/assistant.ts +2 -7
  14. package/src/services/avatars.ts +7 -21
  15. package/src/services/backups.ts +24 -84
  16. package/src/services/console.ts +14 -49
  17. package/src/services/databases.ts +96 -336
  18. package/src/services/functions.ts +55 -192
  19. package/src/services/graphql.ts +4 -14
  20. package/src/services/health.ts +50 -175
  21. package/src/services/locale.ts +16 -56
  22. package/src/services/messaging.ts +92 -322
  23. package/src/services/migrations.ts +24 -84
  24. package/src/services/organizations.ts +86 -196
  25. package/src/services/project.ts +12 -42
  26. package/src/services/projects.ts +92 -322
  27. package/src/services/proxy.ts +10 -35
  28. package/src/services/storage.ts +27 -93
  29. package/src/services/teams.ts +28 -98
  30. package/src/services/users.ts +86 -301
  31. package/src/services/vcs.ts +20 -70
  32. package/types/enums/o-auth-provider.d.ts +1 -0
  33. package/types/models.d.ts +118 -6
  34. package/types/services/account.d.ts +4 -128
  35. package/types/services/assistant.d.ts +0 -2
  36. package/types/services/avatars.d.ts +0 -14
  37. package/types/services/backups.d.ts +0 -24
  38. package/types/services/console.d.ts +0 -14
  39. package/types/services/databases.d.ts +0 -96
  40. package/types/services/functions.d.ts +0 -56
  41. package/types/services/graphql.d.ts +0 -4
  42. package/types/services/health.d.ts +0 -50
  43. package/types/services/locale.d.ts +0 -16
  44. package/types/services/messaging.d.ts +0 -92
  45. package/types/services/migrations.d.ts +0 -24
  46. package/types/services/organizations.d.ts +11 -58
  47. package/types/services/project.d.ts +0 -12
  48. package/types/services/projects.d.ts +0 -92
  49. package/types/services/proxy.d.ts +0 -10
  50. package/types/services/storage.d.ts +0 -30
  51. package/types/services/teams.d.ts +0 -28
  52. package/types/services/users.d.ts +0 -86
  53. package/types/services/vcs.d.ts +0 -20
@@ -21,8 +21,6 @@ export class Projects {
21
21
  }
22
22
 
23
23
  /**
24
- * List projects
25
- *
26
24
  * Get a list of all projects. You can use the query params to filter your results.
27
25
  *
28
26
  * @param {string[]} queries
@@ -30,7 +28,7 @@ export class Projects {
30
28
  * @throws {AppwriteException}
31
29
  * @returns {Promise<Models.ProjectList>}
32
30
  */
33
- async list(queries?: string[], search?: string): Promise<Models.ProjectList> {
31
+ list(queries?: string[], search?: string): Promise<Models.ProjectList> {
34
32
  const apiPath = '/projects';
35
33
  const payload: Payload = {};
36
34
  if (typeof queries !== 'undefined') {
@@ -45,10 +43,7 @@ export class Projects {
45
43
  'content-type': 'application/json',
46
44
  }
47
45
 
48
- payload['project'] = this.client.config.project;
49
-
50
-
51
- return await this.client.call(
46
+ return this.client.call(
52
47
  'get',
53
48
  uri,
54
49
  apiHeaders,
@@ -56,8 +51,6 @@ export class Projects {
56
51
  );
57
52
  }
58
53
  /**
59
- * Create project
60
- *
61
54
  * Create a new project. You can create a maximum of 100 projects per account.
62
55
  *
63
56
  * @param {string} projectId
@@ -76,7 +69,7 @@ export class Projects {
76
69
  * @throws {AppwriteException}
77
70
  * @returns {Promise<Models.Project>}
78
71
  */
79
- async create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
72
+ create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
80
73
  if (typeof projectId === 'undefined') {
81
74
  throw new AppwriteException('Missing required parameter: "projectId"');
82
75
  }
@@ -133,10 +126,7 @@ export class Projects {
133
126
  'content-type': 'application/json',
134
127
  }
135
128
 
136
- payload['project'] = this.client.config.project;
137
-
138
-
139
- return await this.client.call(
129
+ return this.client.call(
140
130
  'post',
141
131
  uri,
142
132
  apiHeaders,
@@ -144,15 +134,13 @@ export class Projects {
144
134
  );
145
135
  }
146
136
  /**
147
- * Get project
148
- *
149
137
  * Get a project by its unique ID. This endpoint allows you to retrieve the project&#039;s details, including its name, description, team, region, and other metadata.
150
138
  *
151
139
  * @param {string} projectId
152
140
  * @throws {AppwriteException}
153
141
  * @returns {Promise<Models.Project>}
154
142
  */
155
- async get(projectId: string): Promise<Models.Project> {
143
+ get(projectId: string): Promise<Models.Project> {
156
144
  if (typeof projectId === 'undefined') {
157
145
  throw new AppwriteException('Missing required parameter: "projectId"');
158
146
  }
@@ -164,10 +152,7 @@ export class Projects {
164
152
  'content-type': 'application/json',
165
153
  }
166
154
 
167
- payload['project'] = this.client.config.project;
168
-
169
-
170
- return await this.client.call(
155
+ return this.client.call(
171
156
  'get',
172
157
  uri,
173
158
  apiHeaders,
@@ -175,8 +160,6 @@ export class Projects {
175
160
  );
176
161
  }
177
162
  /**
178
- * Update project
179
- *
180
163
  * Update a project by its unique ID.
181
164
  *
182
165
  * @param {string} projectId
@@ -193,7 +176,7 @@ export class Projects {
193
176
  * @throws {AppwriteException}
194
177
  * @returns {Promise<Models.Project>}
195
178
  */
196
- async update(projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
179
+ update(projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project> {
197
180
  if (typeof projectId === 'undefined') {
198
181
  throw new AppwriteException('Missing required parameter: "projectId"');
199
182
  }
@@ -238,10 +221,7 @@ export class Projects {
238
221
  'content-type': 'application/json',
239
222
  }
240
223
 
241
- payload['project'] = this.client.config.project;
242
-
243
-
244
- return await this.client.call(
224
+ return this.client.call(
245
225
  'patch',
246
226
  uri,
247
227
  apiHeaders,
@@ -249,15 +229,13 @@ export class Projects {
249
229
  );
250
230
  }
251
231
  /**
252
- * Delete project
253
- *
254
232
  * Delete a project by its unique ID.
255
233
  *
256
234
  * @param {string} projectId
257
235
  * @throws {AppwriteException}
258
236
  * @returns {Promise<{}>}
259
237
  */
260
- async delete(projectId: string): Promise<{}> {
238
+ delete(projectId: string): Promise<{}> {
261
239
  if (typeof projectId === 'undefined') {
262
240
  throw new AppwriteException('Missing required parameter: "projectId"');
263
241
  }
@@ -269,10 +247,7 @@ export class Projects {
269
247
  'content-type': 'application/json',
270
248
  }
271
249
 
272
- payload['project'] = this.client.config.project;
273
-
274
-
275
- return await this.client.call(
250
+ return this.client.call(
276
251
  'delete',
277
252
  uri,
278
253
  apiHeaders,
@@ -280,8 +255,6 @@ export class Projects {
280
255
  );
281
256
  }
282
257
  /**
283
- * Update API status
284
- *
285
258
  * Update the status of a specific API type. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime.
286
259
  *
287
260
  * @param {string} projectId
@@ -290,7 +263,7 @@ export class Projects {
290
263
  * @throws {AppwriteException}
291
264
  * @returns {Promise<Models.Project>}
292
265
  */
293
- async updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project> {
266
+ updateApiStatus(projectId: string, api: Api, status: boolean): Promise<Models.Project> {
294
267
  if (typeof projectId === 'undefined') {
295
268
  throw new AppwriteException('Missing required parameter: "projectId"');
296
269
  }
@@ -314,10 +287,7 @@ export class Projects {
314
287
  'content-type': 'application/json',
315
288
  }
316
289
 
317
- payload['project'] = this.client.config.project;
318
-
319
-
320
- return await this.client.call(
290
+ return this.client.call(
321
291
  'patch',
322
292
  uri,
323
293
  apiHeaders,
@@ -325,8 +295,6 @@ export class Projects {
325
295
  );
326
296
  }
327
297
  /**
328
- * Update all API status
329
- *
330
298
  * Update the status of all API types. Use this endpoint to enable or disable API types such as REST, GraphQL and Realtime all at once.
331
299
  *
332
300
  * @param {string} projectId
@@ -334,7 +302,7 @@ export class Projects {
334
302
  * @throws {AppwriteException}
335
303
  * @returns {Promise<Models.Project>}
336
304
  */
337
- async updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
305
+ updateApiStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
338
306
  if (typeof projectId === 'undefined') {
339
307
  throw new AppwriteException('Missing required parameter: "projectId"');
340
308
  }
@@ -352,10 +320,7 @@ export class Projects {
352
320
  'content-type': 'application/json',
353
321
  }
354
322
 
355
- payload['project'] = this.client.config.project;
356
-
357
-
358
- return await this.client.call(
323
+ return this.client.call(
359
324
  'patch',
360
325
  uri,
361
326
  apiHeaders,
@@ -363,8 +328,6 @@ export class Projects {
363
328
  );
364
329
  }
365
330
  /**
366
- * Update project authentication duration
367
- *
368
331
  * Update how long sessions created within a project should stay active for.
369
332
  *
370
333
  * @param {string} projectId
@@ -372,7 +335,7 @@ export class Projects {
372
335
  * @throws {AppwriteException}
373
336
  * @returns {Promise<Models.Project>}
374
337
  */
375
- async updateAuthDuration(projectId: string, duration: number): Promise<Models.Project> {
338
+ updateAuthDuration(projectId: string, duration: number): Promise<Models.Project> {
376
339
  if (typeof projectId === 'undefined') {
377
340
  throw new AppwriteException('Missing required parameter: "projectId"');
378
341
  }
@@ -390,10 +353,7 @@ export class Projects {
390
353
  'content-type': 'application/json',
391
354
  }
392
355
 
393
- payload['project'] = this.client.config.project;
394
-
395
-
396
- return await this.client.call(
356
+ return this.client.call(
397
357
  'patch',
398
358
  uri,
399
359
  apiHeaders,
@@ -401,8 +361,6 @@ export class Projects {
401
361
  );
402
362
  }
403
363
  /**
404
- * Update project users limit
405
- *
406
364
  * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
407
365
  *
408
366
  * @param {string} projectId
@@ -410,7 +368,7 @@ export class Projects {
410
368
  * @throws {AppwriteException}
411
369
  * @returns {Promise<Models.Project>}
412
370
  */
413
- async updateAuthLimit(projectId: string, limit: number): Promise<Models.Project> {
371
+ updateAuthLimit(projectId: string, limit: number): Promise<Models.Project> {
414
372
  if (typeof projectId === 'undefined') {
415
373
  throw new AppwriteException('Missing required parameter: "projectId"');
416
374
  }
@@ -428,10 +386,7 @@ export class Projects {
428
386
  'content-type': 'application/json',
429
387
  }
430
388
 
431
- payload['project'] = this.client.config.project;
432
-
433
-
434
- return await this.client.call(
389
+ return this.client.call(
435
390
  'patch',
436
391
  uri,
437
392
  apiHeaders,
@@ -439,8 +394,6 @@ export class Projects {
439
394
  );
440
395
  }
441
396
  /**
442
- * Update project user sessions limit
443
- *
444
397
  * Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
445
398
  *
446
399
  * @param {string} projectId
@@ -448,7 +401,7 @@ export class Projects {
448
401
  * @throws {AppwriteException}
449
402
  * @returns {Promise<Models.Project>}
450
403
  */
451
- async updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project> {
404
+ updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project> {
452
405
  if (typeof projectId === 'undefined') {
453
406
  throw new AppwriteException('Missing required parameter: "projectId"');
454
407
  }
@@ -466,10 +419,7 @@ export class Projects {
466
419
  'content-type': 'application/json',
467
420
  }
468
421
 
469
- payload['project'] = this.client.config.project;
470
-
471
-
472
- return await this.client.call(
422
+ return this.client.call(
473
423
  'patch',
474
424
  uri,
475
425
  apiHeaders,
@@ -477,8 +427,6 @@ export class Projects {
477
427
  );
478
428
  }
479
429
  /**
480
- * Update project memberships privacy attributes
481
- *
482
430
  * Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status.
483
431
  *
484
432
  * @param {string} projectId
@@ -488,7 +436,7 @@ export class Projects {
488
436
  * @throws {AppwriteException}
489
437
  * @returns {Promise<Models.Project>}
490
438
  */
491
- async updateMembershipsPrivacy(projectId: string, userName: boolean, userEmail: boolean, mfa: boolean): Promise<Models.Project> {
439
+ updateMembershipsPrivacy(projectId: string, userName: boolean, userEmail: boolean, mfa: boolean): Promise<Models.Project> {
492
440
  if (typeof projectId === 'undefined') {
493
441
  throw new AppwriteException('Missing required parameter: "projectId"');
494
442
  }
@@ -518,10 +466,7 @@ export class Projects {
518
466
  'content-type': 'application/json',
519
467
  }
520
468
 
521
- payload['project'] = this.client.config.project;
522
-
523
-
524
- return await this.client.call(
469
+ return this.client.call(
525
470
  'patch',
526
471
  uri,
527
472
  apiHeaders,
@@ -529,8 +474,6 @@ export class Projects {
529
474
  );
530
475
  }
531
476
  /**
532
- * Update the mock numbers for the project
533
- *
534
477
  * Update the list of mock phone numbers for testing. Use these numbers to bypass SMS verification in development.
535
478
  *
536
479
  * @param {string} projectId
@@ -538,7 +481,7 @@ export class Projects {
538
481
  * @throws {AppwriteException}
539
482
  * @returns {Promise<Models.Project>}
540
483
  */
541
- async updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project> {
484
+ updateMockNumbers(projectId: string, numbers: object[]): Promise<Models.Project> {
542
485
  if (typeof projectId === 'undefined') {
543
486
  throw new AppwriteException('Missing required parameter: "projectId"');
544
487
  }
@@ -556,10 +499,7 @@ export class Projects {
556
499
  'content-type': 'application/json',
557
500
  }
558
501
 
559
- payload['project'] = this.client.config.project;
560
-
561
-
562
- return await this.client.call(
502
+ return this.client.call(
563
503
  'patch',
564
504
  uri,
565
505
  apiHeaders,
@@ -567,8 +507,6 @@ export class Projects {
567
507
  );
568
508
  }
569
509
  /**
570
- * Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
571
- *
572
510
  * Enable or disable checking user passwords against common passwords dictionary. This helps ensure users don&#039;t use common and insecure passwords.
573
511
  *
574
512
  * @param {string} projectId
@@ -576,7 +514,7 @@ export class Projects {
576
514
  * @throws {AppwriteException}
577
515
  * @returns {Promise<Models.Project>}
578
516
  */
579
- async updateAuthPasswordDictionary(projectId: string, enabled: boolean): Promise<Models.Project> {
517
+ updateAuthPasswordDictionary(projectId: string, enabled: boolean): Promise<Models.Project> {
580
518
  if (typeof projectId === 'undefined') {
581
519
  throw new AppwriteException('Missing required parameter: "projectId"');
582
520
  }
@@ -594,10 +532,7 @@ export class Projects {
594
532
  'content-type': 'application/json',
595
533
  }
596
534
 
597
- payload['project'] = this.client.config.project;
598
-
599
-
600
- return await this.client.call(
535
+ return this.client.call(
601
536
  'patch',
602
537
  uri,
603
538
  apiHeaders,
@@ -605,8 +540,6 @@ export class Projects {
605
540
  );
606
541
  }
607
542
  /**
608
- * Update authentication password history. Use this endpoint to set the number of password history to save and 0 to disable password history.
609
- *
610
543
  * Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
611
544
  *
612
545
  * @param {string} projectId
@@ -614,7 +547,7 @@ export class Projects {
614
547
  * @throws {AppwriteException}
615
548
  * @returns {Promise<Models.Project>}
616
549
  */
617
- async updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project> {
550
+ updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project> {
618
551
  if (typeof projectId === 'undefined') {
619
552
  throw new AppwriteException('Missing required parameter: "projectId"');
620
553
  }
@@ -632,10 +565,7 @@ export class Projects {
632
565
  'content-type': 'application/json',
633
566
  }
634
567
 
635
- payload['project'] = this.client.config.project;
636
-
637
-
638
- return await this.client.call(
568
+ return this.client.call(
639
569
  'patch',
640
570
  uri,
641
571
  apiHeaders,
@@ -643,8 +573,6 @@ export class Projects {
643
573
  );
644
574
  }
645
575
  /**
646
- * Enable or disable checking user passwords for similarity with their personal data.
647
- *
648
576
  * Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
649
577
  *
650
578
  * @param {string} projectId
@@ -652,7 +580,7 @@ export class Projects {
652
580
  * @throws {AppwriteException}
653
581
  * @returns {Promise<Models.Project>}
654
582
  */
655
- async updatePersonalDataCheck(projectId: string, enabled: boolean): Promise<Models.Project> {
583
+ updatePersonalDataCheck(projectId: string, enabled: boolean): Promise<Models.Project> {
656
584
  if (typeof projectId === 'undefined') {
657
585
  throw new AppwriteException('Missing required parameter: "projectId"');
658
586
  }
@@ -670,10 +598,7 @@ export class Projects {
670
598
  'content-type': 'application/json',
671
599
  }
672
600
 
673
- payload['project'] = this.client.config.project;
674
-
675
-
676
- return await this.client.call(
601
+ return this.client.call(
677
602
  'patch',
678
603
  uri,
679
604
  apiHeaders,
@@ -681,8 +606,6 @@ export class Projects {
681
606
  );
682
607
  }
683
608
  /**
684
- * Update project sessions emails
685
- *
686
609
  * Enable or disable session email alerts. When enabled, users will receive email notifications when new sessions are created.
687
610
  *
688
611
  * @param {string} projectId
@@ -690,7 +613,7 @@ export class Projects {
690
613
  * @throws {AppwriteException}
691
614
  * @returns {Promise<Models.Project>}
692
615
  */
693
- async updateSessionAlerts(projectId: string, alerts: boolean): Promise<Models.Project> {
616
+ updateSessionAlerts(projectId: string, alerts: boolean): Promise<Models.Project> {
694
617
  if (typeof projectId === 'undefined') {
695
618
  throw new AppwriteException('Missing required parameter: "projectId"');
696
619
  }
@@ -708,10 +631,7 @@ export class Projects {
708
631
  'content-type': 'application/json',
709
632
  }
710
633
 
711
- payload['project'] = this.client.config.project;
712
-
713
-
714
- return await this.client.call(
634
+ return this.client.call(
715
635
  'patch',
716
636
  uri,
717
637
  apiHeaders,
@@ -719,8 +639,6 @@ export class Projects {
719
639
  );
720
640
  }
721
641
  /**
722
- * Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.
723
- *
724
642
  * Update the status of a specific authentication method. Use this endpoint to enable or disable different authentication methods such as email, magic urls or sms in your project.
725
643
  *
726
644
  * @param {string} projectId
@@ -729,7 +647,7 @@ export class Projects {
729
647
  * @throws {AppwriteException}
730
648
  * @returns {Promise<Models.Project>}
731
649
  */
732
- async updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project> {
650
+ updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project> {
733
651
  if (typeof projectId === 'undefined') {
734
652
  throw new AppwriteException('Missing required parameter: "projectId"');
735
653
  }
@@ -750,10 +668,7 @@ export class Projects {
750
668
  'content-type': 'application/json',
751
669
  }
752
670
 
753
- payload['project'] = this.client.config.project;
754
-
755
-
756
- return await this.client.call(
671
+ return this.client.call(
757
672
  'patch',
758
673
  uri,
759
674
  apiHeaders,
@@ -761,8 +676,6 @@ export class Projects {
761
676
  );
762
677
  }
763
678
  /**
764
- * Create JWT
765
- *
766
679
  * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
767
680
  *
768
681
  * @param {string} projectId
@@ -771,7 +684,7 @@ export class Projects {
771
684
  * @throws {AppwriteException}
772
685
  * @returns {Promise<Models.Jwt>}
773
686
  */
774
- async createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt> {
687
+ createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt> {
775
688
  if (typeof projectId === 'undefined') {
776
689
  throw new AppwriteException('Missing required parameter: "projectId"');
777
690
  }
@@ -792,10 +705,7 @@ export class Projects {
792
705
  'content-type': 'application/json',
793
706
  }
794
707
 
795
- payload['project'] = this.client.config.project;
796
-
797
-
798
- return await this.client.call(
708
+ return this.client.call(
799
709
  'post',
800
710
  uri,
801
711
  apiHeaders,
@@ -803,15 +713,13 @@ export class Projects {
803
713
  );
804
714
  }
805
715
  /**
806
- * List keys
807
- *
808
716
  * Get a list of all API keys from the current project.
809
717
  *
810
718
  * @param {string} projectId
811
719
  * @throws {AppwriteException}
812
720
  * @returns {Promise<Models.KeyList>}
813
721
  */
814
- async listKeys(projectId: string): Promise<Models.KeyList> {
722
+ listKeys(projectId: string): Promise<Models.KeyList> {
815
723
  if (typeof projectId === 'undefined') {
816
724
  throw new AppwriteException('Missing required parameter: "projectId"');
817
725
  }
@@ -823,10 +731,7 @@ export class Projects {
823
731
  'content-type': 'application/json',
824
732
  }
825
733
 
826
- payload['project'] = this.client.config.project;
827
-
828
-
829
- return await this.client.call(
734
+ return this.client.call(
830
735
  'get',
831
736
  uri,
832
737
  apiHeaders,
@@ -834,8 +739,6 @@ export class Projects {
834
739
  );
835
740
  }
836
741
  /**
837
- * Create key
838
- *
839
742
  * Create a new API key. It&#039;s recommended to have multiple API keys with strict scopes for separate functions within your project.
840
743
  *
841
744
  * @param {string} projectId
@@ -845,7 +748,7 @@ export class Projects {
845
748
  * @throws {AppwriteException}
846
749
  * @returns {Promise<Models.Key>}
847
750
  */
848
- async createKey(projectId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
751
+ createKey(projectId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
849
752
  if (typeof projectId === 'undefined') {
850
753
  throw new AppwriteException('Missing required parameter: "projectId"');
851
754
  }
@@ -872,10 +775,7 @@ export class Projects {
872
775
  'content-type': 'application/json',
873
776
  }
874
777
 
875
- payload['project'] = this.client.config.project;
876
-
877
-
878
- return await this.client.call(
778
+ return this.client.call(
879
779
  'post',
880
780
  uri,
881
781
  apiHeaders,
@@ -883,8 +783,6 @@ export class Projects {
883
783
  );
884
784
  }
885
785
  /**
886
- * Get key
887
- *
888
786
  * Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it&#039;s scopes.
889
787
  *
890
788
  * @param {string} projectId
@@ -892,7 +790,7 @@ export class Projects {
892
790
  * @throws {AppwriteException}
893
791
  * @returns {Promise<Models.Key>}
894
792
  */
895
- async getKey(projectId: string, keyId: string): Promise<Models.Key> {
793
+ getKey(projectId: string, keyId: string): Promise<Models.Key> {
896
794
  if (typeof projectId === 'undefined') {
897
795
  throw new AppwriteException('Missing required parameter: "projectId"');
898
796
  }
@@ -907,10 +805,7 @@ export class Projects {
907
805
  'content-type': 'application/json',
908
806
  }
909
807
 
910
- payload['project'] = this.client.config.project;
911
-
912
-
913
- return await this.client.call(
808
+ return this.client.call(
914
809
  'get',
915
810
  uri,
916
811
  apiHeaders,
@@ -918,8 +813,6 @@ export class Projects {
918
813
  );
919
814
  }
920
815
  /**
921
- * Update key
922
- *
923
816
  * Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
924
817
  *
925
818
  * @param {string} projectId
@@ -930,7 +823,7 @@ export class Projects {
930
823
  * @throws {AppwriteException}
931
824
  * @returns {Promise<Models.Key>}
932
825
  */
933
- async updateKey(projectId: string, keyId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
826
+ updateKey(projectId: string, keyId: string, name: string, scopes: string[], expire?: string): Promise<Models.Key> {
934
827
  if (typeof projectId === 'undefined') {
935
828
  throw new AppwriteException('Missing required parameter: "projectId"');
936
829
  }
@@ -960,10 +853,7 @@ export class Projects {
960
853
  'content-type': 'application/json',
961
854
  }
962
855
 
963
- payload['project'] = this.client.config.project;
964
-
965
-
966
- return await this.client.call(
856
+ return this.client.call(
967
857
  'put',
968
858
  uri,
969
859
  apiHeaders,
@@ -971,8 +861,6 @@ export class Projects {
971
861
  );
972
862
  }
973
863
  /**
974
- * Delete key
975
- *
976
864
  * Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
977
865
  *
978
866
  * @param {string} projectId
@@ -980,7 +868,7 @@ export class Projects {
980
868
  * @throws {AppwriteException}
981
869
  * @returns {Promise<{}>}
982
870
  */
983
- async deleteKey(projectId: string, keyId: string): Promise<{}> {
871
+ deleteKey(projectId: string, keyId: string): Promise<{}> {
984
872
  if (typeof projectId === 'undefined') {
985
873
  throw new AppwriteException('Missing required parameter: "projectId"');
986
874
  }
@@ -995,10 +883,7 @@ export class Projects {
995
883
  'content-type': 'application/json',
996
884
  }
997
885
 
998
- payload['project'] = this.client.config.project;
999
-
1000
-
1001
- return await this.client.call(
886
+ return this.client.call(
1002
887
  'delete',
1003
888
  uri,
1004
889
  apiHeaders,
@@ -1006,8 +891,6 @@ export class Projects {
1006
891
  );
1007
892
  }
1008
893
  /**
1009
- * Update project OAuth2
1010
- *
1011
894
  * Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
1012
895
  *
1013
896
  * @param {string} projectId
@@ -1018,7 +901,7 @@ export class Projects {
1018
901
  * @throws {AppwriteException}
1019
902
  * @returns {Promise<Models.Project>}
1020
903
  */
1021
- async updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project> {
904
+ updateOAuth2(projectId: string, provider: OAuthProvider, appId?: string, secret?: string, enabled?: boolean): Promise<Models.Project> {
1022
905
  if (typeof projectId === 'undefined') {
1023
906
  throw new AppwriteException('Missing required parameter: "projectId"');
1024
907
  }
@@ -1045,10 +928,7 @@ export class Projects {
1045
928
  'content-type': 'application/json',
1046
929
  }
1047
930
 
1048
- payload['project'] = this.client.config.project;
1049
-
1050
-
1051
- return await this.client.call(
931
+ return this.client.call(
1052
932
  'patch',
1053
933
  uri,
1054
934
  apiHeaders,
@@ -1056,15 +936,13 @@ export class Projects {
1056
936
  );
1057
937
  }
1058
938
  /**
1059
- * List platforms
1060
- *
1061
939
  * Get a list of all platforms in the project. This endpoint returns an array of all platforms and their configurations.
1062
940
  *
1063
941
  * @param {string} projectId
1064
942
  * @throws {AppwriteException}
1065
943
  * @returns {Promise<Models.PlatformList>}
1066
944
  */
1067
- async listPlatforms(projectId: string): Promise<Models.PlatformList> {
945
+ listPlatforms(projectId: string): Promise<Models.PlatformList> {
1068
946
  if (typeof projectId === 'undefined') {
1069
947
  throw new AppwriteException('Missing required parameter: "projectId"');
1070
948
  }
@@ -1076,10 +954,7 @@ export class Projects {
1076
954
  'content-type': 'application/json',
1077
955
  }
1078
956
 
1079
- payload['project'] = this.client.config.project;
1080
-
1081
-
1082
- return await this.client.call(
957
+ return this.client.call(
1083
958
  'get',
1084
959
  uri,
1085
960
  apiHeaders,
@@ -1087,8 +962,6 @@ export class Projects {
1087
962
  );
1088
963
  }
1089
964
  /**
1090
- * Create platform
1091
- *
1092
965
  * Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.
1093
966
  *
1094
967
  * @param {string} projectId
@@ -1100,7 +973,7 @@ export class Projects {
1100
973
  * @throws {AppwriteException}
1101
974
  * @returns {Promise<Models.Platform>}
1102
975
  */
1103
- async createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
976
+ createPlatform(projectId: string, type: PlatformType, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
1104
977
  if (typeof projectId === 'undefined') {
1105
978
  throw new AppwriteException('Missing required parameter: "projectId"');
1106
979
  }
@@ -1133,10 +1006,7 @@ export class Projects {
1133
1006
  'content-type': 'application/json',
1134
1007
  }
1135
1008
 
1136
- payload['project'] = this.client.config.project;
1137
-
1138
-
1139
- return await this.client.call(
1009
+ return this.client.call(
1140
1010
  'post',
1141
1011
  uri,
1142
1012
  apiHeaders,
@@ -1144,8 +1014,6 @@ export class Projects {
1144
1014
  );
1145
1015
  }
1146
1016
  /**
1147
- * Get platform
1148
- *
1149
1017
  * Get a platform by its unique ID. This endpoint returns the platform&#039;s details, including its name, type, and key configurations.
1150
1018
  *
1151
1019
  * @param {string} projectId
@@ -1153,7 +1021,7 @@ export class Projects {
1153
1021
  * @throws {AppwriteException}
1154
1022
  * @returns {Promise<Models.Platform>}
1155
1023
  */
1156
- async getPlatform(projectId: string, platformId: string): Promise<Models.Platform> {
1024
+ getPlatform(projectId: string, platformId: string): Promise<Models.Platform> {
1157
1025
  if (typeof projectId === 'undefined') {
1158
1026
  throw new AppwriteException('Missing required parameter: "projectId"');
1159
1027
  }
@@ -1168,10 +1036,7 @@ export class Projects {
1168
1036
  'content-type': 'application/json',
1169
1037
  }
1170
1038
 
1171
- payload['project'] = this.client.config.project;
1172
-
1173
-
1174
- return await this.client.call(
1039
+ return this.client.call(
1175
1040
  'get',
1176
1041
  uri,
1177
1042
  apiHeaders,
@@ -1179,8 +1044,6 @@ export class Projects {
1179
1044
  );
1180
1045
  }
1181
1046
  /**
1182
- * Update platform
1183
- *
1184
1047
  * Update a platform by its unique ID. Use this endpoint to update the platform&#039;s name, key, platform store ID, or hostname.
1185
1048
  *
1186
1049
  * @param {string} projectId
@@ -1192,7 +1055,7 @@ export class Projects {
1192
1055
  * @throws {AppwriteException}
1193
1056
  * @returns {Promise<Models.Platform>}
1194
1057
  */
1195
- async updatePlatform(projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
1058
+ updatePlatform(projectId: string, platformId: string, name: string, key?: string, store?: string, hostname?: string): Promise<Models.Platform> {
1196
1059
  if (typeof projectId === 'undefined') {
1197
1060
  throw new AppwriteException('Missing required parameter: "projectId"');
1198
1061
  }
@@ -1222,10 +1085,7 @@ export class Projects {
1222
1085
  'content-type': 'application/json',
1223
1086
  }
1224
1087
 
1225
- payload['project'] = this.client.config.project;
1226
-
1227
-
1228
- return await this.client.call(
1088
+ return this.client.call(
1229
1089
  'put',
1230
1090
  uri,
1231
1091
  apiHeaders,
@@ -1233,8 +1093,6 @@ export class Projects {
1233
1093
  );
1234
1094
  }
1235
1095
  /**
1236
- * Delete platform
1237
- *
1238
1096
  * Delete a platform by its unique ID. This endpoint removes the platform and all its configurations from the project.
1239
1097
  *
1240
1098
  * @param {string} projectId
@@ -1242,7 +1100,7 @@ export class Projects {
1242
1100
  * @throws {AppwriteException}
1243
1101
  * @returns {Promise<{}>}
1244
1102
  */
1245
- async deletePlatform(projectId: string, platformId: string): Promise<{}> {
1103
+ deletePlatform(projectId: string, platformId: string): Promise<{}> {
1246
1104
  if (typeof projectId === 'undefined') {
1247
1105
  throw new AppwriteException('Missing required parameter: "projectId"');
1248
1106
  }
@@ -1257,10 +1115,7 @@ export class Projects {
1257
1115
  'content-type': 'application/json',
1258
1116
  }
1259
1117
 
1260
- payload['project'] = this.client.config.project;
1261
-
1262
-
1263
- return await this.client.call(
1118
+ return this.client.call(
1264
1119
  'delete',
1265
1120
  uri,
1266
1121
  apiHeaders,
@@ -1268,8 +1123,6 @@ export class Projects {
1268
1123
  );
1269
1124
  }
1270
1125
  /**
1271
- * Update service status
1272
- *
1273
1126
  * Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
1274
1127
  *
1275
1128
  * @param {string} projectId
@@ -1278,7 +1131,7 @@ export class Projects {
1278
1131
  * @throws {AppwriteException}
1279
1132
  * @returns {Promise<Models.Project>}
1280
1133
  */
1281
- async updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project> {
1134
+ updateServiceStatus(projectId: string, service: ApiService, status: boolean): Promise<Models.Project> {
1282
1135
  if (typeof projectId === 'undefined') {
1283
1136
  throw new AppwriteException('Missing required parameter: "projectId"');
1284
1137
  }
@@ -1302,10 +1155,7 @@ export class Projects {
1302
1155
  'content-type': 'application/json',
1303
1156
  }
1304
1157
 
1305
- payload['project'] = this.client.config.project;
1306
-
1307
-
1308
- return await this.client.call(
1158
+ return this.client.call(
1309
1159
  'patch',
1310
1160
  uri,
1311
1161
  apiHeaders,
@@ -1313,8 +1163,6 @@ export class Projects {
1313
1163
  );
1314
1164
  }
1315
1165
  /**
1316
- * Update all service status
1317
- *
1318
1166
  * Update the status of all services. Use this endpoint to enable or disable all optional services at once.
1319
1167
  *
1320
1168
  * @param {string} projectId
@@ -1322,7 +1170,7 @@ export class Projects {
1322
1170
  * @throws {AppwriteException}
1323
1171
  * @returns {Promise<Models.Project>}
1324
1172
  */
1325
- async updateServiceStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
1173
+ updateServiceStatusAll(projectId: string, status: boolean): Promise<Models.Project> {
1326
1174
  if (typeof projectId === 'undefined') {
1327
1175
  throw new AppwriteException('Missing required parameter: "projectId"');
1328
1176
  }
@@ -1340,10 +1188,7 @@ export class Projects {
1340
1188
  'content-type': 'application/json',
1341
1189
  }
1342
1190
 
1343
- payload['project'] = this.client.config.project;
1344
-
1345
-
1346
- return await this.client.call(
1191
+ return this.client.call(
1347
1192
  'patch',
1348
1193
  uri,
1349
1194
  apiHeaders,
@@ -1351,8 +1196,6 @@ export class Projects {
1351
1196
  );
1352
1197
  }
1353
1198
  /**
1354
- * Update SMTP
1355
- *
1356
1199
  * Update the SMTP configuration for your project. Use this endpoint to configure your project&#039;s SMTP provider with your custom settings for sending transactional emails.
1357
1200
  *
1358
1201
  * @param {string} projectId
@@ -1368,7 +1211,7 @@ export class Projects {
1368
1211
  * @throws {AppwriteException}
1369
1212
  * @returns {Promise<Models.Project>}
1370
1213
  */
1371
- async updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project> {
1214
+ updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project> {
1372
1215
  if (typeof projectId === 'undefined') {
1373
1216
  throw new AppwriteException('Missing required parameter: "projectId"');
1374
1217
  }
@@ -1410,10 +1253,7 @@ export class Projects {
1410
1253
  'content-type': 'application/json',
1411
1254
  }
1412
1255
 
1413
- payload['project'] = this.client.config.project;
1414
-
1415
-
1416
- return await this.client.call(
1256
+ return this.client.call(
1417
1257
  'patch',
1418
1258
  uri,
1419
1259
  apiHeaders,
@@ -1421,8 +1261,6 @@ export class Projects {
1421
1261
  );
1422
1262
  }
1423
1263
  /**
1424
- * Create SMTP test
1425
- *
1426
1264
  * Send a test email to verify SMTP configuration.
1427
1265
  *
1428
1266
  * @param {string} projectId
@@ -1438,7 +1276,7 @@ export class Projects {
1438
1276
  * @throws {AppwriteException}
1439
1277
  * @returns {Promise<{}>}
1440
1278
  */
1441
- async createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}> {
1279
+ createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}> {
1442
1280
  if (typeof projectId === 'undefined') {
1443
1281
  throw new AppwriteException('Missing required parameter: "projectId"');
1444
1282
  }
@@ -1489,10 +1327,7 @@ export class Projects {
1489
1327
  'content-type': 'application/json',
1490
1328
  }
1491
1329
 
1492
- payload['project'] = this.client.config.project;
1493
-
1494
-
1495
- return await this.client.call(
1330
+ return this.client.call(
1496
1331
  'post',
1497
1332
  uri,
1498
1333
  apiHeaders,
@@ -1500,8 +1335,6 @@ export class Projects {
1500
1335
  );
1501
1336
  }
1502
1337
  /**
1503
- * Update project team
1504
- *
1505
1338
  * Update the team ID of a project allowing for it to be transferred to another team.
1506
1339
  *
1507
1340
  * @param {string} projectId
@@ -1509,7 +1342,7 @@ export class Projects {
1509
1342
  * @throws {AppwriteException}
1510
1343
  * @returns {Promise<Models.Project>}
1511
1344
  */
1512
- async updateTeam(projectId: string, teamId: string): Promise<Models.Project> {
1345
+ updateTeam(projectId: string, teamId: string): Promise<Models.Project> {
1513
1346
  if (typeof projectId === 'undefined') {
1514
1347
  throw new AppwriteException('Missing required parameter: "projectId"');
1515
1348
  }
@@ -1527,10 +1360,7 @@ export class Projects {
1527
1360
  'content-type': 'application/json',
1528
1361
  }
1529
1362
 
1530
- payload['project'] = this.client.config.project;
1531
-
1532
-
1533
- return await this.client.call(
1363
+ return this.client.call(
1534
1364
  'patch',
1535
1365
  uri,
1536
1366
  apiHeaders,
@@ -1538,8 +1368,6 @@ export class Projects {
1538
1368
  );
1539
1369
  }
1540
1370
  /**
1541
- * Get custom email template
1542
- *
1543
1371
  * Get a custom email template for the specified locale and type. This endpoint returns the template content, subject, and other configuration details.
1544
1372
  *
1545
1373
  * @param {string} projectId
@@ -1548,7 +1376,7 @@ export class Projects {
1548
1376
  * @throws {AppwriteException}
1549
1377
  * @returns {Promise<Models.EmailTemplate>}
1550
1378
  */
1551
- async getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
1379
+ getEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
1552
1380
  if (typeof projectId === 'undefined') {
1553
1381
  throw new AppwriteException('Missing required parameter: "projectId"');
1554
1382
  }
@@ -1566,10 +1394,7 @@ export class Projects {
1566
1394
  'content-type': 'application/json',
1567
1395
  }
1568
1396
 
1569
- payload['project'] = this.client.config.project;
1570
-
1571
-
1572
- return await this.client.call(
1397
+ return this.client.call(
1573
1398
  'get',
1574
1399
  uri,
1575
1400
  apiHeaders,
@@ -1577,8 +1402,6 @@ export class Projects {
1577
1402
  );
1578
1403
  }
1579
1404
  /**
1580
- * Update custom email templates
1581
- *
1582
1405
  * Update a custom email template for the specified locale and type. Use this endpoint to modify the content of your email templates.
1583
1406
  *
1584
1407
  * @param {string} projectId
@@ -1592,7 +1415,7 @@ export class Projects {
1592
1415
  * @throws {AppwriteException}
1593
1416
  * @returns {Promise<Models.EmailTemplate>}
1594
1417
  */
1595
- async updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.EmailTemplate> {
1418
+ updateEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale, subject: string, message: string, senderName?: string, senderEmail?: string, replyTo?: string): Promise<Models.EmailTemplate> {
1596
1419
  if (typeof projectId === 'undefined') {
1597
1420
  throw new AppwriteException('Missing required parameter: "projectId"');
1598
1421
  }
@@ -1631,10 +1454,7 @@ export class Projects {
1631
1454
  'content-type': 'application/json',
1632
1455
  }
1633
1456
 
1634
- payload['project'] = this.client.config.project;
1635
-
1636
-
1637
- return await this.client.call(
1457
+ return this.client.call(
1638
1458
  'patch',
1639
1459
  uri,
1640
1460
  apiHeaders,
@@ -1642,8 +1462,6 @@ export class Projects {
1642
1462
  );
1643
1463
  }
1644
1464
  /**
1645
- * Reset custom email template
1646
- *
1647
1465
  * Reset a custom email template to its default value. This endpoint removes any custom content and restores the template to its original state.
1648
1466
  *
1649
1467
  * @param {string} projectId
@@ -1652,7 +1470,7 @@ export class Projects {
1652
1470
  * @throws {AppwriteException}
1653
1471
  * @returns {Promise<Models.EmailTemplate>}
1654
1472
  */
1655
- async deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
1473
+ deleteEmailTemplate(projectId: string, type: EmailTemplateType, locale: EmailTemplateLocale): Promise<Models.EmailTemplate> {
1656
1474
  if (typeof projectId === 'undefined') {
1657
1475
  throw new AppwriteException('Missing required parameter: "projectId"');
1658
1476
  }
@@ -1670,10 +1488,7 @@ export class Projects {
1670
1488
  'content-type': 'application/json',
1671
1489
  }
1672
1490
 
1673
- payload['project'] = this.client.config.project;
1674
-
1675
-
1676
- return await this.client.call(
1491
+ return this.client.call(
1677
1492
  'delete',
1678
1493
  uri,
1679
1494
  apiHeaders,
@@ -1681,8 +1496,6 @@ export class Projects {
1681
1496
  );
1682
1497
  }
1683
1498
  /**
1684
- * Get custom SMS template
1685
- *
1686
1499
  * Get a custom SMS template for the specified locale and type returning it&#039;s contents.
1687
1500
  *
1688
1501
  * @param {string} projectId
@@ -1691,7 +1504,7 @@ export class Projects {
1691
1504
  * @throws {AppwriteException}
1692
1505
  * @returns {Promise<Models.SmsTemplate>}
1693
1506
  */
1694
- async getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
1507
+ getSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
1695
1508
  if (typeof projectId === 'undefined') {
1696
1509
  throw new AppwriteException('Missing required parameter: "projectId"');
1697
1510
  }
@@ -1709,10 +1522,7 @@ export class Projects {
1709
1522
  'content-type': 'application/json',
1710
1523
  }
1711
1524
 
1712
- payload['project'] = this.client.config.project;
1713
-
1714
-
1715
- return await this.client.call(
1525
+ return this.client.call(
1716
1526
  'get',
1717
1527
  uri,
1718
1528
  apiHeaders,
@@ -1720,8 +1530,6 @@ export class Projects {
1720
1530
  );
1721
1531
  }
1722
1532
  /**
1723
- * Update custom SMS template
1724
- *
1725
1533
  * Update a custom SMS template for the specified locale and type. Use this endpoint to modify the content of your SMS templates.
1726
1534
  *
1727
1535
  * @param {string} projectId
@@ -1731,7 +1539,7 @@ export class Projects {
1731
1539
  * @throws {AppwriteException}
1732
1540
  * @returns {Promise<Models.SmsTemplate>}
1733
1541
  */
1734
- async updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate> {
1542
+ updateSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale, message: string): Promise<Models.SmsTemplate> {
1735
1543
  if (typeof projectId === 'undefined') {
1736
1544
  throw new AppwriteException('Missing required parameter: "projectId"');
1737
1545
  }
@@ -1755,10 +1563,7 @@ export class Projects {
1755
1563
  'content-type': 'application/json',
1756
1564
  }
1757
1565
 
1758
- payload['project'] = this.client.config.project;
1759
-
1760
-
1761
- return await this.client.call(
1566
+ return this.client.call(
1762
1567
  'patch',
1763
1568
  uri,
1764
1569
  apiHeaders,
@@ -1766,8 +1571,6 @@ export class Projects {
1766
1571
  );
1767
1572
  }
1768
1573
  /**
1769
- * Reset custom SMS template
1770
- *
1771
1574
  * Reset a custom SMS template to its default value. This endpoint removes any custom message and restores the template to its original state.
1772
1575
  *
1773
1576
  * @param {string} projectId
@@ -1776,7 +1579,7 @@ export class Projects {
1776
1579
  * @throws {AppwriteException}
1777
1580
  * @returns {Promise<Models.SmsTemplate>}
1778
1581
  */
1779
- async deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
1582
+ deleteSmsTemplate(projectId: string, type: SmsTemplateType, locale: SmsTemplateLocale): Promise<Models.SmsTemplate> {
1780
1583
  if (typeof projectId === 'undefined') {
1781
1584
  throw new AppwriteException('Missing required parameter: "projectId"');
1782
1585
  }
@@ -1794,10 +1597,7 @@ export class Projects {
1794
1597
  'content-type': 'application/json',
1795
1598
  }
1796
1599
 
1797
- payload['project'] = this.client.config.project;
1798
-
1799
-
1800
- return await this.client.call(
1600
+ return this.client.call(
1801
1601
  'delete',
1802
1602
  uri,
1803
1603
  apiHeaders,
@@ -1805,15 +1605,13 @@ export class Projects {
1805
1605
  );
1806
1606
  }
1807
1607
  /**
1808
- * List webhooks
1809
- *
1810
1608
  * Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
1811
1609
  *
1812
1610
  * @param {string} projectId
1813
1611
  * @throws {AppwriteException}
1814
1612
  * @returns {Promise<Models.WebhookList>}
1815
1613
  */
1816
- async listWebhooks(projectId: string): Promise<Models.WebhookList> {
1614
+ listWebhooks(projectId: string): Promise<Models.WebhookList> {
1817
1615
  if (typeof projectId === 'undefined') {
1818
1616
  throw new AppwriteException('Missing required parameter: "projectId"');
1819
1617
  }
@@ -1825,10 +1623,7 @@ export class Projects {
1825
1623
  'content-type': 'application/json',
1826
1624
  }
1827
1625
 
1828
- payload['project'] = this.client.config.project;
1829
-
1830
-
1831
- return await this.client.call(
1626
+ return this.client.call(
1832
1627
  'get',
1833
1628
  uri,
1834
1629
  apiHeaders,
@@ -1836,8 +1631,6 @@ export class Projects {
1836
1631
  );
1837
1632
  }
1838
1633
  /**
1839
- * Create webhook
1840
- *
1841
1634
  * Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
1842
1635
  *
1843
1636
  * @param {string} projectId
@@ -1851,7 +1644,7 @@ export class Projects {
1851
1644
  * @throws {AppwriteException}
1852
1645
  * @returns {Promise<Models.Webhook>}
1853
1646
  */
1854
- async createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
1647
+ createWebhook(projectId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
1855
1648
  if (typeof projectId === 'undefined') {
1856
1649
  throw new AppwriteException('Missing required parameter: "projectId"');
1857
1650
  }
@@ -1896,10 +1689,7 @@ export class Projects {
1896
1689
  'content-type': 'application/json',
1897
1690
  }
1898
1691
 
1899
- payload['project'] = this.client.config.project;
1900
-
1901
-
1902
- return await this.client.call(
1692
+ return this.client.call(
1903
1693
  'post',
1904
1694
  uri,
1905
1695
  apiHeaders,
@@ -1907,8 +1697,6 @@ export class Projects {
1907
1697
  );
1908
1698
  }
1909
1699
  /**
1910
- * Get webhook
1911
- *
1912
1700
  * Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
1913
1701
  *
1914
1702
  * @param {string} projectId
@@ -1916,7 +1704,7 @@ export class Projects {
1916
1704
  * @throws {AppwriteException}
1917
1705
  * @returns {Promise<Models.Webhook>}
1918
1706
  */
1919
- async getWebhook(projectId: string, webhookId: string): Promise<Models.Webhook> {
1707
+ getWebhook(projectId: string, webhookId: string): Promise<Models.Webhook> {
1920
1708
  if (typeof projectId === 'undefined') {
1921
1709
  throw new AppwriteException('Missing required parameter: "projectId"');
1922
1710
  }
@@ -1931,10 +1719,7 @@ export class Projects {
1931
1719
  'content-type': 'application/json',
1932
1720
  }
1933
1721
 
1934
- payload['project'] = this.client.config.project;
1935
-
1936
-
1937
- return await this.client.call(
1722
+ return this.client.call(
1938
1723
  'get',
1939
1724
  uri,
1940
1725
  apiHeaders,
@@ -1942,8 +1727,6 @@ export class Projects {
1942
1727
  );
1943
1728
  }
1944
1729
  /**
1945
- * Update webhook
1946
- *
1947
1730
  * Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
1948
1731
  *
1949
1732
  * @param {string} projectId
@@ -1958,7 +1741,7 @@ export class Projects {
1958
1741
  * @throws {AppwriteException}
1959
1742
  * @returns {Promise<Models.Webhook>}
1960
1743
  */
1961
- async updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
1744
+ updateWebhook(projectId: string, webhookId: string, name: string, events: string[], url: string, security: boolean, enabled?: boolean, httpUser?: string, httpPass?: string): Promise<Models.Webhook> {
1962
1745
  if (typeof projectId === 'undefined') {
1963
1746
  throw new AppwriteException('Missing required parameter: "projectId"');
1964
1747
  }
@@ -2006,10 +1789,7 @@ export class Projects {
2006
1789
  'content-type': 'application/json',
2007
1790
  }
2008
1791
 
2009
- payload['project'] = this.client.config.project;
2010
-
2011
-
2012
- return await this.client.call(
1792
+ return this.client.call(
2013
1793
  'put',
2014
1794
  uri,
2015
1795
  apiHeaders,
@@ -2017,8 +1797,6 @@ export class Projects {
2017
1797
  );
2018
1798
  }
2019
1799
  /**
2020
- * Delete webhook
2021
- *
2022
1800
  * Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
2023
1801
  *
2024
1802
  * @param {string} projectId
@@ -2026,7 +1804,7 @@ export class Projects {
2026
1804
  * @throws {AppwriteException}
2027
1805
  * @returns {Promise<{}>}
2028
1806
  */
2029
- async deleteWebhook(projectId: string, webhookId: string): Promise<{}> {
1807
+ deleteWebhook(projectId: string, webhookId: string): Promise<{}> {
2030
1808
  if (typeof projectId === 'undefined') {
2031
1809
  throw new AppwriteException('Missing required parameter: "projectId"');
2032
1810
  }
@@ -2041,10 +1819,7 @@ export class Projects {
2041
1819
  'content-type': 'application/json',
2042
1820
  }
2043
1821
 
2044
- payload['project'] = this.client.config.project;
2045
-
2046
-
2047
- return await this.client.call(
1822
+ return this.client.call(
2048
1823
  'delete',
2049
1824
  uri,
2050
1825
  apiHeaders,
@@ -2052,8 +1827,6 @@ export class Projects {
2052
1827
  );
2053
1828
  }
2054
1829
  /**
2055
- * Update webhook signature key
2056
- *
2057
1830
  * Update the webhook signature key. This endpoint can be used to regenerate the signature key used to sign and validate payload deliveries for a specific webhook.
2058
1831
  *
2059
1832
  * @param {string} projectId
@@ -2061,7 +1834,7 @@ export class Projects {
2061
1834
  * @throws {AppwriteException}
2062
1835
  * @returns {Promise<Models.Webhook>}
2063
1836
  */
2064
- async updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook> {
1837
+ updateWebhookSignature(projectId: string, webhookId: string): Promise<Models.Webhook> {
2065
1838
  if (typeof projectId === 'undefined') {
2066
1839
  throw new AppwriteException('Missing required parameter: "projectId"');
2067
1840
  }
@@ -2076,10 +1849,7 @@ export class Projects {
2076
1849
  'content-type': 'application/json',
2077
1850
  }
2078
1851
 
2079
- payload['project'] = this.client.config.project;
2080
-
2081
-
2082
- return await this.client.call(
1852
+ return this.client.call(
2083
1853
  'patch',
2084
1854
  uri,
2085
1855
  apiHeaders,