Skip to content

Releases: Workfront/workfront-api

v8.1.1

03 Jun 09:51
Compare
Choose a tag to compare
  • Fixed broken Node package
  • Upgrade dependencies

Upgrade to tslib v2

17 May 13:08
Compare
Choose a tag to compare

Published a major version as tslib dependency got a major version update.

  • Merge pull request #725 from Workfront/renovate/tslib-2.x 51c8012
  • Update dependency tslib to v2 f6dcdc7
  • Merge pull request #724 from Workfront/renovate/typescript-3.x 436fe3f
  • Update dependency typescript to v3.9.2 56f17c3

v7.0.2...v8.0.0

v7.0.2

15 May 12:07
Compare
Choose a tag to compare
  • Merge pull request #723 from Workfront/fix-api-typings-resolution e035ab9
  • fix: wrong typings path 3a9cc75

v7.0.1...v7.0.2

Fix CommonJS bundle broken in v7.0.0

12 May 23:16
Compare
Choose a tag to compare

WHAT CHANGED

  • fix: cjs bundle was broken 0cc423e
  • Merge branch 'master' of github.com:Workfront/workfront-api c964c57
  • Merge pull request #722 from Workfront/renovate/conventional-changelog-cli-2.0.x a95d9f9
  • Update dependency conventional-changelog-cli to v2.0.34 86c5109
  • Merge pull request #689 from Workfront/renovate/karma-sauce-launcher-4.x 1062b59
  • Update dependency karma-sauce-launcher to v4 6e4b755
  • Merge pull request #721 from Workfront/renovate/karma-5.0.x 3fbbc09
  • Update dependency karma to v5.0.5 3ed05fa

v7.0.0...v7.0.1

Drop Node 8 support

07 May 13:09
Compare
Choose a tag to compare

Starting from this version Node 8 is no longer officially supported.

WHAT CHANGED

  1. Package now has sideEffects: true in package.json
  2. Rollup and its plugins were been updated to their latest versions
  3. We switched to Yarn
  4. ... and a bunch of dependency upgrades

BREAKING CHANGE

  1. Node 8 is no longer supported

v6.0.0

08 Feb 07:56
Compare
Choose a tag to compare

This version is merely reducing the bundle size for browsers.

WHAT CHANGED

We now use Rollup instead of Webpack for bundling the package. There are now three files in the dist.

  • workfront-api.cjs.js use in NodeJS environment.
  • workfront-api.es.js use in browser environment. Modules which have workfront-api dependency.
  • workfront-api.umd.js or workfront-api.umd.min.js use in browser environment by requesting the file via the <script> tag. One loaded into the browser, it creates a global variable Workfront.

BREAKING CHANGE

  • Entry points have changed. This will affect UMD consumers. Now the file name is workfront-api.umd.js and workfront-api.umd.min.js respectfully.
  • For Node users, the api class name has been changed to NodeApi. This is to prevent typing ambiguities.

i.e.

const Workfront = require('workfront-api')
const api = new Workfront.NodeApi({/*...*/})

Batching calls

03 Jun 20:07
Compare
Choose a tag to compare

Features

  • Added batch() method for sending multiple queries in a single network call.

Info

The batch() method has a single argument - URI collector function. URI collector function should return an array of URIs which should be executed in a single network call by batch().
In order to simplify creation of URIs, URI collector function passed to the batch() method receives a special instance of Api, implementing IBatchApi interface. Almost all functions from Api are available in IBatchApi, with the same signatures as in Api but with one difference - all of them return a string.

Usage

// Let's `api` to be an Api instance
api.batch(batchApi => {
    // we should return an array of URIs (path + query portion)
    return [
        // we can directly write `/USER/count`, but we can use a familiar api instead
        batchApi.count('USER'),

        // URI to get metadata for TASK object
        batchApi.metadata('TASK', ['fields']),

        // another URI
        batchApi.metadata('PROJ', ['collections'])
    ]
})

Metadata fields

31 May 08:08
Compare
Choose a tag to compare

Features

  • Added second parameter to metadata() method.
    Parameter name is fields and it can be used if you want some of fields from metadata result.

X-XSRF-TOKEN

20 Feb 07:51
Compare
Choose a tag to compare

With this release we implemented XSRF-TOKEN to prevent Cross-Site Request Forgery (CSRF)

Features

  • Add new setXSRFToken method which is then used in the request headers.

v4.5.0

29 Dec 07:11
Compare
Choose a tag to compare

New

  • A new api method editMultiple to edit multiple object in one request.
api.editMultiple('TASK', [
   {ID: 'fooID', name: 'foo'},
   {ID: 'barID', name: 'bar'},
   {ID: 'bazID', name: 'baz'}
]);