appwrite 17.0.0 → 18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 804930b89ed7f912408660f9bfa295452b67ea0d0589c4f987dc08cf69211945
4
- data.tar.gz: 0e91bd7bdfdc10360f9741f445f2bc75bf6617f0f0a60f8603a0546ad91911bb
3
+ metadata.gz: b57e55943d0fb3e7b6e5fba68adb8fab3d873036f1ff4c5c0f5833bdc1040904
4
+ data.tar.gz: 79ce0de62f0c7a6b48c48f9428b3a87386b76dfe6f4a165684d2bdc510eda49c
5
5
  SHA512:
6
- metadata.gz: 130e16b783f9b16cc176aed461eb401a4372b15c26fbbcd943f0b9e41ca13eacc2ae14f3a91261433d028c6241e67ebf6c004e26c8eff5c3c0e4afa91975a8ee
7
- data.tar.gz: f616ba9aa5b89f95ee808d012560a579d529cf8c9d29e469cc10c58304795cb9b224a67ea9db8409b0c586922a9dfa9a1458802bf8fc2343c9bcb358de62ddf0
6
+ metadata.gz: ffd73d7335b4e545b0d262b98ba8a3b8a3f224261bf5e1ca6045f4ccb0801356d18250527166c2a5f4c5e0a49fa5579d5dec0d5505724159d825abfe37cfe7c0
7
+ data.tar.gz: 0eeb46f320bbe794ffa6c058d32bb718618854d4c5076ce2bcc78dd96a421ac6795da95ee6a07cb76947e174c06136575663e350eb357b688133bb49f2be725e
@@ -15,7 +15,7 @@ module Appwrite
15
15
  'x-sdk-name'=> 'Ruby',
16
16
  'x-sdk-platform'=> 'server',
17
17
  'x-sdk-language'=> 'ruby',
18
- 'x-sdk-version'=> '17.0.0',
18
+ 'x-sdk-version'=> '18.0.0',
19
19
  'X-Appwrite-Response-Format' => '1.8.0'
20
20
  }
21
21
  @endpoint = 'https://cloud.appwrite.io/v1'
@@ -13,7 +13,7 @@ module Appwrite
13
13
  MASTERCARD = 'mastercard'
14
14
  NARANJA = 'naranja'
15
15
  TARJETA_SHOPPING = 'targeta-shopping'
16
- UNION_CHINA_PAY = 'union-china-pay'
16
+ UNION_PAY = 'unionpay'
17
17
  VISA = 'visa'
18
18
  MIR = 'mir'
19
19
  MAESTRO = 'maestro'
@@ -7,6 +7,7 @@ module Appwrite
7
7
  PATCH = 'PATCH'
8
8
  DELETE = 'DELETE'
9
9
  OPTIONS = 'OPTIONS'
10
+ HEAD = 'HEAD'
10
11
  end
11
12
  end
12
13
  end
@@ -4,6 +4,7 @@ module Appwrite
4
4
  KEY = 'key'
5
5
  FULLTEXT = 'fulltext'
6
6
  UNIQUE = 'unique'
7
+ SPATIAL = 'spatial'
7
8
  end
8
9
  end
9
10
  end
@@ -0,0 +1,67 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class AttributeLine
6
+ attr_reader :key
7
+ attr_reader :type
8
+ attr_reader :status
9
+ attr_reader :error
10
+ attr_reader :required
11
+ attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
14
+ attr_reader :default
15
+
16
+ def initialize(
17
+ key:,
18
+ type:,
19
+ status:,
20
+ error:,
21
+ required:,
22
+ array: ,
23
+ created_at:,
24
+ updated_at:,
25
+ default:
26
+ )
27
+ @key = key
28
+ @type = type
29
+ @status = status
30
+ @error = error
31
+ @required = required
32
+ @array = array
33
+ @created_at = created_at
34
+ @updated_at = updated_at
35
+ @default = default
36
+ end
37
+
38
+ def self.from(map:)
39
+ AttributeLine.new(
40
+ key: map["key"],
41
+ type: map["type"],
42
+ status: map["status"],
43
+ error: map["error"],
44
+ required: map["required"],
45
+ array: map["array"],
46
+ created_at: map["$createdAt"],
47
+ updated_at: map["$updatedAt"],
48
+ default: map["default"]
49
+ )
50
+ end
51
+
52
+ def to_map
53
+ {
54
+ "key": @key,
55
+ "type": @type,
56
+ "status": @status,
57
+ "error": @error,
58
+ "required": @required,
59
+ "array": @array,
60
+ "$createdAt": @created_at,
61
+ "$updatedAt": @updated_at,
62
+ "default": @default
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class AttributePoint
6
+ attr_reader :key
7
+ attr_reader :type
8
+ attr_reader :status
9
+ attr_reader :error
10
+ attr_reader :required
11
+ attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
14
+ attr_reader :default
15
+
16
+ def initialize(
17
+ key:,
18
+ type:,
19
+ status:,
20
+ error:,
21
+ required:,
22
+ array: ,
23
+ created_at:,
24
+ updated_at:,
25
+ default:
26
+ )
27
+ @key = key
28
+ @type = type
29
+ @status = status
30
+ @error = error
31
+ @required = required
32
+ @array = array
33
+ @created_at = created_at
34
+ @updated_at = updated_at
35
+ @default = default
36
+ end
37
+
38
+ def self.from(map:)
39
+ AttributePoint.new(
40
+ key: map["key"],
41
+ type: map["type"],
42
+ status: map["status"],
43
+ error: map["error"],
44
+ required: map["required"],
45
+ array: map["array"],
46
+ created_at: map["$createdAt"],
47
+ updated_at: map["$updatedAt"],
48
+ default: map["default"]
49
+ )
50
+ end
51
+
52
+ def to_map
53
+ {
54
+ "key": @key,
55
+ "type": @type,
56
+ "status": @status,
57
+ "error": @error,
58
+ "required": @required,
59
+ "array": @array,
60
+ "$createdAt": @created_at,
61
+ "$updatedAt": @updated_at,
62
+ "default": @default
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class AttributePolygon
6
+ attr_reader :key
7
+ attr_reader :type
8
+ attr_reader :status
9
+ attr_reader :error
10
+ attr_reader :required
11
+ attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
14
+ attr_reader :default
15
+
16
+ def initialize(
17
+ key:,
18
+ type:,
19
+ status:,
20
+ error:,
21
+ required:,
22
+ array: ,
23
+ created_at:,
24
+ updated_at:,
25
+ default:
26
+ )
27
+ @key = key
28
+ @type = type
29
+ @status = status
30
+ @error = error
31
+ @required = required
32
+ @array = array
33
+ @created_at = created_at
34
+ @updated_at = updated_at
35
+ @default = default
36
+ end
37
+
38
+ def self.from(map:)
39
+ AttributePolygon.new(
40
+ key: map["key"],
41
+ type: map["type"],
42
+ status: map["status"],
43
+ error: map["error"],
44
+ required: map["required"],
45
+ array: map["array"],
46
+ created_at: map["$createdAt"],
47
+ updated_at: map["$updatedAt"],
48
+ default: map["default"]
49
+ )
50
+ end
51
+
52
+ def to_map
53
+ {
54
+ "key": @key,
55
+ "type": @type,
56
+ "status": @status,
57
+ "error": @error,
58
+ "required": @required,
59
+ "array": @array,
60
+ "$createdAt": @created_at,
61
+ "$updatedAt": @updated_at,
62
+ "default": @default
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class ColumnLine
6
+ attr_reader :key
7
+ attr_reader :type
8
+ attr_reader :status
9
+ attr_reader :error
10
+ attr_reader :required
11
+ attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
14
+ attr_reader :default
15
+
16
+ def initialize(
17
+ key:,
18
+ type:,
19
+ status:,
20
+ error:,
21
+ required:,
22
+ array: ,
23
+ created_at:,
24
+ updated_at:,
25
+ default:
26
+ )
27
+ @key = key
28
+ @type = type
29
+ @status = status
30
+ @error = error
31
+ @required = required
32
+ @array = array
33
+ @created_at = created_at
34
+ @updated_at = updated_at
35
+ @default = default
36
+ end
37
+
38
+ def self.from(map:)
39
+ ColumnLine.new(
40
+ key: map["key"],
41
+ type: map["type"],
42
+ status: map["status"],
43
+ error: map["error"],
44
+ required: map["required"],
45
+ array: map["array"],
46
+ created_at: map["$createdAt"],
47
+ updated_at: map["$updatedAt"],
48
+ default: map["default"]
49
+ )
50
+ end
51
+
52
+ def to_map
53
+ {
54
+ "key": @key,
55
+ "type": @type,
56
+ "status": @status,
57
+ "error": @error,
58
+ "required": @required,
59
+ "array": @array,
60
+ "$createdAt": @created_at,
61
+ "$updatedAt": @updated_at,
62
+ "default": @default
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class ColumnPoint
6
+ attr_reader :key
7
+ attr_reader :type
8
+ attr_reader :status
9
+ attr_reader :error
10
+ attr_reader :required
11
+ attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
14
+ attr_reader :default
15
+
16
+ def initialize(
17
+ key:,
18
+ type:,
19
+ status:,
20
+ error:,
21
+ required:,
22
+ array: ,
23
+ created_at:,
24
+ updated_at:,
25
+ default:
26
+ )
27
+ @key = key
28
+ @type = type
29
+ @status = status
30
+ @error = error
31
+ @required = required
32
+ @array = array
33
+ @created_at = created_at
34
+ @updated_at = updated_at
35
+ @default = default
36
+ end
37
+
38
+ def self.from(map:)
39
+ ColumnPoint.new(
40
+ key: map["key"],
41
+ type: map["type"],
42
+ status: map["status"],
43
+ error: map["error"],
44
+ required: map["required"],
45
+ array: map["array"],
46
+ created_at: map["$createdAt"],
47
+ updated_at: map["$updatedAt"],
48
+ default: map["default"]
49
+ )
50
+ end
51
+
52
+ def to_map
53
+ {
54
+ "key": @key,
55
+ "type": @type,
56
+ "status": @status,
57
+ "error": @error,
58
+ "required": @required,
59
+ "array": @array,
60
+ "$createdAt": @created_at,
61
+ "$updatedAt": @updated_at,
62
+ "default": @default
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,67 @@
1
+ #frozen_string_literal: true
2
+
3
+ module Appwrite
4
+ module Models
5
+ class ColumnPolygon
6
+ attr_reader :key
7
+ attr_reader :type
8
+ attr_reader :status
9
+ attr_reader :error
10
+ attr_reader :required
11
+ attr_reader :array
12
+ attr_reader :created_at
13
+ attr_reader :updated_at
14
+ attr_reader :default
15
+
16
+ def initialize(
17
+ key:,
18
+ type:,
19
+ status:,
20
+ error:,
21
+ required:,
22
+ array: ,
23
+ created_at:,
24
+ updated_at:,
25
+ default:
26
+ )
27
+ @key = key
28
+ @type = type
29
+ @status = status
30
+ @error = error
31
+ @required = required
32
+ @array = array
33
+ @created_at = created_at
34
+ @updated_at = updated_at
35
+ @default = default
36
+ end
37
+
38
+ def self.from(map:)
39
+ ColumnPolygon.new(
40
+ key: map["key"],
41
+ type: map["type"],
42
+ status: map["status"],
43
+ error: map["error"],
44
+ required: map["required"],
45
+ array: map["array"],
46
+ created_at: map["$createdAt"],
47
+ updated_at: map["$updatedAt"],
48
+ default: map["default"]
49
+ )
50
+ end
51
+
52
+ def to_map
53
+ {
54
+ "key": @key,
55
+ "type": @type,
56
+ "status": @status,
57
+ "error": @error,
58
+ "required": @required,
59
+ "array": @array,
60
+ "$createdAt": @created_at,
61
+ "$updatedAt": @updated_at,
62
+ "default": @default
63
+ }
64
+ end
65
+ end
66
+ end
67
+ end
@@ -136,6 +136,10 @@ module Appwrite
136
136
  return Query.new("createdAfter", nil, value).to_s
137
137
  end
138
138
 
139
+ def created_between(start, ending)
140
+ return Query.new("createdBetween", nil, [start, ending]).to_s
141
+ end
142
+
139
143
  def updated_before(value)
140
144
  return Query.new("updatedBefore", nil, value).to_s
141
145
  end
@@ -144,6 +148,10 @@ module Appwrite
144
148
  return Query.new("updatedAfter", nil, value).to_s
145
149
  end
146
150
 
151
+ def updated_between(start, ending)
152
+ return Query.new("updatedBetween", nil, [start, ending]).to_s
153
+ end
154
+
147
155
  def or(queries)
148
156
  return Query.new("or", nil, queries.map { |query| JSON.parse(query) }).to_s
149
157
  end
@@ -151,6 +159,54 @@ module Appwrite
151
159
  def and(queries)
152
160
  return Query.new("and", nil, queries.map { |query| JSON.parse(query) }).to_s
153
161
  end
162
+
163
+ def distance_equal(attribute, values, distance, meters = true)
164
+ return Query.new("distanceEqual", attribute, [[values, distance, meters]]).to_s
165
+ end
166
+
167
+ def distance_not_equal(attribute, values, distance, meters = true)
168
+ return Query.new("distanceNotEqual", attribute, [[values, distance, meters]]).to_s
169
+ end
170
+
171
+ def distance_greater_than(attribute, values, distance, meters = true)
172
+ return Query.new("distanceGreaterThan", attribute, [[values, distance, meters]]).to_s
173
+ end
174
+
175
+ def distance_less_than(attribute, values, distance, meters = true)
176
+ return Query.new("distanceLessThan", attribute, [[values, distance, meters]]).to_s
177
+ end
178
+
179
+ def intersects(attribute, values)
180
+ return Query.new("intersects", attribute, [values]).to_s
181
+ end
182
+
183
+ def not_intersects(attribute, values)
184
+ return Query.new("notIntersects", attribute, [values]).to_s
185
+ end
186
+
187
+ def crosses(attribute, values)
188
+ return Query.new("crosses", attribute, [values]).to_s
189
+ end
190
+
191
+ def not_crosses(attribute, values)
192
+ return Query.new("notCrosses", attribute, [values]).to_s
193
+ end
194
+
195
+ def overlaps(attribute, values)
196
+ return Query.new("overlaps", attribute, [values]).to_s
197
+ end
198
+
199
+ def not_overlaps(attribute, values)
200
+ return Query.new("notOverlaps", attribute, [values]).to_s
201
+ end
202
+
203
+ def touches(attribute, values)
204
+ return Query.new("touches", attribute, [values]).to_s
205
+ end
206
+
207
+ def not_touches(attribute, values)
208
+ return Query.new("notTouches", attribute, [values]).to_s
209
+ end
154
210
  end
155
211
  end
156
212
  end
@@ -882,7 +882,7 @@ module Appwrite
882
882
  end
883
883
 
884
884
  #
885
- # @deprecated This API has been deprecated.
885
+ # @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
886
886
  #
887
887
  # Use this endpoint to create a session from token. Provide the **userId**
888
888
  # and **secret** parameters from the successful response of authentication
@@ -922,7 +922,7 @@ module Appwrite
922
922
  end
923
923
 
924
924
  #
925
- # @deprecated This API has been deprecated.
925
+ # @deprecated This API has been deprecated since 1.6.0. Please use `Account.createSession` instead.
926
926
  #
927
927
  # Use this endpoint to create a session from token. Provide the **userId**
928
928
  # and **secret** parameters from the successful response of authentication
@@ -59,7 +59,7 @@ module Appwrite
59
59
  # of image returned is 100x100px.
60
60
  #
61
61
  #
62
- # @param [CreditCard] code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.
62
+ # @param [CreditCard] code Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.
63
63
  # @param [Integer] width Image width. Pass an integer between 0 to 2000. Defaults to 100.
64
64
  # @param [Integer] height Image height. Pass an integer between 0 to 2000. Defaults to 100.
65
65
  # @param [Integer] quality Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
@@ -38,7 +38,7 @@ module Appwrite
38
38
  end
39
39
 
40
40
  #
41
- # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createDatabase` instead.
41
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.create` instead.
42
42
  #
43
43
  # Create a new Database.
44
44
  #
@@ -1269,6 +1269,327 @@ module Appwrite
1269
1269
  )
1270
1270
  end
1271
1271
 
1272
+ #
1273
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createLineColumn` instead.
1274
+ #
1275
+ # Create a geometric line attribute.
1276
+ #
1277
+ # @param [String] database_id Database ID.
1278
+ # @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1279
+ # @param [String] key Attribute Key.
1280
+ # @param [] required Is attribute required?
1281
+ # @param [Array] default Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1282
+ #
1283
+ # @return [AttributeLine]
1284
+ def create_line_attribute(database_id:, collection_id:, key:, required:, default: nil)
1285
+ api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line'
1286
+ .gsub('{databaseId}', database_id)
1287
+ .gsub('{collectionId}', collection_id)
1288
+
1289
+ if database_id.nil?
1290
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1291
+ end
1292
+
1293
+ if collection_id.nil?
1294
+ raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
1295
+ end
1296
+
1297
+ if key.nil?
1298
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1299
+ end
1300
+
1301
+ if required.nil?
1302
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1303
+ end
1304
+
1305
+ api_params = {
1306
+ key: key,
1307
+ required: required,
1308
+ default: default,
1309
+ }
1310
+
1311
+ api_headers = {
1312
+ "content-type": 'application/json',
1313
+ }
1314
+
1315
+ @client.call(
1316
+ method: 'POST',
1317
+ path: api_path,
1318
+ headers: api_headers,
1319
+ params: api_params,
1320
+ response_type: Models::AttributeLine
1321
+ )
1322
+ end
1323
+
1324
+ #
1325
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateLineColumn` instead.
1326
+ #
1327
+ # Update a line attribute. Changing the `default` value will not update
1328
+ # already existing documents.
1329
+ #
1330
+ # @param [String] database_id Database ID.
1331
+ # @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).
1332
+ # @param [String] key Attribute Key.
1333
+ # @param [] required Is attribute required?
1334
+ # @param [Array] default Default value for attribute when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when attribute is required.
1335
+ # @param [String] new_key New attribute key.
1336
+ #
1337
+ # @return [AttributeLine]
1338
+ def update_line_attribute(database_id:, collection_id:, key:, required:, default: nil, new_key: nil)
1339
+ api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}'
1340
+ .gsub('{databaseId}', database_id)
1341
+ .gsub('{collectionId}', collection_id)
1342
+ .gsub('{key}', key)
1343
+
1344
+ if database_id.nil?
1345
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1346
+ end
1347
+
1348
+ if collection_id.nil?
1349
+ raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
1350
+ end
1351
+
1352
+ if key.nil?
1353
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1354
+ end
1355
+
1356
+ if required.nil?
1357
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1358
+ end
1359
+
1360
+ api_params = {
1361
+ required: required,
1362
+ default: default,
1363
+ newKey: new_key,
1364
+ }
1365
+
1366
+ api_headers = {
1367
+ "content-type": 'application/json',
1368
+ }
1369
+
1370
+ @client.call(
1371
+ method: 'PATCH',
1372
+ path: api_path,
1373
+ headers: api_headers,
1374
+ params: api_params,
1375
+ response_type: Models::AttributeLine
1376
+ )
1377
+ end
1378
+
1379
+ #
1380
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPointColumn` instead.
1381
+ #
1382
+ # Create a geometric point attribute.
1383
+ #
1384
+ # @param [String] database_id Database ID.
1385
+ # @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1386
+ # @param [String] key Attribute Key.
1387
+ # @param [] required Is attribute required?
1388
+ # @param [Array] default Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1389
+ #
1390
+ # @return [AttributePoint]
1391
+ def create_point_attribute(database_id:, collection_id:, key:, required:, default: nil)
1392
+ api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point'
1393
+ .gsub('{databaseId}', database_id)
1394
+ .gsub('{collectionId}', collection_id)
1395
+
1396
+ if database_id.nil?
1397
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1398
+ end
1399
+
1400
+ if collection_id.nil?
1401
+ raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
1402
+ end
1403
+
1404
+ if key.nil?
1405
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1406
+ end
1407
+
1408
+ if required.nil?
1409
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1410
+ end
1411
+
1412
+ api_params = {
1413
+ key: key,
1414
+ required: required,
1415
+ default: default,
1416
+ }
1417
+
1418
+ api_headers = {
1419
+ "content-type": 'application/json',
1420
+ }
1421
+
1422
+ @client.call(
1423
+ method: 'POST',
1424
+ path: api_path,
1425
+ headers: api_headers,
1426
+ params: api_params,
1427
+ response_type: Models::AttributePoint
1428
+ )
1429
+ end
1430
+
1431
+ #
1432
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePointColumn` instead.
1433
+ #
1434
+ # Update a point attribute. Changing the `default` value will not update
1435
+ # already existing documents.
1436
+ #
1437
+ # @param [String] database_id Database ID.
1438
+ # @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).
1439
+ # @param [String] key Attribute Key.
1440
+ # @param [] required Is attribute required?
1441
+ # @param [Array] default Default value for attribute when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when attribute is required.
1442
+ # @param [String] new_key New attribute key.
1443
+ #
1444
+ # @return [AttributePoint]
1445
+ def update_point_attribute(database_id:, collection_id:, key:, required:, default: nil, new_key: nil)
1446
+ api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}'
1447
+ .gsub('{databaseId}', database_id)
1448
+ .gsub('{collectionId}', collection_id)
1449
+ .gsub('{key}', key)
1450
+
1451
+ if database_id.nil?
1452
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1453
+ end
1454
+
1455
+ if collection_id.nil?
1456
+ raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
1457
+ end
1458
+
1459
+ if key.nil?
1460
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1461
+ end
1462
+
1463
+ if required.nil?
1464
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1465
+ end
1466
+
1467
+ api_params = {
1468
+ required: required,
1469
+ default: default,
1470
+ newKey: new_key,
1471
+ }
1472
+
1473
+ api_headers = {
1474
+ "content-type": 'application/json',
1475
+ }
1476
+
1477
+ @client.call(
1478
+ method: 'PATCH',
1479
+ path: api_path,
1480
+ headers: api_headers,
1481
+ params: api_params,
1482
+ response_type: Models::AttributePoint
1483
+ )
1484
+ end
1485
+
1486
+ #
1487
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createPolygonColumn` instead.
1488
+ #
1489
+ # Create a geometric polygon attribute.
1490
+ #
1491
+ # @param [String] database_id Database ID.
1492
+ # @param [String] collection_id Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
1493
+ # @param [String] key Attribute Key.
1494
+ # @param [] required Is attribute required?
1495
+ # @param [Array] default Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1496
+ #
1497
+ # @return [AttributePolygon]
1498
+ def create_polygon_attribute(database_id:, collection_id:, key:, required:, default: nil)
1499
+ api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon'
1500
+ .gsub('{databaseId}', database_id)
1501
+ .gsub('{collectionId}', collection_id)
1502
+
1503
+ if database_id.nil?
1504
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1505
+ end
1506
+
1507
+ if collection_id.nil?
1508
+ raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
1509
+ end
1510
+
1511
+ if key.nil?
1512
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1513
+ end
1514
+
1515
+ if required.nil?
1516
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1517
+ end
1518
+
1519
+ api_params = {
1520
+ key: key,
1521
+ required: required,
1522
+ default: default,
1523
+ }
1524
+
1525
+ api_headers = {
1526
+ "content-type": 'application/json',
1527
+ }
1528
+
1529
+ @client.call(
1530
+ method: 'POST',
1531
+ path: api_path,
1532
+ headers: api_headers,
1533
+ params: api_params,
1534
+ response_type: Models::AttributePolygon
1535
+ )
1536
+ end
1537
+
1538
+ #
1539
+ # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updatePolygonColumn` instead.
1540
+ #
1541
+ # Update a polygon attribute. Changing the `default` value will not update
1542
+ # already existing documents.
1543
+ #
1544
+ # @param [String] database_id Database ID.
1545
+ # @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).
1546
+ # @param [String] key Attribute Key.
1547
+ # @param [] required Is attribute required?
1548
+ # @param [Array] default Default value for attribute when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when attribute is required.
1549
+ # @param [String] new_key New attribute key.
1550
+ #
1551
+ # @return [AttributePolygon]
1552
+ def update_polygon_attribute(database_id:, collection_id:, key:, required:, default: nil, new_key: nil)
1553
+ api_path = '/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}'
1554
+ .gsub('{databaseId}', database_id)
1555
+ .gsub('{collectionId}', collection_id)
1556
+ .gsub('{key}', key)
1557
+
1558
+ if database_id.nil?
1559
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1560
+ end
1561
+
1562
+ if collection_id.nil?
1563
+ raise Appwrite::Exception.new('Missing required parameter: "collectionId"')
1564
+ end
1565
+
1566
+ if key.nil?
1567
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1568
+ end
1569
+
1570
+ if required.nil?
1571
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1572
+ end
1573
+
1574
+ api_params = {
1575
+ required: required,
1576
+ default: default,
1577
+ newKey: new_key,
1578
+ }
1579
+
1580
+ api_headers = {
1581
+ "content-type": 'application/json',
1582
+ }
1583
+
1584
+ @client.call(
1585
+ method: 'PATCH',
1586
+ path: api_path,
1587
+ headers: api_headers,
1588
+ params: api_params,
1589
+ response_type: Models::AttributePolygon
1590
+ )
1591
+ end
1592
+
1272
1593
  #
1273
1594
  # @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createRelationshipColumn` instead.
1274
1595
  #
@@ -732,7 +732,7 @@ module Appwrite
732
732
  # @param [String] body HTTP body of execution. Default value is empty string.
733
733
  # @param [] async Execute code in the background. Default value is false.
734
734
  # @param [String] xpath HTTP path of execution. Path can include query params. Default value is /
735
- # @param [ExecutionMethod] method HTTP method of execution. Default value is GET.
735
+ # @param [ExecutionMethod] method HTTP method of execution. Default value is POST.
736
736
  # @param [Hash] headers HTTP headers of execution. Defaults to empty.
737
737
  # @param [String] scheduled_at Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
738
738
  #
@@ -1193,6 +1193,309 @@ module Appwrite
1193
1193
  )
1194
1194
  end
1195
1195
 
1196
+ # Create a geometric line column.
1197
+ #
1198
+ # @param [String] database_id Database ID.
1199
+ # @param [String] table_id Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
1200
+ # @param [String] key Column Key.
1201
+ # @param [] required Is column required?
1202
+ # @param [Array] default Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1203
+ #
1204
+ # @return [ColumnLine]
1205
+ def create_line_column(database_id:, table_id:, key:, required:, default: nil)
1206
+ api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/line'
1207
+ .gsub('{databaseId}', database_id)
1208
+ .gsub('{tableId}', table_id)
1209
+
1210
+ if database_id.nil?
1211
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1212
+ end
1213
+
1214
+ if table_id.nil?
1215
+ raise Appwrite::Exception.new('Missing required parameter: "tableId"')
1216
+ end
1217
+
1218
+ if key.nil?
1219
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1220
+ end
1221
+
1222
+ if required.nil?
1223
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1224
+ end
1225
+
1226
+ api_params = {
1227
+ key: key,
1228
+ required: required,
1229
+ default: default,
1230
+ }
1231
+
1232
+ api_headers = {
1233
+ "content-type": 'application/json',
1234
+ }
1235
+
1236
+ @client.call(
1237
+ method: 'POST',
1238
+ path: api_path,
1239
+ headers: api_headers,
1240
+ params: api_params,
1241
+ response_type: Models::ColumnLine
1242
+ )
1243
+ end
1244
+
1245
+ # Update a line column. Changing the `default` value will not update already
1246
+ # existing rows.
1247
+ #
1248
+ # @param [String] database_id Database ID.
1249
+ # @param [String] table_id Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
1250
+ # @param [String] key Column Key.
1251
+ # @param [] required Is column required?
1252
+ # @param [Array] default Default value for column when not provided, two-dimensional array of coordinate pairs, [[longitude, latitude], [longitude, latitude], …], listing the vertices of the line in order. Cannot be set when column is required.
1253
+ # @param [String] new_key New Column Key.
1254
+ #
1255
+ # @return [ColumnLine]
1256
+ def update_line_column(database_id:, table_id:, key:, required:, default: nil, new_key: nil)
1257
+ api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/line/{key}'
1258
+ .gsub('{databaseId}', database_id)
1259
+ .gsub('{tableId}', table_id)
1260
+ .gsub('{key}', key)
1261
+
1262
+ if database_id.nil?
1263
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1264
+ end
1265
+
1266
+ if table_id.nil?
1267
+ raise Appwrite::Exception.new('Missing required parameter: "tableId"')
1268
+ end
1269
+
1270
+ if key.nil?
1271
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1272
+ end
1273
+
1274
+ if required.nil?
1275
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1276
+ end
1277
+
1278
+ api_params = {
1279
+ required: required,
1280
+ default: default,
1281
+ newKey: new_key,
1282
+ }
1283
+
1284
+ api_headers = {
1285
+ "content-type": 'application/json',
1286
+ }
1287
+
1288
+ @client.call(
1289
+ method: 'PATCH',
1290
+ path: api_path,
1291
+ headers: api_headers,
1292
+ params: api_params,
1293
+ response_type: Models::ColumnLine
1294
+ )
1295
+ end
1296
+
1297
+ # Create a geometric point column.
1298
+ #
1299
+ # @param [String] database_id Database ID.
1300
+ # @param [String] table_id Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
1301
+ # @param [String] key Column Key.
1302
+ # @param [] required Is column required?
1303
+ # @param [Array] default Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1304
+ #
1305
+ # @return [ColumnPoint]
1306
+ def create_point_column(database_id:, table_id:, key:, required:, default: nil)
1307
+ api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/point'
1308
+ .gsub('{databaseId}', database_id)
1309
+ .gsub('{tableId}', table_id)
1310
+
1311
+ if database_id.nil?
1312
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1313
+ end
1314
+
1315
+ if table_id.nil?
1316
+ raise Appwrite::Exception.new('Missing required parameter: "tableId"')
1317
+ end
1318
+
1319
+ if key.nil?
1320
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1321
+ end
1322
+
1323
+ if required.nil?
1324
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1325
+ end
1326
+
1327
+ api_params = {
1328
+ key: key,
1329
+ required: required,
1330
+ default: default,
1331
+ }
1332
+
1333
+ api_headers = {
1334
+ "content-type": 'application/json',
1335
+ }
1336
+
1337
+ @client.call(
1338
+ method: 'POST',
1339
+ path: api_path,
1340
+ headers: api_headers,
1341
+ params: api_params,
1342
+ response_type: Models::ColumnPoint
1343
+ )
1344
+ end
1345
+
1346
+ # Update a point column. Changing the `default` value will not update already
1347
+ # existing rows.
1348
+ #
1349
+ # @param [String] database_id Database ID.
1350
+ # @param [String] table_id Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
1351
+ # @param [String] key Column Key.
1352
+ # @param [] required Is column required?
1353
+ # @param [Array] default Default value for column when not provided, array of two numbers [longitude, latitude], representing a single coordinate. Cannot be set when column is required.
1354
+ # @param [String] new_key New Column Key.
1355
+ #
1356
+ # @return [ColumnPoint]
1357
+ def update_point_column(database_id:, table_id:, key:, required:, default: nil, new_key: nil)
1358
+ api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/point/{key}'
1359
+ .gsub('{databaseId}', database_id)
1360
+ .gsub('{tableId}', table_id)
1361
+ .gsub('{key}', key)
1362
+
1363
+ if database_id.nil?
1364
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1365
+ end
1366
+
1367
+ if table_id.nil?
1368
+ raise Appwrite::Exception.new('Missing required parameter: "tableId"')
1369
+ end
1370
+
1371
+ if key.nil?
1372
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1373
+ end
1374
+
1375
+ if required.nil?
1376
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1377
+ end
1378
+
1379
+ api_params = {
1380
+ required: required,
1381
+ default: default,
1382
+ newKey: new_key,
1383
+ }
1384
+
1385
+ api_headers = {
1386
+ "content-type": 'application/json',
1387
+ }
1388
+
1389
+ @client.call(
1390
+ method: 'PATCH',
1391
+ path: api_path,
1392
+ headers: api_headers,
1393
+ params: api_params,
1394
+ response_type: Models::ColumnPoint
1395
+ )
1396
+ end
1397
+
1398
+ # Create a geometric polygon column.
1399
+ #
1400
+ # @param [String] database_id Database ID.
1401
+ # @param [String] table_id Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
1402
+ # @param [String] key Column Key.
1403
+ # @param [] required Is column required?
1404
+ # @param [Array] default Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1405
+ #
1406
+ # @return [ColumnPolygon]
1407
+ def create_polygon_column(database_id:, table_id:, key:, required:, default: nil)
1408
+ api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon'
1409
+ .gsub('{databaseId}', database_id)
1410
+ .gsub('{tableId}', table_id)
1411
+
1412
+ if database_id.nil?
1413
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1414
+ end
1415
+
1416
+ if table_id.nil?
1417
+ raise Appwrite::Exception.new('Missing required parameter: "tableId"')
1418
+ end
1419
+
1420
+ if key.nil?
1421
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1422
+ end
1423
+
1424
+ if required.nil?
1425
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1426
+ end
1427
+
1428
+ api_params = {
1429
+ key: key,
1430
+ required: required,
1431
+ default: default,
1432
+ }
1433
+
1434
+ api_headers = {
1435
+ "content-type": 'application/json',
1436
+ }
1437
+
1438
+ @client.call(
1439
+ method: 'POST',
1440
+ path: api_path,
1441
+ headers: api_headers,
1442
+ params: api_params,
1443
+ response_type: Models::ColumnPolygon
1444
+ )
1445
+ end
1446
+
1447
+ # Update a polygon column. Changing the `default` value will not update
1448
+ # already existing rows.
1449
+ #
1450
+ # @param [String] database_id Database ID.
1451
+ # @param [String] table_id Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate).
1452
+ # @param [String] key Column Key.
1453
+ # @param [] required Is column required?
1454
+ # @param [Array] default Default value for column when not provided, three-dimensional array where the outer array holds one or more linear rings, [[[longitude, latitude], …], …], the first ring is the exterior boundary, any additional rings are interior holes, and each ring must start and end with the same coordinate pair. Cannot be set when column is required.
1455
+ # @param [String] new_key New Column Key.
1456
+ #
1457
+ # @return [ColumnPolygon]
1458
+ def update_polygon_column(database_id:, table_id:, key:, required:, default: nil, new_key: nil)
1459
+ api_path = '/tablesdb/{databaseId}/tables/{tableId}/columns/polygon/{key}'
1460
+ .gsub('{databaseId}', database_id)
1461
+ .gsub('{tableId}', table_id)
1462
+ .gsub('{key}', key)
1463
+
1464
+ if database_id.nil?
1465
+ raise Appwrite::Exception.new('Missing required parameter: "databaseId"')
1466
+ end
1467
+
1468
+ if table_id.nil?
1469
+ raise Appwrite::Exception.new('Missing required parameter: "tableId"')
1470
+ end
1471
+
1472
+ if key.nil?
1473
+ raise Appwrite::Exception.new('Missing required parameter: "key"')
1474
+ end
1475
+
1476
+ if required.nil?
1477
+ raise Appwrite::Exception.new('Missing required parameter: "required"')
1478
+ end
1479
+
1480
+ api_params = {
1481
+ required: required,
1482
+ default: default,
1483
+ newKey: new_key,
1484
+ }
1485
+
1486
+ api_headers = {
1487
+ "content-type": 'application/json',
1488
+ }
1489
+
1490
+ @client.call(
1491
+ method: 'PATCH',
1492
+ path: api_path,
1493
+ headers: api_headers,
1494
+ params: api_params,
1495
+ response_type: Models::ColumnPolygon
1496
+ )
1497
+ end
1498
+
1196
1499
  # Create relationship column. [Learn more about relationship
1197
1500
  # columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
1198
1501
  #
data/lib/appwrite.rb CHANGED
@@ -60,6 +60,9 @@ require_relative 'appwrite/models/attribute_ip'
60
60
  require_relative 'appwrite/models/attribute_url'
61
61
  require_relative 'appwrite/models/attribute_datetime'
62
62
  require_relative 'appwrite/models/attribute_relationship'
63
+ require_relative 'appwrite/models/attribute_point'
64
+ require_relative 'appwrite/models/attribute_line'
65
+ require_relative 'appwrite/models/attribute_polygon'
63
66
  require_relative 'appwrite/models/table'
64
67
  require_relative 'appwrite/models/column_list'
65
68
  require_relative 'appwrite/models/column_string'
@@ -72,6 +75,9 @@ require_relative 'appwrite/models/column_ip'
72
75
  require_relative 'appwrite/models/column_url'
73
76
  require_relative 'appwrite/models/column_datetime'
74
77
  require_relative 'appwrite/models/column_relationship'
78
+ require_relative 'appwrite/models/column_point'
79
+ require_relative 'appwrite/models/column_line'
80
+ require_relative 'appwrite/models/column_polygon'
75
81
  require_relative 'appwrite/models/index'
76
82
  require_relative 'appwrite/models/column_index'
77
83
  require_relative 'appwrite/models/row'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appwrite
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.0.0
4
+ version: 18.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appwrite Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-26 00:00:00.000000000 Z
11
+ date: 2025-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -73,7 +73,10 @@ files:
73
73
  - lib/appwrite/models/attribute_float.rb
74
74
  - lib/appwrite/models/attribute_integer.rb
75
75
  - lib/appwrite/models/attribute_ip.rb
76
+ - lib/appwrite/models/attribute_line.rb
76
77
  - lib/appwrite/models/attribute_list.rb
78
+ - lib/appwrite/models/attribute_point.rb
79
+ - lib/appwrite/models/attribute_polygon.rb
77
80
  - lib/appwrite/models/attribute_relationship.rb
78
81
  - lib/appwrite/models/attribute_string.rb
79
82
  - lib/appwrite/models/attribute_url.rb
@@ -90,7 +93,10 @@ files:
90
93
  - lib/appwrite/models/column_index_list.rb
91
94
  - lib/appwrite/models/column_integer.rb
92
95
  - lib/appwrite/models/column_ip.rb
96
+ - lib/appwrite/models/column_line.rb
93
97
  - lib/appwrite/models/column_list.rb
98
+ - lib/appwrite/models/column_point.rb
99
+ - lib/appwrite/models/column_polygon.rb
94
100
  - lib/appwrite/models/column_relationship.rb
95
101
  - lib/appwrite/models/column_string.rb
96
102
  - lib/appwrite/models/column_url.rb