forked from vbrick/rev-client-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.ts
96 lines (86 loc) · 2.88 KB
/
user.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { Role } from './index';
import { Rev, LiteralString } from './rev';
/** @category Users & Groups */
export interface User {
userId: string;
username: string;
email: string;
firstname: string;
lastname: string;
language: string | null;
userType: User.UserType;
title: string | null;
phone: string | null;
groups: { id: string, name: string; }[] | null;
roles: Role[];
channels: { id: string, name: string; }[] | null;
profileImageUri: string | null;
permissions: User.Permissions;
status: User.UserStatus;
}
/** @category Users & Groups */
export namespace User {
/**
* Individual user entry result when using `.user.search()`.
* **NOTE** these entries are transformed from the raw API result (camelCase instead of PascalCase) in order to better match the User Details API
* See {@link User.RawSearchHit} for the original API schema
*/
export interface SearchHit {
userId: string;
email: string | null;
entityType: 'User';
firstname: string;
lastname: string;
username: string;
profileImageUri: string;
}
export interface RawSearchHit {
Id: string;
Email: string | null;
EntityType: 'User';
FirstName: string;
LastName: string;
UserName: string;
ProfileImageUri: string;
}
export interface Request {
username: string;
email?: string;
firstname?: string;
lastname: string;
title?: string;
phoneNumber?: string;
language?: string;
groupIds?: string[];
roleIds?: string[];
}
export type DetailsLookup = LiteralString<'username' | 'email' | 'userId'>
export interface DetailsOptions extends Rev.RequestOptions {
lookupType?: User.DetailsLookup
}
export interface Permissions {
canUpload: boolean
canCreateEvents: boolean
canCreatePublicWebcasts: boolean
canCreateAllUsersWebcasts: boolean
canCreatePublicVods: boolean
canCreateAllUsersVods: boolean
}
export interface Notification {
notificationId: string;
notificationDate: string;
notificationType: string;
isRead: boolean;
notificationText: string;
notificationTargetUri: string;
}
export type UserType = LiteralString<'System' | 'LDAP' | 'Sso' | 'SCIM'>
export type UserStatus = LiteralString<'Suspended' | 'Unlicensed' | 'AwaitingConfirmation' | 'AwaitingPasswordReset' | 'AwaitingSecurityQuestionReset' | 'LockedOut' | 'Active'>;
export type LoginReportSort = LiteralString<'LastLogin' | 'Username'>
export interface LoginReportEntry {
Username: string;
FullName: string;
UserId: string;
LastLogin: string;
}
}