Change Log
All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[8.4.1]
Fixed
No longer minifying to prevent huge error stack traces, we expect that where it matters bundlers are in use anyway
exh.data.schemas.update
now correctly accepts all the*Mode
and*Limit
schema propertiesAdded missing
Schema
andTypeConfiguration
propertiesCorrected the notification settings type
[8.4.0]
Added
exh.auth.oauth1.tokens
now hasfind
,findFirst
,findById
andremove
methodsexh.auth.oauth2.tokens
now hasfind
,findFirst
,findById
andremove
methodsThe
exh.events.subscriptions
methods now also support the newretriable
field
Deprecated
exh.auth.oauth1.getTokens
is deprecated in favor ofexh.auth.oauth1.tokens.find
exh.auth.oauth1.removeToken
is deprecated in favor ofexh.auth.oauth1.tokens.remove
exh.events.subscriptions.create
should no longer be used, this is managed by the system
[8.3.0]
Added
Now also publishing to the NPM registry, no longer needing to authenticate with GitHub Packages to install the SDK
exh.users.globalRoles
now hasfind
,findFirst
,findById
andfindByName
methodsexh.users.groupRoles
now hasfind
,findFirst
,findById
andfindByName
methodsexh.auth.applications
now hasfind
,findFirst
,findById
andfindByName
methods
Deprecated
exh.users.globalRoles.get
is deprecated in favor ofexh.users.globalRoles.find
exh.users.groupRoles.get
is deprecated in favor ofexh.users.groupRoles.find
exh.auth.applications.get
is deprecated in favor ofexh.auth.applications.find
Fixed
The
data
forexh.profiles.update
is now correctly typed.The
rqlBuilder.intermediate()
method now correctly wraps multiple expressions in anand
expression.Synced the values of
GlobalPermissionName
with the current API permissions.Role permissions are now correctly typed
Any string is now accepted as a permission, but the
GlobalPermissionName
can still be used as a source of known permissionsThis affects the methods for adding/removing permissions for both global roles and group roles
Data service transition action types corrected. Thank you,
tran-simon
!
[8.2.0]
Added
MfaRequiredError
now exposes a typedmfa
property to complete the MFA flow type safe
Changed
All runtime dependencies are now pinned to their specific version
axios
updated to0.28.1
fflate
updated to0.8.2
typescript-json-decoder
updated to1.0.11
qs
updated to6.12.0
Removed the dependency on
ts-toolbelt
as it was no longer required
Fixed
Using an oAuth2 confidential client on web no longer causes a
global not defined
errorexh.files.create
andexh.files.createFromText
now work correctly while using oAuth1 in React NativeThe generic
API_ERROR
name is no longer shown for errors with more specific information availableType corrections for the user, profile, file, index and mfa entities
Corrected the places where the name of a schema can also be used rather than just the id
The
groupIds
forexh.data.documents.unlinkGroups
is now correctly marked as optionalCorrected the permission mentioned for
exh.users.groupRoles.removeUsersFromStaff
[8.1.1]
Fixed
Pinned the
qs
version because of breaking changes in their latest release for our oAuth1 signature generation
[8.1.0]
Changed
exh.users.createAccount
andexh.users.updateEmail
:Now accept an
activationMode
fieldAfter enabling in the verification settings, this field can be set to use the pin code mode
exh.users.requestEmailActivation
andexh.users.requestPasswordReset
:Alternatively now also accept an object with an
email
andmode
fieldAfter enabling in the verification settings, the
mode
field can be set to use the pin code modeAdditional errors are thrown when request limiting is enabled via the verification settings
exh.users.validatePasswordReset
andexh.users.validateEmailActivation
:Alternatively now also accept an
email
andpinCode
fieldAdditional errors are thrown when using the pin code mode
exh.users.getEmailTemplates
andexh.users.setEmailTemplates
now support the new pin code email templates:oidcUnlinkPinEmailTemplateId
activationPinEmailTemplateId
reactivationPinEmailTemplateId
passwordResetPinEmailTemplateId
Improved oAuth2 access token refreshing
If the SDK is able to estimate the expiry time of an access token, the token is refreshed before it expires
This done just before a request is about to made, preventing the extra request to just receive an expired token error
Tokens received from the
exh.auth.authenticate
method, next toexpiresIn
, now also include ancreationTimestamp
fieldcreateClient
andcreateOAuth2Client
now accept anexpiresIn
andcreationTimestamp
field
Added
Methods to work with the activation requests:
exh.users.activationRequests.find
exh.users.activationRequests.findFirst
exh.users.activationRequests.findById
exh.users.activationRequests.findByUserId
exh.users.activationRequests.remove
Methods to work with the forgot password requests:
exh.users.forgotPasswordRequests.find
exh.users.forgotPasswordRequests.findFirst
exh.users.forgotPasswordRequests.findById
exh.users.forgotPasswordRequests.findByUserId
exh.users.forgotPasswordRequests.remove
Methods to work with the user verification settings:
exh.users.settings.getVerificationSettings
exh.users.settings.updateVerificationSettings
Fixed
exh.auth.applications.deleteVersion
now calls the correct endpointAutomatic oAuth2 access token refreshing now properly uses client credentials
Optional fields for
exh.auth.users.addMfaMethod
are now correctly marked as optionalThe return value of
exh.users.changePassword
is now correctly typed as a booleanCorrected the
VIEW_API_FUNCTION_REQUEST_LOGS
permission name mentioned in the inline documentationThe
statuses
field of the data serviceSchema
entity is now typed correctly
[8.0.0]
Changed
Breaking Change: RQL values are now double encoded by default when using the RQL builder
Disable double encoding for all RQL operations with
rqlBuilder.doubleEncodeValues = false
Disable double encoding for a single RQL operation
rqlBuilder({ doubleEncodeValues: false }).eq(name, '< value >').build()
Please consult the Migration Guide for more information
Breaking Change: Starting from v8.0.0, the SDK will no longer normalize custom keys in requests and responses. This means that all custom keys will be sent and received as they are provided.
The normalization of custom keys can be re-enabled for a single operation to the behavior before 8.0.0 by setting the option
exh.service.operation({ normalizeCustomData: true })
The normalization of custom keys can be re-enabled for all operations on a client to the behavior before 8.0.0 using the snippet
exh = createClient({ ...options, normalizeCustomData: true });
Please consult the Migration Guide for more information
Breaking Change: For all unauthenticated methods the response will now undergo the same transformation steps as any other request.
The timestamps previously returned as strings are now converted to date objects in
exh.auth.authenticate
,exh.auth.confirmMfa
andexh.users.createAccount
.Please consult the Migration Guide for more information
New implementation of the hashing for oAuth1 signature generation
This change is not expected to have any impact on the SDK usage
Bug Fixes
In the
TokenDataOauth1
interfaceupdateTimeStamp
is changed toupdateTimestamp
timeZone
is now accepted as a valid parameter for the resolve functions in the template service
[v7.8.0]
Changed
New implementation of the oAuth1 signature generation to support double Encoding of RQL values in
OAuth1
clients
[v7.7.0]
Added
Functionality to allow the double encoding of values when using the RQL builder
Enable double encoding for all RQL operations with
rqlBuilder.doubleEncodeValues = true
Enable double encoding for a single RQL operation
rqlBuilder({ doubleEncodeValues: true }).eq(name, '< value >').build()
When enabling double encoded values ensure that instances of encoding values for the rql builder such as
encodeURIComponent()
are removedDouble Encoding of RQL values is currently only supported in
OAuth2
clients and will come toOAuth1
clients at a later date.
A skip count operator to the rql builder
rqlBuilder().eq(name, '< value >').skipCount().build()
Providing this operator skips the record counting step of a request to increase performance. As a result, the page object in a response will not include the total field.
The skip count operator is currently supported in select services, and efforts are underway to make it available for all services.
Fixed
Documentation for an incorrect permission value of
exh.users.globalRoles.addPermissions()
REMOVE_ROLE_PERMISSIONS
toREMOVE_ROLE_PERMISSION
[v7.6.0]
Added
findAll
,findAllIterator
andupdate
methods to the Dispatcher service
Improvements
Updated types and documentation for the Dispatcher service
Exported the missing
RQLString
type
[v7.5.1]
Added
Type support React Native form data
Fixes
Bumped Axios version to fix content-type header issue
Fixed
onUploadProgress
callback event triggering without a provided functionRemoved discrimination between node and web environments
[v7.5.0]
Added
Support for File Service settings:
File Service settings may now be managed using methods found in:
exh.files.settings
[v7.4.1]
Fixes
Correctly export the interfaces of the tasks component
[v7.4.0]
Added
Support for API Functions:
An API Function may now be executed using methods found in:
exh.tasks.api
API Requests produced by executing API Functions are accessible using methods found in:
exh.tasks.apiRequests
API Request Logs produced during the execution of an API Function can be accessed using methods found in:
exh.tasks.apiRequests.logs
A Function may now be directly executed as a task using the method:
exh.tasks.functions.execute()
Support for Tasks
Task Schedules may now be managed using methods found in:
exh.tasks.schedules
Task Logs produced during the execution of a task can now be accessed using methods found in:
exh.tasks.logs
Monitoring File Uploads
The SDK now supports monitoring file uploads in the browser using a callback function.
Changed
VIEW_GROUPS
permission value is changed to the correctVIEW_GROUP
ADD_ROLE_PERMISSION
is now described correctly as singular in the inline documentationUpdated
RegisterUserData
interface optional fields
[v7.3.0]
Added
Support for OpenID Connect
OAuth 2 clients now allow users to authenticate themselves with OpenID connect. See:
exh.auth.generateOidcAuthenticationUrl()
exh.auth.authenticateWithOidc()
Manage your OpenID Connect configuration via new methods found in:
exh.auth.oidc
exh.auth.oidc.providers
exh.auth.oidc.loginAttempts
Methods to manage the User Service email templates:
exh.users.getEmailTemplates()
exh.users.setEmailTemplates()
While creating an oAuth1 client both
token
andtokenSecret
can now be supplied. In which case there is no need for an extraexh.auth.authenticate
call.
While creating an oAuth2 client both
refreshToken
andaccessToken
can now be supplied. In which case there is no need for an extraexh.auth.authenticate
call.
Changed
Improved types and inline documentation (JSDoc) for the
exh.auth.applications
sectionMore detailed descriptions for the methods
Descriptions for the fields within the data types we accept and return
[v7.2.1]
Added
Support large file uploads
Fixes
Task cancellation
[v7.2.0]
Added
For API errors the
qName
variable is mapped to thename
variable, to improve consistency with default errors.
Fixes
Corrected the interfaces to be consistent with the API
Updated dead links in documentation
[v7.1.0]
Added
logout()
can now be performed on a proxy ClientTasks now take an optional generic to set the data type
userId
is now available on the raw mock
Fixes
The return type of
exh.users.update()
is returning the correctUserData
. See issue #605
[v7.0.0]
Added
OAuth1 token management ->
exh.auth.oauth1.getTokens
/exh.auth.oauth1.removeToken
. See issue #465Password policy ->
exh.users.passwordPolicy
andexh.users.updatePasswordPolicy
Extra Playstore endpoint ->
payments.playStoreHistory.purchaseReceipts
Extra permissions for the updated task service
RQL option to several endpoints
Changed
Types for the
exh.auth.application.create
andexh.auth.application.createVersion
have been exported. See Authentication examples for more info.Pako to fflate
Refactored the Schema and Document Types
Updated the
EnlistmentConfiguration
type. See issue #596
Fixes
Running
yarn
on windows machines resulted in an error issue #612Return type of
exh.auth.application.update
is now correctly typed asAffectedRecords
Breaking changes
Removed
payments.playStoreHistory.purchases
(deprecated)The
contains
andexcludes
endpoints of the rql builder now accepts an array of expressions iso a single string. See issue #603The removal of the group roles now has the correct parameters
[v6.1.0]
Breaking changes
renamed
createTransaction
tocompleteTransaction
on the payments.appStore service
Changed
When passing in
localhost
as host. No prefixing takes places.Fixed bug when calling
sdk.files.create
with tags as an array. See PR #544Properties on your JSONSchema on the data service will no longer have any automatic date parsing. PR #546
If you are using the
sdk.raw
instance you can now pass in additional parameters to the http verbs. See PR #546
Profile
type has been revised
ProxyClient
existed double. One of those has been renamed toProxyInstance
[v6.0.0]
Breaking Changes
sdk.data.documents.create
now accepts 3 generics.
Added
sdk.data.documents.update
now accepts a generic for the update type.Exported
findAllGeneric
andfindAllIterator
for usage on raw functionsBetter type for
findAllIterator
[v5.3.1]
Added/Fixed
Playstore endpoints can handle rql now
[v5.3.0]
Added
There are now 3 mocked exports.
getMockSdkProxy
,getMockSdkOAuth2
andgetMockSdkOAuth1
with matching types. ThegetMockSdk
is also still available and mapped togetMockSdkOAuth2
.
[v5.2.0]
Added
btoa
function to be used when you are using React-Native in combination with a Confidential Application. See documentation for more info.createOAuth1Client
andcreateOAuth2Client
have had their type signatures updated. ThefreshTokensCallback
will now have the correct type.Updated payments service to reflect v1.2.0 payments REST API
createProxyClient
is a new way to initialize the SDK using a proxy service.
Changed
Comment
interface.
Document
interface now accepts an optional second parameter for the status property of the document. See PR #461Refactor of
userId
getter on thesdk.raw
instance. It now works consistently everywhere (browser/node/react-native). See PR #462Added
findAll
andfindAllIterator
to notifications. Thefind
method is also update to have pagination helpers PR #475
[v5.1.0]
Added
oauth1/ssoTokens/generate
andoauth1/ssoTokens/consume
are added under thesdk.auth.oauth1
scope. More info
Changes
Calls not needing authentication are now correctly skipping this
[v5.0.0]
Breaking Changes
The payments services has had some refactoring.
Added
parseGlobalPermissions
is a function to parse strings are return valid permissions
Changed
userId
getter on theOAuthClient
interface now returns aPromise<string>
in stead ofstring
. You can access this onsdk.raw.userId
[v4.5.0]
Added
services that have a
findAll
method now also havefindAllIterator
.
sdk.data.schemas
,sdk.data.documents
andsdk.data.users
have had changes to theirfind
function. This now returns the current value with two added functionsnext()
andprevious()
which can be used to easily traverse the data.
rqlParser accepts a regular string which will be checked using the parser function and returns a valid RQLString.
Changes
added
endTimestamp
to list of fieldnames that are parsed at DaterqlBuilder now supports the
excludes
operatorseveral examples had updates to reflect proper usage
[v4.4.0]
Changes
Fixed
sdk.files.create
options types. See #352
JSDoc for
rqlBuilder().contains
. See #351GET requests returning a 500 status will be retried 4 more times at 300ms intervals. To disable this behaviour add
shouldRetry: false
to the options parameter. See #373findAll
function added on users and data.documents. See #333
[v4.3.0]
Changes
OAuth2
authenticate
returnstokenData
.OAuth2
authenticate
can now be used with an authorization code. See Docs.OAuth2 supports confidentials applications.
[v4.2.1]
Changes
removed console.log in
sdk.data.documents.find
function
[v4.2.0]
Added
Fixed documentation tables
OAuth1
authenticate
returnstokenData
Updated documentation on SSL pinning
Add
logout
function tosdk.auth
Updated installation instructions
Add
findAll
tosdk.data.schemas
Client creation allows for extra headers which will be set on every call.
Functions now accept options to set custom headers
[v4.1.0]
Added
Added missing permissions
Added findFirst method in users service
Changes
Fixed bug to show a clear error when the user is not authenticated
Fixed documentation format
Updated README installation
[v4.0.0]
Breaking Changes
Updated rql parameter type. Is always
rql: RQLString
now. Functions affected:sdk.payments.orders.addTagsToOrder
sdk.payments.orders.removeTagsFromOrder
sdk.payments.products.removeTagsFromProduct
Updated parameter position if rql is a required parameter, it is always the first parameter. Functions affected
sdk.users.groupRoles.remove
sdk.users.groupRoles.removePermissions
sdk.users.groupRoles.removeFromStaff
sdk.users.groupRoles.removeUsersFromStaff
Renamed all methods from
delete
toremove
and all of them returningAffectedRecords
Renamed all methods from
deleteFields
toremoveFields
[3.2.0]
Added
Localizations Service
Profiles Service
Notifications Service
optional
skipTokenCheck
parameter to Oauth1 authentication flow with token/tokenSecret.Events Service
Changes
Fixed return types of
sdk.users.getStaff
andsdk.users.getPatients
Updated docs links
updateProfileImage
method is deprecatedGzip option
sdk.data.documents.create
[3.1.0]
Breaking Changes
sdk.files.create
signature has changed.
Custom Document no longer need to extend from DocumentBase. You can just pass in the type for
data
Added
sdk.files.createFromText
where you can pass in your text directly.
Added
transitionsByName
getter to easily get the transition you need.
Added
findTransitionIdByName
function onschema
objects to easily find the transitionId you need.
Added
findById
,findByName
andfindFirst
helpers to services having a genericfind
function.Payments Service
Added
or
,and
andcontains
operators to the RQL builder.
[3.0.2]
Breaking Changes
apiHost
has been renamed tohost
and should not include the protocol orapi
subdomain. Example `
client
is renamed tocreateClient
rawAxios
is renamed toraw
Added
createOAuth1Client
andcreateOAuth2Client
are now exported as more specifically typed versions ofcreateClient
Additional http header is added with every request. Which includes the package version and when running in node the node version.
Added Test Reports
getMockSdk
function to get back a mocked SDK. See README for more info
Changes
Templates
resolveAsPdf
will return aBuffer
sdk.authenticate
now includes possible error responses in the JSDoc annotationsrqlBuilder
now has JSDoc annotationsFix for results with arrays containing strings
File creation now correctly set the file name on the form-data. Accepts extra parameter
extension
which defaults topdf
The MailsService now correctly decamelizes the keys in the request
[3.0.1]
Changes
Templates basepath fix
[3.0.0]
Breaking Changes
Services scoping:
Added
Configurations Service
Dispatchers Service
Mails Service
Templates Service
Changes
Types are now exposed within modules, so the usage will be:
Error now not only extend from the
ApiError
class but also from their respective HTTP error code error. Possible errors are400:
BadRequestError
401:
UnauthorizedError
403:
ForbiddenError
404:
NotFoundError
500:
ServerError
PagedResults are now using generics
Every merge into dev will create a tag and package with the current version number suffixed with
-dev.X
where X auto-incrementsRemoved
* @throws {ApiError}
in JSDoc comments, only specific errors are mentioned when mentioned in the Swagger documentation
[2.0.0] - 2021-05-12
Breaking changes
ClientId for OAuth2 and consumerkey/secret for Oauth1 are now passed in during client initialization in stead of authentication. This way on not authenicated calls the clientId and consumerkey/secret information is added to the requests.
OAuth2
OAuth1
Changes
Removed
query
from list resultsPartialUserData
is renamed toUser
Changes to the
UserData
interfacelanguage
type is changed fromstring
toLanguageCode
timeZone
type is changed fromstring
toTimeZone
lastFailedTimestamp
type is changed fromnumber
toDate
added
creationTimestamp
andupdateTimestamp
Change to the
RegisterUserData
interfacephoneNumber
is now required
[1.0.1] - 2021-05-05
Changes
Correctly exporting all the possible errors.
[1.0.0] - 2021-05-05
Breaking changes
Optional paramaters are now grouped in an options object as last parameters.
Added
The Axios instance used by the SDK is now directly accessible
Data Service now includes:
Transitions Service
Documents Service
Comments Service
You can pass in your own interface when calling the
sdk.data.findDocuments<CustomDocument>(schemaId);
endpointThe SDK also expose JSON-schema interface you can use to compose your own
Changes
OAuth1 token/tokenSecret flow is implemented.
Functions expecting an RQL should now show a more clear error when passing in a regular string.
[0.0.7] - 2021-04-28
Breaking changes
The authenticate
and confirmMfa
methods have been scoped under the auth
namespace.
Certains methods under the users
namespace have had their name changed.
Removed debug
option. Use responseLogger
and requestLogger
options in stead. See README for example.
Added
Tasks Service
Data Service now includes:
Schemas Service
Properties Service
Statuses Service
Indexes Service
[0.0.6] - 2021-04-21
Breaking changes
Client initialization is changed. For example if you want to use the OAuth2 password flow, you no longer pass in the credentials as oauth
property in the client. But you have to call the authenticate
function. See README for other flows.
Added
Multi-factor authentication via (authenticate / confirmMfa functions).
freshTokensCallback
option when creating the client. Pass in a function to retrieve the response when new tokens are received.OAuth2 Refresh Token Grant flow.
files
service.data
service: only to create a schema at the moment.
Changes
Functions that accept an RQL parameter no longer accepts regular string, but expect the output of and rqlBuilder -> build().
ApiError
now extends the built-inError
.Some functions allowed empty
requestBody
which was incorrect in some cases, these have been fixed as well.
Last updated