onvaca_connect 0.3.1
onvaca_connect: ^0.3.1 copied to clipboard
Dart SDK for the OnVaca Connect Platform — a unified interface for multiple property management system providers.
Changelog #
0.3.1 #
Fixed #
PmsEntity.rawDataandPmsEntity.metadataare now nullable — the gateway may omit these fields when consumer response mapping is not configured, which previously caused atype 'Null' is not a subtype of type 'Map<String, dynamic>'crash during deserialization
0.3.0 #
Added #
awaitJob(jobId, {interval, timeout})— polls a job until it reaches a terminal state (completed/failed). Default interval 2s, timeout 2min. ThrowsTimeoutExceptionon timeout.JobStatus.isTerminal— returnstruewhen status iscompletedorfailedJobStatus.isRunning— inverse ofisTerminaloperations({onlySupported})— optional filter to only return operations the tenant's providers supportsupportsOperation(slug, {onlySupported})— passes through the filter
Changed #
JobStatusmodel expanded — now matches the backend's full response:jobId,type,status,progress,createdAt,startedAt,completedAt,attempts,maxAttempts,error,setupId,providerJobStatus.dataremoved — replaced byprogress,error, and other typed fields
Deprecated #
ExecuteOptions.callbackUrl— server-side only concept. UseawaitJob()on mobile instead.
0.2.1 #
- Complete main example with full SDK workflow: setup, connections, properties, booking, payment, messaging, rates, pagination, disconnect, and error handling
0.2.0 #
Breaking Changes #
providerMessageremoved from all exceptions — replaced bymessagewhich now carries the backend's actual error message instead of hardcoded stringsentityIdremoved fromEntityNotFoundException— was always emptyslugremoved fromOperationNotSupportedException— was always empty
Added #
codefield on all exceptions — backend error code (e.g.'NOT_FOUND','UNAUTHORIZED','BAD_GATEWAY')detailsfield on all exceptions — additional context map from the backend (e.g.retryAfter,operation,providerType)RateLimitException.retryAfternow also parsed from response bodydetails.retryAfter(not just theRetry-Afterheader)- Handles array-format
messagefields from backend validation errors - Comprehensive README with full API documentation
- 6 example files: setup, booking flow, pagination, async operations, error handling
- Fixed resources table: messages
send(), ratesget()/update(), setupsdelete() - Documented connections, operations, direct entity access, execute, async jobs, generic request
- Added .gitignore
0.1.1 #
- Fix homepage and repository URLs in pubspec.yaml
0.1.0 #
- Initial release
- Resource-based client for properties, bookings, payments, messages, rates, setups
- Sealed error hierarchy with Dart 3 pattern matching
- Automatic retry with exponential backoff on 5xx and 429
- Bearer token authentication