- Update package urls to point to new repo
- Use new GitHub Action to handle release tagging
- Move repo to https://github.com/procore-oss/js-sdk
- Update package.json dependencies to latest versions
- via dependabot PRs
- Explicitly mention we support node 14, 16, 17, 18, 19, 20, 21 but emphasize latest LTS version
- Setup repository standards (CODE_OF_CONDUCT.md, SECURITY.md, CONTRIBUTING.md)
- Move tests to GitHub Actions
- Update badges in README.md
- Add check for all PR commits to be signed to meet our DCO requirement
- Update codes to be consistent of API hostname
api.procore.com
- Improve Csrf Class (No change in functionality)
- Update package.json dependencies
- Readme Improvement
- Fix Csrf Class
- Require Node >= 14.15.0 (First LTS version of this version)
- Update package.json dependencies
Upgrade to NodeJs 14.15.0 or higher.
- Add support for adding
Procore-Company-Id
request header whendefaultCompanyId
is passed inClientOptions
. - Add support for adding
Procore-Company-Id
request header whencompanyId
is passed inRequestConfig
. - Add support for customer headers.
- Adds support for Rest API versioning (rest/v1.0 is)
- Remove
ramda
dependency - Remove
string
dependency - Remove
@procore/js-sdk-endpoints
dependency - Add support for revoking token
revoke()
- Add
Procore-Sdk-Version
header to all requests - Add
Procore-Sdk-Language
header to all requests - Updated
destroy
method todelete
method
- Remove
/vapid
from base attribute passed toclient.<method>
functions. Versioning will be handled in theclient.<method>
function. See the Upgrading section for details about how to upgrade to version 3.0.1. destroy
method is no longer supported. Convert alldestroy
requests todelete
.
As of v3.0.1, this npm package now defaults to making requests against Procore's new
/rest/v1.0
namespace, instead of the now deprecated /vapid
namespace.
Previous Version Usage
// In Previous Version
const procore = client(authorizer);
const { body } = await procore.get({
base: '/vapid/drawing_areas/{drawing_area_id}/drawings',
params: { drawing_area_id: 42 }
});
// app.procore.com/vapid/drawing_areas/42/drawings
v3.0.1 Version Usage
const procore = client(authorizer);
// Default version is v1.0
const { body } = await procore.get({
base: '/drawing_areas/{drawing_area_id}/drawings',
params: { drawing_area_id: 42 }
});
// app.procore.com/rest/v1.0/drawing_areas/42/drawings
// Override default version
const { body } = await procore.get({
base: '/drawing_areas/{drawing_area_id}/drawings',
params: { drawing_area_id: 42 },
version: 'v1.1' });
// app.procore.com/rest/v1.1/drawing_areas/42/drawings
// Override default version with legacy version
const { body } = await procore.get({
base: '/drawing_areas/{drawing_area_id}/drawings',
params: { drawing_area_id: 42 },
version: 'vapid' });
// app.procore.com/vapid/drawing_areas/42/drawings
To keep the legacy behavior, set the new defaultVersion
configuration option when
creating the client
.
const procore = client(authorizer, undefined, { defaultVersion: 'vapid' });
Note, that Rest v1.0 is a superset of the Vapid Api - there are no breaking changes.
All the request methods (get
, post
, put
, patch
, delete
) now
accept an optional version
attribute to specify the version at request time.
destroy
method is no longer supported. Convert all destroy
requests to delete
.
- deps:
"@procore/js-sdk-endpoints": "1.9.2"
adds types from fixing bad URL generation