@agility/content-fetch 2.0.5 → 2.0.6
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/dist/browser.js +11 -1
- package/dist/node.js +11 -1
- package/dist/types/Filter.d.ts +2 -2
- package/package.json +2 -2
package/dist/browser.js
CHANGED
|
@@ -212,7 +212,17 @@
|
|
|
212
212
|
} else if (!filter.hasOwnProperty("value")) {
|
|
213
213
|
throw new TypeError2(JSON.stringify(filter) + " does not contain 'value'.", validateRequestParams4);
|
|
214
214
|
}
|
|
215
|
-
if ([
|
|
215
|
+
if ([
|
|
216
|
+
"eq",
|
|
217
|
+
"ne",
|
|
218
|
+
"gt",
|
|
219
|
+
"gte",
|
|
220
|
+
"lt",
|
|
221
|
+
"lte",
|
|
222
|
+
"like",
|
|
223
|
+
"in",
|
|
224
|
+
"contains"
|
|
225
|
+
].indexOf(filter.operator.toLowerCase()) < 0) {
|
|
216
226
|
throw new TypeError2(JSON.stringify(filter) + "Operator must be one of ['eq','ne','gt','gte','lt','lte','like', 'in', 'contains'].", validateRequestParams4);
|
|
217
227
|
}
|
|
218
228
|
}
|
package/dist/node.js
CHANGED
|
@@ -230,7 +230,17 @@ function validateRequestParams4(requestParams) {
|
|
|
230
230
|
} else if (!filter.hasOwnProperty("value")) {
|
|
231
231
|
throw new TypeError2(JSON.stringify(filter) + " does not contain 'value'.", validateRequestParams4);
|
|
232
232
|
}
|
|
233
|
-
if ([
|
|
233
|
+
if ([
|
|
234
|
+
"eq",
|
|
235
|
+
"ne",
|
|
236
|
+
"gt",
|
|
237
|
+
"gte",
|
|
238
|
+
"lt",
|
|
239
|
+
"lte",
|
|
240
|
+
"like",
|
|
241
|
+
"in",
|
|
242
|
+
"contains"
|
|
243
|
+
].indexOf(filter.operator.toLowerCase()) < 0) {
|
|
234
244
|
throw new TypeError2(JSON.stringify(filter) + "Operator must be one of ['eq','ne','gt','gte','lt','lte','like', 'in', 'contains'].", validateRequestParams4);
|
|
235
245
|
}
|
|
236
246
|
}
|
package/dist/types/Filter.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export interface Filter {
|
|
10
10
|
property: string;
|
|
11
|
-
operator: FilterOperator | "eq" | "ne" | "gt" | "lt" | "ge" | "le" | "contains";
|
|
11
|
+
operator: FilterOperator | "eq" | "ne" | "gt" | "lt" | "ge" | "le" | "contains" | "like" | "in";
|
|
12
12
|
value: string;
|
|
13
13
|
}
|
|
14
|
-
export type FilterOperator = "eq" | "ne" | "gt" | "lt" | "ge" | "le" | "contains";
|
|
14
|
+
export type FilterOperator = "eq" | "ne" | "gt" | "lt" | "ge" | "le" | "contains" | "like" | "in";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agility/content-fetch",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "JavaScript library for the Agility Fetch API (node and browser)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
"ts-jest": "^29.1.1",
|
|
50
50
|
"typescript": "^5.1.6"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|