@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 +1 -1
- package/cobalt.js +1 -1
- package/cobalt.min.js +1 -1
- package/docs/Cobalt.html +1 -1
- package/docs/cobalt.js.html +2 -2
- package/docs/global.html +1 -1
- package/docs/index.html +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/cobalt.js
CHANGED
package/cobalt.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
class Cobalt{constructor(options){this.apiBaseUrl=options?.baseUrl||"https://api.gocobalt.io";this.token
|
|
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
|
|
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>
|
package/docs/cobalt.js.html
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
76
|
+
cobalt.token = "COBALT_SESSION_TOKEN";
|
|
77
77
|
</code></pre></article>
|
|
78
78
|
</section>
|
|
79
79
|
|
|
@@ -91,7 +91,7 @@ cobalt.token("COBALT_SESSION_TOKEN");
|
|
|
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
|
|
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>
|