@cobaltio/cobalt-js 0.0.16 → 0.0.17

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.
Files changed (3) hide show
  1. package/README.md +15 -0
  2. package/cobalt.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -88,6 +88,7 @@ Cobalt Frontend SDK
88
88
  * [.installTemplate()](#Cobalt+installTemplate) ⇒ [<code>Promise.&lt;Workflow&gt;</code>](#Workflow)
89
89
  * [.getAppAuthStatus()](#Cobalt+getAppAuthStatus) ⇒ <code>Promise.&lt;boolean&gt;</code>
90
90
  * [.getAppAuthUrl()](#Cobalt+getAppAuthUrl) ⇒ <code>Promise.&lt;string&gt;</code>
91
+ * [.setAppAuthData()](#Cobalt+setAppAuthData) ⇒ <code>Promise.&lt;void&gt;</code>
91
92
  * [.removeAppAuth()](#Cobalt+removeAppAuth) ⇒ <code>Promise.&lt;void&gt;</code>
92
93
  * [.getNodeConfiguration()](#Cobalt+getNodeConfiguration) ⇒ <code>Promise.&lt;Array.&lt;Field&gt;&gt;</code>
93
94
  * [.saveNode()](#Cobalt+saveNode) ⇒ [<code>Promise.&lt;Workflow&gt;</code>](#Workflow)
@@ -163,6 +164,20 @@ specified application.
163
164
  | --- | --- | --- |
164
165
  | application | <code>string</code> | The application type. |
165
166
 
167
+ <a name="Cobalt+setAppAuthData"></a>
168
+
169
+ ### cobalt.setAppAuthData() ⇒ <code>Promise.&lt;void&gt;</code>
170
+ Save the auth data that user provides to authenticate themselves to the
171
+ specified application.
172
+
173
+ **Kind**: instance method of [<code>Cobalt</code>](#Cobalt)
174
+ **Properties**
175
+
176
+ | Name | Type | Description |
177
+ | --- | --- | --- |
178
+ | application | <code>string</code> | The application type. |
179
+ | payload | <code>object</code> | The key value pairs of auth data. |
180
+
166
181
  <a name="Cobalt+removeAppAuth"></a>
167
182
 
168
183
  ### cobalt.removeAppAuth() ⇒ <code>Promise.&lt;void&gt;</code>
package/cobalt.js CHANGED
@@ -74,7 +74,7 @@ class Cobalt {
74
74
  authorization: `Bearer ${this.token}`,
75
75
  "content-type": "application/json",
76
76
  },
77
- body: JSON.stringify(udf),
77
+ body: JSON.stringify({ udf }),
78
78
  });
79
79
 
80
80
  if (res.status >= 400 && res.status < 600) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobaltio/cobalt-js",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Cobalt frontend SDK",
5
5
  "main": "./cobalt.js",
6
6
  "scripts": {