Fix/compliance response mapping#378
Merged
koushiksk-plivo (koushiksk-plivo) merged 4 commits intomasterfrom Apr 16, 2026
Merged
Fix/compliance response mapping#378koushiksk-plivo (koushiksk-plivo) merged 4 commits intomasterfrom
koushiksk-plivo (koushiksk-plivo) merged 4 commits intomasterfrom
Conversation
- Fixed RequirementsResponse: complianceRequirementId→requirementId, countryIso2→countryIso, endUserType→userType, acceptableDocumentTypes→documentTypes - Fixed ComplianceResponse: added missing fields (callbackUrl, callbackMethod, updatedAt, endUser, documents, linkedNumbers) - Fixed ListResponse: objects→compliances to match API response - Fixed GetResponse: unwrap compliance wrapper key from API response - Fixed LinkResponse: added totalCount, updatedCount, report fields - Updated TypeScript declarations to match - Updated mock data and unit tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix wrong assertion values to match actual mock data (requirementId, complianceId, message) - Fix document type count (1 not 2) and field names (name not documentName) - Add not-undefined checks on every mapped field to catch mapping regressions - Add new tests for requiredFields, endUser, createdAt/updatedAt, update response compliance object - Add assertions for linkedNumbers values and report remarks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- list(): added missing countryIso, alias, expand params to JSDoc
- create(): removed misleading top-level params (alias, countryIso, etc.)
that actually belong inside params.data. Documented correct usage with
params.data (JSON object) and params.documents (file array)
- link(): replaced misleading complianceId/phoneNumber with correct
params.numbers array format [{number, compliance_application_id}]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- PhoneNumberComplianceResponse.documents: made optional (only present with expand=documents, undefined otherwise would cause TS errors) - PhoneNumberComplianceResponse.linkedNumbers: changed Array<string> to Array<Object> (each item has number and numberType per OpenAPI spec) - Added expand param documentation to get() JSDoc Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
avinashp-plivo
approved these changes
Apr 16, 2026
3929cdb
into
master
12 of 17 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.