Skip to content

Fix/compliance response mapping#378

Merged
koushiksk-plivo (koushiksk-plivo) merged 4 commits intomasterfrom
fix/compliance-response-mapping
Apr 16, 2026
Merged

Fix/compliance response mapping#378
koushiksk-plivo (koushiksk-plivo) merged 4 commits intomasterfrom
fix/compliance-response-mapping

Conversation

@koushiksk-plivo
Copy link
Copy Markdown
Contributor

No description provided.

Koushik SK and others added 4 commits April 16, 2026 19:24
- 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>
@koushiksk-plivo koushiksk-plivo (koushiksk-plivo) merged commit 3929cdb into master Apr 16, 2026
12 of 17 checks passed
@koushiksk-plivo koushiksk-plivo (koushiksk-plivo) deleted the fix/compliance-response-mapping branch April 16, 2026 15:13
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