Conversation
smoghe-bw
commented
Feb 18, 2026
- Modified LookupResult.md to correct field names and descriptions.
- Updated MachineDetectionConfiguration.md to improve clarity in descriptions.
- Revised MessageRequest.md for consistency in formatting.
- Added new Page.md documentation for pagination support.
- Adjusted RbmOpenUrlEnum.md and RbmWebViewEnum.md for better readability.
- Introduced new SipConnectionMetadata.md and SipCredentials.md models.
- Enhanced StatusCallback.md to clarify the carrierName field description.
- Created new models for endpoint management including CreateEndpointRequestBase, CreateEndpointResponse, and related types.
- Added device-related models including Device, DeviceStatusEnum, and Endpoint management types.
- Implemented error handling models such as ErrorResponse and updated InboundCallback types.
- Added list-endpoints response model for better API response handling.
- Modified LookupResult.md to correct field names and descriptions. - Updated MachineDetectionConfiguration.md to improve clarity in descriptions. - Revised MessageRequest.md for consistency in formatting. - Added new Page.md documentation for pagination support. - Adjusted RbmOpenUrlEnum.md and RbmWebViewEnum.md for better readability. - Introduced new SipConnectionMetadata.md and SipCredentials.md models. - Enhanced StatusCallback.md to clarify the carrierName field description. - Created new models for endpoint management including CreateEndpointRequestBase, CreateEndpointResponse, and related types. - Added device-related models including Device, DeviceStatusEnum, and Endpoint management types. - Implemented error handling models such as ErrorResponse and updated InboundCallback types. - Added list-endpoints response model for better API response handling.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…perty; update tests to validate new structure and behavior
…ses; ensure proper validation of endpoint properties
| import { Link } from '../../../models/link'; | ||
| import { ModelError } from '../../../models/model-error'; | ||
|
|
||
| describe('CreateEndpointResponse', () => { |
There was a problem hiding this comment.
i like the fact that its trying to create these tests, but I think if we're going to do that, we should fully test the model in 1 test, aka, we can have one test where it fills our every possible field in the model and runs assertions for all of that, essentially combining what's going on in the 2 tests here
| expect(Object.values(DeviceStatusEnum)).toEqual([ | ||
| 'CONNECTED', | ||
| 'DISCONNECTED' | ||
| ]); |
There was a problem hiding this comment.
tbh we should probably add this to all of the other enum tests to catch when they're updated, nice
| expect(device.deviceId).toBe('dev-1234'); | ||
| expect(device.deviceName).toBe('Mobile App'); | ||
| expect(device.status).toBe(DeviceStatusEnum.Connected); | ||
| expect(new Date(device.creationTimestamp).toString()).not.toBe('Invalid Date'); |
There was a problem hiding this comment.
I feel like there's probably a better way to test this, can we make sure the date it makes matches like the year or time we expect instead?
| test('should define the expected values', () => { | ||
| expect(EndpointDirectionEnum.Inbound).toBe('INBOUND'); | ||
| expect(EndpointDirectionEnum.Outbound).toBe('OUTBOUND'); | ||
| expect(EndpointDirectionEnum.Bidirectional).toBe('BIDIRECTIONAL'); |
There was a problem hiding this comment.
can add that values assertion i called out earlier
| describe('EndpointEventTypeEnum', () => { | ||
| test('should define the expected values', () => { | ||
| expect(EndpointEventTypeEnum.DeviceConnected).toBe('DEVICE_CONNECTED'); | ||
| expect(EndpointEventTypeEnum.DeviceDisconnected).toBe('DEVICE_DISCONNECTED'); |
There was a problem hiding this comment.
values test here and for the rest of the enum tests
| expect(data.errors).toBeInstanceOf(Array); | ||
| expect(data.errors).toHaveLength(0); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
where is the delete endpoint test?
| test('should list endpoints filtered by type', async () => { | ||
| const { status, data } = await endpointsApi.listEndpoints(BW_ACCOUNT_ID, EndpointTypeEnum.Webrtc); | ||
|
|
||
| expect(status).toEqual(200); | ||
| expect(data.data).toBeInstanceOf(Array); | ||
| expect(data.errors).toBeInstanceOf(Array); | ||
| if (data.data.length > 0) { | ||
| expect(data.data.every((item) => item.type === EndpointTypeEnum.Webrtc)).toEqual(true); | ||
| } | ||
| }); |
| endpointId = data.data.endpointId; | ||
| }); | ||
|
|
||
| test('should list endpoints for the account', async () => { |
There was a problem hiding this comment.
| test('should list endpoints for the account', async () => { | |
| test('should list endpoints, async () => { |
| let endpointId: string; | ||
|
|
||
| describe('endpoint lifecycle', () => { | ||
| test('should create a new endpoint', async () => { |
There was a problem hiding this comment.
| test('should create a new endpoint', async () => { | |
| test('should create endpoint', async () => { |
| } | ||
| }); | ||
|
|
||
| test('should retrieve details of a specific endpoint', async () => { |
There was a problem hiding this comment.
| test('should retrieve details of a specific endpoint', async () => { | |
| test('should get endpoint', async () => { |