@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/pages/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,YAAY,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { components } from './generated/userApi';
|
|
2
|
+
/**
|
|
3
|
+
* Request body for creating a Staffbase user (`POST /users`).
|
|
4
|
+
*
|
|
5
|
+
* Thin alias over the machine-generated user API schema so the public name
|
|
6
|
+
* stays stable even if `generated/userApi.ts` is regenerated. The write side of
|
|
7
|
+
* the spec is properly schematized, so this is sourced directly from codegen
|
|
8
|
+
* (run the user codegen script to refresh).
|
|
9
|
+
*/
|
|
10
|
+
export type CreateUserBody = components['schemas']['CreateUser'];
|
|
11
|
+
//# sourceMappingURL=CreateUserBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateUserBody.d.ts","sourceRoot":"","sources":["../../../../src/types/user/CreateUserBody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { components } from './generated/userApi';
|
|
2
|
+
/**
|
|
3
|
+
* Request body for updating a Staffbase user (`PUT /users/{id}`).
|
|
4
|
+
*
|
|
5
|
+
* Thin alias over the machine-generated user API schema so the public name
|
|
6
|
+
* stays stable even if `generated/userApi.ts` is regenerated. The write side of
|
|
7
|
+
* the spec is properly schematized, so this is sourced directly from codegen
|
|
8
|
+
* (run the user codegen script to refresh).
|
|
9
|
+
*/
|
|
10
|
+
export type UpdateUserBody = components['schemas']['UpdateUser'];
|
|
11
|
+
//# sourceMappingURL=UpdateUserBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdateUserBody.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UpdateUserBody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { UserAvatar } from './UserAvatar';
|
|
2
|
+
import { UserConfig } from './UserConfig';
|
|
3
|
+
import { UserCreation } from './UserCreation';
|
|
4
|
+
import { UserEmail } from './UserEmail';
|
|
5
|
+
import { UserName } from './UserName';
|
|
6
|
+
import { UserProfile } from './UserProfile';
|
|
7
|
+
import { UserRecoveryCode } from './UserRecoveryCode';
|
|
8
|
+
import { UserRole } from './UserRole';
|
|
9
|
+
import { UserSecret } from './UserSecret';
|
|
10
|
+
/**
|
|
11
|
+
* A Staffbase user as returned by the user read endpoints (`GET /api/users`
|
|
12
|
+
* list items and `GET /api/users/{id}`).
|
|
13
|
+
*
|
|
14
|
+
* Curated, not machine-generated. The official user OpenAPI spec carries two
|
|
15
|
+
* read shapes and the runtime endpoint matches NEITHER cleanly: it overlaps the
|
|
16
|
+
* spec `User` schema on only 7 of 11 fields, but matches `SingleUserWithAvatar`
|
|
17
|
+
* on all 20 of its fields AND returns extra fields the spec never documents
|
|
18
|
+
* (`branchRole`, `creation`, `entityType`, `recoveryCode`, `secret`,
|
|
19
|
+
* `userName`, `tags`, plus structured `emails`/`userName` objects). This type
|
|
20
|
+
* is therefore grounded in an exhaustive prod sweep rather than codegen.
|
|
21
|
+
*
|
|
22
|
+
* Required/optional was verified against a sweep of the full prod population
|
|
23
|
+
* (49,215 users) plus single-reads: `avatar` was absent on ~3/300 sampled,
|
|
24
|
+
* `secret` on ~8/300, `recoveryCode` on ~3/300. The full-population sweep also
|
|
25
|
+
* showed `userName` and `groupIDs` missing on some users, `publicEmailAddress`
|
|
26
|
+
* occasionally `null`, and a long tail of rare omissions (`externalID` 5/49215,
|
|
27
|
+
* `tags` 9/49215) - all typed optional accordingly.
|
|
28
|
+
*
|
|
29
|
+
* Wire-format notes (verbatim): `externalID` uses a capital `ID`; `userName`
|
|
30
|
+
* and `emails[]` are objects, not bare strings; `recoveryCode`/`secret` are
|
|
31
|
+
* objects on read (strings on write); `department`/`location`/`position` and
|
|
32
|
+
* `publicEmailAddress` are nullable; `phoneNumber` and `mandatoryGroupIDs` were
|
|
33
|
+
* observed only as `null` across the whole population (typed as a union with
|
|
34
|
+
* the spec/profile string/array form).
|
|
35
|
+
*/
|
|
36
|
+
export interface User {
|
|
37
|
+
id: string;
|
|
38
|
+
firstName: string;
|
|
39
|
+
lastName: string;
|
|
40
|
+
userName?: UserName;
|
|
41
|
+
emails: UserEmail[];
|
|
42
|
+
publicEmailAddress: string | null;
|
|
43
|
+
phoneNumber: string | null;
|
|
44
|
+
externalID?: string;
|
|
45
|
+
entityType: string;
|
|
46
|
+
status: string;
|
|
47
|
+
activated: string;
|
|
48
|
+
created: string;
|
|
49
|
+
updated: string;
|
|
50
|
+
creation: UserCreation;
|
|
51
|
+
role: UserRole;
|
|
52
|
+
branchRole: string;
|
|
53
|
+
config: UserConfig;
|
|
54
|
+
profile: UserProfile;
|
|
55
|
+
department: string | null;
|
|
56
|
+
location: string | null;
|
|
57
|
+
position: string | null;
|
|
58
|
+
groupIDs?: string[];
|
|
59
|
+
mandatoryGroupIDs: string[] | null;
|
|
60
|
+
tags?: string[];
|
|
61
|
+
avatar?: UserAvatar;
|
|
62
|
+
secret?: UserSecret;
|
|
63
|
+
recoveryCode?: UserRecoveryCode;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=User.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/types/user/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,YAAY,CAAA;IACtB,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,UAAU,CAAA;IAClB,OAAO,EAAE,WAAW,CAAA;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,iBAAiB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAClC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAA;CAChC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UserAvatarVariant } from './UserAvatarVariant';
|
|
2
|
+
/**
|
|
3
|
+
* The rendition set of a user avatar (or profile header image) returned by the
|
|
4
|
+
* Staffbase user read endpoints.
|
|
5
|
+
*
|
|
6
|
+
* Grounded in a prod sweep (6000 users): when present, the `avatar` object is
|
|
7
|
+
* either the full rendition set (`original`/`icon`/`thumb`, sometimes with
|
|
8
|
+
* `publicID`) or an empty object `{}` (a placeholder for users with no uploaded
|
|
9
|
+
* avatar). All members are therefore optional. `publicID` accompanies only the
|
|
10
|
+
* subset created through the newer upload pipeline. Each rendition reuses
|
|
11
|
+
* {@link UserAvatarVariant}.
|
|
12
|
+
*/
|
|
13
|
+
export interface UserAvatar {
|
|
14
|
+
original?: UserAvatarVariant;
|
|
15
|
+
icon?: UserAvatarVariant;
|
|
16
|
+
thumb?: UserAvatarVariant;
|
|
17
|
+
publicID?: string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=UserAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserAvatar.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserAvatar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,IAAI,CAAC,EAAE,iBAAiB,CAAA;IACxB,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single rendition of a user avatar (or profile header image) as returned by
|
|
3
|
+
* the Staffbase user read endpoints (`GET /api/users`, `GET /api/users/{id}`).
|
|
4
|
+
*
|
|
5
|
+
* Grounded in an exhaustive prod sweep (2000 users): `url`, `format` and
|
|
6
|
+
* `mimeType` are present on every observed variant; `format` and `mimeType` are
|
|
7
|
+
* frequently `null` (an upload without a detected format). `width`/`height` are
|
|
8
|
+
* always present on the `original` rendition but optional on `icon`/`thumb`
|
|
9
|
+
* (absent on roughly half of them). `size` (bytes) is only ever present on the
|
|
10
|
+
* `original` rendition.
|
|
11
|
+
*
|
|
12
|
+
* Distinct from the news `ArticleImageVariant`, which requires `width`/`height`
|
|
13
|
+
* on all renditions; the user avatar shape leaves them optional.
|
|
14
|
+
*/
|
|
15
|
+
export interface UserAvatarVariant {
|
|
16
|
+
url: string;
|
|
17
|
+
format: string | null;
|
|
18
|
+
mimeType: string | null;
|
|
19
|
+
width?: number;
|
|
20
|
+
height?: number;
|
|
21
|
+
size?: number;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=UserAvatarVariant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserAvatarVariant.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserAvatarVariant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-user configuration block returned by the Staffbase user read endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Grounded in a prod sweep (2000 users): every user carried a `config` object
|
|
5
|
+
* with a `locale` string (e.g. `en_US`). Matches the spec
|
|
6
|
+
* `SingleUserWithAvatar.config` shape.
|
|
7
|
+
*/
|
|
8
|
+
export interface UserConfig {
|
|
9
|
+
locale: string;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=UserConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserConfig.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserConfig.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provenance of a Staffbase user account, returned by the user read endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Grounded in a prod sweep: `type` was present on every user (e.g. how the
|
|
5
|
+
* account was created). `invitorID`/`invitorType` identify the actor that
|
|
6
|
+
* invited the user and were present on almost every account (absent only on
|
|
7
|
+
* users created without an explicit inviter). `ssoConfigID` appears only on
|
|
8
|
+
* users provisioned through an SSO configuration. Not documented by the spec.
|
|
9
|
+
*/
|
|
10
|
+
export interface UserCreation {
|
|
11
|
+
type: string;
|
|
12
|
+
invitorID?: string;
|
|
13
|
+
invitorType?: string;
|
|
14
|
+
ssoConfigID?: string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=UserCreation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCreation.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserCreation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One email entry of a Staffbase user, as embedded in the `emails` array of the
|
|
3
|
+
* user read endpoints.
|
|
4
|
+
*
|
|
5
|
+
* Grounded in a full-population prod sweep (49,215 users): entries carry
|
|
6
|
+
* `primary` and `providerID`, where `providerID` identifies the source that
|
|
7
|
+
* supplied the address (e.g. the SSO/identity provider or `staffbase`). `value`
|
|
8
|
+
* is optional - one entry in the whole population lacked it.
|
|
9
|
+
*/
|
|
10
|
+
export interface UserEmail {
|
|
11
|
+
value?: string;
|
|
12
|
+
primary: boolean;
|
|
13
|
+
providerID: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=UserEmail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserEmail.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserEmail.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The structured user name returned by the Staffbase user read endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Unlike the write side (where `userName` is a plain string), the read shape is
|
|
5
|
+
* an object. Grounded in a prod sweep (2000 users): every user carried both
|
|
6
|
+
* `value` and `providerID`, where `providerID` identifies the source that
|
|
7
|
+
* supplied the user name (e.g. the SSO/identity provider or `staffbase`).
|
|
8
|
+
*/
|
|
9
|
+
export interface UserName {
|
|
10
|
+
value: string;
|
|
11
|
+
providerID: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=UserName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserName.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserName.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UserAvatar } from './UserAvatar';
|
|
2
|
+
/**
|
|
3
|
+
* The profile block of a Staffbase user, returned by the user read endpoints.
|
|
4
|
+
*
|
|
5
|
+
* The Staffbase user model lets each tenant define arbitrary profile fields, so
|
|
6
|
+
* this is an open record rather than a fixed shape. Grounded in a prod sweep
|
|
7
|
+
* (2000 users): the great majority of fields are tenant-defined string
|
|
8
|
+
* attributes (department/job/location codes, etc.), so the index signature
|
|
9
|
+
* carries `string`. Two structured fields recur and are typed explicitly:
|
|
10
|
+
* `avatar` and `profileHeaderImage`, both {@link UserAvatar} rendition sets.
|
|
11
|
+
*
|
|
12
|
+
* The well-known string fields below mirror the spec `UserProfile` (the values
|
|
13
|
+
* the platform mirrors from the top-level user fields). All are optional - they
|
|
14
|
+
* appear only when populated for a given user/tenant.
|
|
15
|
+
*/
|
|
16
|
+
export interface UserProfile {
|
|
17
|
+
avatar?: UserAvatar;
|
|
18
|
+
profileHeaderImage?: UserAvatar;
|
|
19
|
+
firstName?: string;
|
|
20
|
+
lastName?: string;
|
|
21
|
+
department?: string;
|
|
22
|
+
location?: string;
|
|
23
|
+
position?: string;
|
|
24
|
+
phoneNumber?: string;
|
|
25
|
+
publicEmailAddress?: string;
|
|
26
|
+
[field: string]: string | UserAvatar | undefined;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=UserProfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserProfile.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserProfile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,kBAAkB,CAAC,EAAE,UAAU,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAA;CACjD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The account-recovery code descriptor of a Staffbase user, returned by the
|
|
3
|
+
* user read endpoints only for users that have one set.
|
|
4
|
+
*
|
|
5
|
+
* SENSITIVE: `plain` is the recovery code value - never log it. Grounded in a
|
|
6
|
+
* prod sweep: `recoveryCode` appeared on a small minority of users (~3 of 300),
|
|
7
|
+
* always carrying `plain`; `expires` (a unix-millis expiry) was present on a
|
|
8
|
+
* subset.
|
|
9
|
+
*
|
|
10
|
+
* Note: on the write side (`CreateUser`/`UpdateUser`) `recoveryCode` is a plain
|
|
11
|
+
* string; the read shape is this object.
|
|
12
|
+
*/
|
|
13
|
+
export interface UserRecoveryCode {
|
|
14
|
+
plain: string;
|
|
15
|
+
expires?: number;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=UserRecoveryCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserRecoveryCode.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserRecoveryCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The role descriptor of a Staffbase user, as embedded in the user read
|
|
3
|
+
* endpoints.
|
|
4
|
+
*
|
|
5
|
+
* Grounded in a prod sweep (2000 users): every user carried a `role` object
|
|
6
|
+
* with a `type` string (e.g. `admin`, `user`). Matches the spec
|
|
7
|
+
* `SingleUserWithAvatar.role` shape.
|
|
8
|
+
*/
|
|
9
|
+
export interface UserRole {
|
|
10
|
+
type: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=UserRole.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserRole.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserRole.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The access-code / secret descriptor of a Staffbase user, returned by the user
|
|
3
|
+
* read endpoints only for users that have one set.
|
|
4
|
+
*
|
|
5
|
+
* SENSITIVE: this is account-recovery material - never log it. Grounded in a
|
|
6
|
+
* prod sweep: `secret` appeared on a small minority of users (~8 of 300). The
|
|
7
|
+
* read shape never exposes the secret value itself; the bulk of items carried
|
|
8
|
+
* just `expires` (a unix-millis expiry). A single-read additionally exposed a
|
|
9
|
+
* `links.recovery` HATEOAS-style link, modeled here as optional.
|
|
10
|
+
*/
|
|
11
|
+
export interface UserSecret {
|
|
12
|
+
expires: number;
|
|
13
|
+
links?: {
|
|
14
|
+
recovery?: {
|
|
15
|
+
href: string;
|
|
16
|
+
method: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=UserSecret.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSecret.d.ts","sourceRoot":"","sources":["../../../../src/types/user/UserSecret.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE;YACT,IAAI,EAAE,MAAM,CAAA;YACZ,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;KACF,CAAA;CACF"}
|