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

Reflect recent API changes in event and player endpoints #2

Merged
merged 6 commits into from
May 17, 2024

Conversation

maxim-01
Copy link
Contributor

@maxim-01 maxim-01 commented Nov 28, 2023

  • Updated ban-related fields in line with recent changes
  • Narrowed down fields in certain types for better IntelliSense
  • Loosened param types for methods returning API routes to accept string where applicable

- Updated ban-related fields in line with recent changes
- Narrowed down fields in certain types for better IntelliSense
- Loosened param types for methods returning API routes to accept string here applicable
@ShawnCZek ShawnCZek added the enhancement New feature or request label Nov 28, 2023
@ShawnCZek ShawnCZek self-requested a review November 28, 2023 19:03
@ShawnCZek ShawnCZek self-assigned this Nov 28, 2023
@ShawnCZek
Copy link
Member

Thank you very much for a pull request with so many improvements! I will review it in the following days.

I let CI run to trigger the ESLint validation. Can you please take a look at it and make changes so it follows the setup rules of the repository? Also, I am not the biggest fan of the pull request title; do you think you can come up with something more descriptive?

@maxim-01 maxim-01 changed the title Update to match recent API changes Reflect recent API changes Nov 28, 2023
@maxim-01 maxim-01 changed the title Reflect recent API changes Reflect recent API changes in event and player endpoints Nov 28, 2023
Copy link
Member

@ShawnCZek ShawnCZek left a comment

Choose a reason for hiding this comment

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

First of all, I am very sorry for the delay in getting to this pull request. As these repositories are not in my main scope, I have to find some extra time to properly maintain them.

The changes look really nice overall. Thank you a lot for this pull request; I can definitely see a huge improvement. I have left a few comments regarding my concerns and requests for little changes.

web/v2/index.ts Outdated Show resolved Hide resolved
web/v2/ban.ts Outdated Show resolved Hide resolved
web/v2/player/index.ts Outdated Show resolved Hide resolved
web/v2/player/index.ts Outdated Show resolved Hide resolved
web/v2/player/patreon.ts Outdated Show resolved Hide resolved
- removed exported `APIPlayerBans` type
- removed string from argument types when numeric identifiers are expected
- merged types that did not require separation
Copy link
Member

@ShawnCZek ShawnCZek left a comment

Choose a reason for hiding this comment

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

Thank you for the quick changes! I left a few little remarks before we can merge this.

traffic/v2/index.ts Show resolved Hide resolved
web/v2/player/index.ts Outdated Show resolved Hide resolved
web/v2/player/index.ts Outdated Show resolved Hide resolved
- generalised `as const` where applicable
- renamed the base interface for `APIPlayer` to align with `APIPlayerPatreon`
Copy link
Member

@ShawnCZek ShawnCZek left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Thank you for the fast iteration! And thank you once again for this extensive pull request improving the API types. 🚀

I am currently outside the town, so I will make a release later. Just so you know: we will also be moving to the @truckersmp organization (instead of @truckersmp_official) because we finally got the name from npm after months of waiting.

web/v2/index.ts Outdated Show resolved Hide resolved
@ShawnCZek ShawnCZek merged commit 8651788 into TruckersMP:main May 17, 2024
1 check passed
@ShawnCZek
Copy link
Member

Thank you once again for this pull request. This change has been released as a part of v1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants