@carto/api-client 0.4.4 → 0.4.5

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.
@@ -686,6 +686,8 @@ async function baseSource(endpoint, options, urlParameters) {
686
686
  }
687
687
 
688
688
  // deck.gl
689
+ // SPDX-License-Identifier: MIT
690
+ // Copyright (c) vis.gl contributors
689
691
  const boundaryQuerySource = async function boundaryQuerySource(options) {
690
692
  const {
691
693
  columns,
@@ -711,6 +713,8 @@ const boundaryQuerySource = async function boundaryQuerySource(options) {
711
713
  };
712
714
 
713
715
  // deck.gl
716
+ // SPDX-License-Identifier: MIT
717
+ // Copyright (c) vis.gl contributors
714
718
  const boundaryTableSource = async function boundaryTableSource(options) {
715
719
  const {
716
720
  filters,
@@ -1440,10 +1444,11 @@ const h3QuerySource = async function h3QuerySource(options) {
1440
1444
  queryParameters,
1441
1445
  filters
1442
1446
  } = options;
1447
+ const spatialDataType = 'h3';
1443
1448
  const urlParameters = {
1444
1449
  aggregationExp,
1445
1450
  spatialDataColumn,
1446
- spatialDataType: 'h3',
1451
+ spatialDataType,
1447
1452
  q: sqlQuery
1448
1453
  };
1449
1454
  if (aggregationResLevel) {
@@ -1457,9 +1462,9 @@ const h3QuerySource = async function h3QuerySource(options) {
1457
1462
  }
1458
1463
  return baseSource('query', options, urlParameters).then(result => _extends({}, result, {
1459
1464
  widgetSource: new WidgetQuerySource(_extends({}, options, {
1460
- // NOTE: passing redundant spatialDataColumn here to apply the default value 'h3'
1465
+ // NOTE: Parameters with default values above must be explicitly passed here.
1461
1466
  spatialDataColumn,
1462
- spatialDataType: 'h3'
1467
+ spatialDataType
1463
1468
  }))
1464
1469
  }));
1465
1470
  };
@@ -1472,11 +1477,12 @@ const h3TableSource = async function h3TableSource(options) {
1472
1477
  tableName,
1473
1478
  filters
1474
1479
  } = options;
1480
+ const spatialDataType = 'h3';
1475
1481
  const urlParameters = {
1476
1482
  aggregationExp,
1477
1483
  name: tableName,
1478
1484
  spatialDataColumn,
1479
- spatialDataType: 'h3'
1485
+ spatialDataType
1480
1486
  };
1481
1487
  if (aggregationResLevel) {
1482
1488
  urlParameters.aggregationResLevel = String(aggregationResLevel);
@@ -1486,14 +1492,16 @@ const h3TableSource = async function h3TableSource(options) {
1486
1492
  }
1487
1493
  return baseSource('table', options, urlParameters).then(result => _extends({}, result, {
1488
1494
  widgetSource: new WidgetTableSource(_extends({}, options, {
1489
- // NOTE: passing redundant spatialDataColumn here to apply the default value 'h3'
1495
+ // NOTE: Parameters with default values above must be explicitly passed here.
1490
1496
  spatialDataColumn,
1491
- spatialDataType: 'h3'
1497
+ spatialDataType
1492
1498
  }))
1493
1499
  }));
1494
1500
  };
1495
1501
 
1496
1502
  // deck.gl
1503
+ // SPDX-License-Identifier: MIT
1504
+ // Copyright (c) vis.gl contributors
1497
1505
  const h3TilesetSource = async function h3TilesetSource(options) {
1498
1506
  const {
1499
1507
  tableName
@@ -1505,6 +1513,8 @@ const h3TilesetSource = async function h3TilesetSource(options) {
1505
1513
  };
1506
1514
 
1507
1515
  // deck.gl
1516
+ // SPDX-License-Identifier: MIT
1517
+ // Copyright (c) vis.gl contributors
1508
1518
  const rasterSource = async function rasterSource(options) {
1509
1519
  const {
1510
1520
  tableName,
@@ -1528,11 +1538,12 @@ const quadbinQuerySource = async function quadbinQuerySource(options) {
1528
1538
  queryParameters,
1529
1539
  filters
1530
1540
  } = options;
1541
+ const spatialDataType = 'quadbin';
1531
1542
  const urlParameters = {
1532
1543
  aggregationExp,
1533
1544
  q: sqlQuery,
1534
1545
  spatialDataColumn,
1535
- spatialDataType: 'quadbin'
1546
+ spatialDataType
1536
1547
  };
1537
1548
  if (aggregationResLevel) {
1538
1549
  urlParameters.aggregationResLevel = String(aggregationResLevel);
@@ -1545,9 +1556,9 @@ const quadbinQuerySource = async function quadbinQuerySource(options) {
1545
1556
  }
1546
1557
  return baseSource('query', options, urlParameters).then(result => _extends({}, result, {
1547
1558
  widgetSource: new WidgetQuerySource(_extends({}, options, {
1548
- // NOTE: passing redundant spatialDataColumn here to apply the default value 'quadbin'
1559
+ // NOTE: Parameters with default values above must be explicitly passed here.
1549
1560
  spatialDataColumn,
1550
- spatialDataType: 'quadbin'
1561
+ spatialDataType
1551
1562
  }))
1552
1563
  }));
1553
1564
  };
@@ -1560,11 +1571,12 @@ const quadbinTableSource = async function quadbinTableSource(options) {
1560
1571
  tableName,
1561
1572
  filters
1562
1573
  } = options;
1574
+ const spatialDataType = 'quadbin';
1563
1575
  const urlParameters = {
1564
1576
  aggregationExp,
1565
1577
  name: tableName,
1566
1578
  spatialDataColumn,
1567
- spatialDataType: 'quadbin'
1579
+ spatialDataType
1568
1580
  };
1569
1581
  if (aggregationResLevel) {
1570
1582
  urlParameters.aggregationResLevel = String(aggregationResLevel);
@@ -1574,14 +1586,16 @@ const quadbinTableSource = async function quadbinTableSource(options) {
1574
1586
  }
1575
1587
  return baseSource('table', options, urlParameters).then(result => _extends({}, result, {
1576
1588
  widgetSource: new WidgetTableSource(_extends({}, options, {
1577
- // NOTE: passing redundant spatialDataColumn here to apply the default value 'quadbin'
1589
+ // NOTE: Parameters with default values above must be explicitly passed here.
1578
1590
  spatialDataColumn,
1579
- spatialDataType: 'quadbin'
1591
+ spatialDataType
1580
1592
  }))
1581
1593
  }));
1582
1594
  };
1583
1595
 
1584
1596
  // deck.gl
1597
+ // SPDX-License-Identifier: MIT
1598
+ // Copyright (c) vis.gl contributors
1585
1599
  const quadbinTilesetSource = async function quadbinTilesetSource(options) {
1586
1600
  const {
1587
1601
  tableName
@@ -1602,9 +1616,10 @@ const vectorQuerySource = async function vectorQuerySource(options) {
1602
1616
  queryParameters,
1603
1617
  aggregationExp
1604
1618
  } = options;
1619
+ const spatialDataType = 'geo';
1605
1620
  const urlParameters = {
1606
1621
  spatialDataColumn,
1607
- spatialDataType: 'geo',
1622
+ spatialDataType,
1608
1623
  tileResolution: tileResolution.toString(),
1609
1624
  q: sqlQuery
1610
1625
  };
@@ -1622,7 +1637,10 @@ const vectorQuerySource = async function vectorQuerySource(options) {
1622
1637
  }
1623
1638
  return baseSource('query', options, urlParameters).then(result => _extends({}, result, {
1624
1639
  widgetSource: new WidgetQuerySource(_extends({}, options, {
1625
- spatialDataType: 'geo'
1640
+ // NOTE: Parameters with default values above must be explicitly passed here.
1641
+ spatialDataColumn,
1642
+ spatialDataType,
1643
+ tileResolution
1626
1644
  }))
1627
1645
  }));
1628
1646
  };
@@ -1636,10 +1654,11 @@ const vectorTableSource = async function vectorTableSource(options) {
1636
1654
  tileResolution = DEFAULT_TILE_RESOLUTION,
1637
1655
  aggregationExp
1638
1656
  } = options;
1657
+ const spatialDataType = 'geo';
1639
1658
  const urlParameters = {
1640
1659
  name: tableName,
1641
1660
  spatialDataColumn,
1642
- spatialDataType: 'geo',
1661
+ spatialDataType,
1643
1662
  tileResolution: tileResolution.toString()
1644
1663
  };
1645
1664
  if (columns) {
@@ -1653,12 +1672,17 @@ const vectorTableSource = async function vectorTableSource(options) {
1653
1672
  }
1654
1673
  return baseSource('table', options, urlParameters).then(result => _extends({}, result, {
1655
1674
  widgetSource: new WidgetTableSource(_extends({}, options, {
1656
- spatialDataType: 'geo'
1675
+ // NOTE: Parameters with default values above must be explicitly passed here.
1676
+ spatialDataColumn,
1677
+ spatialDataType,
1678
+ tileResolution
1657
1679
  }))
1658
1680
  }));
1659
1681
  };
1660
1682
 
1661
1683
  // deck.gl
1684
+ // SPDX-License-Identifier: MIT
1685
+ // Copyright (c) vis.gl contributors
1662
1686
  const vectorTilesetSource = async function vectorTilesetSource(options) {
1663
1687
  const {
1664
1688
  tableName