@carto/api-client 0.5.4 → 0.5.5-alpha.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.
- package/build/api-client.cjs +8 -12
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.js +8 -12
- package/build/api-client.js.map +1 -1
- package/package.json +3 -2
- package/src/models/model.ts +9 -19
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"homepage": "https://github.com/CartoDB/carto-api-client#readme",
|
|
9
9
|
"author": "Don McCurdy <donmccurdy@carto.com>",
|
|
10
10
|
"packageManager": "yarn@4.3.1",
|
|
11
|
-
"version": "0.5.
|
|
11
|
+
"version": "0.5.5-alpha.0",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
@@ -128,5 +128,6 @@
|
|
|
128
128
|
"resolutions": {
|
|
129
129
|
"@carto/api-client": "portal:./",
|
|
130
130
|
"rollup": "^4.20.0"
|
|
131
|
-
}
|
|
131
|
+
},
|
|
132
|
+
"stableVersion": "0.5.4"
|
|
132
133
|
}
|
package/src/models/model.ts
CHANGED
|
@@ -85,6 +85,7 @@ export function executeModel(props: {
|
|
|
85
85
|
filters,
|
|
86
86
|
filtersLogicalOperator = 'and',
|
|
87
87
|
spatialDataType = 'geo',
|
|
88
|
+
spatialDataColumn = DEFAULT_GEO_COLUMN,
|
|
88
89
|
spatialFiltersMode = 'intersects',
|
|
89
90
|
} = source;
|
|
90
91
|
|
|
@@ -98,26 +99,15 @@ export function executeModel(props: {
|
|
|
98
99
|
filtersLogicalOperator,
|
|
99
100
|
};
|
|
100
101
|
|
|
101
|
-
|
|
102
|
+
queryParams.spatialDataType = spatialDataType;
|
|
103
|
+
queryParams.spatialDataColumn = spatialDataColumn;
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
queryParams.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const spatialFilters = source.spatialFilter
|
|
110
|
-
? {[spatialDataColumn]: source.spatialFilter}
|
|
111
|
-
: undefined;
|
|
112
|
-
|
|
113
|
-
if (spatialFilters) {
|
|
114
|
-
queryParams.spatialFilters = spatialFilters;
|
|
115
|
-
queryParams.spatialDataColumn = spatialDataColumn;
|
|
116
|
-
queryParams.spatialDataType = spatialDataType;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (spatialDataType !== 'geo') {
|
|
120
|
-
queryParams.spatialFiltersMode = spatialFiltersMode;
|
|
105
|
+
if (source.spatialFilter) {
|
|
106
|
+
// API supports multiple filters, we apply it only to spatialDataColumn
|
|
107
|
+
queryParams.spatialFilters = {[spatialDataColumn]: source.spatialFilter};
|
|
108
|
+
if (spatialDataType !== 'geo') {
|
|
109
|
+
queryParams.spatialFiltersMode = spatialFiltersMode;
|
|
110
|
+
}
|
|
121
111
|
}
|
|
122
112
|
|
|
123
113
|
const urlWithSearchParams =
|