feat: add support for update report definition endpoint#125
feat: add support for update report definition endpoint#125smcgowan-smartsheet wants to merge 10 commits intosmartsheet:mainlinefrom
Conversation
Review completed. All previously flagged issues remain resolved in the latest commit.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
update docs-source with the new models, and enums
Fix alphabetical ordering in smartsheet_enums.rst
Review completed. The implementation looks solid and follows established SDK patterns. All models properly implement serialization, use appropriate type hints, and include comprehensive tests. The CHANGELOG has been updated appropriately. The previous alphabetical ordering issue in
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
remove invalid options
add update filters query param support
smartsheet/reports.py
Outdated
| """ | ||
| _op = fresh_operation("update_report_definition") | ||
| _op["method"] = "PATCH" | ||
| _op["path"] = "/reports/" + str(report_id) + "/definition?updateFilters=" + str(updateFilters).lower() |
There was a problem hiding this comment.
The query parameter is manually appended to the path string instead of using the SDK's standard query_params pattern. Every other method in this SDK uses _op["query_params"]["key"] = value (e.g., line 288: _op["query_params"]["sendEmail"] = send_email). This bypasses the SDK's query parameter processing in smartsheet.py and could cause URL encoding issues with more complex parameter values. The implementation should use _op["query_params"]["updateFilters"] = updateFilters instead of manual string concatenation.
Fix it with Roo Code or mention @roomote and request a fix.
fix linting issue
change for consistency
change aggregationCriteria to summarizingCriteria to match spec
changed to PUT from PATCH no longer returning changed definition no longer needs query param
Pull Request
Description
Adding support for update report definition endpoint
Type of Change
What Changes Were Made
update_report_definition()method in Reports class to update report definitionsReportDefinitionmodel with support for filters, grouping, aggregation, and sorting criteriaReportFilterExpressionmodel with recursive structure for complex filter logicReportFilterCriterionmodel for individual filter conditionsReportColumnIdentifiermodel for identifying columns in report criteriaReportGroupingCriterionmodel for report grouping configurationReportAggregationCriterionmodel for report aggregation configurationReportSortingCriterionmodel for report sorting configurationReportAggregationTypeenum (SUM, AVG, MIN, MAX, COUNT, FIRST, LAST)ReportBooleanOperatorenum (AND, OR) for filter expressionsReportFilterOperatorenum with 36 operators for filter criteriaReportSystemColumnTypeenum with report-specific system columns including SHEET_NAMEChecklist
docs-source/(see Documentation guidelines)