Skip to content

Releases: widesky/jswidesky-client

3.1.1 Patch Release

03 Jun 03:48
Compare
Choose a tag to compare

The following changes have been made to the library:

Changed

  • The http option keepAlive will now default to true if it is not specified.

Fixed

  • WideSkyClient.batch.updateOrCreate errored with list type tags.

3.1.0 Minor Release

23 May 04:56
Compare
Choose a tag to compare

The following changes have been made to the library:

ADDED

3.0.1 - NPM Patch Release

20 Mar 23:49
Compare
Choose a tag to compare

No changes have been made. The package was released with a new tag 3.0.1 as NPM does not allow package versions to be
duplicated, even in the case where a package's version was unpublished. This is documented in npm Unpublish Policy - Considerations.

3.0.0 - Major Release (BREAKING CHANGE)

20 Mar 23:48
Compare
Choose a tag to compare

Note: The v3.0.0 package for @widesky/jswidesky-client does not exist in NPM as it was unpublished. Please use v3.0.1 or later instead.

The following changes have been made to the library, that includes a breaking change:

Fixed

  • Fixed minified file error "Invalid or expected token".

Changed

  • BREAKING CHANGE: Changed minified file name from "wideskyClient.min.js" to "jsWideSky.min.js".
  • BREAKING CHANGE: Changed default export name of minified file from wideskyClient (assuming this was set as a default
    when not specified in the webpack configuration) to JsWideSky.

2.1.5 Patch Release

13 Mar 02:12
Compare
Choose a tag to compare

The following changes have been made to the library:

CHANGED

  • getWatchSocket function now accounts for subpath in URL when retrieving a socket connection.

2.1.4 Patch Release

31 Jan 05:59
Compare
Choose a tag to compare

The following changes have been made to the library:

CHANGED

  • Changed the error message produced when more than 1 GraphQL error is encountered. Previously, all that was logged
    was "More than 1 error encountered" which is too vague. This has been changed to "More than 1 GraphQLError
    encountered" with additional logs detailing each GraphQL error encountered as " @ locations/s ...".

2.1.3 Hotfix Release

31 Jan 01:07
Compare
Choose a tag to compare

The following changes have been made to the library:

FIXED

  • Added utility class EntityCriteria to package exports.

2.1.2 Hotfix Release

19 Jan 05:16
Compare
Choose a tag to compare

The following changes have been made to the library:

FIXED

  • Fixed bug TypeError: Cannot read properties of undefined (reading '0') when using WideSkyClient.batch.hisWrite.

CHANGED

  • Added empty payload check.

ADDED

  • Size property to HisWritePayload to get the number of rows currently added to the payload.

2.1.1 Hotfix Release

08 Dec 00:57
Compare
Choose a tag to compare

The following changes have been made to the library:

FIXED

  • Fixed getWatchSocket function returning an invalid socket due to a missing namespace URL.

2.1.0 Major Release

24 Nov 03:40
Compare
Choose a tag to compare

The following changes have been made to the library:

Added

  • Added Haystack utility functions for ease of use. These include:
    • removePrefix(value): Remove the Haystack prefix from the given String value if applied.
    • getId(entity, tag): Get a UUID from the entity, or the Haystack reference tag is specified.
    • getReadableName(entity): Get the fqname or id tag of the entity.
  • Added new argument options to WideSkyClient constructor to accept configurations for the underlying axios client
    instance and WideSky client batch operations. The options argument is expected to have the following structure as
    defined in Client Options.
  • Added a new static function make to create a WideSkyClient instance from a configuration Object. The Object can
    have the following options:
    • serverURL: The URL to the WideSky API server (required).
    • username: The username for a WideSky user (required).
    • password: The password the above WideSky username (required).
    • clientId: The Client ID for OAuth 2.0 authentication (required).
    • clientSecret: The Client secret for OAuth 2.0 authentication (required).
    • accessToken: A valid WideSky access token for OAuth 2.0 authentication (optional).
    • options: An Object containing attributes axios and client for configuring the axios and WideSky client
      respectively. The options argument is expected to have the following structure as defined in
      Client Options.
    • logger: This can be one of:
      • Empty, meaning a default Bunyan logger is used.
      • Object, for which a Bunyan instance will be created with:
        • name: Name of logging instance.
        • level: Bunyan logging level to shows logs higher than
        • raw: If true, output in JSON format. If false, output in prettified Bunyan logging format.
      • Bunyan logging instance
  • Added new set of functions under property v2 of the WideSkyClient instance. v2 consists of client functions:
    • find: Same functionality as the existing WideSkyClient.find but returns only the rows.
  • Added new class HisWritePayload to more easily create payloads suitable for the hisWrite function.
  • Added new function performOpInBatch to perform client operations in a batched and parallel manner. Will be used
    as the basis for all new batch functions added.
  • Add new batch functions:
    • client.batch.hisWrite(payload, options)
    • client.batch.hisRead(ids, from, to, options)
    • client.batch.hisDelete(ids, start, end, options)
    • client.batch.create(entities, options)
    • client.batch.update(entities, options)
    • client.batch.deleteById(ids, options)
    • client.batch.deleteByFilter(filter, limit, options)
    • client.batch.hisReadByFilter(filter, from, to, options)
    • client.batch.updateByFilter(filter, criteriaList, options)
    • client.batch.hisDeleteByFilter(filter, start, end, options)
    • client.batch.migrateHistory(fromEntity, toEntity)
    • client.batch.addChildrenByFilter(filter, children, tagMap)
    • client.batch.multiFind(filterAndLimits, options)
    • client.batch.updateOrCreate(entities, options)
  • Added new utility class EntityCriteria to be used with client.batch.updateByFilter.
  • Added new function entityCount(filter) to get the number of entities from a filter via a GraphQL query.
  • Added new function findAsId(filter, limit) to optimise functions that only require the ids of the entity,
    normally discarding any other information that would be returned from client.find.

Changed

  • Client no longer throws a Axios error if a response has been received and response is a Haystack of GraphQL error.
    Instead, the error found in the response as received from a WideSky API server is used as the error message.
    This has been changed as the WideSky API server already created good responses to request errors and changes should
    only be in API server.