@daeda/mcp-pro 0.1.5 → 0.1.7
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.js +53 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4224,11 +4224,13 @@ operationType MUST match the HubSpot property type:
|
|
|
4224
4224
|
- MULTISTRING \u2192 for string properties (firstname, lastname, email, city, company, etc.). Operators: IS_EQUAL_TO, IS_NOT_EQUAL_TO, CONTAINS, DOES_NOT_CONTAIN, STARTS_WITH, ENDS_WITH.
|
|
4225
4225
|
- NUMBER \u2192 for number properties. Operators: IS_EQUAL_TO, IS_NOT_EQUAL_TO, IS_BETWEEN, IS_GREATER_THAN, IS_LESS_THAN.
|
|
4226
4226
|
- BOOL \u2192 for boolean properties. Operators: IS_EQUAL_TO, IS_NOT_EQUAL_TO.
|
|
4227
|
-
- TIME_POINT \u2192 for date/datetime properties (single point comparison).
|
|
4228
|
-
- TIME_RANGED \u2192 for date/datetime properties (range
|
|
4229
|
-
- ALL_PROPERTY \u2192 any property type
|
|
4227
|
+
- TIME_POINT \u2192 for date/datetime properties (single point comparison). Operators: IS_AFTER, IS_BEFORE.
|
|
4228
|
+
- TIME_RANGED \u2192 for date/datetime properties (range). Operators: IS_BETWEEN. REQUIRED fields in the operation: lowerBoundEndpointBehavior ("INCLUSIVE"), upperBoundEndpointBehavior ("INCLUSIVE"), lowerBoundTimePoint, upperBoundTimePoint. Offset format uses individual fields: { days: -90 } (NOT { unit: "DAY", amount: -90 }). Full TIME_RANGED example: { operationType: "TIME_RANGED", operator: "IS_BETWEEN", lowerBoundEndpointBehavior: "INCLUSIVE", upperBoundEndpointBehavior: "INCLUSIVE", lowerBoundTimePoint: { timeType: "INDEXED", timezoneSource: "CUSTOM", zoneId: "US/Eastern", indexReference: { referenceType: "TODAY" }, offset: { days: -90 } }, upperBoundTimePoint: { timeType: "INDEXED", timezoneSource: "CUSTOM", zoneId: "US/Eastern", indexReference: { referenceType: "TODAY" }, offset: { days: 0 } } }.
|
|
4229
|
+
- ALL_PROPERTY \u2192 any property type. Operators: IS_KNOWN, IS_UNKNOWN, IS_BLANK, IS_NOT_BLANK. WARNING: IS_NOT_KNOWN is NOT valid \u2014 use IS_UNKNOWN instead.
|
|
4230
4230
|
Enum filter example: { filterType: "PROPERTY", property: "lifecyclestage", operation: { operationType: "ENUMERATION", operator: "IS_ANY_OF", values: ["lead"] } }
|
|
4231
4231
|
|
|
4232
|
+
IMPORTANT: Some HubSpot properties are hidden and CANNOT be used in list filters. Hidden properties will cause an API error. Common hidden properties include hs_last_sales_activity_date \u2014 use hs_last_sales_activity_timestamp instead. If unsure whether a property is hidden, prefer well-known visible properties.
|
|
4233
|
+
|
|
4232
4234
|
ASSOCIATION branches filter by associated records and MUST include these required fields:
|
|
4233
4235
|
- filterBranchType: "ASSOCIATION"
|
|
4234
4236
|
- objectTypeId: the associated object type ID (e.g. "0-3" for deals)
|
|
@@ -7116,6 +7118,35 @@ var collectPropertyFilters = (branches, parentObjectTypeId) => {
|
|
|
7116
7118
|
}
|
|
7117
7119
|
return refs;
|
|
7118
7120
|
};
|
|
7121
|
+
var collectTimeRangeIssues = (branches, index) => {
|
|
7122
|
+
const issues = [];
|
|
7123
|
+
for (const branch of branches) {
|
|
7124
|
+
const filters = branch.filters;
|
|
7125
|
+
if (filters) {
|
|
7126
|
+
for (const f of filters) {
|
|
7127
|
+
const op = f.operation;
|
|
7128
|
+
if (op?.operationType === "TIME_RANGED") {
|
|
7129
|
+
const missing = [];
|
|
7130
|
+
if (op.lowerBoundEndpointBehavior == null) missing.push("lowerBoundEndpointBehavior");
|
|
7131
|
+
if (op.upperBoundEndpointBehavior == null) missing.push("upperBoundEndpointBehavior");
|
|
7132
|
+
if (missing.length > 0) {
|
|
7133
|
+
issues.push({
|
|
7134
|
+
severity: "error",
|
|
7135
|
+
operation_index: index,
|
|
7136
|
+
code: "INVALID_TIME_RANGE_ENDPOINT",
|
|
7137
|
+
message: `TIME_RANGED filter on '${f.property ?? "unknown"}' is missing required field(s): ${missing.join(", ")}. Both must be set to "INCLUSIVE".`
|
|
7138
|
+
});
|
|
7139
|
+
}
|
|
7140
|
+
}
|
|
7141
|
+
}
|
|
7142
|
+
}
|
|
7143
|
+
const nested = branch.filterBranches;
|
|
7144
|
+
if (nested?.length) {
|
|
7145
|
+
issues.push(...collectTimeRangeIssues(nested, index));
|
|
7146
|
+
}
|
|
7147
|
+
}
|
|
7148
|
+
return issues;
|
|
7149
|
+
};
|
|
7119
7150
|
var collectAssociationIssues = (branches, index) => {
|
|
7120
7151
|
const issues = [];
|
|
7121
7152
|
for (const branch of branches) {
|
|
@@ -7200,6 +7231,7 @@ var createListHandler = {
|
|
|
7200
7231
|
}
|
|
7201
7232
|
if (branches?.length) {
|
|
7202
7233
|
issues.push(...collectAssociationIssues(branches, index));
|
|
7234
|
+
issues.push(...collectTimeRangeIssues(branches, index));
|
|
7203
7235
|
}
|
|
7204
7236
|
}
|
|
7205
7237
|
}
|
|
@@ -7245,28 +7277,37 @@ var createListHandler = {
|
|
|
7245
7277
|
)
|
|
7246
7278
|
),
|
|
7247
7279
|
Effect53.map((results) => {
|
|
7248
|
-
const
|
|
7280
|
+
const propInfoByObject = /* @__PURE__ */ new Map();
|
|
7249
7281
|
for (const [ot, defs] of results) {
|
|
7250
7282
|
const m = /* @__PURE__ */ new Map();
|
|
7251
|
-
for (const d of defs) m.set(d.name, d.type);
|
|
7252
|
-
|
|
7283
|
+
for (const d of defs) m.set(d.name, { type: d.type, hidden: d.hidden });
|
|
7284
|
+
propInfoByObject.set(ot, m);
|
|
7253
7285
|
}
|
|
7254
7286
|
const issues = [];
|
|
7255
7287
|
for (const ref of filterRefs) {
|
|
7256
|
-
const propMap =
|
|
7288
|
+
const propMap = propInfoByObject.get(ref.objectTypeId);
|
|
7257
7289
|
if (!propMap) continue;
|
|
7258
|
-
const
|
|
7259
|
-
if (!
|
|
7260
|
-
|
|
7290
|
+
const propInfo = propMap.get(ref.property);
|
|
7291
|
+
if (!propInfo) continue;
|
|
7292
|
+
if (propInfo.hidden) {
|
|
7293
|
+
issues.push({
|
|
7294
|
+
severity: "error",
|
|
7295
|
+
operation_index: index,
|
|
7296
|
+
code: "HIDDEN_PROPERTY_IN_FILTER",
|
|
7297
|
+
message: `Property '${ref.property}' is hidden and cannot be used in list filters. Use an alternative visible property instead.`
|
|
7298
|
+
});
|
|
7299
|
+
continue;
|
|
7300
|
+
}
|
|
7301
|
+
const expected = OPERATION_TYPE_FOR_PROPERTY_TYPE[propInfo.type];
|
|
7261
7302
|
if (!expected) continue;
|
|
7262
7303
|
if (ref.operationType === expected) continue;
|
|
7263
7304
|
if (ref.operationType === "ALL_PROPERTY") continue;
|
|
7264
|
-
if (ref.operationType === "TIME_RANGED" && (
|
|
7305
|
+
if (ref.operationType === "TIME_RANGED" && (propInfo.type === "date" || propInfo.type === "datetime")) continue;
|
|
7265
7306
|
issues.push({
|
|
7266
7307
|
severity: "error",
|
|
7267
7308
|
operation_index: index,
|
|
7268
7309
|
code: "INVALID_OPERATION_TYPE",
|
|
7269
|
-
message: `Property '${ref.property}' has type '${
|
|
7310
|
+
message: `Property '${ref.property}' has type '${propInfo.type}' but filter uses operationType '${ref.operationType}'. Use '${expected}' instead.${propInfo.type === "enumeration" ? " For enumeration properties use operators like IS_ANY_OF, IS_NONE_OF (not IS_EQUAL_TO)." : ""}`
|
|
7270
7311
|
});
|
|
7271
7312
|
}
|
|
7272
7313
|
return issues;
|