@staffbase/widget-sdk 3.4.0-beta.2 → 3.4.0-beta.6
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/dist/base-block.d.ts +98 -0
- package/{index.d.ts → dist/base-block.js} +2 -11
- package/{lib/block-attributes.ts → dist/block-attributes.d.ts} +2 -3
- package/dist/block-attributes.js +13 -0
- package/dist/block-definition.d.ts +91 -0
- package/dist/block-definition.js +13 -0
- package/dist/block-element.d.ts +45 -0
- package/dist/block-element.js +13 -0
- package/{lib/block-factory.ts → dist/block-factory.d.ts} +2 -6
- package/dist/block-factory.js +13 -0
- package/{lib/external-block-definition.ts → dist/external-block-definition.d.ts} +15 -19
- package/dist/external-block-definition.js +13 -0
- package/{lib → dist}/global.d.ts +6 -9
- package/dist/global.js +13 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/{lib/widget-api-types.ts → dist/widget-api-types.d.ts} +85 -83
- package/dist/widget-api-types.js +21 -0
- package/{lib/widget-api.ts → dist/widget-api.d.ts} +12 -12
- package/dist/widget-api.js +13 -0
- package/docs/.nojekyll +1 -0
- package/docs/BaseBlock.md +5887 -0
- package/docs/BlockAttributes.md +21 -0
- package/docs/BlockDefinition.md +167 -0
- package/docs/BlockElement.md +103 -0
- package/docs/ColorTheme.md +97 -0
- package/docs/ExternalBlockDefinition.md +58 -0
- package/docs/Home.md +56 -30
- package/docs/IntegrationInformation.md +70 -0
- package/docs/IntegrationState.md +41 -0
- package/docs/IntegrationToken.md +30 -0
- package/docs/SBColors.md +639 -0
- package/docs/SBFileType.md +74 -0
- package/docs/SBImageEntity.md +74 -0
- package/docs/SBUserAvatar.md +52 -0
- package/docs/SBUserProfile.md +96 -0
- package/docs/UserListItem.md +52 -0
- package/docs/UserListRequestQuery.md +52 -0
- package/docs/UserListResponse.md +52 -0
- package/docs/WidgetApi.md +142 -0
- package/docs/_Sidebar.md +2 -19
- package/package.json +22 -17
- package/.commitlintrc.json +0 -28
- package/.github/CODEOWNERS +0 -1
- package/.github/workflows/ci.yaml +0 -61
- package/.github/workflows/dependency-update.yml +0 -24
- package/.husky/commit-msg +0 -6
- package/.releaserc +0 -38
- package/CHANGELOG.md +0 -248
- package/CONTRIBUTING.md +0 -10
- package/catalog-info.yaml +0 -11
- package/docs/Interface: BaseBlock.md +0 -3226
- package/docs/Interface: BlockAttributes.md +0 -11
- package/docs/Interface: BlockDefinition.md +0 -117
- package/docs/Interface: BlockElement.md +0 -89
- package/docs/Interface: ColorTheme.md +0 -52
- package/docs/Interface: ExternalBlockDefinition.md +0 -38
- package/docs/Interface: SBColors.md +0 -354
- package/docs/Interface: SBFileType.md +0 -39
- package/docs/Interface: SBImageEntity.md +0 -39
- package/docs/Interface: SBUserAvatar.md +0 -27
- package/docs/Interface: SBUserProfile.md +0 -51
- package/docs/Interface: UserListItem.md +0 -27
- package/docs/Interface: UserListRequestQuery.md +0 -27
- package/docs/Interface: UserListResponse.md +0 -27
- package/docs/Interface: WidgetApi.md +0 -75
- package/lib/base-block.ts +0 -117
- package/lib/block-definition.ts +0 -101
- package/lib/block-element.ts +0 -56
- package/tsconfig.json +0 -13
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Interface: SBFileType
|
|
2
|
+
|
|
3
|
+
File type entity
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [default](../wiki/SBFileType#default)
|
|
10
|
+
- [doc](../wiki/SBFileType#doc)
|
|
11
|
+
- [img](../wiki/SBFileType#img)
|
|
12
|
+
- [pdf](../wiki/SBFileType#pdf)
|
|
13
|
+
- [ppt](../wiki/SBFileType#ppt)
|
|
14
|
+
- [xls](../wiki/SBFileType#xls)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### default
|
|
19
|
+
|
|
20
|
+
• **default**: `string`
|
|
21
|
+
|
|
22
|
+
#### Defined in
|
|
23
|
+
|
|
24
|
+
[lib/widget-api-types.ts:18](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L18)
|
|
25
|
+
|
|
26
|
+
___
|
|
27
|
+
|
|
28
|
+
### doc
|
|
29
|
+
|
|
30
|
+
• **doc**: `string`
|
|
31
|
+
|
|
32
|
+
#### Defined in
|
|
33
|
+
|
|
34
|
+
[lib/widget-api-types.ts:21](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L21)
|
|
35
|
+
|
|
36
|
+
___
|
|
37
|
+
|
|
38
|
+
### img
|
|
39
|
+
|
|
40
|
+
• **img**: `string`
|
|
41
|
+
|
|
42
|
+
#### Defined in
|
|
43
|
+
|
|
44
|
+
[lib/widget-api-types.ts:23](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L23)
|
|
45
|
+
|
|
46
|
+
___
|
|
47
|
+
|
|
48
|
+
### pdf
|
|
49
|
+
|
|
50
|
+
• **pdf**: `string`
|
|
51
|
+
|
|
52
|
+
#### Defined in
|
|
53
|
+
|
|
54
|
+
[lib/widget-api-types.ts:22](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L22)
|
|
55
|
+
|
|
56
|
+
___
|
|
57
|
+
|
|
58
|
+
### ppt
|
|
59
|
+
|
|
60
|
+
• **ppt**: `string`
|
|
61
|
+
|
|
62
|
+
#### Defined in
|
|
63
|
+
|
|
64
|
+
[lib/widget-api-types.ts:19](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L19)
|
|
65
|
+
|
|
66
|
+
___
|
|
67
|
+
|
|
68
|
+
### xls
|
|
69
|
+
|
|
70
|
+
• **xls**: `string`
|
|
71
|
+
|
|
72
|
+
#### Defined in
|
|
73
|
+
|
|
74
|
+
[lib/widget-api-types.ts:20](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L20)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Interface: SBImageEntity
|
|
2
|
+
|
|
3
|
+
Image entity definition
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [format](../wiki/SBImageEntity#format)
|
|
10
|
+
- [height](../wiki/SBImageEntity#height)
|
|
11
|
+
- [mimeType](../wiki/SBImageEntity#mimetype)
|
|
12
|
+
- [size](../wiki/SBImageEntity#size)
|
|
13
|
+
- [url](../wiki/SBImageEntity#url)
|
|
14
|
+
- [width](../wiki/SBImageEntity#width)
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### format
|
|
19
|
+
|
|
20
|
+
• `Optional` **format**: `string`
|
|
21
|
+
|
|
22
|
+
#### Defined in
|
|
23
|
+
|
|
24
|
+
[lib/widget-api-types.ts:117](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L117)
|
|
25
|
+
|
|
26
|
+
___
|
|
27
|
+
|
|
28
|
+
### height
|
|
29
|
+
|
|
30
|
+
• **height**: `number`
|
|
31
|
+
|
|
32
|
+
#### Defined in
|
|
33
|
+
|
|
34
|
+
[lib/widget-api-types.ts:118](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L118)
|
|
35
|
+
|
|
36
|
+
___
|
|
37
|
+
|
|
38
|
+
### mimeType
|
|
39
|
+
|
|
40
|
+
• `Optional` **mimeType**: `string`
|
|
41
|
+
|
|
42
|
+
#### Defined in
|
|
43
|
+
|
|
44
|
+
[lib/widget-api-types.ts:119](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L119)
|
|
45
|
+
|
|
46
|
+
___
|
|
47
|
+
|
|
48
|
+
### size
|
|
49
|
+
|
|
50
|
+
• `Optional` **size**: `number`
|
|
51
|
+
|
|
52
|
+
#### Defined in
|
|
53
|
+
|
|
54
|
+
[lib/widget-api-types.ts:120](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L120)
|
|
55
|
+
|
|
56
|
+
___
|
|
57
|
+
|
|
58
|
+
### url
|
|
59
|
+
|
|
60
|
+
• **url**: `string`
|
|
61
|
+
|
|
62
|
+
#### Defined in
|
|
63
|
+
|
|
64
|
+
[lib/widget-api-types.ts:121](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L121)
|
|
65
|
+
|
|
66
|
+
___
|
|
67
|
+
|
|
68
|
+
### width
|
|
69
|
+
|
|
70
|
+
• **width**: `number`
|
|
71
|
+
|
|
72
|
+
#### Defined in
|
|
73
|
+
|
|
74
|
+
[lib/widget-api-types.ts:122](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L122)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Interface: SBUserAvatar
|
|
2
|
+
|
|
3
|
+
User avatar definition
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [icon](../wiki/SBUserAvatar#icon)
|
|
10
|
+
- [original](../wiki/SBUserAvatar#original)
|
|
11
|
+
- [publicID](../wiki/SBUserAvatar#publicid)
|
|
12
|
+
- [thumb](../wiki/SBUserAvatar#thumb)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### icon
|
|
17
|
+
|
|
18
|
+
• **icon**: [`SBImageEntity`](../wiki/SBImageEntity)
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[lib/widget-api-types.ts:129](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L129)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### original
|
|
27
|
+
|
|
28
|
+
• **original**: [`SBImageEntity`](../wiki/SBImageEntity)
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[lib/widget-api-types.ts:130](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L130)
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### publicID
|
|
37
|
+
|
|
38
|
+
• **publicID**: `string`
|
|
39
|
+
|
|
40
|
+
#### Defined in
|
|
41
|
+
|
|
42
|
+
[lib/widget-api-types.ts:131](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L131)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### thumb
|
|
47
|
+
|
|
48
|
+
• **thumb**: [`SBImageEntity`](../wiki/SBImageEntity)
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[lib/widget-api-types.ts:132](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L132)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Interface: SBUserProfile
|
|
2
|
+
|
|
3
|
+
User profile data
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [avatar](../wiki/SBUserProfile#avatar)
|
|
10
|
+
- [department](../wiki/SBUserProfile#department)
|
|
11
|
+
- [firstName](../wiki/SBUserProfile#firstname)
|
|
12
|
+
- [lastName](../wiki/SBUserProfile#lastname)
|
|
13
|
+
- [location](../wiki/SBUserProfile#location)
|
|
14
|
+
- [phoneNumber](../wiki/SBUserProfile#phonenumber)
|
|
15
|
+
- [position](../wiki/SBUserProfile#position)
|
|
16
|
+
- [publicEmailAddress](../wiki/SBUserProfile#publicemailaddress)
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
### avatar
|
|
21
|
+
|
|
22
|
+
• `Optional` **avatar**: [`SBUserAvatar`](../wiki/SBUserAvatar)
|
|
23
|
+
|
|
24
|
+
#### Defined in
|
|
25
|
+
|
|
26
|
+
[lib/widget-api-types.ts:145](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L145)
|
|
27
|
+
|
|
28
|
+
___
|
|
29
|
+
|
|
30
|
+
### department
|
|
31
|
+
|
|
32
|
+
• `Optional` **department**: `string`
|
|
33
|
+
|
|
34
|
+
#### Defined in
|
|
35
|
+
|
|
36
|
+
[lib/widget-api-types.ts:146](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L146)
|
|
37
|
+
|
|
38
|
+
___
|
|
39
|
+
|
|
40
|
+
### firstName
|
|
41
|
+
|
|
42
|
+
• **firstName**: `string`
|
|
43
|
+
|
|
44
|
+
#### Defined in
|
|
45
|
+
|
|
46
|
+
[lib/widget-api-types.ts:139](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L139)
|
|
47
|
+
|
|
48
|
+
___
|
|
49
|
+
|
|
50
|
+
### lastName
|
|
51
|
+
|
|
52
|
+
• **lastName**: `string`
|
|
53
|
+
|
|
54
|
+
#### Defined in
|
|
55
|
+
|
|
56
|
+
[lib/widget-api-types.ts:140](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L140)
|
|
57
|
+
|
|
58
|
+
___
|
|
59
|
+
|
|
60
|
+
### location
|
|
61
|
+
|
|
62
|
+
• `Optional` **location**: `string`
|
|
63
|
+
|
|
64
|
+
#### Defined in
|
|
65
|
+
|
|
66
|
+
[lib/widget-api-types.ts:143](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L143)
|
|
67
|
+
|
|
68
|
+
___
|
|
69
|
+
|
|
70
|
+
### phoneNumber
|
|
71
|
+
|
|
72
|
+
• `Optional` **phoneNumber**: `string`
|
|
73
|
+
|
|
74
|
+
#### Defined in
|
|
75
|
+
|
|
76
|
+
[lib/widget-api-types.ts:141](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L141)
|
|
77
|
+
|
|
78
|
+
___
|
|
79
|
+
|
|
80
|
+
### position
|
|
81
|
+
|
|
82
|
+
• `Optional` **position**: `string`
|
|
83
|
+
|
|
84
|
+
#### Defined in
|
|
85
|
+
|
|
86
|
+
[lib/widget-api-types.ts:144](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L144)
|
|
87
|
+
|
|
88
|
+
___
|
|
89
|
+
|
|
90
|
+
### publicEmailAddress
|
|
91
|
+
|
|
92
|
+
• `Optional` **publicEmailAddress**: `string`
|
|
93
|
+
|
|
94
|
+
#### Defined in
|
|
95
|
+
|
|
96
|
+
[lib/widget-api-types.ts:142](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L142)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Interface: UserListItem
|
|
2
|
+
|
|
3
|
+
Single user item
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [entityType](../wiki/UserListItem#entitytype)
|
|
10
|
+
- [firstName](../wiki/UserListItem#firstname)
|
|
11
|
+
- [id](../wiki/UserListItem#id)
|
|
12
|
+
- [lastName](../wiki/UserListItem#lastname)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### entityType
|
|
17
|
+
|
|
18
|
+
• `Optional` **entityType**: `string`
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[lib/widget-api-types.ts:175](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L175)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### firstName
|
|
27
|
+
|
|
28
|
+
• `Optional` **firstName**: `string`
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[lib/widget-api-types.ts:173](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L173)
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### id
|
|
37
|
+
|
|
38
|
+
• `Optional` **id**: `string`
|
|
39
|
+
|
|
40
|
+
#### Defined in
|
|
41
|
+
|
|
42
|
+
[lib/widget-api-types.ts:172](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L172)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### lastName
|
|
47
|
+
|
|
48
|
+
• `Optional` **lastName**: `string`
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[lib/widget-api-types.ts:174](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L174)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Interface: UserListRequestQuery
|
|
2
|
+
|
|
3
|
+
User list request parameters
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [filter](../wiki/UserListRequestQuery#filter)
|
|
10
|
+
- [limit](../wiki/UserListRequestQuery#limit)
|
|
11
|
+
- [offset](../wiki/UserListRequestQuery#offset)
|
|
12
|
+
- [sort](../wiki/UserListRequestQuery#sort)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### filter
|
|
17
|
+
|
|
18
|
+
• `Optional` **filter**: `string`
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[lib/widget-api-types.ts:165](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L165)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### limit
|
|
27
|
+
|
|
28
|
+
• `Optional` **limit**: `number`
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[lib/widget-api-types.ts:162](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L162)
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### offset
|
|
37
|
+
|
|
38
|
+
• `Optional` **offset**: `number`
|
|
39
|
+
|
|
40
|
+
#### Defined in
|
|
41
|
+
|
|
42
|
+
[lib/widget-api-types.ts:163](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L163)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### sort
|
|
47
|
+
|
|
48
|
+
• `Optional` **sort**: [`UserListSorting`](../wiki/Home#userlistsorting)
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[lib/widget-api-types.ts:164](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L164)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Interface: UserListResponse
|
|
2
|
+
|
|
3
|
+
Responded user list
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
- [data](../wiki/UserListResponse#data)
|
|
10
|
+
- [limit](../wiki/UserListResponse#limit)
|
|
11
|
+
- [offset](../wiki/UserListResponse#offset)
|
|
12
|
+
- [total](../wiki/UserListResponse#total)
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### data
|
|
17
|
+
|
|
18
|
+
• **data**: [`UserListItem`](../wiki/UserListItem)[]
|
|
19
|
+
|
|
20
|
+
#### Defined in
|
|
21
|
+
|
|
22
|
+
[lib/widget-api-types.ts:182](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L182)
|
|
23
|
+
|
|
24
|
+
___
|
|
25
|
+
|
|
26
|
+
### limit
|
|
27
|
+
|
|
28
|
+
• **limit**: `number`
|
|
29
|
+
|
|
30
|
+
#### Defined in
|
|
31
|
+
|
|
32
|
+
[lib/widget-api-types.ts:184](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L184)
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
### offset
|
|
37
|
+
|
|
38
|
+
• **offset**: `number`
|
|
39
|
+
|
|
40
|
+
#### Defined in
|
|
41
|
+
|
|
42
|
+
[lib/widget-api-types.ts:183](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L183)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### total
|
|
47
|
+
|
|
48
|
+
• **total**: `number`
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[lib/widget-api-types.ts:185](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api-types.ts#L185)
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# Interface: WidgetApi
|
|
2
|
+
|
|
3
|
+
Widget API class.
|
|
4
|
+
|
|
5
|
+
A class providing access to additional information about the Staffbase ecosystem for widgets.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Methods
|
|
10
|
+
|
|
11
|
+
- [getIntegration](../wiki/WidgetApi#getintegration)
|
|
12
|
+
- [getLegacyAppTheme](../wiki/WidgetApi#getlegacyapptheme)
|
|
13
|
+
- [getUserInformation](../wiki/WidgetApi#getuserinformation)
|
|
14
|
+
- [getUserInformationByExternalId](../wiki/WidgetApi#getuserinformationbyexternalid)
|
|
15
|
+
- [getUserList](../wiki/WidgetApi#getuserlist)
|
|
16
|
+
|
|
17
|
+
## Methods
|
|
18
|
+
|
|
19
|
+
### getIntegration
|
|
20
|
+
|
|
21
|
+
▸ **getIntegration**(`type`, `refresh?`): `Promise`<[`IntegrationInformation`](../wiki/IntegrationInformation)\>
|
|
22
|
+
|
|
23
|
+
Call to retrieve a valid token to access the Microsoft API. Includes a time value to
|
|
24
|
+
refresh the token.
|
|
25
|
+
|
|
26
|
+
**`deprecated`** Returns a IntegrationToken or null if the user is not logged in. This will be replaced
|
|
27
|
+
completely by the IntegrationInformation, containing the token.
|
|
28
|
+
|
|
29
|
+
#### Parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Description |
|
|
32
|
+
| :------ | :------ | :------ |
|
|
33
|
+
| `type` | ``"ms365"`` | The name of the integration. ("ms365") |
|
|
34
|
+
| `refresh?` | `boolean` | Force a refresh of the integration. |
|
|
35
|
+
|
|
36
|
+
#### Returns
|
|
37
|
+
|
|
38
|
+
`Promise`<[`IntegrationInformation`](../wiki/IntegrationInformation)\>
|
|
39
|
+
|
|
40
|
+
A promise containing the IntegrationInformation is returned. If the user session is
|
|
41
|
+
not existing, the status is set to 'loggedOut' and the token is null. Additionally if the
|
|
42
|
+
integration is not configured the status returns 'unavailable'.
|
|
43
|
+
|
|
44
|
+
In case of an error, the promise is rejected.
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[lib/widget-api.ts:74](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api.ts#L74)
|
|
49
|
+
|
|
50
|
+
___
|
|
51
|
+
|
|
52
|
+
### getLegacyAppTheme
|
|
53
|
+
|
|
54
|
+
▸ **getLegacyAppTheme**(): [`ColorTheme`](../wiki/ColorTheme)
|
|
55
|
+
|
|
56
|
+
Call to retrieve the color theme of the app. Since this theme definitions
|
|
57
|
+
are currently redesigned, this method is called legacy.
|
|
58
|
+
|
|
59
|
+
#### Returns
|
|
60
|
+
|
|
61
|
+
[`ColorTheme`](../wiki/ColorTheme)
|
|
62
|
+
|
|
63
|
+
An object containing the color theme data is returned.
|
|
64
|
+
|
|
65
|
+
#### Defined in
|
|
66
|
+
|
|
67
|
+
[lib/widget-api.ts:29](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api.ts#L29)
|
|
68
|
+
|
|
69
|
+
___
|
|
70
|
+
|
|
71
|
+
### getUserInformation
|
|
72
|
+
|
|
73
|
+
▸ **getUserInformation**(`userId?`): `Promise`<[`SBUserProfile`](../wiki/SBUserProfile)\>
|
|
74
|
+
|
|
75
|
+
Call to retrieve the user profile of the current or a specific user.
|
|
76
|
+
|
|
77
|
+
#### Parameters
|
|
78
|
+
|
|
79
|
+
| Name | Type | Description |
|
|
80
|
+
| :------ | :------ | :------ |
|
|
81
|
+
| `userId?` | `string` | User ID to lookup for; leave blank to retrieve current user |
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`Promise`<[`SBUserProfile`](../wiki/SBUserProfile)\>
|
|
86
|
+
|
|
87
|
+
A promise containing the SBUserProfile is returned. In case of an error,
|
|
88
|
+
the promise is rejected.
|
|
89
|
+
|
|
90
|
+
#### Defined in
|
|
91
|
+
|
|
92
|
+
[lib/widget-api.ts:38](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api.ts#L38)
|
|
93
|
+
|
|
94
|
+
___
|
|
95
|
+
|
|
96
|
+
### getUserInformationByExternalId
|
|
97
|
+
|
|
98
|
+
▸ **getUserInformationByExternalId**(`externalId`): `Promise`<[`SBUserProfile`](../wiki/SBUserProfile)\>
|
|
99
|
+
|
|
100
|
+
Call to retrieve a user profile by its external ID.
|
|
101
|
+
|
|
102
|
+
#### Parameters
|
|
103
|
+
|
|
104
|
+
| Name | Type | Description |
|
|
105
|
+
| :------ | :------ | :------ |
|
|
106
|
+
| `externalId` | `string` | An external ID of the user that shall be returned |
|
|
107
|
+
|
|
108
|
+
#### Returns
|
|
109
|
+
|
|
110
|
+
`Promise`<[`SBUserProfile`](../wiki/SBUserProfile)\>
|
|
111
|
+
|
|
112
|
+
A promise containing the SBUserProfile is returned. In case of an error,
|
|
113
|
+
the promise is rejected.
|
|
114
|
+
|
|
115
|
+
#### Defined in
|
|
116
|
+
|
|
117
|
+
[lib/widget-api.ts:47](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api.ts#L47)
|
|
118
|
+
|
|
119
|
+
___
|
|
120
|
+
|
|
121
|
+
### getUserList
|
|
122
|
+
|
|
123
|
+
▸ **getUserList**(`query`): `Promise`<[`UserListResponse`](../wiki/UserListResponse)\>
|
|
124
|
+
|
|
125
|
+
Call to retrieve a list of users determined by the query object.
|
|
126
|
+
|
|
127
|
+
#### Parameters
|
|
128
|
+
|
|
129
|
+
| Name | Type | Description |
|
|
130
|
+
| :------ | :------ | :------ |
|
|
131
|
+
| `query` | [`UserListRequestQuery`](../wiki/UserListRequestQuery) | Adjust limit, offset, filter, and sorting for the request |
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
`Promise`<[`UserListResponse`](../wiki/UserListResponse)\>
|
|
136
|
+
|
|
137
|
+
A promise containing the UserListResponse is returned. In case of an error,
|
|
138
|
+
the promise is rejected.
|
|
139
|
+
|
|
140
|
+
#### Defined in
|
|
141
|
+
|
|
142
|
+
[lib/widget-api.ts:56](https://github.com/Staffbase/widget-sdk/blob/7bb16cc/lib/widget-api.ts#L56)
|
package/docs/_Sidebar.md
CHANGED
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
##
|
|
1
|
+
## @staffbase/widget-sdk
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
### Interfaces
|
|
5
|
-
|
|
6
|
-
- [BaseBlock](../wiki/Interface:%20BaseBlock)
|
|
7
|
-
- [BlockAttributes](../wiki/Interface:%20BlockAttributes)
|
|
8
|
-
- [BlockDefinition](../wiki/Interface:%20BlockDefinition)
|
|
9
|
-
- [BlockElement](../wiki/Interface:%20BlockElement)
|
|
10
|
-
- [ColorTheme](../wiki/Interface:%20ColorTheme)
|
|
11
|
-
- [ExternalBlockDefinition](../wiki/Interface:%20ExternalBlockDefinition)
|
|
12
|
-
- [SBColors](../wiki/Interface:%20SBColors)
|
|
13
|
-
- [SBFileType](../wiki/Interface:%20SBFileType)
|
|
14
|
-
- [SBImageEntity](../wiki/Interface:%20SBImageEntity)
|
|
15
|
-
- [SBUserAvatar](../wiki/Interface:%20SBUserAvatar)
|
|
16
|
-
- [SBUserProfile](../wiki/Interface:%20SBUserProfile)
|
|
17
|
-
- [UserListItem](../wiki/Interface:%20UserListItem)
|
|
18
|
-
- [UserListRequestQuery](../wiki/Interface:%20UserListRequestQuery)
|
|
19
|
-
- [UserListResponse](../wiki/Interface:%20UserListResponse)
|
|
20
|
-
- [WidgetApi](../wiki/Interface:%20WidgetApi)
|
|
3
|
+
- [Home](../wiki/Home)
|
package/package.json
CHANGED
|
@@ -1,41 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@staffbase/widget-sdk",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.6",
|
|
4
4
|
"description": "Staffbase SDK for Custom Widgets",
|
|
5
|
+
"module": "./dist/index.js",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"exports": "./dist/index.js",
|
|
8
|
+
"typings": "./dist/index.d.ts",
|
|
9
|
+
"type": "module",
|
|
5
10
|
"keywords": [
|
|
6
11
|
"web-components"
|
|
7
12
|
],
|
|
8
13
|
"scripts": {
|
|
9
14
|
"clean-doc": "npx rimraf docs",
|
|
10
|
-
"doc": "npm run clean-doc && typedoc --
|
|
15
|
+
"doc": "npm run clean-doc && typedoc --theme github-wiki --readme none --out docs lib/index.ts",
|
|
11
16
|
"release": "semantic-release",
|
|
12
17
|
"prepare": "husky install"
|
|
13
18
|
},
|
|
14
19
|
"license": "Apache-2.0",
|
|
15
20
|
"author": "Staffbase",
|
|
16
21
|
"dependencies": {
|
|
17
|
-
"@rjsf/core": "3.
|
|
18
|
-
"@types/json-schema": "^7.0.
|
|
22
|
+
"@rjsf/core": "^3.2.1",
|
|
23
|
+
"@types/json-schema": "^7.0.9"
|
|
19
24
|
},
|
|
20
25
|
"devDependencies": {
|
|
21
|
-
"@amanda-mitchell/semantic-release-npm-multiple": "2.
|
|
22
|
-
"@commitlint/cli": "
|
|
23
|
-
"@commitlint/config-conventional": "
|
|
24
|
-
"@tmware/semantic-release-npm-github-publish": "1.
|
|
25
|
-
"@types/react": "^17.0.
|
|
26
|
-
"husky": "^7.0.
|
|
27
|
-
"semantic-release": "^
|
|
28
|
-
"typedoc": "0.
|
|
29
|
-
"typedoc-github-wiki-theme": "0.
|
|
30
|
-
"typedoc-plugin-markdown": "3.
|
|
31
|
-
"typescript": "^4.
|
|
26
|
+
"@amanda-mitchell/semantic-release-npm-multiple": "2.17.0",
|
|
27
|
+
"@commitlint/cli": "16.1.0",
|
|
28
|
+
"@commitlint/config-conventional": "16.0.0",
|
|
29
|
+
"@tmware/semantic-release-npm-github-publish": "1.5.0",
|
|
30
|
+
"@types/react": "^17.0.38",
|
|
31
|
+
"husky": "^7.0.4",
|
|
32
|
+
"semantic-release": "^19.0.2",
|
|
33
|
+
"typedoc": "0.22.11",
|
|
34
|
+
"typedoc-github-wiki-theme": "1.0.0",
|
|
35
|
+
"typedoc-plugin-markdown": "3.11.12",
|
|
36
|
+
"typescript": "^4.5.5"
|
|
32
37
|
},
|
|
33
38
|
"repository": {
|
|
34
39
|
"type": "git",
|
|
35
40
|
"url": "https://github.com/Staffbase/widget-sdk"
|
|
36
41
|
},
|
|
37
42
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
39
|
-
"npm": ">=
|
|
43
|
+
"node": ">= 14",
|
|
44
|
+
"npm": ">= 7"
|
|
40
45
|
}
|
|
41
46
|
}
|