Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added response types for different actions #83

Merged
merged 8 commits into from
Mar 2, 2023

Conversation

gismya
Copy link
Contributor

@gismya gismya commented Mar 1, 2023

  • I have added automatic tests where applicable
  • The PR title is suitable as a release note
  • The PR contains a description of what has been changed
  • The description contains manual test instructions

Changes

Added types for the different kinds of responses, based on what action the call sends.

Test

Make sure the types are correct, especially for CreateResponse, UpdateResponse, and DeleteResponse, which differ from the older Response type.

@gismya gismya requested a review from a team as a code owner March 1, 2023 08:58
Copy link
Contributor

@jimmycallin jimmycallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor feedback, good job overall!! 🌟

source/session.ts Outdated Show resolved Hide resolved
source/session.ts Outdated Show resolved Hide resolved
source/session.ts Outdated Show resolved Hide resolved
source/session.ts Outdated Show resolved Hide resolved
source/session.ts Outdated Show resolved Hide resolved
gismya and others added 2 commits March 1, 2023 16:23
Co-authored-by: Jimmy Callin <jimmy.callin@ftrack.com>
source/types.ts Outdated
__entity_type__: string;
}
interface ResponseMetadata {
metadata: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the metadata wrapper here

@gismya gismya merged commit 4dce809 into main Mar 2, 2023
@gismya gismya deleted the typescript-response-types branch March 2, 2023 12:02
gismya added a commit that referenced this pull request May 15, 2023
* Added types for all action responses and general type improvements

* More precise return type for createComponent

* Added generic types to ensure, query, search, create, update and createComponent

---------

Co-authored-by: Jimmy Callin <jimmy.callin@ftrack.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants