@staffbase/widget-sdk 3.4.0-beta.3 → 3.4.0-beta.7

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 (61) hide show
  1. package/dist/base-block.d.ts +98 -0
  2. package/{lib/block-attributes.ts → dist/block-attributes.d.ts} +2 -3
  3. package/dist/block-definition.d.ts +91 -0
  4. package/dist/block-element.d.ts +45 -0
  5. package/{lib/block-factory.ts → dist/block-factory.d.ts} +2 -6
  6. package/{lib/external-block-definition.ts → dist/external-block-definition.d.ts} +15 -19
  7. package/{lib → dist}/global.d.ts +6 -9
  8. package/dist/index.d.ts +9 -0
  9. package/{index.d.ts → dist/index.js} +10 -11
  10. package/{lib/widget-api-types.ts → dist/widget-api-types.d.ts} +85 -83
  11. package/{lib/widget-api.ts → dist/widget-api.d.ts} +12 -12
  12. package/docs/.nojekyll +1 -0
  13. package/docs/BaseBlock.md +5887 -0
  14. package/docs/BlockAttributes.md +21 -0
  15. package/docs/BlockDefinition.md +167 -0
  16. package/docs/BlockElement.md +103 -0
  17. package/docs/ColorTheme.md +97 -0
  18. package/docs/ExternalBlockDefinition.md +58 -0
  19. package/docs/Home.md +56 -30
  20. package/docs/IntegrationInformation.md +70 -0
  21. package/docs/IntegrationState.md +41 -0
  22. package/docs/IntegrationToken.md +30 -0
  23. package/docs/SBColors.md +639 -0
  24. package/docs/SBFileType.md +74 -0
  25. package/docs/SBImageEntity.md +74 -0
  26. package/docs/SBUserAvatar.md +52 -0
  27. package/docs/SBUserProfile.md +96 -0
  28. package/docs/UserListItem.md +52 -0
  29. package/docs/UserListRequestQuery.md +52 -0
  30. package/docs/UserListResponse.md +52 -0
  31. package/docs/WidgetApi.md +142 -0
  32. package/docs/_Sidebar.md +2 -19
  33. package/package.json +24 -17
  34. package/.commitlintrc.json +0 -28
  35. package/.github/CODEOWNERS +0 -1
  36. package/.github/workflows/ci.yaml +0 -61
  37. package/.github/workflows/dependency-update.yml +0 -24
  38. package/.husky/commit-msg +0 -6
  39. package/.releaserc +0 -38
  40. package/CHANGELOG.md +0 -255
  41. package/CONTRIBUTING.md +0 -10
  42. package/catalog-info.yaml +0 -11
  43. package/docs/Interface: BaseBlock.md +0 -3226
  44. package/docs/Interface: BlockAttributes.md +0 -11
  45. package/docs/Interface: BlockDefinition.md +0 -117
  46. package/docs/Interface: BlockElement.md +0 -89
  47. package/docs/Interface: ColorTheme.md +0 -52
  48. package/docs/Interface: ExternalBlockDefinition.md +0 -38
  49. package/docs/Interface: SBColors.md +0 -354
  50. package/docs/Interface: SBFileType.md +0 -39
  51. package/docs/Interface: SBImageEntity.md +0 -39
  52. package/docs/Interface: SBUserAvatar.md +0 -27
  53. package/docs/Interface: SBUserProfile.md +0 -51
  54. package/docs/Interface: UserListItem.md +0 -27
  55. package/docs/Interface: UserListRequestQuery.md +0 -27
  56. package/docs/Interface: UserListResponse.md +0 -27
  57. package/docs/Interface: WidgetApi.md +0 -75
  58. package/lib/base-block.ts +0 -117
  59. package/lib/block-definition.ts +0 -101
  60. package/lib/block-element.ts +0 -56
  61. package/tsconfig.json +0 -13
@@ -0,0 +1,98 @@
1
+ /*!
2
+ * Copyright 2021, Staffbase GmbH and contributors.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ * Unless required by applicable law or agreed to in writing, software
8
+ * distributed under the License is distributed on an "AS IS" BASIS,
9
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ * See the License for the specific language governing permissions and
11
+ * limitations under the License.
12
+ */
13
+ /**
14
+ * Base class for custom widgets.
15
+ *
16
+ * Should be used to extend other custom elements to render their content.
17
+ * Provides common editing and render capabilities for Staffbase widgets.
18
+ */
19
+ export interface BaseBlock extends HTMLElement {
20
+ /**
21
+ * Called when the widget is rendered in a page.
22
+ * Override this method in order to display your widget contents.
23
+ *
24
+ * Default implementation is a noop.
25
+ *
26
+ * @param container an `HTMLElement` into which the contents of the widget should be rendered.
27
+ * Note that this does not necessarily have to be `this` since the base class might
28
+ * render a title, a div with a border, or other decorations.
29
+ */
30
+ renderBlock(container: HTMLElement): void;
31
+ /**
32
+ * Called when the widget is rendered in the WYSIWYG editor.
33
+ * override this method in order to display your widget preview.
34
+ *
35
+ * By default, the editor will display a generic placeholder
36
+ * with the widget name and icon.
37
+ *
38
+ * @param container an `HTMLElement` into which the contents of the widget should be rendered
39
+ * Note that this does not necessarily have to be `this` since the base class might
40
+ * render a title, a div with a border, or other decorations.
41
+ */
42
+ renderBlockInEditor(container: HTMLElement): void;
43
+ /**
44
+ * Called when the widget is unmounted from the DOM.
45
+ *
46
+ * Override this in order to implement your unmount logic.
47
+ *
48
+ * @param container an `HTMLElement` which was used previously to render the widget.
49
+ */
50
+ unmountBlock(container: HTMLElement): void;
51
+ /**
52
+ * Called when an attribute is changed.
53
+ *
54
+ * Override this in order to get notified about new attribute values.
55
+ *
56
+ * NOTE: There are attributes that are common to all widgets. They are handled
57
+ * inside the base block. Therefore, if you override this method, be sure to
58
+ * call `super.attributeChangedCallback()` inside your implementation, in
59
+ * order to let the base class know about the arguments that it might be interested in.
60
+ */
61
+ attributeChangedCallback(attrName: string, oldValue: string | undefined, newValue: string | undefined): void;
62
+ /**
63
+ * Called after the dialog is closed and the attributes are set on the web component.
64
+ *
65
+ * Override this if the attributes are handled with a different logic then the default one.
66
+ *
67
+ * @param attributes A map of attributes, as defined in the block definition, which have the
68
+ * types from the form data
69
+ *
70
+ * NOTE: The default implementation turns every value in a string, except arrays and object, which
71
+ * are converted to base64 encoded data uris in the format `data:text/plain;base64,...`
72
+ */
73
+ parseConfig<T extends Record<string, any>>(attributes: T): Record<string, string>;
74
+ /**
75
+ * Called when the config dialog is opened. The dialog uses the parsed attributes, to fill
76
+ * the fields with the existing values.
77
+ *
78
+ * Uses the property blockDefinition.attributes to parse each indidividual attribute and
79
+ * returns it in the format, the configuration form needs. The common attributes are handled
80
+ * externally
81
+ *
82
+ * This method is the counter part of parseConfig, the this must be implemented, if parseConfig
83
+ * is overriden.
84
+ *
85
+ * NOTE: The default implementation converts every string to string, boolean or number and decodes
86
+ * and parses the data uris to the arrays and objects. Dates are remaining a string!
87
+ */
88
+ parseAttributes<T extends Record<string, any>>(): T;
89
+ /**
90
+ * The content language as defined in the hosting system. Should be used to provide
91
+ * the correct localization in the widget.
92
+ *
93
+ * NOTE: This is not necessarily the same as the UI language, which is defined by the browser.
94
+ * When a widget is added to a specific content, the content-language attribute gets automatically set
95
+ * to that language.
96
+ */
97
+ contentLanguage: string;
98
+ }
@@ -10,8 +10,7 @@
10
10
  * See the License for the specific language governing permissions and
11
11
  * limitations under the License.
12
12
  */
13
-
14
13
  export interface BlockAttributes {
15
- contentLanguage: string;
16
- [key: string]: number | boolean | string;
14
+ contentLanguage: string;
15
+ [key: string]: number | boolean | string;
17
16
  }
@@ -0,0 +1,91 @@
1
+ /*!
2
+ * Copyright 2021, Staffbase GmbH and contributors.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ * Unless required by applicable law or agreed to in writing, software
8
+ * distributed under the License is distributed on an "AS IS" BASIS,
9
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ * See the License for the specific language governing permissions and
11
+ * limitations under the License.
12
+ */
13
+ import { BlockFactory } from "./block-factory";
14
+ import { JSONSchema7 } from "json-schema";
15
+ import { UiSchema } from '@rjsf/core';
16
+ export interface BlockDefinition<Factory = BlockFactory> {
17
+ /**
18
+ * The tag name of the widget. It must be compatible with
19
+ * webcomponent naming conventions.
20
+ *
21
+ * @see https://www.webcomponents.org/community/articles/how-should-i-name-my-element
22
+ */
23
+ name: string;
24
+ /**
25
+ * The implementation of the web component.
26
+ */
27
+ factory: Factory;
28
+ /**
29
+ * Can be used for extending from a built-in element.
30
+ */
31
+ options?: ElementDefinitionOptions;
32
+ /**
33
+ * DOM attributes of the element, must be in kebab-case.
34
+ */
35
+ attributes: string[];
36
+ /**
37
+ * Set to `inline` if you want the element to behave like a span element
38
+ * rather than a div element if not specified, it defaults to `block`.
39
+ */
40
+ blockLevel?: "block" | "inline";
41
+ /**
42
+ * Schema used for defining the configuration form.
43
+ *
44
+ * @example
45
+ * ```json
46
+ * {
47
+ * "type": "object",
48
+ * "required": [
49
+ * "firstName",
50
+ * "lastName"
51
+ * ],
52
+ * "properties": {
53
+ * "firstName": {
54
+ * "type": "string",
55
+ * "title": "First name"
56
+ * },
57
+ * "lastName": {
58
+ * "type": "string",
59
+ * "title": "Last name"
60
+ * }
61
+ * }
62
+ * }
63
+ * ```
64
+ * @see https://react-jsonschema-form.readthedocs.io/en/latest/
65
+ */
66
+ configurationSchema: JSONSchema7;
67
+ /**
68
+ *
69
+ * Schema to add more customization to the look and feel of the configuration form.
70
+ *
71
+ * ```json
72
+ * {
73
+ * "firstName": {
74
+ * "ui:help": "Your first name."
75
+ * }
76
+ * }
77
+ * ```
78
+ *
79
+ * @see https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/uiSchema/
80
+ */
81
+ uiSchema?: UiSchema;
82
+ /**
83
+ * Label displayed in the settings dialog and in the default widget preview.
84
+ */
85
+ label?: string;
86
+ /**
87
+ * Icon displayed on the widget installation page.
88
+ * We recommend an icon with the dimensions 32x32 px.
89
+ */
90
+ iconUrl?: string;
91
+ }
@@ -0,0 +1,45 @@
1
+ /*!
2
+ * Copyright 2021, Staffbase GmbH and contributors.
3
+ * Licensed under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License.
5
+ * You may obtain a copy of the License at
6
+ * http://www.apache.org/licenses/LICENSE-2.0
7
+ * Unless required by applicable law or agreed to in writing, software
8
+ * distributed under the License is distributed on an "AS IS" BASIS,
9
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ * See the License for the specific language governing permissions and
11
+ * limitations under the License.
12
+ */
13
+ export interface BlockElement {
14
+ /**
15
+ * Static getter to determine which HTML attributes should trigger the function 'attributeChangedCallback';
16
+ */
17
+ /**
18
+ * Invoked when the custom element is first connected to the DOM.
19
+ */
20
+ connectedCallback: () => void;
21
+ /**
22
+ * Invoked when the custom element is disconnected from the DOM.
23
+ */
24
+ disconnectedCallback: () => void;
25
+ /**
26
+ * Invoked when the custom element is moved to a new document.
27
+ */
28
+ adoptedCallback: () => void;
29
+ /**
30
+ * Invoked when one of the attributes of the custom element is added, removed, or changed.
31
+ *
32
+ * Note that you have to statically register the observed values with the 'observedAttributes' static getter.
33
+ *
34
+ * @param attrName The changed attributes name
35
+ * @param oldValue The old value
36
+ * @param newValue The new value
37
+ */
38
+ attributeChangedCallback: (attrName: string, oldValue: string | undefined, newValue: string | undefined) => void;
39
+ /**
40
+ * Method to unmount / revert any effects applied by rendering.
41
+ * E.g. to be used in editor cases to remove any rendered content
42
+ * and revert the block to its initial state.
43
+ */
44
+ unmount: () => void;
45
+ }
@@ -10,17 +10,15 @@
10
10
  * See the License for the specific language governing permissions and
11
11
  * limitations under the License.
12
12
  */
13
-
14
13
  import { BaseBlock } from "./base-block";
15
14
  import { WidgetApi } from "./widget-api";
16
-
17
15
  /**
18
16
  * Factory for the custom widgets.
19
17
  *
20
18
  * @param Base base class for the custom widgets to inherit from.
21
19
  * The class itself is a subclass of `HTMLElement` of the relevant `window` object,
22
20
  * with additional functionality.
23
- *
21
+ *
24
22
  * @param widgetApi API providing methods for additional information by the Staffbase framework
25
23
  *
26
24
  * @example
@@ -35,6 +33,4 @@ import { WidgetApi } from "./widget-api";
35
33
  * }
36
34
  * };
37
35
  */
38
- export type BlockFactory = (
39
- Base: new () => BaseBlock, widgetApi: WidgetApi
40
- ) => CustomElementConstructor;
36
+ export declare type BlockFactory = (Base: new () => BaseBlock, widgetApi: WidgetApi) => CustomElementConstructor;
@@ -10,10 +10,8 @@
10
10
  * See the License for the specific language governing permissions and
11
11
  * limitations under the License.
12
12
  */
13
-
14
- import { BlockDefinition } from "..";
13
+ import { BlockDefinition } from ".";
15
14
  import { BlockFactory } from "./block-factory";
16
-
17
15
  /**
18
16
  * Defintion of the Widget.
19
17
  *
@@ -21,20 +19,18 @@ import { BlockFactory } from "./block-factory";
21
19
  * and meta information (author and version of the widget).
22
20
  */
23
21
  export interface ExternalBlockDefinition<Factory = BlockFactory> {
24
- /**
25
- * Definition of the block.
26
- *
27
- * Will be registered to the staffbase app.
28
- */
29
- blockDefinition: BlockDefinition<Factory>;
30
-
31
- /**
32
- * Current version of the widget.
33
- */
34
- version: string;
35
-
36
- /**
37
- * Name of the author.
38
- */
39
- author: string;
22
+ /**
23
+ * Definition of the block.
24
+ *
25
+ * Will be registered to the staffbase app.
26
+ */
27
+ blockDefinition: BlockDefinition<Factory>;
28
+ /**
29
+ * Current version of the widget.
30
+ */
31
+ version: string;
32
+ /**
33
+ * Name of the author.
34
+ */
35
+ author: string;
40
36
  }
@@ -10,20 +10,17 @@
10
10
  * See the License for the specific language governing permissions and
11
11
  * limitations under the License.
12
12
  */
13
-
14
13
  import { ExternalBlockDefinition } from "./external-block-definition";
15
-
16
14
  export {};
17
-
18
15
  /**
19
16
  * declaration merging
20
17
  * to add the defineBlock to the window
21
18
  */
22
19
  declare global {
23
- interface Window {
24
- /**
25
- * global method to register the widget to the frontend
26
- */
27
- defineBlock: (widget: ExternalBlockDefinition) => void;
28
- }
20
+ interface Window {
21
+ /**
22
+ * global method to register the widget to the frontend
23
+ */
24
+ defineBlock: (widget: ExternalBlockDefinition) => void;
25
+ }
29
26
  }
@@ -0,0 +1,9 @@
1
+ export * from './base-block.js';
2
+ export * from './block-attributes.js';
3
+ export * from './block-definition.js';
4
+ export * from './block-element.js';
5
+ export * from './block-factory.js';
6
+ export * from './external-block-definition.js';
7
+ export * from './widget-api-types.js';
8
+ export * from './widget-api.js';
9
+ export * from './global.js';
@@ -1,5 +1,14 @@
1
+ (() => {
2
+ // lib/widget-api-types.ts
3
+ var IntegrationState = /* @__PURE__ */ ((IntegrationState2) => {
4
+ IntegrationState2["UNAVAILABLE"] = "unavailable";
5
+ IntegrationState2["AVAILABLE"] = "available";
6
+ IntegrationState2["LOGGED_OUT"] = "loggedOut";
7
+ return IntegrationState2;
8
+ })(IntegrationState || {});
9
+ })();
1
10
  /*!
2
- * Copyright 2020, Staffbase GmbH and contributors.
11
+ * Copyright 2021, Staffbase GmbH and contributors.
3
12
  * Licensed under the Apache License, Version 2.0 (the "License");
4
13
  * you may not use this file except in compliance with the License.
5
14
  * You may obtain a copy of the License at
@@ -10,13 +19,3 @@
10
19
  * See the License for the specific language governing permissions and
11
20
  * limitations under the License.
12
21
  */
13
-
14
- export * from "./lib/block-attributes";
15
- export * from "./lib/block-definition";
16
- export * from "./lib/block-element";
17
- export * from "./lib/block-factory";
18
- export * from "./lib/global";
19
- export * from "./lib/external-block-definition";
20
- export * from "./lib/base-block";
21
- export * from './lib/widget-api';
22
- export * from './lib/widget-api-types';
@@ -10,19 +10,17 @@
10
10
  * See the License for the specific language governing permissions and
11
11
  * limitations under the License.
12
12
  */
13
-
14
13
  /**
15
14
  * File type entity
16
15
  */
17
16
  export interface SBFileType {
18
- default: string,
19
- ppt: string,
20
- xls: string,
21
- doc: string,
22
- pdf: string,
23
- img: string
17
+ default: string;
18
+ ppt: string;
19
+ xls: string;
20
+ doc: string;
21
+ pdf: string;
22
+ img: string;
24
23
  }
25
-
26
24
  /**
27
25
  * Detailed colors entity definition
28
26
  * @param clientForeground This color is meant to be used for foreground elements and is either black or white depending
@@ -37,64 +35,63 @@ export interface SBFileType {
37
35
  *
38
36
  */
39
37
  export interface SBColors {
40
- fileType: SBFileType,
41
- backdrop: string,
42
- backgroundField: string,
43
- backgroundFieldLight: string,
44
- backgroundPrimary: string,
45
- backgroundSecondary: string,
46
- backgroundTertiary: string,
47
- black: string,
48
- borderSolid: string,
49
- borderTranslucent: string,
50
- clientForeground: string,
51
- clientPrimary: string,
52
- clientPrimaryA11y: string,
53
- clientSecondary: string,
54
- clientSecondaryA11y: string,
55
- textPlaceholder: string,
56
- textPrimary: string,
57
- textSecondary: string,
58
- textTertiary: string,
59
- pressedState: string,
60
- hoverState: string,
61
- backgroundBase: string,
62
- backgroundLevel1: string,
63
- backgroundLevel2: string,
64
- backgroundLevel3: string,
65
- backgroundLevel4: string,
66
- blue: string,
67
- blueDark: string,
68
- blueLight: string,
69
- green: string,
70
- greenDark: string,
71
- greenLight: string,
72
- grey: string,
73
- greyDark: string,
74
- greyLight: string,
75
- hairline: string,
76
- hairlineDark: string,
77
- neutral: string,
78
- neutralDark: string,
79
- neutralLight: string,
80
- orange: string,
81
- orangeDark: string,
82
- orangeLight: string,
83
- overlay: string,
84
- overlayDark: string,
85
- red: string,
86
- redDark: string,
87
- redLight: string,
88
- text: string,
89
- textGreyBase: string,
90
- textGreyLevel1: string,
91
- textGreyLevel2: string,
92
- textGreyLevel3: string,
93
- textGreyLevel4: string,
94
- textLight: string,
95
- warningYellow: string
38
+ fileType: SBFileType;
39
+ backdrop: string;
40
+ backgroundField: string;
41
+ backgroundFieldLight: string;
42
+ backgroundPrimary: string;
43
+ backgroundSecondary: string;
44
+ backgroundTertiary: string;
45
+ black: string;
46
+ borderSolid: string;
47
+ borderTranslucent: string;
48
+ clientForeground: string;
49
+ clientPrimary: string;
50
+ clientPrimaryA11y: string;
51
+ clientSecondary: string;
52
+ clientSecondaryA11y: string;
53
+ textPlaceholder: string;
54
+ textPrimary: string;
55
+ textSecondary: string;
56
+ textTertiary: string;
57
+ pressedState: string;
58
+ hoverState: string;
59
+ backgroundBase: string;
60
+ backgroundLevel1: string;
61
+ backgroundLevel2: string;
62
+ backgroundLevel3: string;
63
+ backgroundLevel4: string;
64
+ blue: string;
65
+ blueDark: string;
66
+ blueLight: string;
67
+ green: string;
68
+ greenDark: string;
69
+ greenLight: string;
70
+ grey: string;
71
+ greyDark: string;
72
+ greyLight: string;
73
+ hairline: string;
74
+ hairlineDark: string;
75
+ neutral: string;
76
+ neutralDark: string;
77
+ neutralLight: string;
78
+ orange: string;
79
+ orangeDark: string;
80
+ orangeLight: string;
81
+ overlay: string;
82
+ overlayDark: string;
83
+ red: string;
84
+ redDark: string;
85
+ redLight: string;
86
+ text: string;
87
+ textGreyBase: string;
88
+ textGreyLevel1: string;
89
+ textGreyLevel2: string;
90
+ textGreyLevel3: string;
91
+ textGreyLevel4: string;
92
+ textLight: string;
93
+ warningYellow: string;
96
94
  }
97
-
98
95
  /**
99
96
  * The color theme allows the widget to mimic the look
100
97
  * and feel of the Staffbase ecosystem it was added to.
@@ -102,14 +99,13 @@ export interface SBColors {
102
99
  export interface ColorTheme {
103
100
  bgColor: string;
104
101
  textColor: string;
105
- colors: SBColors,
102
+ colors: SBColors;
106
103
  bgColorDarkened1?: string;
107
- bgColorDarkened2?: string,
104
+ bgColorDarkened2?: string;
108
105
  bgColorDarkened2Opaque?: string;
109
106
  bgColorLum?: string;
110
107
  outlineColor?: string;
111
108
  }
112
-
113
109
  /**
114
110
  * Image entity definition
115
111
  */
@@ -121,7 +117,6 @@ export interface SBImageEntity {
121
117
  url: string;
122
118
  width: number;
123
119
  }
124
-
125
120
  /**
126
121
  * User avatar definition
127
122
  */
@@ -131,7 +126,6 @@ export interface SBUserAvatar {
131
126
  publicID: string;
132
127
  thumb: SBImageEntity;
133
128
  }
134
-
135
129
  /**
136
130
  * User profile data
137
131
  */
@@ -145,7 +139,6 @@ export interface SBUserProfile {
145
139
  avatar?: SBUserAvatar;
146
140
  department?: string;
147
141
  }
148
-
149
142
  /**
150
143
  * The sorting order of the user list.
151
144
  *
@@ -153,18 +146,16 @@ export interface SBUserProfile {
153
146
  * @param created sort by date of creation descending
154
147
  * @param updated sort by date of last update descending
155
148
  */
156
- export type UserListSorting = 'lastname' | 'created' | 'updated';
157
-
149
+ export declare type UserListSorting = 'lastname' | 'created' | 'updated';
158
150
  /**
159
151
  * User list request parameters
160
152
  */
161
- export interface UserListRequestQuery {
153
+ export interface UserListRequestQuery {
162
154
  limit?: number;
163
155
  offset?: number;
164
156
  sort?: UserListSorting;
165
157
  filter?: string;
166
158
  }
167
-
168
159
  /**
169
160
  * Single user item
170
161
  */
@@ -174,7 +165,6 @@ export interface UserListItem {
174
165
  lastName?: string;
175
166
  entityType?: string;
176
167
  }
177
-
178
168
  /**
179
169
  * Responded user list
180
170
  */
@@ -184,17 +174,29 @@ export interface UserListResponse {
184
174
  limit: number;
185
175
  total: number;
186
176
  }
187
-
188
-
189
- export type IntegrationType = "ms365"
190
-
177
+ export declare type IntegrationType = "ms365";
191
178
  /**
192
179
  * Integration Token including the expiration time
193
180
  */
194
181
  export interface IntegrationToken {
195
- // the token to access the api of the integration
196
182
  accessToken: string;
197
-
198
- // date when the access token expires
199
183
  accessTokenExpiresAt?: Date;
200
184
  }
185
+ /**
186
+ * All available states the integration can take
187
+ */
188
+ export declare enum IntegrationState {
189
+ UNAVAILABLE = "unavailable",
190
+ AVAILABLE = "available",
191
+ LOGGED_OUT = "loggedOut"
192
+ }
193
+ /**
194
+ * Information about the requested Integration target
195
+ */
196
+ export interface IntegrationInformation {
197
+ status: IntegrationState;
198
+ enabledFeatures: string[];
199
+ supportedFeatures: string[];
200
+ token?: IntegrationToken;
201
+ signIn?: () => void;
202
+ }