@staffbase/widget-sdk 3.18.1 → 3.19.0

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.
@@ -224,3 +224,10 @@ export interface BranchInformation {
224
224
  webUrl: string;
225
225
  flags: string[];
226
226
  }
227
+ /**
228
+ * A signed JWT issued for a plugin installation,
229
+ * to be used for authenticating against plugin backends.
230
+ */
231
+ export interface InstallationServiceToken {
232
+ jwt: string;
233
+ }
@@ -10,7 +10,7 @@
10
10
  * See the License for the specific language governing permissions and
11
11
  * limitations under the License.
12
12
  */
13
- import { BranchInformation, ColorTheme, IntegrationInformation, IntegrationType, SBUserProfile, UserListRequestQuery, UserListResponse } from './widget-api-types';
13
+ import { BranchInformation, ColorTheme, IntegrationInformation, IntegrationType, InstallationServiceToken, SBUserProfile, UserListRequestQuery, UserListResponse } from './widget-api-types';
14
14
  /**
15
15
  * Widget API class.
16
16
  *
@@ -67,4 +67,13 @@ export interface WidgetApi {
67
67
  * @returns An object containing the branch information.
68
68
  */
69
69
  getBranchInformation(): BranchInformation;
70
+ /**
71
+ * Call to retrieve a signed JWT for a plugin installation. The token is issued
72
+ * by the Staffbase backend and can be used to authenticate the current user
73
+ * against a plugin backend.
74
+ * @param installationId The ID of the plugin installation the token shall be issued for
75
+ * @returns A promise containing the InstallationServiceToken. In case of an error,
76
+ * the promise is rejected.
77
+ */
78
+ getServiceToken(installationId: string): Promise<InstallationServiceToken>;
70
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staffbase/widget-sdk",
3
- "version": "3.18.1",
3
+ "version": "3.19.0",
4
4
  "description": "Staffbase SDK for Custom Widgets",
5
5
  "homepage": "https://developers.staffbase.com/frameworks/customwidget-development",
6
6
  "main": "./dist/index.cjs",