@favish/staffbase-utils 0.16.0 → 0.17.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.
- package/dist/src/types/groups/CreateGroupBody.d.ts +12 -0
- package/dist/src/types/groups/CreateGroupBody.d.ts.map +1 -0
- package/dist/src/types/groups/Group.d.ts +47 -0
- package/dist/src/types/groups/Group.d.ts.map +1 -0
- package/dist/src/types/groups/GroupAccessors.d.ts +13 -0
- package/dist/src/types/groups/GroupAccessors.d.ts.map +1 -0
- package/dist/src/types/groups/GroupAdminsWithGroups.d.ts +18 -0
- package/dist/src/types/groups/GroupAdminsWithGroups.d.ts.map +1 -0
- package/dist/src/types/groups/GroupBranch.d.ts +23 -0
- package/dist/src/types/groups/GroupBranch.d.ts.map +1 -0
- package/dist/src/types/groups/GroupConfig.d.ts +16 -0
- package/dist/src/types/groups/GroupConfig.d.ts.map +1 -0
- package/dist/src/types/groups/GroupConfigLocalization.d.ts +13 -0
- package/dist/src/types/groups/GroupConfigLocalization.d.ts.map +1 -0
- package/dist/src/types/groups/GroupUser.d.ts +51 -0
- package/dist/src/types/groups/GroupUser.d.ts.map +1 -0
- package/dist/src/types/groups/GroupUsers.d.ts +21 -0
- package/dist/src/types/groups/GroupUsers.d.ts.map +1 -0
- package/dist/src/types/groups/UpdateGroupBody.d.ts +12 -0
- package/dist/src/types/groups/UpdateGroupBody.d.ts.map +1 -0
- package/dist/src/types/groups/generated/groupsApi.d.ts +739 -0
- package/dist/src/types/groups/generated/groupsApi.d.ts.map +1 -0
- package/dist/src/types/groups/index.d.ts +11 -0
- package/dist/src/types/groups/index.d.ts.map +1 -0
- package/dist/src/types/news/CreatePostBody.d.ts +11 -0
- package/dist/src/types/news/CreatePostBody.d.ts.map +1 -0
- package/dist/src/types/news/Post.d.ts +73 -0
- package/dist/src/types/news/Post.d.ts.map +1 -0
- package/dist/src/types/news/PostAcknowledgements.d.ts +14 -0
- package/dist/src/types/news/PostAcknowledgements.d.ts.map +1 -0
- package/dist/src/types/news/PostAuthor.d.ts +16 -0
- package/dist/src/types/news/PostAuthor.d.ts.map +1 -0
- package/dist/src/types/news/PostAuthorAvatar.d.ts +17 -0
- package/dist/src/types/news/PostAuthorAvatar.d.ts.map +1 -0
- package/dist/src/types/news/PostComments.d.ts +11 -0
- package/dist/src/types/news/PostComments.d.ts.map +1 -0
- package/dist/src/types/news/PostLayout.d.ts +12 -0
- package/dist/src/types/news/PostLayout.d.ts.map +1 -0
- package/dist/src/types/news/PostLikes.d.ts +12 -0
- package/dist/src/types/news/PostLikes.d.ts.map +1 -0
- package/dist/src/types/news/PostSource.d.ts +11 -0
- package/dist/src/types/news/PostSource.d.ts.map +1 -0
- package/dist/src/types/news/UpdatePostBody.d.ts +10 -0
- package/dist/src/types/news/UpdatePostBody.d.ts.map +1 -0
- package/dist/src/types/news/generated/newsApi.d.ts +1433 -0
- package/dist/src/types/news/generated/newsApi.d.ts.map +1 -0
- package/dist/src/types/news/index.d.ts +11 -0
- package/dist/src/types/news/index.d.ts.map +1 -0
- package/dist/src/types/pages/CreatePagePayload.d.ts +12 -0
- package/dist/src/types/pages/CreatePagePayload.d.ts.map +1 -0
- package/dist/src/types/pages/Page.d.ts +51 -0
- package/dist/src/types/pages/Page.d.ts.map +1 -0
- package/dist/src/types/pages/PageAccess.d.ts +20 -0
- package/dist/src/types/pages/PageAccess.d.ts.map +1 -0
- package/dist/src/types/pages/PageContent.d.ts +18 -0
- package/dist/src/types/pages/PageContent.d.ts.map +1 -0
- package/dist/src/types/pages/UpdatePagePayload.d.ts +11 -0
- package/dist/src/types/pages/UpdatePagePayload.d.ts.map +1 -0
- package/dist/src/types/pages/generated/pagesApi.d.ts +418 -0
- package/dist/src/types/pages/generated/pagesApi.d.ts.map +1 -0
- package/dist/src/types/pages/index.d.ts +6 -0
- package/dist/src/types/pages/index.d.ts.map +1 -0
- package/dist/src/types/user/CreateUserBody.d.ts +11 -0
- package/dist/src/types/user/CreateUserBody.d.ts.map +1 -0
- package/dist/src/types/user/UpdateUserBody.d.ts +11 -0
- package/dist/src/types/user/UpdateUserBody.d.ts.map +1 -0
- package/dist/src/types/user/User.d.ts +65 -0
- package/dist/src/types/user/User.d.ts.map +1 -0
- package/dist/src/types/user/UserAvatar.d.ts +19 -0
- package/dist/src/types/user/UserAvatar.d.ts.map +1 -0
- package/dist/src/types/user/UserAvatarVariant.d.ts +23 -0
- package/dist/src/types/user/UserAvatarVariant.d.ts.map +1 -0
- package/dist/src/types/user/UserConfig.d.ts +11 -0
- package/dist/src/types/user/UserConfig.d.ts.map +1 -0
- package/dist/src/types/user/UserCreation.d.ts +16 -0
- package/dist/src/types/user/UserCreation.d.ts.map +1 -0
- package/dist/src/types/user/UserEmail.d.ts +15 -0
- package/dist/src/types/user/UserEmail.d.ts.map +1 -0
- package/dist/src/types/user/UserName.d.ts +13 -0
- package/dist/src/types/user/UserName.d.ts.map +1 -0
- package/dist/src/types/user/UserProfile.d.ts +28 -0
- package/dist/src/types/user/UserProfile.d.ts.map +1 -0
- package/dist/src/types/user/UserRecoveryCode.d.ts +17 -0
- package/dist/src/types/user/UserRecoveryCode.d.ts.map +1 -0
- package/dist/src/types/user/UserRole.d.ts +12 -0
- package/dist/src/types/user/UserRole.d.ts.map +1 -0
- package/dist/src/types/user/UserSecret.d.ts +20 -0
- package/dist/src/types/user/UserSecret.d.ts.map +1 -0
- package/dist/src/types/user/generated/userApi.d.ts +1525 -0
- package/dist/src/types/user/generated/userApi.d.ts.map +1 -0
- package/dist/src/types/user/index.d.ts +14 -0
- package/dist/src/types/user/index.d.ts.map +1 -0
- package/dist/types/groups.cjs.js +1 -0
- package/dist/types/groups.es.mjs +0 -0
- package/dist/types/news.cjs.js +1 -0
- package/dist/types/news.es.mjs +0 -0
- package/dist/types/pages.cjs.js +1 -0
- package/dist/types/pages.es.mjs +0 -0
- package/dist/types/user.cjs.js +1 -0
- package/dist/types/user.es.mjs +0 -0
- package/package.json +26 -1
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/groups": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* List groups
|
|
15
|
+
* @description This endpoint returns all groups on the Staffbase platform sorted by name.
|
|
16
|
+
*/
|
|
17
|
+
get: operations["GetGroups"];
|
|
18
|
+
put?: never;
|
|
19
|
+
/**
|
|
20
|
+
* Create a group
|
|
21
|
+
* @description This endpoint creates a new group on the Staffbase platform. Use this endpoint to define the <a href="https://support.staffbase.com/hc/en-us/articles/360010803979" target="_blank" rel="noopener noreferrer">group type</a>, which is determined by the configuration settings you provide.
|
|
22
|
+
*/
|
|
23
|
+
post: operations["CreateGroup"];
|
|
24
|
+
delete?: never;
|
|
25
|
+
options?: never;
|
|
26
|
+
head?: never;
|
|
27
|
+
patch?: never;
|
|
28
|
+
trace?: never;
|
|
29
|
+
};
|
|
30
|
+
"/groups/search": {
|
|
31
|
+
parameters: {
|
|
32
|
+
query?: never;
|
|
33
|
+
header?: never;
|
|
34
|
+
path?: never;
|
|
35
|
+
cookie?: never;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Search groups
|
|
39
|
+
* @description This endpoint allows to search for groups on the Staffbase platform. You can provide a query or filter by name, type, creator, and permission.
|
|
40
|
+
*/
|
|
41
|
+
get: operations["SearchGroups"];
|
|
42
|
+
put?: never;
|
|
43
|
+
post?: never;
|
|
44
|
+
delete?: never;
|
|
45
|
+
options?: never;
|
|
46
|
+
head?: never;
|
|
47
|
+
patch?: never;
|
|
48
|
+
trace?: never;
|
|
49
|
+
};
|
|
50
|
+
"/groups/{groupId}": {
|
|
51
|
+
parameters: {
|
|
52
|
+
query?: never;
|
|
53
|
+
header?: never;
|
|
54
|
+
path?: never;
|
|
55
|
+
cookie?: never;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Get a group
|
|
59
|
+
* @description This endpoint retrieves the details of a specific group.
|
|
60
|
+
*/
|
|
61
|
+
get: operations["GetGroup"];
|
|
62
|
+
put?: never;
|
|
63
|
+
post?: never;
|
|
64
|
+
/**
|
|
65
|
+
* Delete a group
|
|
66
|
+
* @description This endpoint deletes a group based on the group identifier. It can be executed by an administrator or group administrator.
|
|
67
|
+
*/
|
|
68
|
+
delete: operations["DeleteGroup"];
|
|
69
|
+
options?: never;
|
|
70
|
+
head?: never;
|
|
71
|
+
/**
|
|
72
|
+
* Update a group
|
|
73
|
+
* @description This endpoint updates a group. Only the fields provided in the request body will be updated. This applies not to the nested fields like the localization. To reset a field, set its value to `null` or leave it empty.
|
|
74
|
+
*/
|
|
75
|
+
patch: operations["PatchGroup"];
|
|
76
|
+
trace?: never;
|
|
77
|
+
};
|
|
78
|
+
"/groups/{groupId}/members/search": {
|
|
79
|
+
parameters: {
|
|
80
|
+
query?: never;
|
|
81
|
+
header?: never;
|
|
82
|
+
path?: never;
|
|
83
|
+
cookie?: never;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Get members
|
|
87
|
+
* @description This endpoint returns members of a specific group sorted by their name.
|
|
88
|
+
*/
|
|
89
|
+
get: operations["SearchMembersOfGroup"];
|
|
90
|
+
put?: never;
|
|
91
|
+
post?: never;
|
|
92
|
+
delete?: never;
|
|
93
|
+
options?: never;
|
|
94
|
+
head?: never;
|
|
95
|
+
patch?: never;
|
|
96
|
+
trace?: never;
|
|
97
|
+
};
|
|
98
|
+
"/groups/{groupId}/members": {
|
|
99
|
+
parameters: {
|
|
100
|
+
query?: never;
|
|
101
|
+
header?: never;
|
|
102
|
+
path?: never;
|
|
103
|
+
cookie?: never;
|
|
104
|
+
};
|
|
105
|
+
get?: never;
|
|
106
|
+
put?: never;
|
|
107
|
+
post?: never;
|
|
108
|
+
delete?: never;
|
|
109
|
+
options?: never;
|
|
110
|
+
head?: never;
|
|
111
|
+
/**
|
|
112
|
+
* Update members
|
|
113
|
+
* @description This endpoint adds or removes members from a group.
|
|
114
|
+
*/
|
|
115
|
+
patch: operations["PatchMembersOfGroup"];
|
|
116
|
+
trace?: never;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export type webhooks = Record<string, never>;
|
|
120
|
+
export interface components {
|
|
121
|
+
schemas: {
|
|
122
|
+
/** @description The object used to create a new group. The group type is determined by the configuration provided in the request. */
|
|
123
|
+
GroupCreate: {
|
|
124
|
+
config: components["schemas"]["GroupConfigCreate"];
|
|
125
|
+
/** @description Unique identifier from an external system, such as an HR integration. */
|
|
126
|
+
externalId?: string;
|
|
127
|
+
accessorIds?: components["schemas"]["GroupAccessorIds"];
|
|
128
|
+
adminIds?: components["schemas"]["AdminIds"];
|
|
129
|
+
/** @description A list of inclusion conditions that define which users are automatically added to the group. Each condition specifies tags or attributes that users must match to be included. This is only applicable for conditional groups. */
|
|
130
|
+
inclusions?: components["schemas"]["Conditions"][];
|
|
131
|
+
/** @description A list of user IDs that are included in the group, regardless of any exclusion or conditional rules. This is only applicable for conditional groups. */
|
|
132
|
+
inclusionUserIds?: string[];
|
|
133
|
+
/** @description A list of user IDs that are explicitly excluded from the group, even if they meet inclusion conditions. This is only applicable for conditional groups. */
|
|
134
|
+
exclusions?: components["schemas"]["Conditions"][];
|
|
135
|
+
/** @description A list of user IDs that are explicitly excluded from the group, even if they meet inclusion conditions. This is only applicable for conditional groups. */
|
|
136
|
+
exclusionUserIds?: string[];
|
|
137
|
+
};
|
|
138
|
+
GroupUpdate: {
|
|
139
|
+
accessorIds?: components["schemas"]["GroupAccessorIds"];
|
|
140
|
+
adminIds?: components["schemas"]["GroupAccessorIds"];
|
|
141
|
+
config?: components["schemas"]["GroupConfigUpdate"];
|
|
142
|
+
/** @description Unique identifier from an external system, such as an HR integration. */
|
|
143
|
+
externalId?: string;
|
|
144
|
+
/** @description A list of inclusion conditions that define which users are automatically added to the group. Each condition specifies tags or attributes that users must match to be included. */
|
|
145
|
+
inclusions?: components["schemas"]["Conditions"][];
|
|
146
|
+
/** @description A list of user IDs that are included in the group, regardless of any exclusion or conditional rules. */
|
|
147
|
+
inclusionUserIds?: string[];
|
|
148
|
+
/** @description A list of user IDs that are explicitly excluded from the group, even if they meet inclusion conditions. */
|
|
149
|
+
exclusions?: components["schemas"]["Conditions"][];
|
|
150
|
+
/** @description A list of user IDs that are explicitly excluded from the group, even if they meet inclusion conditions. */
|
|
151
|
+
exclusionUserIds?: string[];
|
|
152
|
+
};
|
|
153
|
+
/** @description Defines conditions for including or excluding users from a group based on tags. */
|
|
154
|
+
Conditions: {
|
|
155
|
+
/** @description List of tags that users must match to be included or excluded. */
|
|
156
|
+
tags?: string[];
|
|
157
|
+
};
|
|
158
|
+
GroupsSearch: {
|
|
159
|
+
/** @description The total number of groups matching the search. */
|
|
160
|
+
total?: number;
|
|
161
|
+
/** @description Cursor to get the next data page. */
|
|
162
|
+
nextCursor?: string;
|
|
163
|
+
/** @description Cursor to get the previous data page. */
|
|
164
|
+
prevCursor?: string;
|
|
165
|
+
/** @description List of searched groups. */
|
|
166
|
+
entries?: {
|
|
167
|
+
/** @description List of groups. */
|
|
168
|
+
data?: components["schemas"]["Group"][];
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
/** @description Returns a list of manageable groups. */
|
|
172
|
+
Groups: {
|
|
173
|
+
/** @description Cursor to get the next data page. */
|
|
174
|
+
nextCursor?: string;
|
|
175
|
+
/** @description Cursor to get the previous data page. */
|
|
176
|
+
prevCursor?: string;
|
|
177
|
+
/** @description List of groups. */
|
|
178
|
+
entries?: components["schemas"]["Group"][];
|
|
179
|
+
};
|
|
180
|
+
Group: {
|
|
181
|
+
/** @description Unique identifier of a group. */
|
|
182
|
+
id: string;
|
|
183
|
+
accessorIds?: components["schemas"]["GroupAccessorIds"];
|
|
184
|
+
adminIds?: components["schemas"]["GroupAccessorIds"];
|
|
185
|
+
/** @description External systems identifier of the group. */
|
|
186
|
+
externalId?: string;
|
|
187
|
+
config: components["schemas"]["GroupConfig"];
|
|
188
|
+
/**
|
|
189
|
+
* @description Type of the group. Learn more about <a href="https://support.staffbase.com/hc/en-us/articles/360010803979-Types-of-User-Groups" target="_blank" rel="noopener noreferrer"> types of user groups</a>.
|
|
190
|
+
* @enum {string}
|
|
191
|
+
*/
|
|
192
|
+
type: "conditional" | "internal" | "open";
|
|
193
|
+
creator: components["schemas"]["GroupCreator"];
|
|
194
|
+
/**
|
|
195
|
+
* Format: date-time
|
|
196
|
+
* @description Timestamp of the last update.
|
|
197
|
+
*/
|
|
198
|
+
updatedAt: string;
|
|
199
|
+
/** @description List of inclusion conditions. */
|
|
200
|
+
inclusions?: components["schemas"]["Conditions"][];
|
|
201
|
+
/** @description List of included userIds. */
|
|
202
|
+
inclusionUserIds?: string[];
|
|
203
|
+
/** @description List of exclusion conditions. */
|
|
204
|
+
exclusions?: components["schemas"]["Conditions"][];
|
|
205
|
+
/** @description List of excluded userIds. */
|
|
206
|
+
exclusionUserIds?: string[];
|
|
207
|
+
};
|
|
208
|
+
GroupConfigCreate: {
|
|
209
|
+
localization: components["schemas"]["Localization"];
|
|
210
|
+
/** @description Show the group in the My Groups overview page. Set this to `true` for open groups. For other group types, this setting is ignored. */
|
|
211
|
+
showInOverview?: boolean;
|
|
212
|
+
/** @description URL to the group image. */
|
|
213
|
+
imageUrl?: string;
|
|
214
|
+
/** @description Icon of the group. */
|
|
215
|
+
icon?: string;
|
|
216
|
+
/** @description URL of a custom icon for the group. */
|
|
217
|
+
customIconUrl?: string;
|
|
218
|
+
/** @description URL to the group page. */
|
|
219
|
+
link?: string;
|
|
220
|
+
};
|
|
221
|
+
GroupConfigUpdate: {
|
|
222
|
+
localization?: components["schemas"]["Localization"];
|
|
223
|
+
/** @description Show the group in the My Groups overview page. */
|
|
224
|
+
showInOverview?: boolean;
|
|
225
|
+
/** @description URL to the group image. */
|
|
226
|
+
imageUrl?: string;
|
|
227
|
+
/** @description Icon of the group. */
|
|
228
|
+
icon?: string;
|
|
229
|
+
/** @description URL of a custom icon for the group. */
|
|
230
|
+
customIconUrl?: string;
|
|
231
|
+
/** @description URL to the group page. */
|
|
232
|
+
link?: string;
|
|
233
|
+
};
|
|
234
|
+
GroupConfig: {
|
|
235
|
+
localization: components["schemas"]["Localization"];
|
|
236
|
+
/** @description Show the group in the My Groups overview page. */
|
|
237
|
+
showInOverview: boolean;
|
|
238
|
+
/** @description URL to the group image. */
|
|
239
|
+
imageUrl?: string;
|
|
240
|
+
/** @description Icon of the group. */
|
|
241
|
+
icon?: string;
|
|
242
|
+
/** @description URL of a custom icon for the group. */
|
|
243
|
+
customIconUrl?: string;
|
|
244
|
+
/** @description URL to the group page. */
|
|
245
|
+
link?: string;
|
|
246
|
+
};
|
|
247
|
+
GroupCreator: {
|
|
248
|
+
/** @description Unique identifier of the creator. */
|
|
249
|
+
id?: string;
|
|
250
|
+
/**
|
|
251
|
+
* @description Type of the creator.
|
|
252
|
+
* @enum {string}
|
|
253
|
+
*/
|
|
254
|
+
type: "integration" | "scim" | "token" | "user";
|
|
255
|
+
};
|
|
256
|
+
/** @description The object that holds different types of accessor ids for a group, including user, group, and platform access. Its presence indicates that the group is open. If it is omitted, the group is internal. It is required only for open groups. */
|
|
257
|
+
GroupAccessorIds: {
|
|
258
|
+
/** @description List of user ids that has access to this group. */
|
|
259
|
+
userIds?: string[];
|
|
260
|
+
/** @description List of group ids that has access to this group. */
|
|
261
|
+
groupIds?: string[];
|
|
262
|
+
/** @description Shows whether all users on the platform have access to this group. */
|
|
263
|
+
branchAccess?: boolean;
|
|
264
|
+
};
|
|
265
|
+
/** @description Defines the users or groups that are members of this group. */
|
|
266
|
+
GroupMemberIds: {
|
|
267
|
+
/** @description List of user identifiers for members who have access to the group. Each identifier can be either the system-generated unique user ID or an <a href="https://support.staffbase.com/hc/en-us/articles/360020766759" target="_blank" rel="noopener noreferrer">external identifier</a>. */
|
|
268
|
+
userIds?: string[];
|
|
269
|
+
};
|
|
270
|
+
/** @description Defines the users or groups that have administrative rights to manage this group. Administrators can modify group settings and membership. */
|
|
271
|
+
AdminIds: {
|
|
272
|
+
/** @description List of user ids that are administrators of this group. */
|
|
273
|
+
userIds?: string[];
|
|
274
|
+
/** @description List of group ids that are administrators of this group. */
|
|
275
|
+
groupIds?: string[];
|
|
276
|
+
};
|
|
277
|
+
/** @description The object that holds different localization values for a group. Refer to the <a href="https://developers.staffbase.com/references/languages-and-locale-codes" target="_blank" rel="noopener noreferrer">localization documentation</a> for the list of supported locales. */
|
|
278
|
+
Localization: {
|
|
279
|
+
[key: string]: {
|
|
280
|
+
/** @description Name of the group. */
|
|
281
|
+
name: string;
|
|
282
|
+
/** @description Description of the group. */
|
|
283
|
+
description?: string;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
UserConfig: {
|
|
287
|
+
/**
|
|
288
|
+
* @description Content language locale for the specific user. The locale has to be one of the <a href="/references/languages-and-locale-codes/" target="_blank">supported language locales</a>. The user can <a href="https://support.staffbase.com/hc/en-us/articles/206524359-Changing-the-Language" target="_blank">update their content language</a> any time in the App or Intranet settings.
|
|
289
|
+
* @example en_US
|
|
290
|
+
*/
|
|
291
|
+
locale: string;
|
|
292
|
+
};
|
|
293
|
+
Email: {
|
|
294
|
+
/** @description primary mail of the user */
|
|
295
|
+
value?: string;
|
|
296
|
+
/**
|
|
297
|
+
* @description source of the email address
|
|
298
|
+
* @enum {string}
|
|
299
|
+
*/
|
|
300
|
+
source: "admin" | "user" | "system";
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* @description The status of the user on the platform. The status `contact` is only applicable if you have Staffbase Email.
|
|
304
|
+
* @enum {string}
|
|
305
|
+
*/
|
|
306
|
+
UserStatus: "pending" | "activated" | "deactivated" | "deleted" | "contact";
|
|
307
|
+
UserAvatar: {
|
|
308
|
+
original?: {
|
|
309
|
+
/** @example https://{{sb-host}}.com/{{sb-system}}/image/upload/v1631172776/{{shortened}}/603b64e00c3fdb29134eb89b.png */
|
|
310
|
+
url?: string;
|
|
311
|
+
/** @example 225 */
|
|
312
|
+
width?: number;
|
|
313
|
+
/** @example 225 */
|
|
314
|
+
height?: number;
|
|
315
|
+
/** @example 4650 */
|
|
316
|
+
size?: number;
|
|
317
|
+
/** @example png */
|
|
318
|
+
format?: string;
|
|
319
|
+
/** @example image/png */
|
|
320
|
+
mimeType?: string;
|
|
321
|
+
/** @example 2021-09-09T07:32:56.000Z */
|
|
322
|
+
created?: string;
|
|
323
|
+
};
|
|
324
|
+
icon?: {
|
|
325
|
+
/** @example https://{{sb-host}}.com/{{sb-system}}/image/upload/v1631172776/{{shortened}}/603b64e00c3fdb29134eb89b.png */
|
|
326
|
+
url?: string;
|
|
327
|
+
/** @example null */
|
|
328
|
+
format?: string;
|
|
329
|
+
/** @example null */
|
|
330
|
+
mimeType?: string;
|
|
331
|
+
};
|
|
332
|
+
thumb?: {
|
|
333
|
+
/** @example https://{{sb-host}}.com/{{sb-system}}/image/upload/v1631172776/{{shortened}}/603b64e00c3fdb29134eb89b.png */
|
|
334
|
+
url?: string;
|
|
335
|
+
/** @example null */
|
|
336
|
+
format?: string;
|
|
337
|
+
/** @example null */
|
|
338
|
+
mimeType?: string;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
/** @description <a href="https://support.staffbase.com/hc/en-us/articles/25487559570834" target="_blank">System and custom profile fields</a> for a user. System fields are listed as named properties, and custom profile fields are supported as additional properties. */
|
|
342
|
+
UserDataProfile: {
|
|
343
|
+
/** @description The first name of the user. */
|
|
344
|
+
firstName?: string;
|
|
345
|
+
/** @description The last name of the user. */
|
|
346
|
+
lastName?: string;
|
|
347
|
+
/** @description The department of the user. */
|
|
348
|
+
department?: string;
|
|
349
|
+
/** @description The location of the user. */
|
|
350
|
+
location?: string;
|
|
351
|
+
/** @description The position or job title of the user. */
|
|
352
|
+
position?: string;
|
|
353
|
+
/** @description The phone number of the user. */
|
|
354
|
+
phoneNumber?: string;
|
|
355
|
+
/** @description The public email address of the user. Only shown in the user profile, not used for login or notifications. */
|
|
356
|
+
publicEmailAddress?: string;
|
|
357
|
+
avatar?: components["schemas"]["UserAvatar"];
|
|
358
|
+
} & {
|
|
359
|
+
[key: string]: unknown;
|
|
360
|
+
};
|
|
361
|
+
UserName: {
|
|
362
|
+
/** @description unique username of the user */
|
|
363
|
+
value?: string;
|
|
364
|
+
/**
|
|
365
|
+
* @description source of the username
|
|
366
|
+
* @enum {string}
|
|
367
|
+
*/
|
|
368
|
+
source: "admin" | "user" | "system";
|
|
369
|
+
};
|
|
370
|
+
User: {
|
|
371
|
+
/** @description unique identifier of a user */
|
|
372
|
+
id: string;
|
|
373
|
+
config?: components["schemas"]["UserConfig"];
|
|
374
|
+
/**
|
|
375
|
+
* Format: date-time
|
|
376
|
+
* @description timestamp when the user was created
|
|
377
|
+
*/
|
|
378
|
+
createdAt: string;
|
|
379
|
+
/**
|
|
380
|
+
* Format: date-time
|
|
381
|
+
* @description timestamp when the user was activated
|
|
382
|
+
*/
|
|
383
|
+
activatedAt?: string;
|
|
384
|
+
/** @description external identifier for a user */
|
|
385
|
+
externalId?: string;
|
|
386
|
+
/** @description role for permission checks */
|
|
387
|
+
role?: string;
|
|
388
|
+
email?: components["schemas"]["Email"];
|
|
389
|
+
status: components["schemas"]["UserStatus"];
|
|
390
|
+
/** @description access code assigned to the user before activation */
|
|
391
|
+
secret?: string;
|
|
392
|
+
profile?: components["schemas"]["UserDataProfile"];
|
|
393
|
+
userName?: components["schemas"]["UserName"];
|
|
394
|
+
};
|
|
395
|
+
UsersSearch: {
|
|
396
|
+
/** @description total number of members */
|
|
397
|
+
total?: number;
|
|
398
|
+
/** @description cursor to get the next data */
|
|
399
|
+
nextCursor?: string;
|
|
400
|
+
/** @description cursor to get the previous data */
|
|
401
|
+
prevCursor?: string;
|
|
402
|
+
/** @description list of members */
|
|
403
|
+
entries?: {
|
|
404
|
+
/** @description list of users */
|
|
405
|
+
data?: components["schemas"]["User"][];
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
responses: {
|
|
410
|
+
/** @description This occurs when the requested resource cannot be found. */
|
|
411
|
+
NotFound: {
|
|
412
|
+
headers: {
|
|
413
|
+
[name: string]: unknown;
|
|
414
|
+
};
|
|
415
|
+
content: {
|
|
416
|
+
/**
|
|
417
|
+
* @example {
|
|
418
|
+
* "identifier": 40408,
|
|
419
|
+
* "statusCode": 404,
|
|
420
|
+
* "message": "Group could not be found.",
|
|
421
|
+
* "type": "NotFoundException"
|
|
422
|
+
* }
|
|
423
|
+
*/
|
|
424
|
+
"application/json": unknown;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
/** @description This occurs when a valid authentication token is missing. */
|
|
428
|
+
NoToken: {
|
|
429
|
+
headers: {
|
|
430
|
+
[name: string]: unknown;
|
|
431
|
+
};
|
|
432
|
+
content: {
|
|
433
|
+
/**
|
|
434
|
+
* @example {
|
|
435
|
+
* "identifier": 40102,
|
|
436
|
+
* "statusCode": 401,
|
|
437
|
+
* "message": "This endpoint requires authentication.",
|
|
438
|
+
* "type": "NotLoggedInException"
|
|
439
|
+
* }
|
|
440
|
+
*/
|
|
441
|
+
"application/json": unknown;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
/** @description This occurs when the provided token does not have permission to perform the action. */
|
|
445
|
+
NoPermission: {
|
|
446
|
+
headers: {
|
|
447
|
+
[name: string]: unknown;
|
|
448
|
+
};
|
|
449
|
+
content: {
|
|
450
|
+
/**
|
|
451
|
+
* @example {
|
|
452
|
+
* "identifier": 40308,
|
|
453
|
+
* "statusCode": 403,
|
|
454
|
+
* "message": "Access to entity is restricted. You are trying to perform an operation that exceeds the access level.",
|
|
455
|
+
* "type": "AccessDeniedException"
|
|
456
|
+
* }
|
|
457
|
+
*/
|
|
458
|
+
"application/json": unknown;
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
parameters: {
|
|
463
|
+
/** @description The maximum number of results to return per page. */
|
|
464
|
+
Limit: number;
|
|
465
|
+
/** @description The unique identifier automatically generated by the Staffbase platform or the external identifier (`externalId`), if it is added for the group. */
|
|
466
|
+
GroupId: string;
|
|
467
|
+
/** @description Cursor for pagination. Use it to fetch the next or previous page of results. When a cursor is provided, only the `limit` parameter is applied. Changing other parameters affects pagination consistency. */
|
|
468
|
+
Cursor: string;
|
|
469
|
+
/** @description Search for a specific group and their name. */
|
|
470
|
+
Query: string;
|
|
471
|
+
/** @description Filter group members by their user status. The query parameter supports multiple values. For example, `?status=activated&status=pending` returns all members who are either registered on the platform or pending activation. */
|
|
472
|
+
UserStatus: "pending" | "activated" | "deactivated" | "contact";
|
|
473
|
+
/** @description Filter by group type. Learn more about <a href="https://support.staffbase.com/hc/en-us/articles/360010803979-Types-of-User-Groups" target="_blank" rel="noopener noreferrer"> types of user groups</a>. */
|
|
474
|
+
Type: "conditional" | "internal" | "open";
|
|
475
|
+
/** @description Filter groups by creator ID. Only groups owned by the specified ID are returned. */
|
|
476
|
+
CreatorIds: string[];
|
|
477
|
+
/** @description Filter groups by permission level. Use `manage` for groups you can edit or `access` for all groups you can view. */
|
|
478
|
+
Permission: "manage" | "access";
|
|
479
|
+
/** @description Sort groups by a specific field. */
|
|
480
|
+
Sort: "created_ASC" | "created_DESC" | "updated_DESC" | "name_ASC" | "name_DESC" | "relevance_DESC";
|
|
481
|
+
};
|
|
482
|
+
requestBodies: never;
|
|
483
|
+
headers: never;
|
|
484
|
+
pathItems: never;
|
|
485
|
+
}
|
|
486
|
+
export type $defs = Record<string, never>;
|
|
487
|
+
export interface operations {
|
|
488
|
+
GetGroups: {
|
|
489
|
+
parameters: {
|
|
490
|
+
query?: {
|
|
491
|
+
/** @description Cursor for pagination. Use it to fetch the next or previous page of results. When a cursor is provided, only the `limit` parameter is applied. Changing other parameters affects pagination consistency. */
|
|
492
|
+
cursor?: components["parameters"]["Cursor"];
|
|
493
|
+
/** @description The maximum number of results to return per page. */
|
|
494
|
+
limit?: components["parameters"]["Limit"];
|
|
495
|
+
};
|
|
496
|
+
header?: never;
|
|
497
|
+
path?: never;
|
|
498
|
+
cookie?: never;
|
|
499
|
+
};
|
|
500
|
+
requestBody?: never;
|
|
501
|
+
responses: {
|
|
502
|
+
/** @description Get a list of groups on the Staffbase platform. */
|
|
503
|
+
200: {
|
|
504
|
+
headers: {
|
|
505
|
+
[name: string]: unknown;
|
|
506
|
+
};
|
|
507
|
+
content: {
|
|
508
|
+
"application/vnd.staffbase.accessors.groups.v2+json": components["schemas"]["Groups"];
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
401: components["responses"]["NoToken"];
|
|
512
|
+
403: components["responses"]["NoPermission"];
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
CreateGroup: {
|
|
516
|
+
parameters: {
|
|
517
|
+
query?: never;
|
|
518
|
+
header?: never;
|
|
519
|
+
path?: never;
|
|
520
|
+
cookie?: never;
|
|
521
|
+
};
|
|
522
|
+
requestBody?: {
|
|
523
|
+
content: {
|
|
524
|
+
"application/vnd.staffbase.accessors.group-create.v2+json": components["schemas"]["GroupCreate"];
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
responses: {
|
|
528
|
+
/** @description Group successfully created. */
|
|
529
|
+
201: {
|
|
530
|
+
headers: {
|
|
531
|
+
[name: string]: unknown;
|
|
532
|
+
};
|
|
533
|
+
content: {
|
|
534
|
+
"application/vnd.staffbase.accessors.group.v3+json": components["schemas"]["Group"];
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
401: components["responses"]["NoToken"];
|
|
538
|
+
403: components["responses"]["NoPermission"];
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
SearchGroups: {
|
|
542
|
+
parameters: {
|
|
543
|
+
query?: {
|
|
544
|
+
/** @description Cursor for pagination. Use it to fetch the next or previous page of results. When a cursor is provided, only the `limit` parameter is applied. Changing other parameters affects pagination consistency. */
|
|
545
|
+
cursor?: components["parameters"]["Cursor"];
|
|
546
|
+
/** @description Sort groups by a specific field. */
|
|
547
|
+
sort?: components["parameters"]["Sort"];
|
|
548
|
+
/** @description The maximum number of results to return per page. */
|
|
549
|
+
limit?: components["parameters"]["Limit"];
|
|
550
|
+
/** @description Search for a specific group and their name. */
|
|
551
|
+
query?: components["parameters"]["Query"];
|
|
552
|
+
/** @description Filter by group type. Learn more about <a href="https://support.staffbase.com/hc/en-us/articles/360010803979-Types-of-User-Groups" target="_blank" rel="noopener noreferrer"> types of user groups</a>. */
|
|
553
|
+
type?: components["parameters"]["Type"];
|
|
554
|
+
/** @description Filter groups by permission level. Use `manage` for groups you can edit or `access` for all groups you can view. */
|
|
555
|
+
permission?: components["parameters"]["Permission"];
|
|
556
|
+
/** @description Filter groups by creator ID. Only groups owned by the specified ID are returned. */
|
|
557
|
+
creatorIds?: components["parameters"]["CreatorIds"];
|
|
558
|
+
};
|
|
559
|
+
header?: never;
|
|
560
|
+
path?: never;
|
|
561
|
+
cookie?: never;
|
|
562
|
+
};
|
|
563
|
+
requestBody?: never;
|
|
564
|
+
responses: {
|
|
565
|
+
/** @description Returns a list of groups that match the specified search filters. */
|
|
566
|
+
200: {
|
|
567
|
+
headers: {
|
|
568
|
+
[name: string]: unknown;
|
|
569
|
+
};
|
|
570
|
+
content: {
|
|
571
|
+
"application/vnd.staffbase.accessors.groups-search.v1+json": components["schemas"]["GroupsSearch"];
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
401: components["responses"]["NoToken"];
|
|
575
|
+
403: components["responses"]["NoPermission"];
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
GetGroup: {
|
|
579
|
+
parameters: {
|
|
580
|
+
query?: never;
|
|
581
|
+
header?: never;
|
|
582
|
+
path: {
|
|
583
|
+
/** @description The unique identifier automatically generated by the Staffbase platform or the external identifier (`externalId`), if it is added for the group. */
|
|
584
|
+
groupId: components["parameters"]["GroupId"];
|
|
585
|
+
};
|
|
586
|
+
cookie?: never;
|
|
587
|
+
};
|
|
588
|
+
requestBody?: never;
|
|
589
|
+
responses: {
|
|
590
|
+
/** @description Group returned. */
|
|
591
|
+
200: {
|
|
592
|
+
headers: {
|
|
593
|
+
[name: string]: unknown;
|
|
594
|
+
};
|
|
595
|
+
content: {
|
|
596
|
+
"application/vnd.staffbase.accessors.group.v3+json": components["schemas"]["Group"];
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
401: components["responses"]["NoToken"];
|
|
600
|
+
404: components["responses"]["NotFound"];
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
DeleteGroup: {
|
|
604
|
+
parameters: {
|
|
605
|
+
query?: never;
|
|
606
|
+
header?: never;
|
|
607
|
+
path: {
|
|
608
|
+
/** @description The unique identifier automatically generated by the Staffbase platform or the external identifier (`externalId`), if it is added for the group. */
|
|
609
|
+
groupId: components["parameters"]["GroupId"];
|
|
610
|
+
};
|
|
611
|
+
cookie?: never;
|
|
612
|
+
};
|
|
613
|
+
requestBody?: never;
|
|
614
|
+
responses: {
|
|
615
|
+
/** @description Group deleted. */
|
|
616
|
+
204: {
|
|
617
|
+
headers: {
|
|
618
|
+
[name: string]: unknown;
|
|
619
|
+
};
|
|
620
|
+
content: {
|
|
621
|
+
"application/vnd.staffbase.accessors.group-delete.v2+json": unknown;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
401: components["responses"]["NoToken"];
|
|
625
|
+
404: components["responses"]["NotFound"];
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
PatchGroup: {
|
|
629
|
+
parameters: {
|
|
630
|
+
query?: never;
|
|
631
|
+
header?: never;
|
|
632
|
+
path: {
|
|
633
|
+
/** @description The unique identifier automatically generated by the Staffbase platform or the external identifier (`externalId`), if it is added for the group. */
|
|
634
|
+
groupId: components["parameters"]["GroupId"];
|
|
635
|
+
};
|
|
636
|
+
cookie?: never;
|
|
637
|
+
};
|
|
638
|
+
requestBody?: {
|
|
639
|
+
content: {
|
|
640
|
+
"application/vnd.staffbase.accessors.group-update.v1+json": components["schemas"]["GroupUpdate"];
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
responses: {
|
|
644
|
+
/** @description Group updated. */
|
|
645
|
+
200: {
|
|
646
|
+
headers: {
|
|
647
|
+
[name: string]: unknown;
|
|
648
|
+
};
|
|
649
|
+
content: {
|
|
650
|
+
"application/vnd.staffbase.accessors.group.v3+json": components["schemas"]["Group"];
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
401: components["responses"]["NoToken"];
|
|
654
|
+
404: components["responses"]["NotFound"];
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
SearchMembersOfGroup: {
|
|
658
|
+
parameters: {
|
|
659
|
+
query?: {
|
|
660
|
+
/** @description The maximum number of results to return per page. */
|
|
661
|
+
limit?: components["parameters"]["Limit"];
|
|
662
|
+
/** @description Cursor for pagination. Use it to fetch the next or previous page of results. When a cursor is provided, only the `limit` parameter is applied. Changing other parameters affects pagination consistency. */
|
|
663
|
+
cursor?: components["parameters"]["Cursor"];
|
|
664
|
+
/** @description Search for a specific group and their name. */
|
|
665
|
+
query?: components["parameters"]["Query"];
|
|
666
|
+
/** @description Filter group members by their user status. The query parameter supports multiple values. For example, `?status=activated&status=pending` returns all members who are either registered on the platform or pending activation. */
|
|
667
|
+
status?: components["parameters"]["UserStatus"];
|
|
668
|
+
};
|
|
669
|
+
header?: never;
|
|
670
|
+
path: {
|
|
671
|
+
/** @description The unique identifier automatically generated by the Staffbase platform or the external identifier (`externalId`), if it is added for the group. */
|
|
672
|
+
groupId: components["parameters"]["GroupId"];
|
|
673
|
+
};
|
|
674
|
+
cookie?: never;
|
|
675
|
+
};
|
|
676
|
+
requestBody?: never;
|
|
677
|
+
responses: {
|
|
678
|
+
/** @description Group members returned. */
|
|
679
|
+
200: {
|
|
680
|
+
headers: {
|
|
681
|
+
[name: string]: unknown;
|
|
682
|
+
};
|
|
683
|
+
content: {
|
|
684
|
+
"application/vnd.staffbase.accessors.group.members-search.v1+json": components["schemas"]["UsersSearch"];
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
401: components["responses"]["NoToken"];
|
|
688
|
+
404: components["responses"]["NotFound"];
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
PatchMembersOfGroup: {
|
|
692
|
+
parameters: {
|
|
693
|
+
query?: never;
|
|
694
|
+
header?: never;
|
|
695
|
+
path: {
|
|
696
|
+
/** @description The unique identifier automatically generated by the Staffbase platform or the external identifier (`externalId`), if it is added for the group. */
|
|
697
|
+
groupId: components["parameters"]["GroupId"];
|
|
698
|
+
};
|
|
699
|
+
cookie?: never;
|
|
700
|
+
};
|
|
701
|
+
requestBody?: {
|
|
702
|
+
content: {
|
|
703
|
+
/**
|
|
704
|
+
* @example {
|
|
705
|
+
* "userIds": [
|
|
706
|
+
* "62dfa87d725db035a9a2278a",
|
|
707
|
+
* "jane@examplecompany.com"
|
|
708
|
+
* ]
|
|
709
|
+
* }
|
|
710
|
+
*/
|
|
711
|
+
"application/vnd.staffbase.accessors.group.members-add.v1+json": components["schemas"]["GroupMemberIds"];
|
|
712
|
+
/**
|
|
713
|
+
* @example {
|
|
714
|
+
* "userIds": [
|
|
715
|
+
* "62dfa87d725db035a9a2278a",
|
|
716
|
+
* "jane@examplecompany.com"
|
|
717
|
+
* ]
|
|
718
|
+
* }
|
|
719
|
+
*/
|
|
720
|
+
"application/vnd.staffbase.accessors.group.members-remove.v1+json": components["schemas"]["GroupMemberIds"];
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
responses: {
|
|
724
|
+
/** @description Group members updated. */
|
|
725
|
+
204: {
|
|
726
|
+
headers: {
|
|
727
|
+
[name: string]: unknown;
|
|
728
|
+
};
|
|
729
|
+
content: {
|
|
730
|
+
"application/vnd.staffbase.accessors.group.members-add.v1+json": unknown;
|
|
731
|
+
"application/vnd.staffbase.accessors.group.members-remove.v1+json": unknown;
|
|
732
|
+
};
|
|
733
|
+
};
|
|
734
|
+
401: components["responses"]["NoToken"];
|
|
735
|
+
404: components["responses"]["NotFound"];
|
|
736
|
+
};
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
//# sourceMappingURL=groupsApi.d.ts.map
|