@cobaltio/cobalt-js 0.0.1 → 0.0.2

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/cobalt.js CHANGED
@@ -88,4 +88,4 @@ class Cobalt {
88
88
  }
89
89
  }
90
90
 
91
- export default Cobalt;
91
+ module.exports = Cobalt;
package/cobalt.min.js CHANGED
@@ -1 +1 @@
1
- class Cobalt{constructor(options){this.apiBaseUrl=options?.baseUrl||"https://api.gocobalt.io";this.template={}}get token(){return this.templateToken}set token(token){return this.templateToken=typeof token==="string"?token:""}get baseUrl(){return this.apiBaseUrl}async installTemplate(){const res=await fetch(`${this.baseUrl}/api/v1/template/install`,{method:"POST",headers:{authorization:`Bearer ${this.token}`}});this.template=await res.json();return this.template}async saveNode(nodeId,inputData={}){const res=await fetch(`${this.baseUrl}/api/v2/workflow/${this.template?.workflow_id}/node/${nodeId}`,{method:"PUT",headers:{authorization:`Bearer ${this.token}`},body:JSON.stringify({input_data:inputData})});return await res.json()}}export default Cobalt;
1
+ class Cobalt{constructor(options){this.apiBaseUrl=options?.baseUrl||"https://api.gocobalt.io";this.template={}}get token(){return this.templateToken}set token(token){return this.templateToken=typeof token==="string"?token:""}get baseUrl(){return this.apiBaseUrl}async installTemplate(){const res=await fetch(`${this.baseUrl}/api/v1/template/install`,{method:"POST",headers:{authorization:`Bearer ${this.token}`}});this.template=await res.json();return this.template}async saveNode(nodeId,inputData={}){const res=await fetch(`${this.baseUrl}/api/v2/workflow/${this.template?.workflow_id}/node/${nodeId}`,{method:"PUT",headers:{authorization:`Bearer ${this.token}`},body:JSON.stringify({input_data:inputData})});return await res.json()}}module.exports=Cobalt;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobaltio/cobalt-js",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Cobalt frontend SDK",
5
5
  "main": "./cobalt.js",
6
6
  "scripts": {