Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased
- Added support for PATCH /2.0/reports/{reportId}/definition endpoint
- WireMock integration tests for contract testing for PATCH /2.0/reports/{reportId}/definition endpoint
- Support for POST /reports/{reportId}/scope endpoint
- Support for DELETE /reports/{reportId}/scope endpoint
- Support for DELETE /reports/{reportId} endpoint

## [4.7.2] - 2026-03-17
### Fixed
- App crashing after updating to v4.7.1 with logLevel set to 'info' [#158](https://github.com/smartsheet/smartsheet-javascript-sdk/issues/158)
Expand All @@ -16,8 +23,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- WireMock integration tests for contract testing for POST /2.0/users/{userId}/plans/{planId}/upgrade and POST /2.0/users/{userId}/plans/{planId}/downgrade
- WireMock integration tests for contract testing for DELETE /2.0/users/{userId}/plans/{planId} endpoint
- Remove trailing slashes from routes
- Support for POST /reports/{reportId}/scope endpoint
- Support for DELETE /reports/{reportId}/scope endpoint
### Updated
- listAllUsers url generation
- Folder structure for the Users related WireMock tests
Expand Down
15 changes: 15 additions & 0 deletions lib/reports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type {
ReportPublish,
SetReportPublishStatusOptions,
SetReportPublishStatusResponse,
UpdateReportDefinitionOptions,
DeleteReportOptions,
DeleteReportResponse,
AddReportScopeOptions,
Expand Down Expand Up @@ -92,6 +93,19 @@ export function create(options: CreateOptions): ReportsApi {
return requestor.put({ ...optionsToSend, ...urlOptions, ...putOptions }, callback);
};

const updateReportDefinition = (
patchOptions: UpdateReportDefinitionOptions,
callback?: RequestCallback<BaseResponseStatus>
): Promise<BaseResponseStatus> => {
const urlOptions = {
url: options.apiUrls.reports + '/' + patchOptions.reportId + '/definition',
queryParameters: {
updateFilters: patchOptions.updateFilters,
},
};
return requestor.put({ ...optionsToSend, ...urlOptions, ...patchOptions }, callback);
};

const deleteReport = (deleteOptions: DeleteReportOptions, callback?: RequestCallback<DeleteReportResponse>) => {
const urlOptions = { url: options.apiUrls.reports + '/' + deleteOptions.reportId };
return requestor.delete({ ...optionsToSend, ...urlOptions, ...deleteOptions }, callback);
Expand Down Expand Up @@ -121,6 +135,7 @@ export function create(options: CreateOptions): ReportsApi {
getReportAsCSV,
getReportPublishStatus,
setReportPublishStatus,
updateReportDefinition,
deleteReport,
addReportScope,
removeReportScope,
Expand Down
Loading
Loading