Azure SDK for JavaScript (April 2021)
The Azure SDK team is pleased to make available the April 2021 client library release.
GA
- Core - Auth
- Azure Communication Chat
- Azure Communication Common
- Azure Communication Identity
- Azure Communication SMS
- Core - Client
- Core - AMQP
- Event Hubs
- Identity
- Cosmos
Updates
- Core Rest Pipeline
- Core - LRO
- Core - HTTP
- Service Bus
- Cosmos DB
Beta
- Anomaly Detector
- Azure Communication Phone Numbers
- Identity
- Core - Tracing
- Key Vault - Administration
- Key Vault - Keys
- Key Vault - Certificates
- Key Vault - Secrets
- Form Recognizer
- App Configuration
- Cognitive Search
- Synapse - Artifacts
- Container Registry
- Tables
Installation Instructions
To install the packages, copy and paste the below into a terminal.
$> npm install @azure/ai-anomaly-detector@3.0.0-beta.3
$> npm install @azure/communication-phone-numbers@1.0.0-beta.5
$> npm install @azure/core-auth@1.3.0
$> npm install @azure/communication-identity@1.0.0
$> npm install @azure/core-rest-pipeline@1.0.3
$> npm install @azure/core-lro@1.0.4
$> npm install @azure/core-lro@1.0.5
$> npm install @azure/communication-common@1.0.0
$> npm install @azure/core-client@1.1.0
$> npm install @azure/communication-chat@1.0.0
$> npm install @azure/identity@2.0.0-beta.1
$> npm install @azure/identity@2.0.0-beta.2
$> npm install @azure/identity@1.3.0
$> npm install @azure/cosmos@3.10.6
$> npm install @azure/cosmos@3.11.0
$> npm install @azure/core-rest-pipeline@1.0.2
$> npm install @azure/core-http@1.2.4
$> npm install @azure/communication-sms@1.0.0
$> npm install @azure/core-amqp@2.2.0
$> npm install @azure/service-bus@7.0.4
$> npm install @azure/core-tracing@1.0.0-preview.11
$> npm install @azure/keyvault-admin@4.0.0-beta.3
$> npm install @azure/keyvault-keys@4.2.0-beta.5
$> npm install @azure/keyvault-certificates@4.2.0-beta.3
$> npm install @azure/keyvault-secrets@4.2.0-beta.4
$> npm install @azure/event-hubs@5.5.0
$> npm install @azure/ai-form-recognizer@3.1.0-beta.3
$> npm install @azure/app-configuration@1.2.0-beta.1
$> npm install @azure/search-documents@11.2.0-beta.1
$> npm install @azure/synapse-artifacts@1.0.0-beta.4
$> npm install @azure/container-registry@1.0.0-beta.1
$> npm install @azure/data-tables@12.0.0-beta.2
Feedback
If you have a bug or feature request for one of the libraries, please post an issue at the azure-sdk-for-js repository
Anomaly Detector 3.0.0-beta.3 Changelog
- Introduced the following new APIs related to Mutivariate Models:trainMultivariateModel, getMultivariateModel, deleteMultivariateModel, detectAnomaly, getDetectionResult, exportModel, listMultivariateModel, listMultivariateModelNext.
Core - Auth 1.3.0 Changelog
- Adds the
AzureNamedKeyCredentialclass which supports credential rotation and a correspondingNamedKeyCredentialinterface to support the use of static string-based names and keys in Azure clients. - Adds the
isNamedKeyCredentialandisSASCredentialtypeguard functions similar to the existingisTokenCredential.
Azure Communication Chat 1.0.0 Changelog
Breaking Changes
- Renamed
urltoendpointin the constructors ofChatClientandChatThreadClient. - Renamed
ChatThreadmodel toChatThreadProperties. RenamedGetChatThreadoperation toGetPropertiesand move toChatThreadClient. - Renamed
ChatThreadInfomodel toChatThreadItem. - Renamed parameter
repeatabilityRequestIdtoidempotencyToken. - Uses
ChatErrorinstead ofCommunicationErrorin operation result. - Move
participantsfromCreateChatThreadRequesttoCreateChatThreadOptions - Updated to @azure/communication-signaling@1.0.0-beta.3.
Azure Communication Common 1.0.0 Changelog
Updated @azure/communication-common version.
Azure Communication Identity 1.0.0 Changelog
- Stable release of
@azure/communication-identity.
Release highlights
Azure Communication Phone Numbers 1.0.0-beta.5 Changelog
Breaking Changes
- Renamed
AcquiredPhoneNumbertoPurchasedPhoneNumber. - Renamed
getPhoneNumbertogetPurchasedPhoneNumberonPhoneNumbersClient. - Renamed
listPhoneNumberstolistPurchasedPhoneNumbersonPhoneNumbersClient. - Replaced
VoidResultwith method specific interfacesPurchasePhoneNumbersResultandReleasePhoneNumberResult.
Azure Communication SMS 1.0.0 Changelog
- Stable release of
@azure/communication-sms.
Core Rest Pipeline 1.0.3 Changelog
Breaking Changes
- Updated @azure/core-tracing to version
1.0.0-preview.11. See @azure/core-tracing CHANGELOG for details about breaking changes with tracing.
Core - LRO 1.0.4 Changelog
- Bug fix: Fix an issue where we might return stale state if the
updateimplementation reassignsoperation.state.
Breaking Changes
- Updated @azure/core-tracing to version
1.0.0-preview.11. See @azure/core-tracing CHANGELOG for details about breaking changes with tracing.
Core - LRO 1.0.5 Changelog
- No functionality changes from 1.0.4. This release is to correct an issue where 1.0.4 shipped with modules in the wrong format (cjs instead of es6.)
Core - Client 1.1.0 Changelog
Breaking Changes
- If the response body is empty and the mapper for it says it is nullable, then a null is returned.
- Updated @azure/core-tracing to version
1.0.0-preview.11. See @azure/core-tracing CHANGELOG for details about breaking changes with tracing.
CosmosDB - 3.10.6 Changelog
Bugfix
- Adds partitionKey parameter to
container.conflicts.delete’
Cosmos DB 3.11.0 Changelog
- FEATURE: Internal client update. No user facing changes, but major version bump to be safe.
Identity 2.0.0-beta.1 Changelog
This update marks the preview for the first major version update of the
@azure/identitypackage since the first stable version was released in October, 2019. This is mainly driven by the improvements we are making for theInteractiveBrowserCredentialwhen used in browser applications by updating it to use the new@azure/msal-browserwhich is replacing the oldermsalpackage.
Breaking changes
- Changes to
InteractiveBrowserCredential- When used in browser applications, the
InteractiveBrowserCredentialhas been updated to use the Auth Code Flow with PKCE rather than Implicit Grant Flow by default to better support browsers with enhanced security restrictions. Please note that this credential always used the Auth Code Flow when used in Node.js applications. Read more on this in our docs on Interactive Browser Credential. - The default client ID used for
InteractiveBrowserCredentialwas viable only in Node.js and not for the browser. Therefore, client Id is now a required parameter when constructing this credential in browser applications. - The
loginStyleandflowoptions to the constructor forInteractiveBrowserCredentialwill now show up only when used in browser applications as these were never applicable to Node.js - Removed the
postLogoutRedirectUrifrom the options to the constructor forInteractiveBrowserCredential. This option was not being used since we don’t have a way for users to log out yet.
- When used in browser applications, the
- When a token is not available, some credentials had the promise returned by the
getTokenmethod resolve withnull, others had thegetTokenmethod throw theCredentialUnavailableerror. This behavior is now made consistent across all credentials to throw theCredentialUnavailableerror.- This change has no bearing on the user if all they ever did was create the credentials and pass it to the Azure SDKs.
- This change affects only those users who called the
getToken()method directly and did not handle resulting errors.
- The constructor for
DeviceCodeCredentialalways had multiple optional parameters and no required ones. As per our guidelines, this has now been simplified to take a single optional bag of parameters.
New features
- Changes to
InteractiveBrowserCredential,DeviceCodeCredential,ClientSecretCredential,ClientCertificateCredentialandUsernamePasswordCredential:- Migrated to use the latest MSAL. This update improves caching of tokens, significantly reducing the number of network requests.
- Added the feature of persistence caching of credentials. This is driven by the new
tokenCachePersistenceOptionsoption available in the options you pass to the credential constructors.- For now, to use this feature, users will need to install
@azure/msal-node-extensions1.0.0-alpha.6 on their own. This experience will be improved in the next update. - This feature uses DPAPI on Windows, it tries to use the Keychain on OSX and the Keyring on Linux.
- To learn more on the usage, please refer to our docs on the
TokenCachePersistenceOptionsinterface. - IMPORTANT: As part of this beta, this feature is only supported in Node 10, 12 and 14.
- For now, to use this feature, users will need to install
- Changes to
InteractiveBrowserCredential,DeviceCodeCredential, andUsernamePasswordCredential:- You can now control when the credential requests user input with the new
disableAutomaticAuthenticationoption added to the options you pass to the credential constructors.- When enabled, this option stops the
getToken()method from requesting user input in case the credential is unable to authenticate silently. - If
getToken()fails to authenticate without user interaction, anddisableAutomaticAuthenticationhas been set to true, a new error will be thrown:AuthenticationRequired. You may use this error to identify scenarios when manual authentication needs to be triggered (withauthenticate(), as described in the next point).
- When enabled, this option stops the
- A new method
authenticate()is added to these credentials which is similar togetToken(), but it does not read thedisableAutomaticAuthenticationoption described above.- Use this to get an
AuthenticationRecordwhich you can then use to create new credentials that will re-use the token information. - The
AuthenticationRecordobject has aserialize()method that allows an authenticated account to be stored as a string and re-used in another credential at any time. Use the new helper functiondeserializeAuthenticationRecordto de-serialize this string. authenticate()might succeed and still returnundefinedif we’re unable to pick just one account record from the cache. This might happen if the cache is being used by more than one credential, or if multiple users have authenticated using the same Client ID and Tenant ID. To ensure consistency on a program with many users, please keep track of theAuthenticationRecordand provide them in the constructors of the credentials on initialization.
- Use this to get an
- You can now control when the credential requests user input with the new
Other changes
- Updated the
@azure/msal-nodedependency to^1.0.0. DefaultAzureCredential’s implementation for browsers is simplified to throw theBrowserNotSupportedErrorin its constructor. Previously, we relied on getting the same error from trying to instantiate the different credentials thatDefaultAzureCredentialsupports in Node.js.- As before, please use only the
InteractiveBrowserCredentialin your browser applications.
- As before, please use only the
- For the
InteractiveBrowserCredentialfor node, replaced the use of theexpressmodule with a native http server for Node, shrinking the resulting identity module considerably.
Identity 2.0.0-beta.2 Changelog
Breaking Changes
- Renamed errors
CredentialUnavailabletoCredentialUnavailableError, andAuthenticationRequiredtoAuthenticationRequiredError, to align with the naming convention used for error classes in the Azure SDKs in JavaScript. - Added
clientIdto theAuthenticationRecordtype, alongsides thetenantIdthat this interface already had. Together they can be used to re-authenticate after recovering a previously serializedAuthenticationRecord. - The
serialize()method on theAuthenticationRecordobject that allows an authenticated account to be stored as a string and re-used in another credential at any time, is removed in favor of a standalone functionserializeAuthenticationRecordsimilar to how we have thedeserializeAuthenticationRecordfunction. serializeAuthenticationRecordnow serializes into a JSON string with camel case properties. This makes it re-usable across languages.- Removed the interface
PersistentCredentialOptions(introduced in2.0.0-beta.1) and instead inlined the options for the persistent cache feature in the options of individual credentials. - Added properties
scopesandgetTokenOptionsto the AuthenticationRequired error. These properties hold the values used by thegetToken()method on your credential to fetch the access token. You should pass these to theauthenticate()method on your credential if you wanted to do manual authentication after catching theAuthenticationRequirederror. InteractiveBrowserCredentialno longer supports Implicit Grant Flow and will only support Auth Code Flow instead. Therefore theflowoption introduced in1.2.4-beta.1has been removed. More information from the documentation on Implicit Grant Flow:With the plans for third party cookies to be removed from browsers, the implicit grant flow is no longer a suitable authentication method. The silent SSO features of the implicit flow do not work without third party cookies, causing applications to break when they attempt to get a new token. We strongly recommend that all new applications use the authorization code flow that now supports single page apps in place of the implicit flow, and that existing single page apps begin migrating to the authorization code flow as well.
Identity 1.3.0 Changelog
Tracing Changes
- Updated @azure/core-tracing to version `1.0.0-preview.11`. See [@azure/core-tracing CHANGELOG](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-tracing/CHANGELOG.md) for details about breaking changes with tracing.
Core - HTTP 1.2.4 Changelog
- Rewrote
bearerTokenAuthenticationPolicyto use a new backend that refreshes tokens only when they’re about to expire and not multiple times before. This fixes the issue: 13369.
Breaking Changes
- Updated @azure/core-tracing to version
1.0.0-preview.11. See @azure/core-tracing CHANGELOG for details about breaking changes with tracing.
Core - AMQP 2.2.0 Changelog
-
Updates
translateErrorto convert non-object type parameters to errors. The parameter will be part of the error’smessageproperty unless the parameter is null or undefined. Fixes issue 14499. - Addresses issue 9988
by updating the following operations to accept an
abortSignalto allow cancellation:- CbsClient.init()
- CbsClient.negotiateClaim()
- RequestResponseLink.create()
- Exporting
StandardAbortMessagethat is the standard error message accompanying theAbortError.
Service Bus 7.0.4 Changelog
Bug fixes
-
ServiceBusSessionReceiver.receiveMessagesandServiceBusSessionReceiver.subscribemethods are updated to handle errors on the AMQP connection like a network disconnect in #13956. Previously, these methods only handled errors on the AMQP link or session.- This previously resulted in the promise returned by the
receiveMessagesmethod never getting fulfilled and thesubscribemethod not calling the user provided error handler. - The
receiveMessagesmethod will now throwSessionLockLostErrorwhen used inpeekLockmode and return messages collected so far when used inreceiveAndDeletemode to avoid data loss if errors on the AMQP connection are encountered. - When using the
subscribe, the user providedprocessErrorcallback will now be called withSessionLockLostErrorif errors on the AMQP connection are encountered.
- This previously resulted in the promise returned by the
- Allow null as a value for the properties in
ServiceBusMessage.applicationProperties. Fixes #14329 - Re-exports
RetryModefor use when setting theRetryOptions.modefield inServiceBusClientOptions. Resolves #13166.
Tracing updates
- Tracing options for
ServiceBusMessageBatch.tryAddnow match the shape ofOperationOptions.
Core - Tracing 1.0.0-preview.11 Changelog
Breaking Changes
- Update @azure/core-tracing to version 1.0.0-preview.11. This brings core-tracing up to date with @opentelemetry/api@1.0.0-rc.0.
There are two scenarios that will require changes if you are using tracing:
- Previously, you would pass a parent span using the
OperationOptions.tracingOptions.spanOptions.parentSpanproperty. This has been changed so that you now specify a parentContextusing theOperationOptions.tracingOptions.tracingContextproperty instead. - The status code for Spans is no longer of type
CanonicalCode. Instead, it’s nowSpanStatusCode, which also has a smaller range of values.Key Vault - Administration 4.0.0-beta.3 Changelog
- Previously, you would pass a parent span using the
- Updated the Latest service version to 7.2.
- Long Running Operations will now use the
statusfield to determine whether the operation failed. - Improved tracing across the various KeyVault libraries. By switching to a consistent naming convention, ensuring spans are always closed appropriately, and setting the correct status when an operation errors developers can expect an improved experience when enabling distributed tracing.
- We now ensure tracing spans are properly closed with an appropriate status when an operation throws an exception.
- If a traced operation throws an exception we will now properly record the exception message in the tracing span.
- Finally, naming conventions have been standardized across the KeyVault libraries taking the format of
Azure.KeyVault.<PACKAGE NAME>.<CLIENT NAME>.
- Fixed an issue where retrying a failed initial Key Vault request may result in an empty body.
Key Vault - Keys 4.2.0-beta.5 Changelog
- Added local cryptography support for encryption / decryption for
A128CBCPAD,A192CBCPAD, andA256CBCPAD. - For AES-CBC encryption we will now generate an IV if the user did not pass it in, making
ivoptional for those parameters. - Improved tracing across the various KeyVault libraries. By switching to a consistent naming convention, ensuring spans are always closed appropriately, and setting the correct status when an operation errors developers can expect an improved experience when enabling distributed tracing.
- We now ensure tracing spans are properly closed with an appropriate status when an operation throws an exception.
- If a traced operation throws an exception we will now properly record the exception message in the tracing span.
- Finally, naming conventions have been standardized across the KeyVault libraries taking the format of
Azure.KeyVault.<PACKAGE NAME>.<CLIENT NAME>.
- Fixed an issue where retrying a failed initial Key Vault request may result in an empty body.
- [Breaking] Removed the now unused
LocalCryptographyAlgorithmNametype (Added in 4.2.0-beta.1 to supportLocalCryptographyClientand unused since 4.2.0-beta.4) - Updated
CryptographyClientto ensure that any local cryptography error is properly handled. We will now try to perform the operation locally where we can but fallback to KeyVault if the local operation fails.
Key Vault - Certificates 4.2.0-beta.3 Changelog
- Updated the Latest service version to 7.2.
- Added a sample demonstrating how to import PFX / PEM certificates.
- Fixed an issue where importing a certificate incorrectly required a Subject or Subject Alternative Name.
- Improved tracing across the various KeyVault libraries. By switching to a consistent naming convention, ensuring spans are always closed appropriately, and setting the correct status when an operation errors developers can expect an improved experience when enabling distributed tracing.
- We now ensure tracing spans are properly closed with an appropriate status when an operation throws an exception.
- If a traced operation throws an exception we will now properly record the exception message in the tracing span.
- Finally, naming conventions have been standardized across the KeyVault libraries taking the format of
Azure.KeyVault.<PACKAGE NAME>.<CLIENT NAME>.
- Fixed an issue where retrying a failed initial Key Vault request may result in an empty body.
Key Vault - Secrets 4.2.0-beta.4 Changelog
- Improved tracing across the various KeyVault libraries. By switching to a consistent naming convention, ensuring spans are always closed appropriately, and setting the correct status when an operation errors developers can expect an improved experience when enabling distributed tracing.
- We now ensure tracing spans are properly closed with an appropriate status when an operation throws an exception.
- If a traced operation throws an exception we will now properly record the exception message in the tracing span.
- Finally, naming conventions have been standardized across the KeyVault libraries taking the format of
Azure.KeyVault.<PACKAGE NAME>.<CLIENT NAME>.
- Fixed an issue where retrying a failed initial Key Vault request may result in an empty body.
Event Hubs 5.5.0 Changelog
- Updates the methods on the
CheckpointStoreinterface to accept an optionaloptionsparameter that can be used to pass in anabortSignalandtracingOptions.
New features:
- Allows passing
NamedKeyCredentialandSASCredentialas the credential type toEventHubConsumerClientandEventHubProducerClient. These credential types support rotation via theirupdatemethods and are an alternative to using theSharedAccessKeyName/SharedAccessKeyorSharedAccessSignatureproperties in a connection string.
Tracing updates
- Tracing options for
EventDataBatch.tryAddnow match the shape ofOperationOptions.
Form Recognizer 3.1.0-beta.3 Changelog
- Split
FormFieldinto several different interfaces. This should not cause any API compatibility issues except in certain edge cases (undefinedvalueType), but should result in more accurate type refinement when dealing with FormField values and should significantly improve documentation and code hinting of these values through IntelliSense. - Added support for recognizing identity documents (such as driver licenses and passports) through the
beginRecognizeIdDocumentsmethod and its URL-based counterpartbeginRecognizeIdDocumentsFromUrl. The identity document model is prebuilt and may be used without training a model. - Introduced two new form field value types:
"gender"and"country". These value types appear in the identity document recognition responses.- The
"gender"value type signifies the gender or sex of an individual and is represented by a string that is one of three values: “M”, “F”, or “X”. - The
"country"value type indicates a specific country and is represented by a three-letter country code string (ISO 3166-1 alpha-3).
- The
- Added support for the
pagesoption to all form recognition methods (custom forms and all prebuilt models). This option works the same as in the content recognition methods, and allows for the specification of which pages within a multi-page document (PDF or TIFF formats) should be considered during analysis and included in the response. - Added support for a
readingOrderoption to the content recognition methods. This option enables you to control the algorithm that the service uses to determine how recognized lines of text should be ordered. - Custom model recognition now supports bitmap images through the “image/bmp” content-type (content recognition and all prebuilt models already support this content type).
- Migrated to the 2.1-preview.3 Form Recognizer service endpoint for all REST API calls.
App Configuration 1.2.0-beta.1 Changelog
New Features
- New
SecretReferenceConfigurationSettingandFeatureFlagConfigurationSettingtypes to represent configuration settings that references KeyVault Secret reference and feature flag respectively. #14342 - Added
updateSyncTokenmethod toAppConfigurationClientto be able to provide external synchronization tokens. #14507
Cognitive Search 11.2.0-beta.1 Changelog
- Added Support for new skills such as
CustomEntityLookupSkill,DocumentExtractionSkill, etc. Please refer #14620 for further details. - Added Support for new datasource
adlsgen2. Please refer #14620 for further details. - Added Support for normalizers
LexicalNormalizer&CustomNormalizer. Please refer #14620 for further details.
Synapse - Artifacts 1.0.0-beta.4 Changelog
- Adds ADF support
- Consume latest Code Generator changes
Container Registry 1.0.0-beta.1 Changelog
- Initial version of Azure Container Registry client SDK library.
- This release is a preview of our efforts to create a client library that is user friendly and idiomatic to the JavaScript ecosystem. The reasons for most of the changes in this update can be found in the Azure SDK Design Guidelines for TypeScript.
Tables 12.0.0-beta.2 Changelog
- Update open-telemetry dependency to 1.0.0-rc.0 #14208
- Update @azure/core-client and @azure/core-rest-pipeline dependencies to 1.0.0 #14318
Latest Releases
View all the latest versions of JavaScript packages here.