Skip to content

Commit

Permalink
Expose creation and last modified dates in saved-views-react
Browse files Browse the repository at this point in the history
  • Loading branch information
sarah-pontier committed May 24, 2024
1 parent 16147a5 commit 8086f88
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/saved-views-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Minor changes

* Add `extensions` property to `SavedView` type
* Add `creationTime` and `lastModified` properties to `SavedView` type
* Update `ITwinSavedViewsClient` to include `creationTime` and `lastModified` in `getSavedViewInfo`, `getSingularSavedView`, `createSavedView`, and `updateSavedView` responses

## [0.3.1](https://github.com/iTwin/saved-views/tree/v0.3.1-react/packages/saved-views-react) - 2024-05-20

Expand Down
4 changes: 4 additions & 0 deletions packages/saved-views-react/src/SavedView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export interface SavedView {
thumbnail?: ReactNode | string | undefined;
/** `extensionName` and `data` pairs. */
extensions?: Map<string, string> | undefined;
/** Time the saved view was created as an ISO8601 string, `"YYYY-MM-DDTHH:mm:ss.sssZ"` */
creationTime?: string;
/** Time the saved view was last modified as an ISO8601 string, `"YYYY-MM-DDTHH:mm:ss.sssZ"` */
lastModified?: string;
}

export interface SavedViewTag {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ function savedViewResponseToSavedView(response: Omit<SavedViewMinimal, "savedVie
creatorId: response._links.creator?.href.split("/").at(-1),
shared: response.shared,
thumbnail: undefined,
creationTime: response.creationTime,
lastModified: response.lastModified,
};
}

Expand Down

0 comments on commit 8086f88

Please sign in to comment.