node-zendesk
node-zendesk copied to clipboard
Fixed types for organization client methods, organization type
Pull Request Description
The PR corrects the parameter types for the various create and update methods of the organization client (see #437 for a report on some of the issues). This change is not breaking, but merely adjusting the types to match the shape Zendesk's API expects.
The PR also adds an explicit Organization type (based on Zendesk's docs), and updates the method signatures to use that type or its derivatives.
I also updated the implementation of the upsert() method, which is just duplicating createOrUpdate(), and deprecated the method, since its naming deviates from the API's.
Related Issue(s)
- [x] This PR fixes/closes issue #437
- [x] This is a new feature and does not have an associated issue.
Additional Information
- [ ] This change is a breaking change (may require a major version update)
- [ ] This change is a new feature (non-breaking change which adds functionality)
- [x] This change improves the code (e.g., refactoring, etc.)
- [ ] This change includes dependency updates
Test Cases
- manually verified that createMany and updateMany work with the updated types
- manually verified that the output of organization client methods matches methods' updated return types
Documentation
- [x] I have updated the documentation accordingly.
- [ ] No updates are required.
Checklist
- [x] I have read the CONTRIBUTING documentation.
- [x] My code follows the coding standards of this project.
- [x] All new and existing tests passed.