@staffbase/widget-sdk 3.3.4 → 3.4.0-beta.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/CHANGELOG.md +5 -29
- package/lib/widget-api-types.ts +14 -0
- package/lib/widget-api.ts +11 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,39 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
# [3.4.0-beta.4](https://github.com/Staffbase/widget-sdk/compare/3.4.0-beta.3...3.4.0-beta.4) (2021-11-23)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
5
|
-
|
|
6
|
-
* fix peer dependency ([13d1cba](https://github.com/Staffbase/widget-sdk/commit/13d1cba452d46a165b88d233412fc0ef54585aa8))
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Build System
|
|
10
|
-
|
|
11
|
-
* **deps:** npm audit fix ([6e7a417](https://github.com/Staffbase/widget-sdk/commit/6e7a417b42a86845528f605ae18bbff448d5f77f))
|
|
12
|
-
* **deps:** npm audit fix ([4bade01](https://github.com/Staffbase/widget-sdk/commit/4bade0131d073e9859dbbb8cc6862035fef9493f))
|
|
13
|
-
* **deps:** npm audit fix ([89951f4](https://github.com/Staffbase/widget-sdk/commit/89951f4aa7db18babc21918bab37a6da10d330b9))
|
|
14
|
-
* **deps:** npm audit fix ([330760c](https://github.com/Staffbase/widget-sdk/commit/330760cb4971042d132a93700fedecff16cde89b))
|
|
15
|
-
* **deps:** npm audit fix ([856ca6b](https://github.com/Staffbase/widget-sdk/commit/856ca6b503229bae8ebf841b0637868515f3367e))
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Chores
|
|
4
|
+
### Documentation
|
|
19
5
|
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* exchange token vars ([80bebb5](https://github.com/Staffbase/widget-sdk/commit/80bebb5825c5f7d410f3bc2d1493d492d757a2e4))
|
|
23
|
-
* remove unneeded env vars ([c368fde](https://github.com/Staffbase/widget-sdk/commit/c368fdee2473b0ff7fa8b54464740200718370bd))
|
|
24
|
-
* remove unneeded env vars ([a823c98](https://github.com/Staffbase/widget-sdk/commit/a823c98a51a5d9b928ce857d36e5ced7f8e10d98))
|
|
25
|
-
* remove yarn ([5fb934f](https://github.com/Staffbase/widget-sdk/commit/5fb934f3aadc7eef2aea60a31b6b812335483b8f))
|
|
26
|
-
* removed unneeded env var ([52960df](https://github.com/Staffbase/widget-sdk/commit/52960dfef49d00432ebc00a3f84a3a902aaefc6f))
|
|
27
|
-
* update dependencies ([d9a807b](https://github.com/Staffbase/widget-sdk/commit/d9a807b5da9f13f7b811df673a2290040557ca72))
|
|
28
|
-
* **deps:** bump semver-regex from 3.1.2 to 3.1.3 ([#28](https://github.com/Staffbase/widget-sdk/issues/28)) ([05dc6db](https://github.com/Staffbase/widget-sdk/commit/05dc6dbdbd3c4743768fc612f994522c42459264))
|
|
6
|
+
* change description ([a11bc08](https://github.com/Staffbase/widget-sdk/commit/a11bc085308f903501a4f97e8e7f755b0d3c8a32))
|
|
7
|
+
* fix typo ([5bca2d1](https://github.com/Staffbase/widget-sdk/commit/5bca2d1b092cb0f86e8413904ff767042e529aed))
|
|
29
8
|
|
|
30
9
|
|
|
31
10
|
### Miscellaneous
|
|
32
11
|
|
|
33
|
-
*
|
|
34
|
-
* Set env variable ([9da7ec4](https://github.com/Staffbase/widget-sdk/commit/9da7ec4f026efb52beb920f0c5791ab7e201ab9c))
|
|
35
|
-
* Add env variable ([f0e5b1f](https://github.com/Staffbase/widget-sdk/commit/f0e5b1fdd07fd2f04ce3008c8b82260c27acd967))
|
|
36
|
-
* ([1622de1](https://github.com/Staffbase/widget-sdk/commit/1622de1c0741fe438e7efa7d706cb1c9c94d12ee))
|
|
12
|
+
* Merge branch 'NFS-1519-add-integrations' into beta ([2b582e6](https://github.com/Staffbase/widget-sdk/commit/2b582e6e865be38d3a248cd1311f6783a101f870))
|
|
37
13
|
|
|
38
14
|
## [3.3.3](https://github.com/Staffbase/widget-sdk/compare/3.3.2...3.3.3) (2021-09-01)
|
|
39
15
|
|
package/lib/widget-api-types.ts
CHANGED
|
@@ -184,3 +184,17 @@ export interface UserListResponse {
|
|
|
184
184
|
limit: number;
|
|
185
185
|
total: number;
|
|
186
186
|
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
export type IntegrationType = "ms365"
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Integration Token including the expiration time
|
|
193
|
+
*/
|
|
194
|
+
export interface IntegrationToken {
|
|
195
|
+
// the token to access the api of the integration
|
|
196
|
+
accessToken: string;
|
|
197
|
+
|
|
198
|
+
// date when the access token expires
|
|
199
|
+
accessTokenExpiresAt?: Date;
|
|
200
|
+
}
|
package/lib/widget-api.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* limitations under the License.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { ColorTheme, SBUserProfile, UserListRequestQuery, UserListResponse } from './widget-api-types';
|
|
14
|
+
import { ColorTheme, IntegrationToken, IntegrationType, SBUserProfile, UserListRequestQuery, UserListResponse } from './widget-api-types';
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -55,4 +55,14 @@ export interface WidgetApi {
|
|
|
55
55
|
*/
|
|
56
56
|
getUserList(query: UserListRequestQuery): Promise<UserListResponse>;
|
|
57
57
|
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Call to retrieve a valid token to access the Microsoft API. Includes a time value to
|
|
61
|
+
* refresh the token.
|
|
62
|
+
*
|
|
63
|
+
* @param type The name of the integration. ("ms365")
|
|
64
|
+
* @returns A promise containing the IntegrationToken is returned. If the user session is
|
|
65
|
+
* not existing, null is returned. In case of an error, the promise is rejected.
|
|
66
|
+
*/
|
|
67
|
+
getIntegration(type: IntegrationType): Promise<IntegrationToken | null>;
|
|
58
68
|
}
|