feat: add SDK logging support and SSE event discrimination#78
Open
fern-api[bot] wants to merge 1 commit intomainfrom
Open
feat: add SDK logging support and SSE event discrimination#78fern-api[bot] wants to merge 1 commit intomainfrom
fern-api[bot] wants to merge 1 commit intomainfrom
Conversation
This release introduces configurable SDK-wide logging capabilities and extends streaming support with event-level discrimination for Server-Sent Events (SSE). The logging system is silent by default and requires explicit configuration. Key changes: - Add optional logging configuration to ClientOptions with LogConfig support - Add LoggingInterceptor integration for HTTP request/response logging - Extend Stream class with SSE_EVENT_DISCRIMINATED type for discriminated unions - Add fromSseWithEventDiscrimination() methods for event-based SSE parsing - Remove InputStream-based file upload methods from LabReport clients - Update documentation comments for file upload methods 🌿 Generated with Fern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version Bump: Removed public InputStream-based parserCreateJob() methods from AsyncLabReportClient and LabReportClient classes.
LogConfigoption inClientOptions. Logging is silent by default and must be explicitly enabled. Additionally, theStreamclass now supports event-level discrimination for Server-Sent Events through newfromSseWithEventDiscrimination()methods, enabling better handling of discriminated union payloads in streaming responses.parserCreateJobmethods have been removed fromRawLabReportClient. Migrate to the File-based overloads instead. New lab configuration options are now available across various lab test request classes including lab account ID, lab slug specification, and appointment notes support.jobIdfield has been removed fromParsingJob. Code that accessesgetJobId()will need to be updated. Several new optional fields have been added:statusDetailin order events,orderTransactionin lab results, andaccessNotesin patient addresses. The order transaction status field is now properly typed as an enum instead of a string.QueryGroupByItemandQuerySelectItemhas been updated with new type orderings. Existing visitor implementations must be updated to handle the newDerivedReadinessColumnExprtype and shifted positions of existing types. TheUserInfo.addressfield now uses the more specificUserAddresstype. A new optionalaccessNotesfield has been added toUsAddress.RawLabAccountClientwith methods to query team lab accounts. Lab test orders also support optional clinical notes via the newclinicalNotesparameter inCreateOrderRequestCompatible.additionalProperty()andadditionalProperties()methods to include custom key-value pairs in your requests for future extensibility.additionalProperty()andadditionalProperties()methods for setting custom properties in a fluent, type-safe manner.additionalProperty()andadditionalProperties()methods..additionalProperty(key, value)or.additionalProperties(map)methods when building requests to include custom fields beyond the standard API schema. A new optionalappointmentNotesfield has been added toAppointmentBookingRequest.CanonicalCandidatetype available for biomarker matching operations with LOINC codes, aliases, and confidence scoring. Builder classes now support dynamic additional properties viaadditionalProperty()andadditionalProperties()methods.appointmentNotesfield available onClientFacingAppointmentobjects. Enhanced builder patterns across client-facing types now support additional properties viaadditionalProperty()andadditionalProperties()methods.additionalProperty()andadditionalProperties()are now available on all client-facing model builders, allowing dynamic property handling during object construction.additionalProperty()andadditionalProperties()methods to all client-facing type builders. These methods provide a fluent API for handling additional JSON properties in API responses.additionalProperty()andadditionalProperties()are now available on all client-facing data type builders, providing a fluent API for setting custom properties during object construction.ClientFacingLabAccounttype available for lab account management with billing configuration and team allowlist support. Two new event typesClientFacingLabReportParsingJobCreatedEventandClientFacingLabReportParsingJobUpdatedEventenable tracking of lab report parsing job lifecycle events.additionalProperty()andadditionalProperties()methods available on all builder interfaces. These methods allow you to add custom key-value pairs when constructing objects, providing better support for dynamic data and future extensibility.additionalProperty()andadditionalProperties()builder methods available on all client-facing types. These methods allow setting arbitrary key-value pairs that will be included in the serialized object, enabling more flexible object construction.additionalProperty()andadditionalProperties()builder methods available on all model classes. These methods allow setting custom properties on objects to handle additional fields that may be present in API responses.additionalProperty()andadditionalProperties()methods available on all model builders for setting custom fields not defined in the schema.additionalProperty()andadditionalProperties()are available on all data model classes for setting dynamic JSON properties. AddedGetTeamLabAccountsResponsetype for team lab account operations.additionalProperty(key, value)andadditionalProperties(map)on builders for grouped response objects.additionalProperty()andadditionalProperties()are now available on all grouped response and data type builders, providing a convenient way to set custom properties for API extensibility.additionalProperty(key, value)to set individual properties oradditionalProperties(map)to set multiple properties at once. New enum values and types have been added for lab account management features.additionalProperty()andadditionalProperties()are now available on model builders, allowing developers to set custom properties on API response objects for better forward compatibility.UsStateenum for US state abbreviations andUserAddressmodel for structured address data.