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

Upgrade to latest typed-rest-client #206

Merged
merged 9 commits into from
Sep 11, 2018
Merged

Upgrade to latest typed-rest-client #206

merged 9 commits into from
Sep 11, 2018

Conversation

damccorm
Copy link

@damccorm damccorm commented Sep 6, 2018

Due to shifting interfaces, some changes had to be made, especially to make the handlers compatible.

Resolves #155 and resolves #175

In addition, fixes how dates and other objects are serialized.

Fixes #98, fixes #191, and fixes #199

@stephenmichaelf
Copy link
Member

This may be a breaking change as I think before they could instantiate the handlers directly if they wanted to? If so, will have to bump major.

@bryanmacfarlane
Copy link
Contributor

The other option is to leave those modules in place (api/handlers/...) but have them load and return the handlers from the rest client?

@stephenmichaelf
Copy link
Member

Let's merge, @bryanmacfarlane up to you how to patch. Minor should be fine.

api/VsoClient.ts Outdated
return value;
}

protected getValueString(queryValue, value) {
Copy link
Member

Choose a reason for hiding this comment

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

Can this be private?

Copy link
Author

Choose a reason for hiding this comment

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

Good call, updated it appropriately.

@@ -52,15 +54,34 @@ export interface IBasicCredentials {
password: string;
}

export interface IHttpClient {
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to export this?

Copy link
Author

@damccorm damccorm Sep 10, 2018

Choose a reason for hiding this comment

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

I think we need to export both this and IRequestInfo because we're using them as parameters in other interfaces that are being exported. If I don't export them, an error is thrown Parameter 'httpClient' of method from exported interface has or is using private name 'IHttpClient'.

requestRawWithCallback(info: IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: IHttpClientResponse) => void): void;
}

export interface IRequestInfo {
Copy link
Member

Choose a reason for hiding this comment

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

Same question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants