appwrite 24.2.0 → 25.1.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/lib/appwrite/client.rb +19 -3
  3. data/lib/appwrite/enums/backup_services.rb +1 -0
  4. data/lib/appwrite/enums/{theme.rb → browser_theme.rb} +1 -1
  5. data/lib/appwrite/enums/build_runtime.rb +2 -3
  6. data/lib/appwrite/enums/{name.rb → health_queue_name.rb} +1 -1
  7. data/lib/appwrite/enums/organization_key_scopes.rb +16 -0
  8. data/lib/appwrite/enums/project_key_scopes.rb +2 -0
  9. data/lib/appwrite/enums/project_o_auth_provider_id.rb +0 -2
  10. data/lib/appwrite/enums/project_policy_id.rb +4 -0
  11. data/lib/appwrite/enums/region.rb +12 -0
  12. data/lib/appwrite/enums/runtime.rb +2 -3
  13. data/lib/appwrite/enums/status_code.rb +4 -4
  14. data/lib/appwrite/models/activity_event.rb +20 -20
  15. data/lib/appwrite/models/function.rb +10 -0
  16. data/lib/appwrite/models/policy_deny_aliased_email.rb +32 -0
  17. data/lib/appwrite/models/policy_deny_disposable_email.rb +32 -0
  18. data/lib/appwrite/models/policy_deny_free_email.rb +32 -0
  19. data/lib/appwrite/models/policy_password_strength.rb +52 -0
  20. data/lib/appwrite/models/presence.rb +2 -6
  21. data/lib/appwrite/models/presence_list.rb +0 -4
  22. data/lib/appwrite/models/project.rb +58 -13
  23. data/lib/appwrite/models/project_list.rb +32 -0
  24. data/lib/appwrite/models/site.rb +10 -0
  25. data/lib/appwrite/models/usage_gauge.rb +13 -3
  26. data/lib/appwrite/services/account.rb +46 -1
  27. data/lib/appwrite/services/activities.rb +2 -0
  28. data/lib/appwrite/services/advisor.rb +5 -0
  29. data/lib/appwrite/services/avatars.rb +9 -1
  30. data/lib/appwrite/services/backups.rb +12 -0
  31. data/lib/appwrite/services/databases.rb +71 -0
  32. data/lib/appwrite/services/functions.rb +36 -2
  33. data/lib/appwrite/services/graphql.rb +2 -0
  34. data/lib/appwrite/services/health.rb +52 -1
  35. data/lib/appwrite/services/locale.rb +8 -0
  36. data/lib/appwrite/services/messaging.rb +150 -0
  37. data/lib/appwrite/services/organization.rb +359 -0
  38. data/lib/appwrite/services/presences.rb +6 -1
  39. data/lib/appwrite/services/project.rb +214 -12
  40. data/lib/appwrite/services/proxy.rb +8 -0
  41. data/lib/appwrite/services/sites.rb +35 -2
  42. data/lib/appwrite/services/storage.rb +13 -0
  43. data/lib/appwrite/services/tables_db.rb +71 -0
  44. data/lib/appwrite/services/teams.rb +13 -0
  45. data/lib/appwrite/services/tokens.rb +5 -0
  46. data/lib/appwrite/services/usage.rb +12 -10
  47. data/lib/appwrite/services/users.rb +43 -0
  48. data/lib/appwrite/services/webhooks.rb +6 -0
  49. data/lib/appwrite.rb +13 -6
  50. metadata +12 -5
  51. data/lib/appwrite/enums/scopes.rb +0 -100
@@ -18,6 +18,7 @@ module Appwrite
18
18
  }
19
19
 
20
20
  api_headers = {
21
+ "X-Appwrite-Project": @client.get_config('project'),
21
22
  }
22
23
 
23
24
  @client.call(
@@ -41,6 +42,7 @@ module Appwrite
41
42
  }
42
43
 
43
44
  api_headers = {
45
+ "X-Appwrite-Project": @client.get_config('project'),
44
46
  "content-type": 'application/json',
45
47
  }
46
48
 
@@ -77,6 +79,7 @@ module Appwrite
77
79
  }
78
80
 
79
81
  api_headers = {
82
+ "X-Appwrite-Project": @client.get_config('project'),
80
83
  "content-type": 'application/json',
81
84
  }
82
85
 
@@ -105,6 +108,7 @@ module Appwrite
105
108
  }
106
109
 
107
110
  api_headers = {
111
+ "X-Appwrite-Project": @client.get_config('project'),
108
112
  }
109
113
 
110
114
  @client.call(
@@ -152,6 +156,7 @@ module Appwrite
152
156
  }
153
157
 
154
158
  api_headers = {
159
+ "X-Appwrite-Project": @client.get_config('project'),
155
160
  "content-type": 'application/json',
156
161
  }
157
162
 
@@ -192,6 +197,7 @@ module Appwrite
192
197
  }
193
198
 
194
199
  api_headers = {
200
+ "X-Appwrite-Project": @client.get_config('project'),
195
201
  "content-type": 'application/json',
196
202
  }
197
203
 
@@ -222,6 +228,7 @@ module Appwrite
222
228
  }
223
229
 
224
230
  api_headers = {
231
+ "X-Appwrite-Project": @client.get_config('project'),
225
232
  }
226
233
 
227
234
  @client.call(
@@ -266,6 +273,7 @@ module Appwrite
266
273
  }
267
274
 
268
275
  api_headers = {
276
+ "X-Appwrite-Project": @client.get_config('project'),
269
277
  "content-type": 'application/json',
270
278
  }
271
279
 
@@ -297,6 +305,7 @@ module Appwrite
297
305
  }
298
306
 
299
307
  api_headers = {
308
+ "X-Appwrite-Project": @client.get_config('project'),
300
309
  "content-type": 'application/json',
301
310
  }
302
311
 
@@ -327,6 +336,7 @@ module Appwrite
327
336
  }
328
337
 
329
338
  api_headers = {
339
+ "X-Appwrite-Project": @client.get_config('project'),
330
340
  "content-type": 'application/json',
331
341
  }
332
342
 
@@ -356,6 +366,7 @@ module Appwrite
356
366
  }
357
367
 
358
368
  api_headers = {
369
+ "X-Appwrite-Project": @client.get_config('project'),
359
370
  }
360
371
 
361
372
  @client.call(
@@ -392,6 +403,7 @@ module Appwrite
392
403
  }
393
404
 
394
405
  api_headers = {
406
+ "X-Appwrite-Project": @client.get_config('project'),
395
407
  "content-type": 'application/json',
396
408
  }
397
409
 
@@ -423,6 +435,7 @@ module Appwrite
423
435
  }
424
436
 
425
437
  api_headers = {
438
+ "X-Appwrite-Project": @client.get_config('project'),
426
439
  }
427
440
 
428
441
  @client.call(
@@ -459,6 +472,7 @@ module Appwrite
459
472
  }
460
473
 
461
474
  api_headers = {
475
+ "X-Appwrite-Project": @client.get_config('project'),
462
476
  "content-type": 'application/json',
463
477
  }
464
478
 
@@ -490,6 +504,7 @@ module Appwrite
490
504
  }
491
505
 
492
506
  api_headers = {
507
+ "X-Appwrite-Project": @client.get_config('project'),
493
508
  "content-type": 'application/json',
494
509
  }
495
510
 
@@ -519,6 +534,7 @@ module Appwrite
519
534
  }
520
535
 
521
536
  api_headers = {
537
+ "X-Appwrite-Project": @client.get_config('project'),
522
538
  }
523
539
 
524
540
  @client.call(
@@ -531,6 +547,55 @@ module Appwrite
531
547
 
532
548
  end
533
549
 
550
+ # Update the OAuth2 server (OIDC provider) configuration.
551
+ #
552
+ # @param [] enabled Enable or disable the OAuth2 server.
553
+ # @param [String] authorization_url URL to your application with consent screen.
554
+ # @param [Array] scopes List of allowed OAuth2 scopes. Maximum of 100 scopes are allowed, each up to 128 characters long.
555
+ # @param [Integer] access_token_duration Access token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 8 hours.
556
+ # @param [Integer] refresh_token_duration Refresh token duration in seconds for confidential clients (server-side apps that authenticate with a client secret). Leave empty to use default 1 year.
557
+ # @param [Integer] public_access_token_duration Access token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 1 hour.
558
+ # @param [Integer] public_refresh_token_duration Refresh token duration in seconds for public clients (SPAs, mobile, and native apps that cannot keep a client secret). Leave empty to use default 30 days.
559
+ # @param [] confidential_pkce When enabled, PKCE is required for confidential clients (server-side flows using client_secret). PKCE is always required for public clients regardless of this setting.
560
+ #
561
+ # @return [Project]
562
+ def update_o_auth2_server(enabled:, authorization_url:, scopes: nil, access_token_duration: nil, refresh_token_duration: nil, public_access_token_duration: nil, public_refresh_token_duration: nil, confidential_pkce: nil)
563
+ api_path = '/project/oauth2-server'
564
+
565
+ if enabled.nil?
566
+ raise Appwrite::Exception.new('Missing required parameter: "enabled"')
567
+ end
568
+
569
+ if authorization_url.nil?
570
+ raise Appwrite::Exception.new('Missing required parameter: "authorizationUrl"')
571
+ end
572
+
573
+ api_params = {
574
+ enabled: enabled,
575
+ authorizationUrl: authorization_url,
576
+ scopes: scopes,
577
+ accessTokenDuration: access_token_duration,
578
+ refreshTokenDuration: refresh_token_duration,
579
+ publicAccessTokenDuration: public_access_token_duration,
580
+ publicRefreshTokenDuration: public_refresh_token_duration,
581
+ confidentialPkce: confidential_pkce,
582
+ }
583
+
584
+ api_headers = {
585
+ "X-Appwrite-Project": @client.get_config('project'),
586
+ "content-type": 'application/json',
587
+ }
588
+
589
+ @client.call(
590
+ method: 'PUT',
591
+ path: api_path,
592
+ headers: api_headers,
593
+ params: api_params,
594
+ response_type: Models::Project
595
+ )
596
+
597
+ end
598
+
534
599
  # Update the project OAuth2 Amazon configuration.
535
600
  #
536
601
  # @param [String] client_id 'Client ID' of Amazon OAuth2 app. For example: amzn1.application-oa2-client.87400c00000000000000000000063d5b2
@@ -548,6 +613,7 @@ module Appwrite
548
613
  }
549
614
 
550
615
  api_headers = {
616
+ "X-Appwrite-Project": @client.get_config('project'),
551
617
  "content-type": 'application/json',
552
618
  }
553
619
 
@@ -582,6 +648,7 @@ module Appwrite
582
648
  }
583
649
 
584
650
  api_headers = {
651
+ "X-Appwrite-Project": @client.get_config('project'),
585
652
  "content-type": 'application/json',
586
653
  }
587
654
 
@@ -614,6 +681,7 @@ module Appwrite
614
681
  }
615
682
 
616
683
  api_headers = {
684
+ "X-Appwrite-Project": @client.get_config('project'),
617
685
  "content-type": 'application/json',
618
686
  }
619
687
 
@@ -646,6 +714,7 @@ module Appwrite
646
714
  }
647
715
 
648
716
  api_headers = {
717
+ "X-Appwrite-Project": @client.get_config('project'),
649
718
  "content-type": 'application/json',
650
719
  }
651
720
 
@@ -676,6 +745,7 @@ module Appwrite
676
745
  }
677
746
 
678
747
  api_headers = {
748
+ "X-Appwrite-Project": @client.get_config('project'),
679
749
  "content-type": 'application/json',
680
750
  }
681
751
 
@@ -706,6 +776,7 @@ module Appwrite
706
776
  }
707
777
 
708
778
  api_headers = {
779
+ "X-Appwrite-Project": @client.get_config('project'),
709
780
  "content-type": 'application/json',
710
781
  }
711
782
 
@@ -736,6 +807,7 @@ module Appwrite
736
807
  }
737
808
 
738
809
  api_headers = {
810
+ "X-Appwrite-Project": @client.get_config('project'),
739
811
  "content-type": 'application/json',
740
812
  }
741
813
 
@@ -766,6 +838,7 @@ module Appwrite
766
838
  }
767
839
 
768
840
  api_headers = {
841
+ "X-Appwrite-Project": @client.get_config('project'),
769
842
  "content-type": 'application/json',
770
843
  }
771
844
 
@@ -796,6 +869,7 @@ module Appwrite
796
869
  }
797
870
 
798
871
  api_headers = {
872
+ "X-Appwrite-Project": @client.get_config('project'),
799
873
  "content-type": 'application/json',
800
874
  }
801
875
 
@@ -826,6 +900,7 @@ module Appwrite
826
900
  }
827
901
 
828
902
  api_headers = {
903
+ "X-Appwrite-Project": @client.get_config('project'),
829
904
  "content-type": 'application/json',
830
905
  }
831
906
 
@@ -856,6 +931,7 @@ module Appwrite
856
931
  }
857
932
 
858
933
  api_headers = {
934
+ "X-Appwrite-Project": @client.get_config('project'),
859
935
  "content-type": 'application/json',
860
936
  }
861
937
 
@@ -886,6 +962,7 @@ module Appwrite
886
962
  }
887
963
 
888
964
  api_headers = {
965
+ "X-Appwrite-Project": @client.get_config('project'),
889
966
  "content-type": 'application/json',
890
967
  }
891
968
 
@@ -916,6 +993,7 @@ module Appwrite
916
993
  }
917
994
 
918
995
  api_headers = {
996
+ "X-Appwrite-Project": @client.get_config('project'),
919
997
  "content-type": 'application/json',
920
998
  }
921
999
 
@@ -946,6 +1024,7 @@ module Appwrite
946
1024
  }
947
1025
 
948
1026
  api_headers = {
1027
+ "X-Appwrite-Project": @client.get_config('project'),
949
1028
  "content-type": 'application/json',
950
1029
  }
951
1030
 
@@ -976,6 +1055,7 @@ module Appwrite
976
1055
  }
977
1056
 
978
1057
  api_headers = {
1058
+ "X-Appwrite-Project": @client.get_config('project'),
979
1059
  "content-type": 'application/json',
980
1060
  }
981
1061
 
@@ -1008,6 +1088,7 @@ module Appwrite
1008
1088
  }
1009
1089
 
1010
1090
  api_headers = {
1091
+ "X-Appwrite-Project": @client.get_config('project'),
1011
1092
  "content-type": 'application/json',
1012
1093
  }
1013
1094
 
@@ -1038,6 +1119,7 @@ module Appwrite
1038
1119
  }
1039
1120
 
1040
1121
  api_headers = {
1122
+ "X-Appwrite-Project": @client.get_config('project'),
1041
1123
  "content-type": 'application/json',
1042
1124
  }
1043
1125
 
@@ -1070,6 +1152,7 @@ module Appwrite
1070
1152
  }
1071
1153
 
1072
1154
  api_headers = {
1155
+ "X-Appwrite-Project": @client.get_config('project'),
1073
1156
  "content-type": 'application/json',
1074
1157
  }
1075
1158
 
@@ -1086,7 +1169,7 @@ module Appwrite
1086
1169
  # Update the project OAuth2 Google configuration.
1087
1170
  #
1088
1171
  # @param [String] client_id 'Client ID' of Google OAuth2 app. For example: 120000000095-92ifjb00000000000000000000g7ijfb.apps.googleusercontent.com
1089
- # @param [String] client_secret 'Client Secret' of Google OAuth2 app. For example: example-google-client-secret
1172
+ # @param [String] client_secret 'Client Secret' of Google OAuth2 app. For example: GOCSPX-2k8gsR0000000000000000VNahJj
1090
1173
  # @param [Array] prompt Array of Google OAuth2 prompt values. If "none" is included, it must be the only element. "none" means: don't display any authentication or consent screens. Must not be specified with other values. "consent" means: prompt the user for consent. "select_account" means: prompt the user to select an account.
1091
1174
  # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
1092
1175
  #
@@ -1102,6 +1185,7 @@ module Appwrite
1102
1185
  }
1103
1186
 
1104
1187
  api_headers = {
1188
+ "X-Appwrite-Project": @client.get_config('project'),
1105
1189
  "content-type": 'application/json',
1106
1190
  }
1107
1191
 
@@ -1136,6 +1220,7 @@ module Appwrite
1136
1220
  }
1137
1221
 
1138
1222
  api_headers = {
1223
+ "X-Appwrite-Project": @client.get_config('project'),
1139
1224
  "content-type": 'application/json',
1140
1225
  }
1141
1226
 
@@ -1166,6 +1251,7 @@ module Appwrite
1166
1251
  }
1167
1252
 
1168
1253
  api_headers = {
1254
+ "X-Appwrite-Project": @client.get_config('project'),
1169
1255
  "content-type": 'application/json',
1170
1256
  }
1171
1257
 
@@ -1182,7 +1268,7 @@ module Appwrite
1182
1268
  # Update the project OAuth2 Linkedin configuration.
1183
1269
  #
1184
1270
  # @param [String] client_id 'Client ID' of Linkedin OAuth2 app. For example: 770000000000dv
1185
- # @param [String] primary_client_secret 'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: example-linkedin-client-secret
1271
+ # @param [String] primary_client_secret 'Primary Client Secret or Secondary Client Secret' of Linkedin OAuth2 app. For example: WPL_AP1.2Bf0000000000000./HtlYw==
1186
1272
  # @param [] enabled OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.
1187
1273
  #
1188
1274
  # @return [OAuth2Linkedin]
@@ -1196,6 +1282,7 @@ module Appwrite
1196
1282
  }
1197
1283
 
1198
1284
  api_headers = {
1285
+ "X-Appwrite-Project": @client.get_config('project'),
1199
1286
  "content-type": 'application/json',
1200
1287
  }
1201
1288
 
@@ -1228,6 +1315,7 @@ module Appwrite
1228
1315
  }
1229
1316
 
1230
1317
  api_headers = {
1318
+ "X-Appwrite-Project": @client.get_config('project'),
1231
1319
  "content-type": 'application/json',
1232
1320
  }
1233
1321
 
@@ -1258,6 +1346,7 @@ module Appwrite
1258
1346
  }
1259
1347
 
1260
1348
  api_headers = {
1349
+ "X-Appwrite-Project": @client.get_config('project'),
1261
1350
  "content-type": 'application/json',
1262
1351
  }
1263
1352
 
@@ -1296,6 +1385,7 @@ module Appwrite
1296
1385
  }
1297
1386
 
1298
1387
  api_headers = {
1388
+ "X-Appwrite-Project": @client.get_config('project'),
1299
1389
  "content-type": 'application/json',
1300
1390
  }
1301
1391
 
@@ -1330,6 +1420,7 @@ module Appwrite
1330
1420
  }
1331
1421
 
1332
1422
  api_headers = {
1423
+ "X-Appwrite-Project": @client.get_config('project'),
1333
1424
  "content-type": 'application/json',
1334
1425
  }
1335
1426
 
@@ -1360,6 +1451,7 @@ module Appwrite
1360
1451
  }
1361
1452
 
1362
1453
  api_headers = {
1454
+ "X-Appwrite-Project": @client.get_config('project'),
1363
1455
  "content-type": 'application/json',
1364
1456
  }
1365
1457
 
@@ -1390,6 +1482,7 @@ module Appwrite
1390
1482
  }
1391
1483
 
1392
1484
  api_headers = {
1485
+ "X-Appwrite-Project": @client.get_config('project'),
1393
1486
  "content-type": 'application/json',
1394
1487
  }
1395
1488
 
@@ -1420,6 +1513,7 @@ module Appwrite
1420
1513
  }
1421
1514
 
1422
1515
  api_headers = {
1516
+ "X-Appwrite-Project": @client.get_config('project'),
1423
1517
  "content-type": 'application/json',
1424
1518
  }
1425
1519
 
@@ -1450,6 +1544,7 @@ module Appwrite
1450
1544
  }
1451
1545
 
1452
1546
  api_headers = {
1547
+ "X-Appwrite-Project": @client.get_config('project'),
1453
1548
  "content-type": 'application/json',
1454
1549
  }
1455
1550
 
@@ -1480,6 +1575,7 @@ module Appwrite
1480
1575
  }
1481
1576
 
1482
1577
  api_headers = {
1578
+ "X-Appwrite-Project": @client.get_config('project'),
1483
1579
  "content-type": 'application/json',
1484
1580
  }
1485
1581
 
@@ -1510,6 +1606,7 @@ module Appwrite
1510
1606
  }
1511
1607
 
1512
1608
  api_headers = {
1609
+ "X-Appwrite-Project": @client.get_config('project'),
1513
1610
  "content-type": 'application/json',
1514
1611
  }
1515
1612
 
@@ -1540,6 +1637,7 @@ module Appwrite
1540
1637
  }
1541
1638
 
1542
1639
  api_headers = {
1640
+ "X-Appwrite-Project": @client.get_config('project'),
1543
1641
  "content-type": 'application/json',
1544
1642
  }
1545
1643
 
@@ -1570,6 +1668,7 @@ module Appwrite
1570
1668
  }
1571
1669
 
1572
1670
  api_headers = {
1671
+ "X-Appwrite-Project": @client.get_config('project'),
1573
1672
  "content-type": 'application/json',
1574
1673
  }
1575
1674
 
@@ -1600,6 +1699,7 @@ module Appwrite
1600
1699
  }
1601
1700
 
1602
1701
  api_headers = {
1702
+ "X-Appwrite-Project": @client.get_config('project'),
1603
1703
  "content-type": 'application/json',
1604
1704
  }
1605
1705
 
@@ -1630,6 +1730,7 @@ module Appwrite
1630
1730
  }
1631
1731
 
1632
1732
  api_headers = {
1733
+ "X-Appwrite-Project": @client.get_config('project'),
1633
1734
  "content-type": 'application/json',
1634
1735
  }
1635
1736
 
@@ -1660,6 +1761,7 @@ module Appwrite
1660
1761
  }
1661
1762
 
1662
1763
  api_headers = {
1764
+ "X-Appwrite-Project": @client.get_config('project'),
1663
1765
  "content-type": 'application/json',
1664
1766
  }
1665
1767
 
@@ -1690,6 +1792,7 @@ module Appwrite
1690
1792
  }
1691
1793
 
1692
1794
  api_headers = {
1795
+ "X-Appwrite-Project": @client.get_config('project'),
1693
1796
  "content-type": 'application/json',
1694
1797
  }
1695
1798
 
@@ -1720,6 +1823,7 @@ module Appwrite
1720
1823
  }
1721
1824
 
1722
1825
  api_headers = {
1826
+ "X-Appwrite-Project": @client.get_config('project'),
1723
1827
  "content-type": 'application/json',
1724
1828
  }
1725
1829
 
@@ -1750,6 +1854,7 @@ module Appwrite
1750
1854
  }
1751
1855
 
1752
1856
  api_headers = {
1857
+ "X-Appwrite-Project": @client.get_config('project'),
1753
1858
  "content-type": 'application/json',
1754
1859
  }
1755
1860
 
@@ -1780,6 +1885,7 @@ module Appwrite
1780
1885
  }
1781
1886
 
1782
1887
  api_headers = {
1888
+ "X-Appwrite-Project": @client.get_config('project'),
1783
1889
  "content-type": 'application/json',
1784
1890
  }
1785
1891
 
@@ -1810,6 +1916,7 @@ module Appwrite
1810
1916
  }
1811
1917
 
1812
1918
  api_headers = {
1919
+ "X-Appwrite-Project": @client.get_config('project'),
1813
1920
  "content-type": 'application/json',
1814
1921
  }
1815
1922
 
@@ -1841,6 +1948,7 @@ module Appwrite
1841
1948
  }
1842
1949
 
1843
1950
  api_headers = {
1951
+ "X-Appwrite-Project": @client.get_config('project'),
1844
1952
  }
1845
1953
 
1846
1954
  response = @client.call(
@@ -2074,6 +2182,7 @@ module Appwrite
2074
2182
  }
2075
2183
 
2076
2184
  api_headers = {
2185
+ "X-Appwrite-Project": @client.get_config('project'),
2077
2186
  }
2078
2187
 
2079
2188
  @client.call(
@@ -2117,6 +2226,7 @@ module Appwrite
2117
2226
  }
2118
2227
 
2119
2228
  api_headers = {
2229
+ "X-Appwrite-Project": @client.get_config('project'),
2120
2230
  "content-type": 'application/json',
2121
2231
  }
2122
2232
 
@@ -2160,6 +2270,7 @@ module Appwrite
2160
2270
  }
2161
2271
 
2162
2272
  api_headers = {
2273
+ "X-Appwrite-Project": @client.get_config('project'),
2163
2274
  "content-type": 'application/json',
2164
2275
  }
2165
2276
 
@@ -2204,6 +2315,7 @@ module Appwrite
2204
2315
  }
2205
2316
 
2206
2317
  api_headers = {
2318
+ "X-Appwrite-Project": @client.get_config('project'),
2207
2319
  "content-type": 'application/json',
2208
2320
  }
2209
2321
 
@@ -2247,6 +2359,7 @@ module Appwrite
2247
2359
  }
2248
2360
 
2249
2361
  api_headers = {
2362
+ "X-Appwrite-Project": @client.get_config('project'),
2250
2363
  "content-type": 'application/json',
2251
2364
  }
2252
2365
 
@@ -2291,6 +2404,7 @@ module Appwrite
2291
2404
  }
2292
2405
 
2293
2406
  api_headers = {
2407
+ "X-Appwrite-Project": @client.get_config('project'),
2294
2408
  "content-type": 'application/json',
2295
2409
  }
2296
2410
 
@@ -2334,6 +2448,7 @@ module Appwrite
2334
2448
  }
2335
2449
 
2336
2450
  api_headers = {
2451
+ "X-Appwrite-Project": @client.get_config('project'),
2337
2452
  "content-type": 'application/json',
2338
2453
  }
2339
2454
 
@@ -2378,6 +2493,7 @@ module Appwrite
2378
2493
  }
2379
2494
 
2380
2495
  api_headers = {
2496
+ "X-Appwrite-Project": @client.get_config('project'),
2381
2497
  "content-type": 'application/json',
2382
2498
  }
2383
2499
 
@@ -2421,6 +2537,7 @@ module Appwrite
2421
2537
  }
2422
2538
 
2423
2539
  api_headers = {
2540
+ "X-Appwrite-Project": @client.get_config('project'),
2424
2541
  "content-type": 'application/json',
2425
2542
  }
2426
2543
 
@@ -2465,6 +2582,7 @@ module Appwrite
2465
2582
  }
2466
2583
 
2467
2584
  api_headers = {
2585
+ "X-Appwrite-Project": @client.get_config('project'),
2468
2586
  "content-type": 'application/json',
2469
2587
  }
2470
2588
 
@@ -2508,6 +2626,7 @@ module Appwrite
2508
2626
  }
2509
2627
 
2510
2628
  api_headers = {
2629
+ "X-Appwrite-Project": @client.get_config('project'),
2511
2630
  "content-type": 'application/json',
2512
2631
  }
2513
2632
 
@@ -2539,6 +2658,7 @@ module Appwrite
2539
2658
  }
2540
2659
 
2541
2660
  api_headers = {
2661
+ "X-Appwrite-Project": @client.get_config('project'),
2542
2662
  }
2543
2663
 
2544
2664
  response = @client.call(
@@ -2599,6 +2719,7 @@ module Appwrite
2599
2719
  }
2600
2720
 
2601
2721
  api_headers = {
2722
+ "X-Appwrite-Project": @client.get_config('project'),
2602
2723
  "content-type": 'application/json',
2603
2724
  }
2604
2725
 
@@ -2626,6 +2747,7 @@ module Appwrite
2626
2747
  }
2627
2748
 
2628
2749
  api_headers = {
2750
+ "X-Appwrite-Project": @client.get_config('project'),
2629
2751
  }
2630
2752
 
2631
2753
  @client.call(
@@ -2656,6 +2778,7 @@ module Appwrite
2656
2778
  }
2657
2779
 
2658
2780
  api_headers = {
2781
+ "X-Appwrite-Project": @client.get_config('project'),
2659
2782
  "content-type": 'application/json',
2660
2783
  }
2661
2784
 
@@ -2687,6 +2810,7 @@ module Appwrite
2687
2810
  }
2688
2811
 
2689
2812
  api_headers = {
2813
+ "X-Appwrite-Project": @client.get_config('project'),
2690
2814
  "content-type": 'application/json',
2691
2815
  }
2692
2816
 
@@ -2718,6 +2842,7 @@ module Appwrite
2718
2842
  }
2719
2843
 
2720
2844
  api_headers = {
2845
+ "X-Appwrite-Project": @client.get_config('project'),
2721
2846
  "content-type": 'application/json',
2722
2847
  }
2723
2848
 
@@ -2754,6 +2879,7 @@ module Appwrite
2754
2879
  }
2755
2880
 
2756
2881
  api_headers = {
2882
+ "X-Appwrite-Project": @client.get_config('project'),
2757
2883
  "content-type": 'application/json',
2758
2884
  }
2759
2885
 
@@ -2786,6 +2912,7 @@ module Appwrite
2786
2912
  }
2787
2913
 
2788
2914
  api_headers = {
2915
+ "X-Appwrite-Project": @client.get_config('project'),
2789
2916
  "content-type": 'application/json',
2790
2917
  }
2791
2918
 
@@ -2824,6 +2951,7 @@ module Appwrite
2824
2951
  }
2825
2952
 
2826
2953
  api_headers = {
2954
+ "X-Appwrite-Project": @client.get_config('project'),
2827
2955
  "content-type": 'application/json',
2828
2956
  }
2829
2957
 
@@ -2857,6 +2985,7 @@ module Appwrite
2857
2985
  }
2858
2986
 
2859
2987
  api_headers = {
2988
+ "X-Appwrite-Project": @client.get_config('project'),
2860
2989
  "content-type": 'application/json',
2861
2990
  }
2862
2991
 
@@ -2870,6 +2999,41 @@ module Appwrite
2870
2999
 
2871
3000
  end
2872
3001
 
3002
+ # Update the password strength requirements for users in the project.
3003
+ #
3004
+ # @param [Integer] min Minimum password length. Value must be between 8 and 256. Default is 8.
3005
+ # @param [] uppercase Whether passwords must include at least one uppercase letter.
3006
+ # @param [] lowercase Whether passwords must include at least one lowercase letter.
3007
+ # @param [] number Whether passwords must include at least one number.
3008
+ # @param [] symbols Whether passwords must include at least one symbol.
3009
+ #
3010
+ # @return [PolicyPasswordStrength]
3011
+ def update_password_strength_policy(min: nil, uppercase: nil, lowercase: nil, number: nil, symbols: nil)
3012
+ api_path = '/project/policies/password-strength'
3013
+
3014
+ api_params = {
3015
+ min: min,
3016
+ uppercase: uppercase,
3017
+ lowercase: lowercase,
3018
+ number: number,
3019
+ symbols: symbols,
3020
+ }
3021
+
3022
+ api_headers = {
3023
+ "X-Appwrite-Project": @client.get_config('project'),
3024
+ "content-type": 'application/json',
3025
+ }
3026
+
3027
+ @client.call(
3028
+ method: 'PATCH',
3029
+ path: api_path,
3030
+ headers: api_headers,
3031
+ params: api_params,
3032
+ response_type: Models::PolicyPasswordStrength
3033
+ )
3034
+
3035
+ end
3036
+
2873
3037
  # Updating this policy allows you to control if email alert is sent upon
2874
3038
  # session creation. When enabled, and user signs into their account, they
2875
3039
  # will be sent an email notification. There is an exception, the first
@@ -2891,6 +3055,7 @@ module Appwrite
2891
3055
  }
2892
3056
 
2893
3057
  api_headers = {
3058
+ "X-Appwrite-Project": @client.get_config('project'),
2894
3059
  "content-type": 'application/json',
2895
3060
  }
2896
3061
 
@@ -2922,6 +3087,7 @@ module Appwrite
2922
3087
  }
2923
3088
 
2924
3089
  api_headers = {
3090
+ "X-Appwrite-Project": @client.get_config('project'),
2925
3091
  "content-type": 'application/json',
2926
3092
  }
2927
3093
 
@@ -2954,6 +3120,7 @@ module Appwrite
2954
3120
  }
2955
3121
 
2956
3122
  api_headers = {
3123
+ "X-Appwrite-Project": @client.get_config('project'),
2957
3124
  "content-type": 'application/json',
2958
3125
  }
2959
3126
 
@@ -2985,6 +3152,7 @@ module Appwrite
2985
3152
  }
2986
3153
 
2987
3154
  api_headers = {
3155
+ "X-Appwrite-Project": @client.get_config('project'),
2988
3156
  "content-type": 'application/json',
2989
3157
  }
2990
3158
 
@@ -3017,6 +3185,7 @@ module Appwrite
3017
3185
  }
3018
3186
 
3019
3187
  api_headers = {
3188
+ "X-Appwrite-Project": @client.get_config('project'),
3020
3189
  "content-type": 'application/json',
3021
3190
  }
3022
3191
 
@@ -3033,9 +3202,9 @@ module Appwrite
3033
3202
  # Get a policy by its unique ID. This endpoint returns the current
3034
3203
  # configuration for the requested project policy.
3035
3204
  #
3036
- # @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy.
3205
+ # @param [ProjectPolicyId] policy_id Policy ID. Can be one of: password-dictionary, password-history, password-strength, password-personal-data, session-alert, session-duration, session-invalidation, session-limit, user-limit, membership-privacy, deny-aliased-email, deny-disposable-email, deny-free-email.
3037
3206
  #
3038
- # @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordPersonalData, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy]
3207
+ # @return [PolicyPasswordDictionary, PolicyPasswordHistory, PolicyPasswordStrength, PolicyPasswordPersonalData, PolicySessionAlert, PolicySessionDuration, PolicySessionInvalidation, PolicySessionLimit, PolicyUserLimit, PolicyMembershipPrivacy, PolicyDenyAliasedEmail, PolicyDenyDisposableEmail, PolicyDenyFreeEmail]
3039
3208
  def get_policy(policy_id:)
3040
3209
  api_path = '/project/policies/{policyId}'
3041
3210
  .gsub('{policyId}', policy_id)
@@ -3048,6 +3217,7 @@ module Appwrite
3048
3217
  }
3049
3218
 
3050
3219
  api_headers = {
3220
+ "X-Appwrite-Project": @client.get_config('project'),
3051
3221
  }
3052
3222
 
3053
3223
  response = @client.call(
@@ -3071,6 +3241,11 @@ module Appwrite
3071
3241
  return Models::PolicyPasswordHistory.from(map: response)
3072
3242
  end
3073
3243
 
3244
+ if response['$id'] == 'password-strength'
3245
+
3246
+ return Models::PolicyPasswordStrength.from(map: response)
3247
+ end
3248
+
3074
3249
  if response['$id'] == 'password-personal-data'
3075
3250
 
3076
3251
  return Models::PolicyPasswordPersonalData.from(map: response)
@@ -3106,6 +3281,21 @@ module Appwrite
3106
3281
  return Models::PolicyMembershipPrivacy.from(map: response)
3107
3282
  end
3108
3283
 
3284
+ if response['$id'] == 'deny-aliased-email'
3285
+
3286
+ return Models::PolicyDenyAliasedEmail.from(map: response)
3287
+ end
3288
+
3289
+ if response['$id'] == 'deny-disposable-email'
3290
+
3291
+ return Models::PolicyDenyDisposableEmail.from(map: response)
3292
+ end
3293
+
3294
+ if response['$id'] == 'deny-free-email'
3295
+
3296
+ return Models::PolicyDenyFreeEmail.from(map: response)
3297
+ end
3298
+
3109
3299
  raise Exception, "Unable to match response to any expected response model"
3110
3300
 
3111
3301
  end
@@ -3134,6 +3324,7 @@ module Appwrite
3134
3324
  }
3135
3325
 
3136
3326
  api_headers = {
3327
+ "X-Appwrite-Project": @client.get_config('project'),
3137
3328
  "content-type": 'application/json',
3138
3329
  }
3139
3330
 
@@ -3171,6 +3362,7 @@ module Appwrite
3171
3362
  }
3172
3363
 
3173
3364
  api_headers = {
3365
+ "X-Appwrite-Project": @client.get_config('project'),
3174
3366
  "content-type": 'application/json',
3175
3367
  }
3176
3368
 
@@ -3190,12 +3382,12 @@ module Appwrite
3190
3382
  #
3191
3383
  # @param [String] host SMTP server hostname (domain)
3192
3384
  # @param [Integer] port SMTP server port
3193
- # @param [String] username SMTP server username. Leave empty for no authorization.
3194
- # @param [String] password SMTP server password. Leave empty for no authorization. This property is stored securely and cannot be read in future (write-only).
3195
- # @param [String] sender_email Email address shown in inbox as the sender of the email.
3196
- # @param [String] sender_name Name shown in inbox as the sender of the email.
3197
- # @param [String] reply_to_email Email used when user replies to the email.
3198
- # @param [String] reply_to_name Name used when user replies to the email.
3385
+ # @param [String] username SMTP server username. Pass an empty string to clear a previously set value.
3386
+ # @param [String] password SMTP server password. Pass an empty string to clear a previously set value. This property is stored securely and cannot be read in future (write-only).
3387
+ # @param [String] sender_email Email address shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.
3388
+ # @param [String] sender_name Name shown in inbox as the sender of the email. Pass an empty string to clear a previously set value.
3389
+ # @param [String] reply_to_email Email used when user replies to the email. Pass an empty string to clear a previously set value.
3390
+ # @param [String] reply_to_name Name used when user replies to the email. Pass an empty string to clear a previously set value.
3199
3391
  # @param [ProjectSMTPSecure] secure Configures if communication with SMTP server is encrypted. Allowed values are: tls, ssl. Leave empty for no encryption.
3200
3392
  # @param [] enabled Enable or disable custom SMTP. Custom SMTP is useful for branding purposes, but also allows use of custom email templates.
3201
3393
  #
@@ -3217,6 +3409,7 @@ module Appwrite
3217
3409
  }
3218
3410
 
3219
3411
  api_headers = {
3412
+ "X-Appwrite-Project": @client.get_config('project'),
3220
3413
  "content-type": 'application/json',
3221
3414
  }
3222
3415
 
@@ -3247,6 +3440,7 @@ module Appwrite
3247
3440
  }
3248
3441
 
3249
3442
  api_headers = {
3443
+ "X-Appwrite-Project": @client.get_config('project'),
3250
3444
  "content-type": 'application/json',
3251
3445
  }
3252
3446
 
@@ -3276,6 +3470,7 @@ module Appwrite
3276
3470
  }
3277
3471
 
3278
3472
  api_headers = {
3473
+ "X-Appwrite-Project": @client.get_config('project'),
3279
3474
  }
3280
3475
 
3281
3476
  @client.call(
@@ -3296,8 +3491,8 @@ module Appwrite
3296
3491
  # @param [String] subject Subject of the email template. Can be up to 255 characters.
3297
3492
  # @param [String] message Plain or HTML body of the email template message. Can be up to 10MB of content.
3298
3493
  # @param [String] sender_name Name of the email sender.
3299
- # @param [String] sender_email Email of the sender.
3300
- # @param [String] reply_to_email Reply to email.
3494
+ # @param [String] sender_email Email of the sender. Pass an empty string to clear a previously set value.
3495
+ # @param [String] reply_to_email Reply to email. Pass an empty string to clear a previously set value.
3301
3496
  # @param [String] reply_to_name Reply to name.
3302
3497
  #
3303
3498
  # @return [EmailTemplate]
@@ -3320,6 +3515,7 @@ module Appwrite
3320
3515
  }
3321
3516
 
3322
3517
  api_headers = {
3518
+ "X-Appwrite-Project": @client.get_config('project'),
3323
3519
  "content-type": 'application/json',
3324
3520
  }
3325
3521
 
@@ -3354,6 +3550,7 @@ module Appwrite
3354
3550
  }
3355
3551
 
3356
3552
  api_headers = {
3553
+ "X-Appwrite-Project": @client.get_config('project'),
3357
3554
  }
3358
3555
 
3359
3556
  @client.call(
@@ -3381,6 +3578,7 @@ module Appwrite
3381
3578
  }
3382
3579
 
3383
3580
  api_headers = {
3581
+ "X-Appwrite-Project": @client.get_config('project'),
3384
3582
  }
3385
3583
 
3386
3584
  @client.call(
@@ -3425,6 +3623,7 @@ module Appwrite
3425
3623
  }
3426
3624
 
3427
3625
  api_headers = {
3626
+ "X-Appwrite-Project": @client.get_config('project'),
3428
3627
  "content-type": 'application/json',
3429
3628
  }
3430
3629
 
@@ -3455,6 +3654,7 @@ module Appwrite
3455
3654
  }
3456
3655
 
3457
3656
  api_headers = {
3657
+ "X-Appwrite-Project": @client.get_config('project'),
3458
3658
  }
3459
3659
 
3460
3660
  @client.call(
@@ -3490,6 +3690,7 @@ module Appwrite
3490
3690
  }
3491
3691
 
3492
3692
  api_headers = {
3693
+ "X-Appwrite-Project": @client.get_config('project'),
3493
3694
  "content-type": 'application/json',
3494
3695
  }
3495
3696
 
@@ -3520,6 +3721,7 @@ module Appwrite
3520
3721
  }
3521
3722
 
3522
3723
  api_headers = {
3724
+ "X-Appwrite-Project": @client.get_config('project'),
3523
3725
  "content-type": 'application/json',
3524
3726
  }
3525
3727