Commit 83bf524
VAPI-2700 Add Endpoint Event Model and Related Enums (#173)
* Add Endpoint Event Model and Related Enums
- Created EndpointEvent class to represent events occurring on endpoints.
- Introduced EndpointEventTypeEnum to define event types (DEVICE_CONNECTED, DEVICE_DISCONNECTED).
- Added EndpointResponse class for handling responses related to endpoints.
- Implemented EndpointStatusEnum to represent endpoint statuses (CONNECTED, DISCONNECTED).
- Added EndpointTypeEnum for defining endpoint types (WEBRTC).
- Created Endpoints class to encapsulate endpoint details.
- Introduced ErrorResponse class for managing error responses.
- Added ListEndpointsResponse class for handling lists of endpoints.
- Implemented Page class for pagination support in endpoint listings.
- Created SipConnectionMetadata class to manage SIP connection details.
- Added SipCredentials class for handling SIP authentication credentials.
* Add unit tests for EndpointsApi, EndpointEvent, and EndpointEventTypeEnum
* Add integration tests for EndpointsApi with various endpoint operations
* Refactor Endpoints integration tests to use synchronous methods and improve API client configuration
* Refactor endpoint creation requests to use CreateEndpointRequest and update status code assertions
* Skip GenerateMessagingCodeBadRequest test due to API returning 500 instead of expected 400
* Add Connect and Endpoint classes to BXML verbs for call connection
* Fix parameter references and add beta badges for endpoints in OpenAPI spec
* Rename CreateEndpointResponseObject to CreateEndpointResponseData in CreateEndpointTest
* Remove CreateEndpointResponseObject class and documentation
* Add unit tests for endpoint models and enums
- Created tests for CreateEndpointRequestBase, CreateEndpointResponseData, CreateEndpointResponse, CreateWebRtcConnectionRequest, Device, Endpoint, and Endpoints classes.
- Implemented serialization and deserialization tests for various models.
- Added tests for enum values and their serialization/deserialization for DeviceStatusEnum, EndpointDirectionEnum, EndpointStatusEnum, and EndpointTypeEnum.
- Included validation tests to ensure required fields throw exceptions when null.
- Enhanced coverage for ListEndpointsResponse and its associated properties.
* Refactor EndpointsSmokeTests: Simplify initialization and remove unused variables
* Address PR review feedback for BRTC SDK tests
- Remove JSON serialization/deserialization tests from model test files
(tests the JSON library, not the model)
- Remove integer value tests and JsonConvert tests from enum test files
- Remove duplicate enum creation tests from EndpointEventTypeEnumTests
- Standardize enum tests to use concise assertion style
- Simplify smoke test list assertion to check first element
- Remove filter test from smoke tests
- Make smoke test client initialization consistent with other smoke tests
- Add missing BXML verb tests for Connect and Endpoint
- Add missing model unit tests for CreateEndpointRequest, ErrorResponse,
Page, SipConnectionMetadata, and SipCredentials
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix ErrorResponseTests to use correct Error constructor parameter
The Error model has (code, description, telephoneNumbers) parameters,
not a 'type' parameter. Changed to use code: 400 instead of the
non-existent type parameter that caused a CS1739 build error.
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Improve BRTC endpoint test quality and coverage
- Enum tests now robustly verify all values via serialization/deserialization
- Consolidate per-field [Fact] methods into single test methods across 15 model tests
- Remove 3 redundant variant tests from EndpointEventTests (DisconnectedEventType, WithoutTag, WithoutDevice)
- Add Page and item-level field assertions to smoke test List section
- Add Page field assertion to unit API ListEndpointsTest
- Remove empty IDisposable implementation from EndpointEventTests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address PR review feedback: simplify enum tests and fix smoke test init
- Rewrite all 5 enum test files (DeviceStatusEnum, EndpointDirectionEnum,
EndpointEventTypeEnum, EndpointStatusEnum, EndpointTypeEnum) to match
the existing auto-generated pattern (CallDirectionEnumTests, etc.)
removing unnecessary integer value checks, JSON serialization tests,
and inequality assertions
- Add BasePath to EndpointsIntegrationTests constructor for consistency
with other smoke tests (Calls, Messages, MFA, etc.)
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address remaining PR review feedback
- Restore JSON serialization tests for EndpointEventTypeEnum: the non-obvious
CONNECTED -> "DEVICE_CONNECTED" mapping is worth testing explicitly
- Assert that the created endpoint ID appears in the list response to verify
the just-created endpoint is findable
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Address remaining PR review feedback
- Delete useless enum InstanceTest files (DeviceStatusEnum, EndpointStatusEnum,
EndpointTypeEnum, EndpointDirectionEnum) per reviewer request
- Fix list assertion in smoke test to find the specific created endpoint using
.First(e => e.EndpointId == endpointId) instead of generic Data[0]
- Add System.Linq using directive to smoke test
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix smoke test BasePath to match API spec
The Endpoints API server URL is https://api.bandwidth.com/v2 per the
OpenAPI spec, not https://api.bandwidth.com/api/v2.
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add serialization tests for BRTC enum types
Replace deleted boilerplate Assert.IsType tests with meaningful
serialization/deserialization tests for DeviceStatusEnum,
EndpointStatusEnum, EndpointDirectionEnum, and EndpointTypeEnum,
matching the concise style used in EndpointEventTypeEnumTests.
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Match enum tests to existing repo convention
Update BRTC enum test files to follow the same structure as
CallbackMethodEnumTests and CompletedLookupStatusEnumTests:
IDisposable pattern, constructor, InstanceTest, plus serialization
tests for actual value coverage.
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Match BRTC model tests to existing repo convention
Update all 13 BRTC model test files to follow the auto-generated test
pattern: license header, full usings, IDisposable with Dispose(),
InstanceTest, individual per-property [Fact] methods with XML doc
comments, and Assert.IsType + Assert.Equal assertions.
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update test file headers with author attribution
Replace auto-generated header line with "Author: Sudhanshu Moghe"
across all 18 BRTC test files (13 model + 5 enum).
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Align BRTC tests with existing repo conventions
- Replace author attribution headers with standard OpenAPI generator header
- Add IDisposable, XML doc comments, and standard structure to ErrorResponseTests and SipCredentialsTests
- Remove enum serialization tests to match existing enum test pattern
- Remove required field validation tests not present in existing model tests
- Add BadRequest, Unauthorized, Forbidden, NotFound error cases to EndpointsApiTests
- Add XML doc comments to all EndpointsApiTests methods
- Rewrite EndpointsIntegrationTests: split lifecycle test into separate operations, add forbidden client, use standard method naming convention
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Use combined lifecycle test for endpoint happy path
Keep Create -> List -> Get -> Delete as one test instead of separate
tests, reducing endpoint churn while still covering the full flow.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove forbidden smoke tests for endpoints
The forbidden credentials return 401 instead of 403 for the endpoints
API, so remove those tests and keep only unauthorized + not found.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove hardcoded BasePath from EndpointsSmokeTests
Remove unnecessary BasePath override from the authorized client
configuration, consistent with other smoke test initializations.
Generated from Claude9 with Claude Code
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: smoghe-bw <smoghe-bw>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent a5dc5c6 commit 83bf524
92 files changed
Lines changed: 9889 additions & 126 deletions
File tree
- .openapi-generator
- api
- docs
- src
- Bandwidth.Standard.Test
- Smoke
- Unit
- Api
- Model
- Bxml
- Bandwidth.Standard
- Api
- Client
- Model
- Bxml/Verbs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
50 | 55 | | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
54 | 70 | | |
55 | 71 | | |
| 72 | + | |
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
| |||
70 | 87 | | |
71 | 88 | | |
72 | 89 | | |
| 90 | + | |
73 | 91 | | |
74 | 92 | | |
75 | 93 | | |
| |||
117 | 135 | | |
118 | 136 | | |
119 | 137 | | |
| 138 | + | |
120 | 139 | | |
121 | 140 | | |
122 | 141 | | |
| |||
147 | 166 | | |
148 | 167 | | |
149 | 168 | | |
| 169 | + | |
| 170 | + | |
150 | 171 | | |
151 | 172 | | |
152 | 173 | | |
| |||
192 | 213 | | |
193 | 214 | | |
194 | 215 | | |
| 216 | + | |
195 | 217 | | |
196 | 218 | | |
197 | 219 | | |
| |||
260 | 282 | | |
261 | 283 | | |
262 | 284 | | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
263 | 289 | | |
264 | 290 | | |
265 | 291 | | |
266 | 292 | | |
| 293 | + | |
267 | 294 | | |
| 295 | + | |
| 296 | + | |
268 | 297 | | |
269 | 298 | | |
270 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
271 | 308 | | |
272 | 309 | | |
| 310 | + | |
273 | 311 | | |
274 | 312 | | |
275 | 313 | | |
| |||
287 | 325 | | |
288 | 326 | | |
289 | 327 | | |
| 328 | + | |
290 | 329 | | |
291 | 330 | | |
292 | 331 | | |
| |||
330 | 369 | | |
331 | 370 | | |
332 | 371 | | |
| 372 | + | |
333 | 373 | | |
334 | 374 | | |
335 | 375 | | |
| |||
358 | 398 | | |
359 | 399 | | |
360 | 400 | | |
| 401 | + | |
| 402 | + | |
361 | 403 | | |
362 | 404 | | |
363 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
| |||
207 | 212 | | |
208 | 213 | | |
209 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
213 | 222 | | |
| 223 | + | |
214 | 224 | | |
| 225 | + | |
| 226 | + | |
215 | 227 | | |
216 | 228 | | |
217 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
218 | 238 | | |
219 | 239 | | |
| 240 | + | |
220 | 241 | | |
221 | 242 | | |
222 | 243 | | |
| |||
234 | 255 | | |
235 | 256 | | |
236 | 257 | | |
| 258 | + | |
237 | 259 | | |
238 | 260 | | |
239 | 261 | | |
| |||
277 | 299 | | |
278 | 300 | | |
279 | 301 | | |
| 302 | + | |
280 | 303 | | |
281 | 304 | | |
282 | 305 | | |
| |||
305 | 328 | | |
306 | 329 | | |
307 | 330 | | |
| 331 | + | |
| 332 | + | |
308 | 333 | | |
309 | 334 | | |
310 | 335 | | |
| |||
0 commit comments