@cobaltio/cobalt-js 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -41,5 +41,5 @@ const cobalt = new Cobalt({
41
41
  // initialize without token
42
42
  const cobalt = new Cobalt();
43
43
  // the token you generate for linked accounts using the cobalt backend SDK
44
- cobalt.token("COBALT_SESSION_TOKEN");
44
+ cobalt.token = "COBALT_SESSION_TOKEN";
45
45
  ```
package/cobalt.js CHANGED
@@ -10,7 +10,7 @@ class Cobalt {
10
10
  */
11
11
  constructor(options) {
12
12
  this.apiBaseUrl = options?.baseUrl || "https://api.gocobalt.io";
13
- this.token(options?.token);
13
+ this.token = options?.token;
14
14
  }
15
15
 
16
16
  /**
package/cobalt.min.js CHANGED
@@ -1 +1 @@
1
- class Cobalt{constructor(options){this.apiBaseUrl=options?.baseUrl||"https://api.gocobalt.io";this.token(options?.token)}get token(){return this.sessionToken}set token(token){return this.sessionToken=typeof token==="string"?token:""}get baseUrl(){return this.apiBaseUrl}async installTemplate(templateId){const res=await fetch(`${this.baseUrl}/api/v1/template/install/${templateId}`,{method:"POST",headers:{authorization:`Bearer ${this.token}`}});return await res.json()}async saveNode(workflowId,nodeId,inputData={}){const res=await fetch(`${this.baseUrl}/api/v2/workflow/${workflowId}/node/${nodeId}`,{method:"PUT",headers:{authorization:`Bearer ${this.token}`},body:JSON.stringify({input_data:inputData})});return await res.json()}}module.exports=Cobalt;
1
+ class Cobalt{constructor(options){this.apiBaseUrl=options?.baseUrl||"https://api.gocobalt.io";this.token=options?.token}get token(){return this.sessionToken}set token(token){return this.sessionToken=typeof token==="string"?token:""}get baseUrl(){return this.apiBaseUrl}async installTemplate(templateId){const res=await fetch(`${this.baseUrl}/api/v1/template/install/${templateId}`,{method:"POST",headers:{authorization:`Bearer ${this.token}`}});return await res.json()}async saveNode(workflowId,nodeId,inputData={}){const res=await fetch(`${this.baseUrl}/api/v2/workflow/${workflowId}/node/${nodeId}`,{method:"PUT",headers:{authorization:`Bearer ${this.token}`},body:JSON.stringify({input_data:inputData})});return await res.json()}}module.exports=Cobalt;
package/docs/Cobalt.html CHANGED
@@ -864,7 +864,7 @@
864
864
  <br class="clear">
865
865
 
866
866
  <footer>
867
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 12:11:23 GMT+0530 (India Standard Time)
867
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 13:14:31 GMT+0530 (India Standard Time)
868
868
  </footer>
869
869
 
870
870
  <script> prettyPrint(); </script>
@@ -38,7 +38,7 @@ class Cobalt {
38
38
  */
39
39
  constructor(options) {
40
40
  this.apiBaseUrl = options?.baseUrl || "https://api.gocobalt.io";
41
- this.token(options?.token);
41
+ this.token = options?.token;
42
42
  }
43
43
 
44
44
  /**
@@ -137,7 +137,7 @@ module.exports = Cobalt;
137
137
  <br class="clear">
138
138
 
139
139
  <footer>
140
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 12:11:23 GMT+0530 (India Standard Time)
140
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 13:14:31 GMT+0530 (India Standard Time)
141
141
  </footer>
142
142
 
143
143
  <script> prettyPrint(); </script>
package/docs/global.html CHANGED
@@ -653,7 +653,7 @@
653
653
  <br class="clear">
654
654
 
655
655
  <footer>
656
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 12:11:23 GMT+0530 (India Standard Time)
656
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 13:14:31 GMT+0530 (India Standard Time)
657
657
  </footer>
658
658
 
659
659
  <script> prettyPrint(); </script>
package/docs/index.html CHANGED
@@ -73,7 +73,7 @@ const cobalt = new Cobalt({
73
73
  // initialize without token
74
74
  const cobalt = new Cobalt();
75
75
  // the token you generate for linked accounts using the cobalt backend SDK
76
- cobalt.token(&quot;COBALT_SESSION_TOKEN&quot;);
76
+ cobalt.token = &quot;COBALT_SESSION_TOKEN&quot;;
77
77
  </code></pre></article>
78
78
  </section>
79
79
 
@@ -91,7 +91,7 @@ cobalt.token(&quot;COBALT_SESSION_TOKEN&quot;);
91
91
  <br class="clear">
92
92
 
93
93
  <footer>
94
- Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 12:11:23 GMT+0530 (India Standard Time)
94
+ Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 13:14:31 GMT+0530 (India Standard Time)
95
95
  </footer>
96
96
 
97
97
  <script> prettyPrint(); </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobaltio/cobalt-js",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Cobalt frontend SDK",
5
5
  "main": "./cobalt.js",
6
6
  "scripts": {