appwrite 16.1.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/appwrite/client.rb +2 -2
- data/lib/appwrite/models/column_boolean.rb +67 -0
- data/lib/appwrite/models/column_datetime.rb +72 -0
- data/lib/appwrite/models/column_email.rb +72 -0
- data/lib/appwrite/models/column_enum.rb +77 -0
- data/lib/appwrite/models/column_float.rb +77 -0
- data/lib/appwrite/models/column_index.rb +72 -0
- data/lib/appwrite/models/column_index_list.rb +32 -0
- data/lib/appwrite/models/column_integer.rb +77 -0
- data/lib/appwrite/models/column_ip.rb +72 -0
- data/lib/appwrite/models/column_list.rb +32 -0
- data/lib/appwrite/models/column_relationship.rb +92 -0
- data/lib/appwrite/models/column_string.rb +77 -0
- data/lib/appwrite/models/column_url.rb +72 -0
- data/lib/appwrite/models/database.rb +8 -3
- data/lib/appwrite/models/execution.rb +5 -0
- data/lib/appwrite/models/index.rb +18 -13
- data/lib/appwrite/models/row.rb +66 -0
- data/lib/appwrite/models/row_list.rb +36 -0
- data/lib/appwrite/models/table.rb +72 -0
- data/lib/appwrite/models/table_list.rb +32 -0
- data/lib/appwrite/query.rb +36 -0
- data/lib/appwrite/services/account.rb +15 -48
- data/lib/appwrite/services/avatars.rb +0 -7
- data/lib/appwrite/services/databases.rb +198 -120
- data/lib/appwrite/services/functions.rb +0 -26
- data/lib/appwrite/services/graphql.rb +0 -2
- data/lib/appwrite/services/health.rb +0 -22
- data/lib/appwrite/services/locale.rb +0 -8
- data/lib/appwrite/services/messaging.rb +0 -46
- data/lib/appwrite/services/sites.rb +0 -25
- data/lib/appwrite/services/storage.rb +0 -13
- data/lib/appwrite/services/tables_db.rb +2318 -0
- data/lib/appwrite/services/teams.rb +0 -13
- data/lib/appwrite/services/tokens.rb +0 -5
- data/lib/appwrite/services/users.rb +0 -42
- data/lib/appwrite.rb +18 -0
- metadata +20 -2
@@ -7,6 +7,9 @@ module Appwrite
|
|
7
7
|
@client = client
|
8
8
|
end
|
9
9
|
|
10
|
+
#
|
11
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.list` instead.
|
12
|
+
#
|
10
13
|
# Get a list of all databases from the current Appwrite project. You can use
|
11
14
|
# the search parameter to filter your results.
|
12
15
|
#
|
@@ -34,7 +37,9 @@ module Appwrite
|
|
34
37
|
)
|
35
38
|
end
|
36
39
|
|
37
|
-
|
40
|
+
#
|
41
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatabase` instead.
|
42
|
+
#
|
38
43
|
# Create a new Database.
|
39
44
|
#
|
40
45
|
#
|
@@ -73,7 +78,9 @@ module Appwrite
|
|
73
78
|
)
|
74
79
|
end
|
75
80
|
|
76
|
-
|
81
|
+
#
|
82
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.get` instead.
|
83
|
+
#
|
77
84
|
# Get a database by its unique ID. This endpoint response returns a JSON
|
78
85
|
# object with the database metadata.
|
79
86
|
#
|
@@ -103,7 +110,9 @@ module Appwrite
|
|
103
110
|
)
|
104
111
|
end
|
105
112
|
|
106
|
-
|
113
|
+
#
|
114
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.update` instead.
|
115
|
+
#
|
107
116
|
# Update a database by its unique ID.
|
108
117
|
#
|
109
118
|
# @param [String] database_id Database ID.
|
@@ -141,7 +150,9 @@ module Appwrite
|
|
141
150
|
)
|
142
151
|
end
|
143
152
|
|
144
|
-
|
153
|
+
#
|
154
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.delete` instead.
|
155
|
+
#
|
145
156
|
# Delete a database by its unique ID. Only API keys with with databases.write
|
146
157
|
# scope can delete a database.
|
147
158
|
#
|
@@ -171,7 +182,9 @@ module Appwrite
|
|
171
182
|
)
|
172
183
|
end
|
173
184
|
|
174
|
-
|
185
|
+
#
|
186
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listTables` instead.
|
187
|
+
#
|
175
188
|
# Get a list of all collections that belong to the provided databaseId. You
|
176
189
|
# can use the search parameter to filter your results.
|
177
190
|
#
|
@@ -205,7 +218,9 @@ module Appwrite
|
|
205
218
|
)
|
206
219
|
end
|
207
220
|
|
208
|
-
|
221
|
+
#
|
222
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createTable` instead.
|
223
|
+
#
|
209
224
|
# Create a new Collection. Before using this route, you should create a new
|
210
225
|
# database resource using either a [server
|
211
226
|
# integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
@@ -256,7 +271,9 @@ module Appwrite
|
|
256
271
|
)
|
257
272
|
end
|
258
273
|
|
259
|
-
|
274
|
+
#
|
275
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getTable` instead.
|
276
|
+
#
|
260
277
|
# Get a collection by its unique ID. This endpoint response returns a JSON
|
261
278
|
# object with the collection metadata.
|
262
279
|
#
|
@@ -292,7 +309,9 @@ module Appwrite
|
|
292
309
|
)
|
293
310
|
end
|
294
311
|
|
295
|
-
|
312
|
+
#
|
313
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateTable` instead.
|
314
|
+
#
|
296
315
|
# Update a collection by its unique ID.
|
297
316
|
#
|
298
317
|
# @param [String] database_id Database ID.
|
@@ -340,7 +359,9 @@ module Appwrite
|
|
340
359
|
)
|
341
360
|
end
|
342
361
|
|
343
|
-
|
362
|
+
#
|
363
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteTable` instead.
|
364
|
+
#
|
344
365
|
# Delete a collection by its unique ID. Only users with write permissions
|
345
366
|
# have access to delete this resource.
|
346
367
|
#
|
@@ -376,11 +397,13 @@ module Appwrite
|
|
376
397
|
)
|
377
398
|
end
|
378
399
|
|
379
|
-
|
400
|
+
#
|
401
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listColumns` instead.
|
402
|
+
#
|
380
403
|
# List attributes in the collection.
|
381
404
|
#
|
382
405
|
# @param [String] database_id Database ID.
|
383
|
-
# @param [String] collection_id Collection ID.
|
406
|
+
# @param [String] collection_id Collection ID.
|
384
407
|
# @param [Array] queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: key, type, size, required, array, status, error
|
385
408
|
#
|
386
409
|
# @return [AttributeList]
|
@@ -413,12 +436,14 @@ module Appwrite
|
|
413
436
|
)
|
414
437
|
end
|
415
438
|
|
416
|
-
|
439
|
+
#
|
440
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBooleanColumn` instead.
|
441
|
+
#
|
417
442
|
# Create a boolean attribute.
|
418
443
|
#
|
419
444
|
#
|
420
445
|
# @param [String] database_id Database ID.
|
421
|
-
# @param [String] collection_id Collection ID. You can create a new
|
446
|
+
# @param [String] collection_id Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
422
447
|
# @param [String] key Attribute Key.
|
423
448
|
# @param [] required Is attribute required?
|
424
449
|
# @param [] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
@@ -466,12 +491,14 @@ module Appwrite
|
|
466
491
|
)
|
467
492
|
end
|
468
493
|
|
469
|
-
|
494
|
+
#
|
495
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBooleanColumn` instead.
|
496
|
+
#
|
470
497
|
# Update a boolean attribute. Changing the `default` value will not update
|
471
498
|
# already existing documents.
|
472
499
|
#
|
473
500
|
# @param [String] database_id Database ID.
|
474
|
-
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#
|
501
|
+
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
475
502
|
# @param [String] key Attribute Key.
|
476
503
|
# @param [] required Is attribute required?
|
477
504
|
# @param [] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
@@ -523,11 +550,13 @@ module Appwrite
|
|
523
550
|
)
|
524
551
|
end
|
525
552
|
|
526
|
-
|
553
|
+
#
|
554
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatetimeColumn` instead.
|
555
|
+
#
|
527
556
|
# Create a date time attribute according to the ISO 8601 standard.
|
528
557
|
#
|
529
558
|
# @param [String] database_id Database ID.
|
530
|
-
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#
|
559
|
+
# @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#createCollection).
|
531
560
|
# @param [String] key Attribute Key.
|
532
561
|
# @param [] required Is attribute required?
|
533
562
|
# @param [String] default Default value for the attribute in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.
|
@@ -575,12 +604,14 @@ module Appwrite
|
|
575
604
|
)
|
576
605
|
end
|
577
606
|
|
578
|
-
|
607
|
+
#
|
608
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateDatetimeColumn` instead.
|
609
|
+
#
|
579
610
|
# Update a date time attribute. Changing the `default` value will not update
|
580
611
|
# already existing documents.
|
581
612
|
#
|
582
613
|
# @param [String] database_id Database ID.
|
583
|
-
# @param [String] collection_id Collection ID.
|
614
|
+
# @param [String] collection_id Collection ID.
|
584
615
|
# @param [String] key Attribute Key.
|
585
616
|
# @param [] required Is attribute required?
|
586
617
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
@@ -632,12 +663,14 @@ module Appwrite
|
|
632
663
|
)
|
633
664
|
end
|
634
665
|
|
635
|
-
|
666
|
+
#
|
667
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEmailColumn` instead.
|
668
|
+
#
|
636
669
|
# Create an email attribute.
|
637
670
|
#
|
638
671
|
#
|
639
672
|
# @param [String] database_id Database ID.
|
640
|
-
# @param [String] collection_id Collection ID.
|
673
|
+
# @param [String] collection_id Collection ID.
|
641
674
|
# @param [String] key Attribute Key.
|
642
675
|
# @param [] required Is attribute required?
|
643
676
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
@@ -685,17 +718,19 @@ module Appwrite
|
|
685
718
|
)
|
686
719
|
end
|
687
720
|
|
688
|
-
|
721
|
+
#
|
722
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEmailColumn` instead.
|
723
|
+
#
|
689
724
|
# Update an email attribute. Changing the `default` value will not update
|
690
725
|
# already existing documents.
|
691
726
|
#
|
692
727
|
#
|
693
728
|
# @param [String] database_id Database ID.
|
694
|
-
# @param [String] collection_id Collection ID.
|
729
|
+
# @param [String] collection_id Collection ID.
|
695
730
|
# @param [String] key Attribute Key.
|
696
731
|
# @param [] required Is attribute required?
|
697
732
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
698
|
-
# @param [String] new_key New
|
733
|
+
# @param [String] new_key New Attribute Key.
|
699
734
|
#
|
700
735
|
# @return [AttributeEmail]
|
701
736
|
def update_email_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
|
@@ -743,15 +778,17 @@ module Appwrite
|
|
743
778
|
)
|
744
779
|
end
|
745
780
|
|
746
|
-
|
747
|
-
#
|
748
|
-
#
|
781
|
+
#
|
782
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createEnumColumn` instead.
|
783
|
+
#
|
784
|
+
# Create an enum attribute. The `elements` param acts as a white-list of
|
785
|
+
# accepted values for this attribute.
|
749
786
|
#
|
750
787
|
#
|
751
788
|
# @param [String] database_id Database ID.
|
752
|
-
# @param [String] collection_id Collection ID.
|
789
|
+
# @param [String] collection_id Collection ID.
|
753
790
|
# @param [String] key Attribute Key.
|
754
|
-
# @param [Array] elements Array of
|
791
|
+
# @param [Array] elements Array of enum values.
|
755
792
|
# @param [] required Is attribute required?
|
756
793
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
757
794
|
# @param [] array Is attribute an array?
|
@@ -803,18 +840,20 @@ module Appwrite
|
|
803
840
|
)
|
804
841
|
end
|
805
842
|
|
806
|
-
|
843
|
+
#
|
844
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateEnumColumn` instead.
|
845
|
+
#
|
807
846
|
# Update an enum attribute. Changing the `default` value will not update
|
808
847
|
# already existing documents.
|
809
848
|
#
|
810
849
|
#
|
811
850
|
# @param [String] database_id Database ID.
|
812
|
-
# @param [String] collection_id Collection ID.
|
851
|
+
# @param [String] collection_id Collection ID.
|
813
852
|
# @param [String] key Attribute Key.
|
814
|
-
# @param [Array] elements
|
853
|
+
# @param [Array] elements Updated list of enum values.
|
815
854
|
# @param [] required Is attribute required?
|
816
855
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
817
|
-
# @param [String] new_key New
|
856
|
+
# @param [String] new_key New Attribute Key.
|
818
857
|
#
|
819
858
|
# @return [AttributeEnum]
|
820
859
|
def update_enum_attribute(database_id:, collection_id:, key:, elements:, required:, default:, new_key: nil)
|
@@ -867,18 +906,20 @@ module Appwrite
|
|
867
906
|
)
|
868
907
|
end
|
869
908
|
|
870
|
-
|
909
|
+
#
|
910
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createFloatColumn` instead.
|
911
|
+
#
|
871
912
|
# Create a float attribute. Optionally, minimum and maximum values can be
|
872
913
|
# provided.
|
873
914
|
#
|
874
915
|
#
|
875
916
|
# @param [String] database_id Database ID.
|
876
|
-
# @param [String] collection_id Collection ID.
|
917
|
+
# @param [String] collection_id Collection ID.
|
877
918
|
# @param [String] key Attribute Key.
|
878
919
|
# @param [] required Is attribute required?
|
879
|
-
# @param [Float] min Minimum value
|
880
|
-
# @param [Float] max Maximum value
|
881
|
-
# @param [Float] default Default value
|
920
|
+
# @param [Float] min Minimum value.
|
921
|
+
# @param [Float] max Maximum value.
|
922
|
+
# @param [Float] default Default value. Cannot be set when required.
|
882
923
|
# @param [] array Is attribute an array?
|
883
924
|
#
|
884
925
|
# @return [AttributeFloat]
|
@@ -925,19 +966,21 @@ module Appwrite
|
|
925
966
|
)
|
926
967
|
end
|
927
968
|
|
928
|
-
|
969
|
+
#
|
970
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateFloatColumn` instead.
|
971
|
+
#
|
929
972
|
# Update a float attribute. Changing the `default` value will not update
|
930
973
|
# already existing documents.
|
931
974
|
#
|
932
975
|
#
|
933
976
|
# @param [String] database_id Database ID.
|
934
|
-
# @param [String] collection_id Collection ID.
|
977
|
+
# @param [String] collection_id Collection ID.
|
935
978
|
# @param [String] key Attribute Key.
|
936
979
|
# @param [] required Is attribute required?
|
937
|
-
# @param [Float] default Default value
|
938
|
-
# @param [Float] min Minimum value
|
939
|
-
# @param [Float] max Maximum value
|
940
|
-
# @param [String] new_key New
|
980
|
+
# @param [Float] default Default value. Cannot be set when required.
|
981
|
+
# @param [Float] min Minimum value.
|
982
|
+
# @param [Float] max Maximum value.
|
983
|
+
# @param [String] new_key New Attribute Key.
|
941
984
|
#
|
942
985
|
# @return [AttributeFloat]
|
943
986
|
def update_float_attribute(database_id:, collection_id:, key:, required:, default:, min: nil, max: nil, new_key: nil)
|
@@ -987,18 +1030,20 @@ module Appwrite
|
|
987
1030
|
)
|
988
1031
|
end
|
989
1032
|
|
990
|
-
|
1033
|
+
#
|
1034
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIntegerColumn` instead.
|
1035
|
+
#
|
991
1036
|
# Create an integer attribute. Optionally, minimum and maximum values can be
|
992
1037
|
# provided.
|
993
1038
|
#
|
994
1039
|
#
|
995
1040
|
# @param [String] database_id Database ID.
|
996
|
-
# @param [String] collection_id Collection ID.
|
1041
|
+
# @param [String] collection_id Collection ID.
|
997
1042
|
# @param [String] key Attribute Key.
|
998
1043
|
# @param [] required Is attribute required?
|
999
|
-
# @param [Integer] min Minimum value
|
1000
|
-
# @param [Integer] max Maximum value
|
1001
|
-
# @param [Integer] default Default value
|
1044
|
+
# @param [Integer] min Minimum value
|
1045
|
+
# @param [Integer] max Maximum value
|
1046
|
+
# @param [Integer] default Default value. Cannot be set when attribute is required.
|
1002
1047
|
# @param [] array Is attribute an array?
|
1003
1048
|
#
|
1004
1049
|
# @return [AttributeInteger]
|
@@ -1045,19 +1090,21 @@ module Appwrite
|
|
1045
1090
|
)
|
1046
1091
|
end
|
1047
1092
|
|
1048
|
-
|
1093
|
+
#
|
1094
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIntegerColumn` instead.
|
1095
|
+
#
|
1049
1096
|
# Update an integer attribute. Changing the `default` value will not update
|
1050
1097
|
# already existing documents.
|
1051
1098
|
#
|
1052
1099
|
#
|
1053
1100
|
# @param [String] database_id Database ID.
|
1054
|
-
# @param [String] collection_id Collection ID.
|
1101
|
+
# @param [String] collection_id Collection ID.
|
1055
1102
|
# @param [String] key Attribute Key.
|
1056
1103
|
# @param [] required Is attribute required?
|
1057
|
-
# @param [Integer] default Default value
|
1058
|
-
# @param [Integer] min Minimum value
|
1059
|
-
# @param [Integer] max Maximum value
|
1060
|
-
# @param [String] new_key New
|
1104
|
+
# @param [Integer] default Default value. Cannot be set when attribute is required.
|
1105
|
+
# @param [Integer] min Minimum value
|
1106
|
+
# @param [Integer] max Maximum value
|
1107
|
+
# @param [String] new_key New Attribute Key.
|
1061
1108
|
#
|
1062
1109
|
# @return [AttributeInteger]
|
1063
1110
|
def update_integer_attribute(database_id:, collection_id:, key:, required:, default:, min: nil, max: nil, new_key: nil)
|
@@ -1107,15 +1154,17 @@ module Appwrite
|
|
1107
1154
|
)
|
1108
1155
|
end
|
1109
1156
|
|
1110
|
-
|
1157
|
+
#
|
1158
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIpColumn` instead.
|
1159
|
+
#
|
1111
1160
|
# Create IP address attribute.
|
1112
1161
|
#
|
1113
1162
|
#
|
1114
1163
|
# @param [String] database_id Database ID.
|
1115
|
-
# @param [String] collection_id Collection ID.
|
1164
|
+
# @param [String] collection_id Collection ID.
|
1116
1165
|
# @param [String] key Attribute Key.
|
1117
1166
|
# @param [] required Is attribute required?
|
1118
|
-
# @param [String] default Default value
|
1167
|
+
# @param [String] default Default value. Cannot be set when attribute is required.
|
1119
1168
|
# @param [] array Is attribute an array?
|
1120
1169
|
#
|
1121
1170
|
# @return [AttributeIp]
|
@@ -1160,17 +1209,19 @@ module Appwrite
|
|
1160
1209
|
)
|
1161
1210
|
end
|
1162
1211
|
|
1163
|
-
|
1212
|
+
#
|
1213
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateIpColumn` instead.
|
1214
|
+
#
|
1164
1215
|
# Update an ip attribute. Changing the `default` value will not update
|
1165
1216
|
# already existing documents.
|
1166
1217
|
#
|
1167
1218
|
#
|
1168
1219
|
# @param [String] database_id Database ID.
|
1169
|
-
# @param [String] collection_id Collection ID.
|
1220
|
+
# @param [String] collection_id Collection ID.
|
1170
1221
|
# @param [String] key Attribute Key.
|
1171
1222
|
# @param [] required Is attribute required?
|
1172
|
-
# @param [String] default Default value
|
1173
|
-
# @param [String] new_key New
|
1223
|
+
# @param [String] default Default value. Cannot be set when attribute is required.
|
1224
|
+
# @param [String] new_key New Attribute Key.
|
1174
1225
|
#
|
1175
1226
|
# @return [AttributeIp]
|
1176
1227
|
def update_ip_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
|
@@ -1218,14 +1269,16 @@ module Appwrite
|
|
1218
1269
|
)
|
1219
1270
|
end
|
1220
1271
|
|
1221
|
-
|
1272
|
+
#
|
1273
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead.
|
1274
|
+
#
|
1222
1275
|
# Create relationship attribute. [Learn more about relationship
|
1223
1276
|
# attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
1224
1277
|
#
|
1225
1278
|
#
|
1226
1279
|
# @param [String] database_id Database ID.
|
1227
|
-
# @param [String] collection_id Collection ID.
|
1228
|
-
# @param [String] related_collection_id Related Collection ID.
|
1280
|
+
# @param [String] collection_id Collection ID.
|
1281
|
+
# @param [String] related_collection_id Related Collection ID.
|
1229
1282
|
# @param [RelationshipType] type Relation type
|
1230
1283
|
# @param [] two_way Is Two Way?
|
1231
1284
|
# @param [String] key Attribute Key.
|
@@ -1276,12 +1329,14 @@ module Appwrite
|
|
1276
1329
|
)
|
1277
1330
|
end
|
1278
1331
|
|
1279
|
-
|
1332
|
+
#
|
1333
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createStringColumn` instead.
|
1334
|
+
#
|
1280
1335
|
# Create a string attribute.
|
1281
1336
|
#
|
1282
1337
|
#
|
1283
1338
|
# @param [String] database_id Database ID.
|
1284
|
-
# @param [String] collection_id Collection ID. You can create a new
|
1339
|
+
# @param [String] collection_id Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
1285
1340
|
# @param [String] key Attribute Key.
|
1286
1341
|
# @param [Integer] size Attribute size for text attributes, in number of characters.
|
1287
1342
|
# @param [] required Is attribute required?
|
@@ -1337,18 +1392,20 @@ module Appwrite
|
|
1337
1392
|
)
|
1338
1393
|
end
|
1339
1394
|
|
1340
|
-
|
1395
|
+
#
|
1396
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateStringColumn` instead.
|
1397
|
+
#
|
1341
1398
|
# Update a string attribute. Changing the `default` value will not update
|
1342
1399
|
# already existing documents.
|
1343
1400
|
#
|
1344
1401
|
#
|
1345
1402
|
# @param [String] database_id Database ID.
|
1346
|
-
# @param [String] collection_id Collection ID. You can create a new
|
1403
|
+
# @param [String] collection_id Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
1347
1404
|
# @param [String] key Attribute Key.
|
1348
1405
|
# @param [] required Is attribute required?
|
1349
1406
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
1350
1407
|
# @param [Integer] size Maximum size of the string attribute.
|
1351
|
-
# @param [String] new_key New
|
1408
|
+
# @param [String] new_key New Attribute Key.
|
1352
1409
|
#
|
1353
1410
|
# @return [AttributeString]
|
1354
1411
|
def update_string_attribute(database_id:, collection_id:, key:, required:, default:, size: nil, new_key: nil)
|
@@ -1397,12 +1454,14 @@ module Appwrite
|
|
1397
1454
|
)
|
1398
1455
|
end
|
1399
1456
|
|
1400
|
-
|
1457
|
+
#
|
1458
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createUrlColumn` instead.
|
1459
|
+
#
|
1401
1460
|
# Create a URL attribute.
|
1402
1461
|
#
|
1403
1462
|
#
|
1404
1463
|
# @param [String] database_id Database ID.
|
1405
|
-
# @param [String] collection_id Collection ID.
|
1464
|
+
# @param [String] collection_id Collection ID.
|
1406
1465
|
# @param [String] key Attribute Key.
|
1407
1466
|
# @param [] required Is attribute required?
|
1408
1467
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
@@ -1450,17 +1509,19 @@ module Appwrite
|
|
1450
1509
|
)
|
1451
1510
|
end
|
1452
1511
|
|
1453
|
-
|
1512
|
+
#
|
1513
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateUrlColumn` instead.
|
1514
|
+
#
|
1454
1515
|
# Update an url attribute. Changing the `default` value will not update
|
1455
1516
|
# already existing documents.
|
1456
1517
|
#
|
1457
1518
|
#
|
1458
1519
|
# @param [String] database_id Database ID.
|
1459
|
-
# @param [String] collection_id Collection ID.
|
1520
|
+
# @param [String] collection_id Collection ID.
|
1460
1521
|
# @param [String] key Attribute Key.
|
1461
1522
|
# @param [] required Is attribute required?
|
1462
1523
|
# @param [String] default Default value for attribute when not provided. Cannot be set when attribute is required.
|
1463
|
-
# @param [String] new_key New
|
1524
|
+
# @param [String] new_key New Attribute Key.
|
1464
1525
|
#
|
1465
1526
|
# @return [AttributeUrl]
|
1466
1527
|
def update_url_attribute(database_id:, collection_id:, key:, required:, default:, new_key: nil)
|
@@ -1508,11 +1569,13 @@ module Appwrite
|
|
1508
1569
|
)
|
1509
1570
|
end
|
1510
1571
|
|
1511
|
-
|
1572
|
+
#
|
1573
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead.
|
1574
|
+
#
|
1512
1575
|
# Get attribute by ID.
|
1513
1576
|
#
|
1514
1577
|
# @param [String] database_id Database ID.
|
1515
|
-
# @param [String] collection_id Collection ID.
|
1578
|
+
# @param [String] collection_id Collection ID.
|
1516
1579
|
# @param [String] key Attribute Key.
|
1517
1580
|
#
|
1518
1581
|
# @return []
|
@@ -1548,11 +1611,13 @@ module Appwrite
|
|
1548
1611
|
)
|
1549
1612
|
end
|
1550
1613
|
|
1551
|
-
|
1614
|
+
#
|
1615
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteColumn` instead.
|
1616
|
+
#
|
1552
1617
|
# Deletes an attribute.
|
1553
1618
|
#
|
1554
1619
|
# @param [String] database_id Database ID.
|
1555
|
-
# @param [String] collection_id Collection ID.
|
1620
|
+
# @param [String] collection_id Collection ID.
|
1556
1621
|
# @param [String] key Attribute Key.
|
1557
1622
|
#
|
1558
1623
|
# @return []
|
@@ -1589,16 +1654,18 @@ module Appwrite
|
|
1589
1654
|
)
|
1590
1655
|
end
|
1591
1656
|
|
1592
|
-
|
1657
|
+
#
|
1658
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
|
1659
|
+
#
|
1593
1660
|
# Update relationship attribute. [Learn more about relationship
|
1594
1661
|
# attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
1595
1662
|
#
|
1596
1663
|
#
|
1597
1664
|
# @param [String] database_id Database ID.
|
1598
|
-
# @param [String] collection_id Collection ID.
|
1665
|
+
# @param [String] collection_id Collection ID.
|
1599
1666
|
# @param [String] key Attribute Key.
|
1600
1667
|
# @param [RelationMutate] on_delete Constraints option
|
1601
|
-
# @param [String] new_key New
|
1668
|
+
# @param [String] new_key New Attribute Key.
|
1602
1669
|
#
|
1603
1670
|
# @return [AttributeRelationship]
|
1604
1671
|
def update_relationship_attribute(database_id:, collection_id:, key:, on_delete: nil, new_key: nil)
|
@@ -1637,7 +1704,9 @@ module Appwrite
|
|
1637
1704
|
)
|
1638
1705
|
end
|
1639
1706
|
|
1640
|
-
|
1707
|
+
#
|
1708
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
1709
|
+
#
|
1641
1710
|
# Get a list of all the user's documents in a given collection. You can use
|
1642
1711
|
# the query params to filter your results.
|
1643
1712
|
#
|
@@ -1675,7 +1744,9 @@ module Appwrite
|
|
1675
1744
|
)
|
1676
1745
|
end
|
1677
1746
|
|
1678
|
-
|
1747
|
+
#
|
1748
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRow` instead.
|
1749
|
+
#
|
1679
1750
|
# Create a new Document. Before using this route, you should create a new
|
1680
1751
|
# collection resource using either a [server
|
1681
1752
|
# integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
@@ -1728,11 +1799,9 @@ module Appwrite
|
|
1728
1799
|
)
|
1729
1800
|
end
|
1730
1801
|
|
1731
|
-
|
1732
|
-
#
|
1733
|
-
#
|
1734
|
-
# in future versions.
|
1735
|
-
#
|
1802
|
+
#
|
1803
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRows` instead.
|
1804
|
+
#
|
1736
1805
|
# Create new Documents. Before using this route, you should create a new
|
1737
1806
|
# collection resource using either a [server
|
1738
1807
|
# integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
@@ -1777,11 +1846,9 @@ module Appwrite
|
|
1777
1846
|
)
|
1778
1847
|
end
|
1779
1848
|
|
1780
|
-
|
1781
|
-
#
|
1782
|
-
#
|
1783
|
-
# in future versions.
|
1784
|
-
#
|
1849
|
+
#
|
1850
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRows` instead.
|
1851
|
+
#
|
1785
1852
|
# Create or update Documents. Before using this route, you should create a
|
1786
1853
|
# new collection resource using either a [server
|
1787
1854
|
# integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
@@ -1827,11 +1894,9 @@ module Appwrite
|
|
1827
1894
|
)
|
1828
1895
|
end
|
1829
1896
|
|
1830
|
-
|
1831
|
-
#
|
1832
|
-
#
|
1833
|
-
# in future versions.
|
1834
|
-
#
|
1897
|
+
#
|
1898
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRows` instead.
|
1899
|
+
#
|
1835
1900
|
# Update all documents that match your queries, if no queries are submitted
|
1836
1901
|
# then all documents are updated. You can pass only specific fields to be
|
1837
1902
|
# updated.
|
@@ -1873,11 +1938,9 @@ module Appwrite
|
|
1873
1938
|
)
|
1874
1939
|
end
|
1875
1940
|
|
1876
|
-
|
1877
|
-
#
|
1878
|
-
#
|
1879
|
-
# in future versions.
|
1880
|
-
#
|
1941
|
+
#
|
1942
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRows` instead.
|
1943
|
+
#
|
1881
1944
|
# Bulk delete documents using queries, if no queries are passed then all
|
1882
1945
|
# documents are deleted.
|
1883
1946
|
#
|
@@ -1916,7 +1979,9 @@ module Appwrite
|
|
1916
1979
|
)
|
1917
1980
|
end
|
1918
1981
|
|
1919
|
-
|
1982
|
+
#
|
1983
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getRow` instead.
|
1984
|
+
#
|
1920
1985
|
# Get a document by its unique ID. This endpoint response returns a JSON
|
1921
1986
|
# object with the document data.
|
1922
1987
|
#
|
@@ -1960,11 +2025,9 @@ module Appwrite
|
|
1960
2025
|
)
|
1961
2026
|
end
|
1962
2027
|
|
1963
|
-
|
1964
|
-
#
|
1965
|
-
#
|
1966
|
-
# in future versions.
|
1967
|
-
#
|
2028
|
+
#
|
2029
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.upsertRow` instead.
|
2030
|
+
#
|
1968
2031
|
# Create or update a Document. Before using this route, you should create a
|
1969
2032
|
# new collection resource using either a [server
|
1970
2033
|
# integration](https://appwrite.io/docs/server/databases#databasesCreateCollection)
|
@@ -2017,7 +2080,9 @@ module Appwrite
|
|
2017
2080
|
)
|
2018
2081
|
end
|
2019
2082
|
|
2020
|
-
|
2083
|
+
#
|
2084
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRow` instead.
|
2085
|
+
#
|
2021
2086
|
# Update a document by its unique ID. Using the patch method you can pass
|
2022
2087
|
# only specific fields that will get updated.
|
2023
2088
|
#
|
@@ -2064,7 +2129,9 @@ module Appwrite
|
|
2064
2129
|
)
|
2065
2130
|
end
|
2066
2131
|
|
2067
|
-
|
2132
|
+
#
|
2133
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteRow` instead.
|
2134
|
+
#
|
2068
2135
|
# Delete a document by its unique ID.
|
2069
2136
|
#
|
2070
2137
|
# @param [String] database_id Database ID.
|
@@ -2105,14 +2172,16 @@ module Appwrite
|
|
2105
2172
|
)
|
2106
2173
|
end
|
2107
2174
|
|
2108
|
-
|
2175
|
+
#
|
2176
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.decrementRowColumn` instead.
|
2177
|
+
#
|
2109
2178
|
# Decrement a specific attribute of a document by a given value.
|
2110
2179
|
#
|
2111
2180
|
# @param [String] database_id Database ID.
|
2112
2181
|
# @param [String] collection_id Collection ID.
|
2113
2182
|
# @param [String] document_id Document ID.
|
2114
2183
|
# @param [String] attribute Attribute key.
|
2115
|
-
# @param [Float] value Value to
|
2184
|
+
# @param [Float] value Value to increment the attribute by. The value must be a number.
|
2116
2185
|
# @param [Float] min Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
2117
2186
|
#
|
2118
2187
|
# @return [Document]
|
@@ -2157,7 +2226,9 @@ module Appwrite
|
|
2157
2226
|
)
|
2158
2227
|
end
|
2159
2228
|
|
2160
|
-
|
2229
|
+
#
|
2230
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.incrementRowColumn` instead.
|
2231
|
+
#
|
2161
2232
|
# Increment a specific attribute of a document by a given value.
|
2162
2233
|
#
|
2163
2234
|
# @param [String] database_id Database ID.
|
@@ -2209,7 +2280,9 @@ module Appwrite
|
|
2209
2280
|
)
|
2210
2281
|
end
|
2211
2282
|
|
2212
|
-
|
2283
|
+
#
|
2284
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listIndexes` instead.
|
2285
|
+
#
|
2213
2286
|
# List indexes in the collection.
|
2214
2287
|
#
|
2215
2288
|
# @param [String] database_id Database ID.
|
@@ -2246,7 +2319,9 @@ module Appwrite
|
|
2246
2319
|
)
|
2247
2320
|
end
|
2248
2321
|
|
2249
|
-
|
2322
|
+
#
|
2323
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.
|
2324
|
+
#
|
2250
2325
|
# Creates an index on the attributes listed. Your index should include all
|
2251
2326
|
# the attributes you will query in a single request.
|
2252
2327
|
# Attributes can be `key`, `fulltext`, and `unique`.
|
@@ -2306,7 +2381,9 @@ module Appwrite
|
|
2306
2381
|
)
|
2307
2382
|
end
|
2308
2383
|
|
2309
|
-
|
2384
|
+
#
|
2385
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getIndex` instead.
|
2386
|
+
#
|
2310
2387
|
# Get index by ID.
|
2311
2388
|
#
|
2312
2389
|
# @param [String] database_id Database ID.
|
@@ -2347,7 +2424,9 @@ module Appwrite
|
|
2347
2424
|
)
|
2348
2425
|
end
|
2349
2426
|
|
2350
|
-
|
2427
|
+
#
|
2428
|
+
# @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.deleteIndex` instead.
|
2429
|
+
#
|
2351
2430
|
# Delete an index.
|
2352
2431
|
#
|
2353
2432
|
# @param [String] database_id Database ID.
|
@@ -2388,6 +2467,5 @@ module Appwrite
|
|
2388
2467
|
)
|
2389
2468
|
end
|
2390
2469
|
|
2391
|
-
|
2392
2470
|
end
|
2393
2471
|
end
|