Releases: infobip/infobip-api-java-client
4.3.1
[ 4.3.1 ] - 2024-06-05
Added
- Most recent Infobip SMS API feature set.
Changed
-
Fixes and changes
- Changed SmsTurkeyIysOptions model, previously nested enum 'RecipientTypeEnum' is now extracted to a separate class: SmsIysRecipientType.
- Expanded ApiExceptionDetailsResolver model with additional error response that the API might return.
-
Documentation
- Fixed Javadoc.
4.3.0
[ 4.3.0 ] - 2024-03-19
All changes, including breaking changes, are addressed and explained in the list bellow.
If you find out that something was not addressed properly, please submit an issue.
Added
- Support for Infobip Messages API.
- Most recent feature set for:
Changed
- Removed classes and unified structures
- Removed basic url security configuration classes (
CallsBasicUrlSecurityConfig
,CallRoutingBasicUrlSecurityConfig
) in favor of a unified class: BasicSecurityConfig - Removed hmac algorithm class (
CallsHmacAlgorithm
) in favor of a unified class: HmacAlgorithm - Removed hmac url security configuration classes (
CallRoutingHmacUrlSecurityConfig
,CallsHmacUrlSecurityConfig
) in favor of a unified class: HmacSecurityConfig - Removed url security configuration classes (
CallRoutingUrlSecurityConfig
,CallsUrlSecurityConfig
) in favor of a unified class: SecurityConfig
- Removed basic url security configuration classes (
- Fixes and changes
- Changed CallRoutingRecording model, previously nested enum 'RecordingTypeEnum' is now extracted to a separate class: CallRoutingRecordingType.
- Changed 'endpoint' field type in CallsBulkCall from CallEndpoint to CallsBulkEndpoint since it didn't correspond to the state of the endpoint.
- Changed 'endpoint' field type in CallsBulkCallRequest from CallEndpoint to CallsBulkEndpoint since it didn't correspond to the state of the endpoint.
- Fixed some of the enum values in TfaLanguage since they didn't correspond to the state of the endpoint.
- Removed 'record' field in CallsClickToCallMessage since it is not supported on the API side.
- Removed 'values' field in ViberOutboundFileContent since it is not supported on the API side.
- Removed 'values' field in ViberOutboundImageContent since it is not supported on the API side.
- Removed 'values' field in ViberOutboundVideoContent since it is not supported on the API side.
- Changed 'reports' field name in ViberWebhookReportResponse to 'results'.
- Changed 'callbackData' field type in ViberWebhooks from Object to String since it didn't correspond to the state of the endpoint.
- Changed WhatsAppTemplateApiResponse by making it an abstract class, serving as a base for WhatsAppAuthenticationTemplateApiResponse, WhatsAppDefaultMarketingTemplateApiResponse, WhatsAppDefaultUtilityTemplateApiResponse.
- Changed 'results' field in WhatsAppWebhookInboundContactMessage to be initialized to an empty list rather than null.
- Changed 'results' field in WhatsAppWebhookInboundMessageResult to be initialized to an empty list rather than null.
- Removed 'contact' field in WhatsAppWebhookInboundMessageData since it didn't correspond to the state of the endpoint.
- Changed WhatsAppWebhookReferral model, previously nested enum 'SourceTypeEnum' is now extracted to a separate class: WhatsAppWebhookReferralSourceType.
- Changed WhatsAppWebhookReferralMedia by making it an abstract class, serving as a base for WhatsAppWebhookReferralMediaImage, WhatsAppWebhookReferralMediaVideo.
- Documentation
- Fixed Javadoc.
Removed
- Models for Receive WhatsApp Deleted Reports webhook since it is no longer part of Infobip's product stack.
- Unused model classes
4.2.0
4.1.2
Fixed
- Issue that caused the number of query parameters for 'bulkId' & 'messageId' to be squared when making getOutboundSmsMessageLogsDefinition call in SmsApi.
- Issue that caused the number of query parameters for 'sender' to be squared when making getWhatsappSendersQualityDefinition call in WhatsAppApi.
4.1.1
Added
guava
dependency to tagearly-access
endpoints with@Beta
annotation.- Most recent Infobip WhatsApp API feature set.
Changed
- Expanded WhatsAppTemplateDataContent model with additional field supporting
WhatsAppTemplateCarouselContent
that the API might return. - Early access endpoints in WhatsAppApi are tagged with
@Beta
annotation - Fixed Javadoc.
4.1.0
[ 4.1.0 ] - 2023-12-20
All changes, including breaking changes, are addressed and explained in the list bellow.
If you find out that something was not addressed properly, please submit an issue.
Added
- Support for Infobip Call Routing API.
- Support for Infobip Call Link API.
- Most recent Infobip Email API feature set.
- Most recent Infobip SMS API feature set.
- Most recent Infobip MMS API feature set.
- Most recent Infobip Voice API feature set.
- Most recent Infobip WebRTC API feature set.
- Most recent Infobip Viber API feature set.
- CPaaS-X support to more channels.
- Support for handling ApiError models:
Changed
- Removed classes and unified structures
- Removed pagination classes (
CallsPageInfo
,WebRtcPageInfo
) in favor of a unified class: PageInfo - Removed status-defining classes for messages by products (
EmailStatus
,MmsStatus
,SmsStatus
) and introduced a unified class: MessageStatus - Removed price-defining classes for messages by products (
EmailPrice
,MmsPrice
,SmsPrice
,EmailWebhookPrice
) and replaced with a unified class: MessagePrice - Removed error-defining classes for query execution by different products (
EmailReportError
,MmsError
,SmsError
) and introduced a unified class: MessageError
- Removed pagination classes (
- Fixes and changes
- Expanded ApiExceptionDetails model with additional fields supporting enriched error responses that the API might return.
- Changed
templateId
field type from Integer to Long in EmailApi's SendEmailRequest class because of reported issue. - Updated WhatsAppCategory enumeration values based on report and reported issue.
- Updated CallsErrorCode enumeration values to reflect changes on Hangup endpoint.
- Updated ViberValidityPeriodTimeUnit enumeration values since 'DAYS' is no longer supported, use 'HOURS' instead.
- Changed 'context' field name in CallsApplicationTransferRequest to 'customData'.
- Changed 'days' field type in CallsDeliveryTimeWindow from List to Set to avoid duplicates.
- Removed 'type' field in CallsDtmfTermination since it is not supported on the API side.
- Removed 'stopOn' field in CallsSayRequest since it is not supported on the API side.
- Removed 'sipTrunkGroupId' field in CallsSipEndpoint since it is not supported on the API side.
- Removed 'notifyContentType' field in MmsAdvancedMessage since it is not supported on the API side.
- Removed 'sendingSpeedLimit' field in MmsAdvancedRequest since it is not supported on the API side.
- Fixed Viber webhook report models.
- Changed 'results' field name in ViberWebhookReportResponse to reports.
- Replaced 'ios' and 'android' fields in WebRtcPushConfigurationResponse with 'androidConfigured' and 'iosConfigured' since they didn't correspond to the state of the endpoint.
- Changed 'structure' field type in WhatsAppTemplateApiResponse from 'WhatsAppTemplateStructureApiData' and 'WhatsAppDefaultTemplateStructureApiData'.
- Changed WhatsAppTemplatePublicApiRequest by making it an abstract class, serving as a base for WhatsAppAuthenticationTemplatePublicApiRequest, WhatsAppDefaultMarketingTemplatePublicApiRequest, WhatsAppDefaultUtilityTemplatePublicApiRequest.
- Documentation
- Fixed Javadoc.
- Dependencies
- Bumped
slf4j-api
version to2.0.9
- Bumped
jackson
version to2.15.2
- Bumped
okhttp
version to4.12.0
- Bumped
Removed
- Unused model classes
Deprecated
- Deprecated old error fields in ApiExceptionDetails
4.0.0
[ 4.0.0 ] - 2023-03-02
🎉 NEW Major Version of infobip-api-java-client
.
All changes, including breaking changes, are addressed and explained in the list bellow.
If you find out that something was not addressed properly, please submit an issue.
Added
- Support for Infobip MMS API.
- Support for Infobip Voice API.
- Support for Infobip WebRTC API.
- Support for Infobip Viber API.
- Most recent Infobip SMS API feature set.
- Most recent Email feature set.
- Most recent WhatsApp feature set.
- Tests for the static parts of the auto-generated code.
There are multiple tests phases implemented in our auto-generation pipeline.
A part of the tests is now included as a library source code. - Base URL abstraction.
- Api Key abstraction.
- Deprecation notice log if deprecated or gone endpoints are used (
slf4j-api
dependency). - Snyk and Java version badges to README.
Changed
- The library now requires Java 11 or above.
- OkHttp dependency was bumped to version 4.10.0.
- From this version, an
ApiClient
instance must be constructed and configured using the Builder pattern:The additional OkHttp client configuration was removed from the library.ApiClient apiClient = ApiClient.forApiKey(givenApiKey) .withBaseUrl(givenBaseUrl) .withHttpClient(givenHttpClient) .withReadTimeout(givenReadTimeoutInSeconds) .withTempDirectoryPath(givenTempDirPath) .build();
Please check the Removed section for details. - API classes were refactored in a way that all functionalities are grouped under the same product.
For example,SendSmsApi
,ScheduledSmsApi
andReceiveSmsApi
classes are replaced with a singleSmsApi
class. - API class methods that trigger an API call were rewritten using a fluent style where all required parameters
must be passed to a request builder factory method.
On the other hand, optional parameters may be passed using a separate request builder methods.
The result can be fetched usingexecute
orexecuteAsync
methods.
That allows us to add optional parameters without introducing a breaking change to the library.
For example, in the previous version, to send a TFA pin code, we could use something like this:In the new version, the following pattern applies:TfaStartAuthenticationResponse response = tfaApi.sendTfaPinCodeOverSms(false, request);
TfaStartAuthenticationResponse sendCodeResponse = tfaApi .sendTfaPinCodeOverSms(request) .ncNeeded(false) .execute();
- Jackson (version 2.14.2) serialization library is used instead of Gson.
TheJSON
serialization utility now uses a preconfigured Jackson'sObjectMapper
.
Also, the support forInputStream
serialization was added. - All maven plugins were bumped to the most recent version.
Both unneeded plugins and the obsolete configuration were removed. - The API request and response processing was rewritten to increase maintainability and usability.
- The
ApiException
class was refactored to have fluent getters and a single accessible Builder. - From this version, the error response body is deserialized and stored in
details
property of theApiException
class. - The
palantir-java-format
is now used instead ofgoogle-java-format
to have the formatting closer to our internal coding style.
See the Spotless README for details. - Some products like Email and WhatsApp contain a few breaking changes since a new version of a few of the API endpoints was released.
If you have issues when migrating the existing implementation, please check the official API documentation or submit an issue.
Removed
- Basic, IBSSO Token Header and client credentials grant type OAuth2 authentication methods.
Use API Key Header authentication method instead.
The API Key should be injected into theApiClient
instance through the newly introducedforApiKey
factory method.
Examples can be found in the README. Configuration
utility class.
Having static default configuration is error-prone and provides an unnecessary overhead.
AnApiClient
instance should always be injected in the given API class.SSL
settings configuration methods from theApiClient
.
If you need to configure customSSL
related settings (custom client keys, disabled CA certificate and hostname verification, etc.),
configure them on theOkHttpClient
instance directly and pass the instance to theApiClient
usingwithHttpClient
builder method.- Date format customization methods from the
ApiClient
.
Only the default Infobip date format should be used.
The date formatter instance to be used is available through theJSON
class. - Header and cookie manipulation through
ApiClient
public interface.
However, it can still be achieved using OkHttp interceptors if needed.
Feel free to configure anOkHttpClient
instance with appropriate interceptors and pass the instance to theApiClient
usingwithHttpClient
builder method. - Explicit debugging option for
ApiClient
.
HttpLoggingInterceptor can always be included by providing a preconfigured HTTP client as described above. - Explicit gzip support for requests.
The support should be provided by the client itself like explained here. - Unused generated classes.
- Default network interceptor used for tracking upload and download progress.
The functionality can be re-added by using the official OkHttp recipe. ...WithHttpInfo
methods from API client classes.
If an additional info like response headers or the response code is needed, theexecuteAsync
method should be
used.
The required information is injected in the callback....buildCall
methods from API client classes.
The OkHttpCall
abstraction can be obtained by using theexecuteAsync
method.
We don't allow calling the API without processing the response internally anymore.
3.2.0
[ 3.2.0 ] - 2022-01-19
Added
- Support for Infobip WhatsApp API
whatsapp.md
containing quick start guide for WhatsApp API
Changed
- Email sending API to match the latest version of the API.
- Signature changed: getEmailLogs()
- Renamed some email API models to be consistent across multiple products
- EmailError -> EmailReportError
- EmailLogsResult -> EmailLogsResponse
Fixed
- Minor SMS API changes (some fields became read-only)
- Improved Javadoc comments
3.1.0
[ 3.1.0 ] - 2021-06-16
Added
- Support for Infobip Email API
email.md
which contains basic example of Email API usage
3.0.1
[ 3.0.1 ] - 2021-02-16
Changed
README.md
which now contains more details about supported authentication methods & updated examples of library usage for webhooks
Removed
- Unused model classes, utility classes, and dependencies
Fixed
- Supported date formats as specified in Integration Best Practices