@staffbase/widget-sdk 3.3.3 → 3.4.0-beta.3
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/.github/workflows/ci.yaml +0 -2
- package/.github/workflows/dependency-update.yml +24 -0
- package/CHANGELOG.md +95 -74
- package/lib/base-block.ts +9 -2
- package/lib/widget-api-types.ts +14 -0
- package/lib/widget-api.ts +11 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Dependency Update
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 12 * * 3" # every Wednesday at 12pm UTC
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
env:
|
|
9
|
+
NPM_TOKEN: ${{ secrets.STAFFBOT_NPM_TOKEN_PACKAGE_READ }}
|
|
10
|
+
GITHUB_TOKEN: ${{ secrets.STAFFBOT_GITHUB_TOKEN }}
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
npm-audit-fix:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v2
|
|
17
|
+
with:
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
- uses: Staffbase/npm-audit-fix-action@v3.3.0
|
|
20
|
+
with:
|
|
21
|
+
github_token: ${{ secrets.STAFFBOT_GITHUB_TOKEN }}
|
|
22
|
+
github_user: "Staffbot"
|
|
23
|
+
github_email: "staffbot@staffbase.com"
|
|
24
|
+
labels: "dependencies, javascript, security, dev"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
|
1
|
+
# [3.4.0-beta.3](https://github.com/Staffbase/widget-sdk/compare/3.4.0-beta.2...3.4.0-beta.3) (2021-11-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Documentation
|
|
5
|
+
|
|
6
|
+
* adds null return description ([888ef3c](https://github.com/Staffbase/widget-sdk/commit/888ef3c289715e6a6a4a66333dec4565360f77cc))
|
|
7
|
+
|
|
8
|
+
# [3.4.0-beta.2](https://github.com/Staffbase/widget-sdk/compare/3.4.0-beta.1...3.4.0-beta.2) (2021-11-23)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add null to return value ([c5a2069](https://github.com/Staffbase/widget-sdk/commit/c5a20696fad6fa9fb66be6bb3d3dbac7508c8640))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Miscellaneous
|
|
17
|
+
|
|
18
|
+
* Merge branch 'NFS-1519-add-integrations' into beta ([e48d347](https://github.com/Staffbase/widget-sdk/commit/e48d34745e8aa5be375674e1c4cf1c2b26813072))
|
|
19
|
+
|
|
20
|
+
# [3.4.0-beta.1](https://github.com/Staffbase/widget-sdk/compare/3.3.3...3.4.0-beta.1) (2021-11-23)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* change types to allow casting ([ebc524a](https://github.com/Staffbase/widget-sdk/commit/ebc524a1d4fbc64d4f688bca949c0cdefb476185))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Build System
|
|
29
|
+
|
|
30
|
+
* **deps:** npm audit fix ([89951f4](https://github.com/Staffbase/widget-sdk/commit/89951f4aa7db18babc21918bab37a6da10d330b9))
|
|
31
|
+
* **deps:** npm audit fix ([330760c](https://github.com/Staffbase/widget-sdk/commit/330760cb4971042d132a93700fedecff16cde89b))
|
|
32
|
+
* **deps:** npm audit fix ([856ca6b](https://github.com/Staffbase/widget-sdk/commit/856ca6b503229bae8ebf841b0637868515f3367e))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Chores
|
|
36
|
+
|
|
37
|
+
* add dependency update bot ([48be50e](https://github.com/Staffbase/widget-sdk/commit/48be50e36508ab89cb17f0b5643162180a7b7d38))
|
|
38
|
+
* exchange token vars ([4ef9c78](https://github.com/Staffbase/widget-sdk/commit/4ef9c78bf81e9b272f4014cd5e8df1cb6b2d2f3b))
|
|
39
|
+
* exchange token vars ([80bebb5](https://github.com/Staffbase/widget-sdk/commit/80bebb5825c5f7d410f3bc2d1493d492d757a2e4))
|
|
40
|
+
* remove unneeded env vars ([c368fde](https://github.com/Staffbase/widget-sdk/commit/c368fdee2473b0ff7fa8b54464740200718370bd))
|
|
41
|
+
* remove unneeded env vars ([a823c98](https://github.com/Staffbase/widget-sdk/commit/a823c98a51a5d9b928ce857d36e5ced7f8e10d98))
|
|
42
|
+
* remove yarn ([5fb934f](https://github.com/Staffbase/widget-sdk/commit/5fb934f3aadc7eef2aea60a31b6b812335483b8f))
|
|
43
|
+
* removed unneeded env var ([52960df](https://github.com/Staffbase/widget-sdk/commit/52960dfef49d00432ebc00a3f84a3a902aaefc6f))
|
|
44
|
+
* **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))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Documentation
|
|
48
|
+
|
|
49
|
+
* add explanation ([85f5af3](https://github.com/Staffbase/widget-sdk/commit/85f5af391d99877f88e0ffe1989cbe48dac21587))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Features
|
|
53
|
+
|
|
54
|
+
* add integrations support to the api ([f091004](https://github.com/Staffbase/widget-sdk/commit/f091004c98115a7fdd663f7781cd1e86ac0c5e80))
|
|
55
|
+
* add null to return value ([478256b](https://github.com/Staffbase/widget-sdk/commit/478256ba7704d9410dcdabd57967ca434bd4a07b))
|
|
56
|
+
* add value map type ([3371441](https://github.com/Staffbase/widget-sdk/commit/33714410ba35c89ad12ab0242762b751cfabceeb))
|
|
57
|
+
* change type, add docu ([89a1622](https://github.com/Staffbase/widget-sdk/commit/89a16224b75bd2d75e275a5ea641bf1fffd1bd24))
|
|
58
|
+
* changed type to date ([9aa8cc2](https://github.com/Staffbase/widget-sdk/commit/9aa8cc223b78b0d8e9046cc2a8ebbcdcc068ac84))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### Miscellaneous
|
|
62
|
+
|
|
63
|
+
* Merge branch 'NFS-1519-add-integrations' into beta ([8857284](https://github.com/Staffbase/widget-sdk/commit/88572843757d178ead03b39700455d74fe9e065e))
|
|
64
|
+
* Merge branch 'NFS-1519-add-integrations' into beta ([3499518](https://github.com/Staffbase/widget-sdk/commit/3499518ee1bbad67fce3bc8e6ed473378d7f7a38))
|
|
65
|
+
* Merge branch 'master' into beta ([27dff30](https://github.com/Staffbase/widget-sdk/commit/27dff30a4d0da7f0fe65c39d4da0f362f8dc88a5))
|
|
66
|
+
* ([ed1232c](https://github.com/Staffbase/widget-sdk/commit/ed1232c889fb7294283312b3a8461ca969842d14))
|
|
67
|
+
* Set env variable ([9da7ec4](https://github.com/Staffbase/widget-sdk/commit/9da7ec4f026efb52beb920f0c5791ab7e201ab9c))
|
|
68
|
+
* Add env variable ([f0e5b1f](https://github.com/Staffbase/widget-sdk/commit/f0e5b1fdd07fd2f04ce3008c8b82260c27acd967))
|
|
69
|
+
* ([1622de1](https://github.com/Staffbase/widget-sdk/commit/1622de1c0741fe438e7efa7d706cb1c9c94d12ee))
|
|
70
|
+
* **version:** Release 3.3.0-beta.1 [skip ci] ([bfff946](https://github.com/Staffbase/widget-sdk/commit/bfff946703a6a438c7f5bbc19ff973c5bf102f11)), closes [#NFS-872](https://github.com/Staffbase/widget-sdk/issues/NFS-872)
|
|
71
|
+
* **version:** Release 3.3.1-beta.1 [skip ci] ([e0b175a](https://github.com/Staffbase/widget-sdk/commit/e0b175a69aabd0d08e16f3453bf6793e89eb389b)), closes [#NFS-872](https://github.com/Staffbase/widget-sdk/issues/NFS-872)
|
|
72
|
+
* **version:** Release 3.3.1-beta.2 [skip ci] ([4fa6ece](https://github.com/Staffbase/widget-sdk/commit/4fa6ece0161fa5a83e916ec8dcb85bbf2ab932d8))
|
|
73
|
+
* Merge branch 'nfs-1164-documentation' into beta ([e7cbe2c](https://github.com/Staffbase/widget-sdk/commit/e7cbe2c134682220a6b64232f287dd2d032ee43d))
|
|
74
|
+
* Merge branch 'beta' of github.com:Staffbase/widget-sdk into beta ([27c2943](https://github.com/Staffbase/widget-sdk/commit/27c2943b15d2ec462fd171dec304e0c99a66c223))
|
|
75
|
+
|
|
1
76
|
## [3.3.3](https://github.com/Staffbase/widget-sdk/compare/3.3.2...3.3.3) (2021-09-01)
|
|
2
77
|
|
|
3
78
|
|
|
@@ -76,84 +151,38 @@
|
|
|
76
151
|
|
|
77
152
|
### Bug Fixes
|
|
78
153
|
|
|
79
|
-
*
|
|
80
|
-
* changed props to contentLanguage #NFS-872 ([f8f0107](https://github.com/Staffbase/widget-sdk/commit/f8f01078f5798239e63f34921c43cfb1fb6e4e21)), closes [#NFS-872](https://github.com/Staffbase/widget-sdk/issues/NFS-872)
|
|
81
|
-
* update package-lock.json ([67163cf](https://github.com/Staffbase/widget-sdk/commit/67163cf3445d3f6dc4ae6862461b28409ea22328))
|
|
82
|
-
* update package-lock.json ([6480488](https://github.com/Staffbase/widget-sdk/commit/648048892f7804913747c24320c4f71dc7597cf7))
|
|
154
|
+
* change types to allow casting ([ebc524a](https://github.com/Staffbase/widget-sdk/commit/ebc524a1d4fbc64d4f688bca949c0cdefb476185))
|
|
83
155
|
|
|
156
|
+
## [3.3.1-beta.1](https://github.com/Staffbase/widget-sdk/compare/3.3.0...3.3.1-beta.1) (2021-05-11)
|
|
84
157
|
|
|
85
|
-
### Chores
|
|
86
158
|
|
|
87
|
-
|
|
88
|
-
* add deleted block attributes file ([629d0c5](https://github.com/Staffbase/widget-sdk/commit/629d0c5276cb065979e0c66b3d849e083d73a032))
|
|
89
|
-
* add semantic release ([0dc3400](https://github.com/Staffbase/widget-sdk/commit/0dc340015f62702608b107199b977a13bcebdaa3))
|
|
90
|
-
* add semantic release ([63e0344](https://github.com/Staffbase/widget-sdk/commit/63e0344939cb24444afab2d1ab0c3553730a5cea))
|
|
91
|
-
* change release rules ([32f0520](https://github.com/Staffbase/widget-sdk/commit/32f05208e33801eb925c09d67dcd9ec6ae993b57))
|
|
92
|
-
* disabled dryrun ([f390c78](https://github.com/Staffbase/widget-sdk/commit/f390c78d85446decc62b0eb9efa1a346bedb32bd))
|
|
93
|
-
* fix blocked release ([9283e21](https://github.com/Staffbase/widget-sdk/commit/9283e210a788bee4c72856ecde5125a8daf45298))
|
|
94
|
-
* fix blocked release ([857dcac](https://github.com/Staffbase/widget-sdk/commit/857dcac7093892a3035297bc70b693c5c9a3d501))
|
|
95
|
-
* raise min node version ([c41863d](https://github.com/Staffbase/widget-sdk/commit/c41863d877c210b3ee46d5c7a7db77623b3c93ad))
|
|
96
|
-
* remove publish config ([c7b6198](https://github.com/Staffbase/widget-sdk/commit/c7b61980ff4c44f8aa58f78e28486fffa5975f4e))
|
|
97
|
-
* switched the release plugin ([5c907a6](https://github.com/Staffbase/widget-sdk/commit/5c907a6d46ee77a87b6d71c92dd9e13a3190ab1a))
|
|
98
|
-
* use default release rules ([5932645](https://github.com/Staffbase/widget-sdk/commit/59326457e0c73ff68762bf130c80c1b5e0b8725e))
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Code Refactoring
|
|
159
|
+
### Chores
|
|
102
160
|
|
|
103
|
-
*
|
|
161
|
+
* add scripts to generate docs ([30ec320](https://github.com/Staffbase/widget-sdk/commit/30ec320a9a0d82d4b83496dd04da710a17bc2c99))
|
|
162
|
+
* change release rule for docs ([a4a6d13](https://github.com/Staffbase/widget-sdk/commit/a4a6d136c78e39380b1e8f2e2c63c58507803ed6))
|
|
163
|
+
* fix dependencies ([68ea122](https://github.com/Staffbase/widget-sdk/commit/68ea122d30bf67235439869cffdda35fde6d35e8))
|
|
104
164
|
|
|
105
165
|
|
|
106
|
-
###
|
|
166
|
+
### Documentation
|
|
107
167
|
|
|
108
|
-
* add
|
|
109
|
-
* add
|
|
110
|
-
*
|
|
168
|
+
* add example for the json schema ([f454896](https://github.com/Staffbase/widget-sdk/commit/f45489631c1a67046b298fa0234a44f6d8bb2d93))
|
|
169
|
+
* add more to the readme ([15f59fe](https://github.com/Staffbase/widget-sdk/commit/15f59fe1206f27dade3dd9f1fe66c5c914edae36))
|
|
170
|
+
* add typedoc and generated docs files ([8c61df0](https://github.com/Staffbase/widget-sdk/commit/8c61df0a3f98aaa82cb1ccc8a3d161cf57d4c3ce))
|
|
171
|
+
* create new doc files ([f3d72f2](https://github.com/Staffbase/widget-sdk/commit/f3d72f232b1e805cab195cdd8ab646b020a70ec9))
|
|
172
|
+
* fix missing comment line ([abe01df](https://github.com/Staffbase/widget-sdk/commit/abe01df6f8e18a173ec4edd8b237a30cc24c81b4))
|
|
173
|
+
* update documentation ([54f9212](https://github.com/Staffbase/widget-sdk/commit/54f92123879b889b93e7690f29f69d641de93edd))
|
|
174
|
+
* update generated docs ([8cb1a22](https://github.com/Staffbase/widget-sdk/commit/8cb1a229b58b927d1d90dcc51bb979d565a1ecf9))
|
|
175
|
+
* updated generated doc ([c7eeede](https://github.com/Staffbase/widget-sdk/commit/c7eeeded002f2ec468de58c478262bf30a520459))
|
|
111
176
|
|
|
112
177
|
|
|
113
178
|
### Miscellaneous
|
|
114
179
|
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* Merge branch '
|
|
118
|
-
*
|
|
119
|
-
* 3.3.0-beta-2 ([5ee39df](https://github.com/Staffbase/widget-sdk/commit/5ee39dff788cdd90054f097f13d8ca27844d53a0))
|
|
120
|
-
* NFS-989: Add colors to the sdk ([eb59ed1](https://github.com/Staffbase/widget-sdk/commit/eb59ed1c7670f91e8974e1648e354d925c4feae5))
|
|
121
|
-
* Merge branch 'Add_colors_to_the_SDK' of github.com:Staffbase/widget-sdk into Add_colors_to_the_SDK ([e576c4f](https://github.com/Staffbase/widget-sdk/commit/e576c4f8636ca8938d737bfd449d695171b42eb2))
|
|
122
|
-
* Merge branch 'master' into Add_colors_to_the_SDK ([be07592](https://github.com/Staffbase/widget-sdk/commit/be07592ab9f8682d466b78d127bdf0a4cac6cde0))
|
|
123
|
-
* NFS-1289: Widget SDK: As a widget developer I want to have user information provided ([7716a6f](https://github.com/Staffbase/widget-sdk/commit/7716a6f590eb3dff8b7d9ee14c84bda1a5d3a7eb))
|
|
124
|
-
* NFS-1289: Changes from review ([ccad4b1](https://github.com/Staffbase/widget-sdk/commit/ccad4b1605129db09e840619cf26a76c99d694b4))
|
|
125
|
-
* NFS-1289: Changes from review ([18fd04d](https://github.com/Staffbase/widget-sdk/commit/18fd04d635eedbba3f89f60cecdc6412e1a21dc1))
|
|
126
|
-
* NFS-1289: Changes from review ([766801f](https://github.com/Staffbase/widget-sdk/commit/766801faefd489163f2191d7f2fa329e68a7fa4d))
|
|
127
|
-
* NFS-1289: Comment adjustments from review ([6a5757b](https://github.com/Staffbase/widget-sdk/commit/6a5757b6e7f70648ce1152a67d15d6baae95fb3e))
|
|
128
|
-
* NFS-1289: Increase alpha version ([3201add](https://github.com/Staffbase/widget-sdk/commit/3201add07f2dc8bc3cee18c17f30c4fc9c219719))
|
|
129
|
-
* 3.3.0-alpha-1 ([ae51620](https://github.com/Staffbase/widget-sdk/commit/ae51620a8510591ef87ffb579ec4eaa5af4ffa84))
|
|
130
|
-
* NFS-1289: Rollback incomptible changes from NFS-872 ([d276698](https://github.com/Staffbase/widget-sdk/commit/d2766983ef168d0c7f97b6cb5583d0899b8d9192))
|
|
131
|
-
* NFS-1289: Make widgetApi non-optional ([e8ba6cc](https://github.com/Staffbase/widget-sdk/commit/e8ba6cc111c003ec4b4012a883c897fd6de064f9))
|
|
132
|
-
* NFS-1289: Add getUserList ([76a3aed](https://github.com/Staffbase/widget-sdk/commit/76a3aedbd7ede00836d6a5dbc514eedf70a45429))
|
|
133
|
-
* NFS-1289: Update naming and comments ([76ae96b](https://github.com/Staffbase/widget-sdk/commit/76ae96b9391052fa29617602c1b82f6cb5ca5351))
|
|
134
|
-
* NFS-1289: Add user info type ([2f09337](https://github.com/Staffbase/widget-sdk/commit/2f0933796de0878bdf69bd3249068a75c2ac3b1d))
|
|
135
|
-
* NFS-1289: Update index ([66b34c5](https://github.com/Staffbase/widget-sdk/commit/66b34c5a4e55222274b14571b694043201d3a838))
|
|
136
|
-
* NFS-1289: Add widget api definition ([979d944](https://github.com/Staffbase/widget-sdk/commit/979d944010869f361b934ae181988c22eeb8c7a9))
|
|
137
|
-
* add description for uischema ([ca052f4](https://github.com/Staffbase/widget-sdk/commit/ca052f4c68198b1035fa81ed261281079cfee531))
|
|
138
|
-
* add description for uischema ([793e83c](https://github.com/Staffbase/widget-sdk/commit/793e83cc4ae969898cba5593086abbea3d5668a3))
|
|
139
|
-
* NFS-872: change widget attribute ([596572b](https://github.com/Staffbase/widget-sdk/commit/596572b6121c0ed43180a584affce2d44e8c4046))
|
|
140
|
-
* Adding the SBColors type ([436d071](https://github.com/Staffbase/widget-sdk/commit/436d071dff28a4905dd5da0786e3e87f8fe6764e))
|
|
141
|
-
* Adding ColorTheme to the widgetApi ([98ab6e2](https://github.com/Staffbase/widget-sdk/commit/98ab6e256d93167da43965f1b1177711a03d8ac2))
|
|
142
|
-
* 3.2.1-alpha-groda-1 ([47c6c76](https://github.com/Staffbase/widget-sdk/commit/47c6c76c9fa23f1dcb9052b433971a754e158aeb))
|
|
143
|
-
* NFS-1289: Increase alpha version ([b82fa28](https://github.com/Staffbase/widget-sdk/commit/b82fa28d9ec06ed34352d087cc397388b851e3ed))
|
|
144
|
-
* Merge branch 'NFS-1289-Add-Widget-Api-Definition' of github.com:Staffbase/widget-sdk into NFS-1289-Add-Widget-Api-Definition ([2acd9fa](https://github.com/Staffbase/widget-sdk/commit/2acd9faf0af7a6b5dc625d2b31b4e53f515597d0))
|
|
145
|
-
* NFS-1289: Rollback incomptible changes from NFS-872 ([1006f62](https://github.com/Staffbase/widget-sdk/commit/1006f6201cc2dff7159582e8bde3e6674c057ae5))
|
|
146
|
-
* 3.3.0-alpha-1 ([39e2983](https://github.com/Staffbase/widget-sdk/commit/39e29831b7dac6b63c62b4b5ed1f787569784931))
|
|
147
|
-
* NFS-1289: Make widgetApi non-optional ([faa8223](https://github.com/Staffbase/widget-sdk/commit/faa82235e71210afe984624143f4a774ee94e897))
|
|
148
|
-
* NFS-1289: Add getUserList ([e96311b](https://github.com/Staffbase/widget-sdk/commit/e96311b8a81165ac594d42c0a45592845dc8a0a4))
|
|
149
|
-
* NFS-1289: Update naming and comments ([e5593d7](https://github.com/Staffbase/widget-sdk/commit/e5593d76deb6deae7386b16a3ae084ddfdb17f87))
|
|
150
|
-
* NFS-1289: Add user info type ([ac5e83b](https://github.com/Staffbase/widget-sdk/commit/ac5e83ba585a7b75698a138f820475415abbe50c))
|
|
151
|
-
* NFS-1289: Update index ([ef49c3d](https://github.com/Staffbase/widget-sdk/commit/ef49c3dddcf8f37656f1cf61ee54059e9c9e0c87))
|
|
152
|
-
* NFS-1289: Add widget api definition ([a16b267](https://github.com/Staffbase/widget-sdk/commit/a16b267805eccbcb354eb6d2020b90ddfc852d5e))
|
|
153
|
-
* Update lib/base-block.ts ([39c40ec](https://github.com/Staffbase/widget-sdk/commit/39c40ec298274f6814b7ed9a25622ea71946928a))
|
|
154
|
-
* NFS-1002: adds definitions for the parsing of attributes ([08f5675](https://github.com/Staffbase/widget-sdk/commit/08f5675da41be87b6535c5d4a28dfe1d913f0bd4))
|
|
180
|
+
* Merge branch 'nfs-1164-documentation' into beta ([e7cbe2c](https://github.com/Staffbase/widget-sdk/commit/e7cbe2c134682220a6b64232f287dd2d032ee43d))
|
|
181
|
+
* Merge branch 'next' into nfs-1164-documentation ([92881b1](https://github.com/Staffbase/widget-sdk/commit/92881b173480451aa9b6731f336e7b96d30898f3))
|
|
182
|
+
* Merge branch 'beta' of github.com:Staffbase/widget-sdk into beta ([27c2943](https://github.com/Staffbase/widget-sdk/commit/27c2943b15d2ec462fd171dec304e0c99a66c223))
|
|
183
|
+
* **version:** Release 3.3.0-beta.1 [skip ci] ([bfff946](https://github.com/Staffbase/widget-sdk/commit/bfff946703a6a438c7f5bbc19ff973c5bf102f11)), closes [#NFS-872](https://github.com/Staffbase/widget-sdk/issues/NFS-872)
|
|
155
184
|
|
|
156
|
-
# [3.3.0](https://github.com/Staffbase/widget-sdk/compare/3.2.0...3.3.0) (2021-05-11)
|
|
185
|
+
# [3.3.0-beta.1](https://github.com/Staffbase/widget-sdk/compare/3.2.0...3.3.0-beta.1) (2021-05-11)
|
|
157
186
|
|
|
158
187
|
|
|
159
188
|
### Bug Fixes
|
|
@@ -168,12 +197,8 @@
|
|
|
168
197
|
|
|
169
198
|
* add deleted block attributes file ([8c639df](https://github.com/Staffbase/widget-sdk/commit/8c639dfbe70197be614af7a4a57041d391caf372))
|
|
170
199
|
* add deleted block attributes file ([629d0c5](https://github.com/Staffbase/widget-sdk/commit/629d0c5276cb065979e0c66b3d849e083d73a032))
|
|
171
|
-
* add semantic release ([0dc3400](https://github.com/Staffbase/widget-sdk/commit/0dc340015f62702608b107199b977a13bcebdaa3))
|
|
172
200
|
* add semantic release ([63e0344](https://github.com/Staffbase/widget-sdk/commit/63e0344939cb24444afab2d1ab0c3553730a5cea))
|
|
173
|
-
* change release rules ([32f0520](https://github.com/Staffbase/widget-sdk/commit/32f05208e33801eb925c09d67dcd9ec6ae993b57))
|
|
174
201
|
* disabled dryrun ([f390c78](https://github.com/Staffbase/widget-sdk/commit/f390c78d85446decc62b0eb9efa1a346bedb32bd))
|
|
175
|
-
* fix blocked release ([9283e21](https://github.com/Staffbase/widget-sdk/commit/9283e210a788bee4c72856ecde5125a8daf45298))
|
|
176
|
-
* fix blocked release ([857dcac](https://github.com/Staffbase/widget-sdk/commit/857dcac7093892a3035297bc70b693c5c9a3d501))
|
|
177
202
|
* raise min node version ([c41863d](https://github.com/Staffbase/widget-sdk/commit/c41863d877c210b3ee46d5c7a7db77623b3c93ad))
|
|
178
203
|
* switched the release plugin ([5c907a6](https://github.com/Staffbase/widget-sdk/commit/5c907a6d46ee77a87b6d71c92dd9e13a3190ab1a))
|
|
179
204
|
* use default release rules ([5932645](https://github.com/Staffbase/widget-sdk/commit/59326457e0c73ff68762bf130c80c1b5e0b8725e))
|
|
@@ -193,8 +218,6 @@
|
|
|
193
218
|
|
|
194
219
|
### Miscellaneous
|
|
195
220
|
|
|
196
|
-
* NFS-1002: adds definitions for the parsing of attributes ([8d5e897](https://github.com/Staffbase/widget-sdk/commit/8d5e897f956f97f03b1b7ebd5190b343db9672e9))
|
|
197
|
-
* Merge branch 'next' into NFS-1002-parse-methods ([a4fc6e3](https://github.com/Staffbase/widget-sdk/commit/a4fc6e3b26e2fb89787c4f924235e0fdbb0b4a43))
|
|
198
221
|
* Make ui schema optional ([3c6e1b1](https://github.com/Staffbase/widget-sdk/commit/3c6e1b104ec99acd97c5febc8ee7544ee5a856fb))
|
|
199
222
|
* 3.3.0-beta-2 ([5ee39df](https://github.com/Staffbase/widget-sdk/commit/5ee39dff788cdd90054f097f13d8ca27844d53a0))
|
|
200
223
|
* NFS-989: Add colors to the sdk ([eb59ed1](https://github.com/Staffbase/widget-sdk/commit/eb59ed1c7670f91e8974e1648e354d925c4feae5))
|
|
@@ -230,5 +253,3 @@
|
|
|
230
253
|
* NFS-1289: Add user info type ([ac5e83b](https://github.com/Staffbase/widget-sdk/commit/ac5e83ba585a7b75698a138f820475415abbe50c))
|
|
231
254
|
* NFS-1289: Update index ([ef49c3d](https://github.com/Staffbase/widget-sdk/commit/ef49c3dddcf8f37656f1cf61ee54059e9c9e0c87))
|
|
232
255
|
* NFS-1289: Add widget api definition ([a16b267](https://github.com/Staffbase/widget-sdk/commit/a16b267805eccbcb354eb6d2020b90ddfc852d5e))
|
|
233
|
-
* Update lib/base-block.ts ([39c40ec](https://github.com/Staffbase/widget-sdk/commit/39c40ec298274f6814b7ed9a25622ea71946928a))
|
|
234
|
-
* NFS-1002: adds definitions for the parsing of attributes ([08f5675](https://github.com/Staffbase/widget-sdk/commit/08f5675da41be87b6535c5d4a28dfe1d913f0bd4))
|
package/lib/base-block.ts
CHANGED
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
* limitations under the License.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
+
type Value = string | number | boolean | unknown[] | Record<string, unknown> | null | undefined;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Generic map of parsed attributes.
|
|
18
|
+
*/
|
|
19
|
+
type ValueMap = Record<string, Value>;
|
|
20
|
+
|
|
14
21
|
/**
|
|
15
22
|
* Base class for custom widgets.
|
|
16
23
|
*
|
|
@@ -79,7 +86,7 @@ export interface BaseBlock extends HTMLElement {
|
|
|
79
86
|
* NOTE: The default implementation turns every value in a string, except arrays and object, which
|
|
80
87
|
* are converted to base64 encoded data uris in the format `data:text/plain;base64,...`
|
|
81
88
|
*/
|
|
82
|
-
parseConfig<T extends
|
|
89
|
+
parseConfig<T extends ValueMap>(attributes: T): Record<string, string>;
|
|
83
90
|
|
|
84
91
|
/**
|
|
85
92
|
* Called when the config dialog is opened. The dialog uses the parsed attributes, to fill
|
|
@@ -95,7 +102,7 @@ export interface BaseBlock extends HTMLElement {
|
|
|
95
102
|
* NOTE: The default implementation converts every string to string, boolean or number and decodes
|
|
96
103
|
* and parses the data uris to the arrays and objects. Dates are remaining a string!
|
|
97
104
|
*/
|
|
98
|
-
parseAttributes
|
|
105
|
+
parseAttributes(): ValueMap;
|
|
99
106
|
|
|
100
107
|
/**
|
|
101
108
|
* The content language as defined in the hosting system. Should be used to provide
|
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
|
}
|