Audit and fix space-api TypeSpec migration regressions#32
Conversation
- Fix queues route parameters (queue_id, id) and add missing endpoints
- Fix MFA verify route structure (/{mfa_request_id}/verify)
- Fix registry-beta nested routes for campaigns under brands
- Add missing verified_caller_ids endpoints (update, redial, validate)
- Add missing filter parameters to registry-beta endpoints
- Fix operationIds and summaries to match original spec
- Update TypeSpec to v1.8.0
🌿 Previewhttps://signalwire-preview-842e63aa-bfac-4478-a6b7-0880f3bf9872.docs.buildwithfern.com ✅ All links are valid. |
…per TypeSpec annotations
…, comparison script oneOf handling, remove extra request properties
cassieemb
left a comment
There was a problem hiding this comment.
I'm not finished yet, but need to context switch for a bit and wanted to provide the feedback I have so far!
|
@cassieemb regarding the campaign registry endpoints.. Since many request properties become optional if the request is for a self-registered brand, i wonder if we should change how we present this in the spec. Would a That way we only enforce the required properties where needed (regular brand object). |
I think that's a really good callout and would be a great way to improve the readability of this endpoint! |
Implemented! It seems from the backend code that a lot of these properties that are marked as optional for CSP actually don't get used. So it seems a managed brands request would look like: {
"name": "My Brand",
"company_name": "BrandCo",
"contact_email": "brand_info@example.com",
"contact_phone": "+18995551212",
"ein_issuing_country": "United States",
"legal_entity_type": "PRIVATE_PROFIT",
"ein": "12-3456789",
"company_address": "123 Brand St, Hill Valley CA, 91905",
"company_vertical": "HEALTHCARE",
"company_website": "www.example.com",
"status_callback_url": "https://example.com/handle_callback"
}While CSPs would look like: {
"csp_self_registered": true,
"name": "My Brand",
"csp_brand_reference": "B123456",
"status_callback_url": "https://example.com/handle_callback"
}So it seems the presence of |
|
I'm sorry, I completely missed the campaign mismatches in my first review - I think we may want to structure them similar to the brand creation endpoint. Create Campaign: Both: Partner: Managed: I'm not sure why the UI indicates that there is a default value for the keywords - I checked across the codebase and we don't set any default when nothing is passed. The value is not required by TCR either, so there is no need to - we simply don't pass anything when we create the campaign with TCR. I'll open a PR to fix this in the UI Let me know if you have any questions about any of these! I can expand further. Everything else looks great IMO |
Fixes TypeSpec migration regressions for the Space API including route parameters, nested routes, missing endpoints, and operationIds.