Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

helloworks-sdk

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

helloworks-sdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Change Log

## [1.0.2](https://github.com/hellosign/helloworks-nodejs-sdk/compare/v1.0.1...v1.0.2) (2019-03-19)
## [1.0.1](https://github.com/hellosign/helloworks-nodejs-sdk/compare/v1.0.0...v1.0.1) (2019-03-13)

@@ -7,0 +11,0 @@

@@ -0,1 +1,17 @@

/**
* Copyright 2019 HelloSign
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = require('./lib/helloworks');

@@ -0,1 +1,17 @@

/**
* Copyright 2019 HelloSign
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const pkg = require('../../package.json');

@@ -2,0 +18,0 @@

52

lib/helloworks.test.js

@@ -1,3 +0,19 @@

/* global client testApiKeyId testApiKeySecret testWorkflowId testCompletedInstanceId */
/**
* Copyright 2019 HelloSign
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* global client wait testApiKeyId testApiKeySecret testWorkflowId testCompletedInstanceId */
let instanceId;

@@ -116,9 +132,12 @@

return expect(
client.workflowInstances.cancelInstance({
instanceId,
}).then(() => {
return client.workflowInstances.getInstance({
instanceId,
});
}),
client.workflowInstances.cancelInstance({ instanceId })
// Wait 2.5s before fetching the instance to
// help prevent race conditions with the
// HelloWorks server.
.then(() => wait(2500))
.then(() => {
return client.workflowInstances.getInstance({
instanceId,
});
}),
).resolves.toMatchObject({

@@ -229,9 +248,12 @@ id: instanceId,

return expect(
client.workflowInstances.cancelInstance({
instanceId,
}).then(() => {
return client.workflowInstances.cancelInstance({
instanceId,
});
}),
client.workflowInstances.cancelInstance({ instanceId })
// Wait 2.5s before fetching the instance to
// help prevent race conditions with the
// HelloWorks server.
.then(() => wait(2500))
.then(() => {
return client.workflowInstances.cancelInstance({
instanceId,
});
}),
).rejects.toThrow('Workflow instance has been cancelled');

@@ -238,0 +260,0 @@ });

{
"name": "helloworks-sdk",
"version": "1.0.1",
"version": "1.0.2",
"description": "A Node.js SDK for easily creating and managing HelloWorks workflow instances.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,2 @@ # HelloWorks Node.js SDK

[![Npm version][badge_npm-version]][external_npm]
[![Npm downloads][badge_npm-downloads]][external_npm]
[![Travis][badge_travis]][external_travis]

@@ -27,13 +26,13 @@ [![David][badge_david]][external_david]

const client = new HelloWorks({
apiKeyId: 'Your API key ID',
apiKeySecret: 'Your API key secret'
apiKeyId,
apiKeySecret,
});
```
Use the client to easily make HelloWorks API requests without the overhead of handling responses and managing authorization tokens.
Use the client to easily make HelloWorks API requests without the overhead of handling responses and managing JWT authorization.
```js
client.workflowInstances.getInstance({
instanceId: 'Your instance ID'
}).then((instance) => {
instanceId,
}).then((instanceObj) => {
// ...

@@ -45,3 +44,5 @@ });

**Note:** It should go without saying that this library must **never be used on the client side** of your application. The HelloWorks Node.js SDK relies on sensitive API keys and by using it on the public-facing frontend codebase you will risk dangerously exposing your API key secret, which will make you vulnerable to impersonation attacks.
## Resources

@@ -66,3 +67,2 @@

[badge_npm-version]: https://img.shields.io/npm/v/helloworks-sdk.svg
[badge_npm-downloads]: https://img.shields.io/npm/dm/helloworks-sdk.svg
[badge_david]: https://img.shields.io/david/hellosign/helloworks-nodejs-sdk.svg

@@ -69,0 +69,0 @@ [badge_travis]: https://img.shields.io/travis/hellosign/helloworks-nodejs-sdk/master.svg

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc