@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
@@ -10,10 +10,7 @@
10
10
  * See the License for the specific language governing permissions and
11
11
  * limitations under the License.
12
12
  */
13
-
14
- import { ColorTheme, IntegrationToken, IntegrationType, SBUserProfile, UserListRequestQuery, UserListResponse } from './widget-api-types';
15
-
16
-
13
+ import { ColorTheme, IntegrationInformation, IntegrationType, SBUserProfile, UserListRequestQuery, UserListResponse } from './widget-api-types';
17
14
  /**
18
15
  * Widget API class.
19
16
  *
@@ -27,7 +24,6 @@ export interface WidgetApi {
27
24
  * @returns An object containing the color theme data is returned.
28
25
  */
29
26
  getLegacyAppTheme(): ColorTheme;
30
-
31
27
  /**
32
28
  * Call to retrieve the user profile of the current or a specific user.
33
29
  *
@@ -36,7 +32,6 @@ export interface WidgetApi {
36
32
  * the promise is rejected.
37
33
  */
38
34
  getUserInformation(userId?: string): Promise<SBUserProfile>;
39
-
40
35
  /**
41
36
  * Call to retrieve a user profile by its external ID.
42
37
  *
@@ -45,7 +40,6 @@ export interface WidgetApi {
45
40
  * the promise is rejected.
46
41
  */
47
42
  getUserInformationByExternalId(externalId: string): Promise<SBUserProfile>;
48
-
49
43
  /**
50
44
  * Call to retrieve a list of users determined by the query object.
51
45
  *
@@ -54,15 +48,21 @@ export interface WidgetApi {
54
48
  * the promise is rejected.
55
49
  */
56
50
  getUserList(query: UserListRequestQuery): Promise<UserListResponse>;
57
-
58
-
59
51
  /**
60
52
  * Call to retrieve a valid token to access the Microsoft API. Includes a time value to
61
53
  * refresh the token.
62
54
  *
63
55
  * @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.
56
+ * @param refresh Force a refresh of the integration.
57
+ *
58
+ * @returns A promise containing the IntegrationInformation is returned. If the user session is
59
+ * not existing, the status is set to 'loggedOut' and the token is null. Additionally if the
60
+ * integration is not configured the status returns 'unavailable'.
61
+ *
62
+ * In case of an error, the promise is rejected.
63
+ *
64
+ * @deprecated Returns a IntegrationToken or null if the user is not logged in. This will be replaced
65
+ * completely by the IntegrationInformation, containing the token.
66
66
  */
67
- getIntegration(type: IntegrationType): Promise<IntegrationToken | null>;
67
+ getIntegration(type: IntegrationType, refresh?: boolean): Promise<IntegrationInformation>;
68
68
  }
package/docs/.nojekyll ADDED
@@ -0,0 +1 @@
1
+ TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.