appwrite 17.0.0 → 18.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.
@@ -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
  #
@@ -1875,7 +2178,7 @@ module Appwrite
1875
2178
  #
1876
2179
  # @param [String] database_id Database ID.
1877
2180
  # @param [String] table_id Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/tablesdb#tablesDBCreate). Make sure to define columns before creating rows.
1878
- # @param [Array] rows Array of documents data as JSON objects.
2181
+ # @param [Array] rows Array of rows data as JSON objects.
1879
2182
  #
1880
2183
  # @return [RowList]
1881
2184
  def create_rows(database_id:, table_id:, rows:)
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'