@getsupervisor/agents-studio-sdk 1.23.0 → 1.24.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/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1531,7 +1531,7 @@ function ensureCatalogTypeFilter(filter, type) {
|
|
|
1531
1531
|
if (isQueryBuilderLike(filter)) {
|
|
1532
1532
|
return ensureTypeForBuilder(filter, requiredQuery, requiredExpression);
|
|
1533
1533
|
}
|
|
1534
|
-
if (
|
|
1534
|
+
if (isFilterRecord(filter)) {
|
|
1535
1535
|
return ensureTypeForObject(filter, type);
|
|
1536
1536
|
}
|
|
1537
1537
|
return filter;
|
|
@@ -1561,7 +1561,7 @@ function ensureTypeForObject(candidate, type) {
|
|
|
1561
1561
|
return candidate;
|
|
1562
1562
|
}
|
|
1563
1563
|
const typeConfig = candidate.type;
|
|
1564
|
-
const normalizedType =
|
|
1564
|
+
const normalizedType = isFilterOperators(typeConfig) ? { ...typeConfig, eq: type } : { eq: type };
|
|
1565
1565
|
return {
|
|
1566
1566
|
...candidate,
|
|
1567
1567
|
type: normalizedType
|
|
@@ -1572,10 +1572,11 @@ function hasTypeEquality(candidate, type) {
|
|
|
1572
1572
|
if (typeof typeConfig === "string") {
|
|
1573
1573
|
return typeConfig === type;
|
|
1574
1574
|
}
|
|
1575
|
-
if (!
|
|
1575
|
+
if (!isFilterOperators(typeConfig)) {
|
|
1576
1576
|
return false;
|
|
1577
1577
|
}
|
|
1578
|
-
|
|
1578
|
+
const equality = typeConfig.eq;
|
|
1579
|
+
return typeof equality === "string" ? equality === type : false;
|
|
1579
1580
|
}
|
|
1580
1581
|
function containsTypePredicate(expression, required) {
|
|
1581
1582
|
const normalizedExpression = expression.replace(/\s+/g, "").toLowerCase();
|
|
@@ -1592,6 +1593,12 @@ function isPlainObject2(value) {
|
|
|
1592
1593
|
const proto = Object.getPrototypeOf(value);
|
|
1593
1594
|
return proto === Object.prototype || proto === null;
|
|
1594
1595
|
}
|
|
1596
|
+
function isFilterRecord(value) {
|
|
1597
|
+
return isPlainObject2(value);
|
|
1598
|
+
}
|
|
1599
|
+
function isFilterOperators(value) {
|
|
1600
|
+
return isPlainObject2(value);
|
|
1601
|
+
}
|
|
1595
1602
|
|
|
1596
1603
|
// src/api/voices.ts
|
|
1597
1604
|
function mapCatalogResponseToVoiceList(response) {
|