Cleanup - unused files / unused exports / duplicate exports
[ProtonMail-WebClient.git] / packages / shared / lib / interfaces / GroupMember.ts
blob308112e3f8d10d41c217b7ed82047f7d2a81822e
1 export enum GROUP_MEMBER_STATE {
2     PENDING = 0,
3     ACTIVE = 1,
4     OUTDATED = 2,
5     PAUSED = 3,
6     REJECTED = 4,
9 export enum GROUP_MEMBER_TYPE {
10     INTERNAL = 0,
11     EXTERNAL = 1,
12     INTERNAL_TYPE_EXTERNAL = 2,
15 export enum GROUP_MEMBER_PERMISSIONS {
16     NONE = 0, // 0000
17     SEND = 1 << 0, // 0001
18     LEAVE = 1 << 1, // 0010
21 export enum GROUP_MEMBERSHIP_STATUS {
22     ACTIVE = 'active',
23     UNANSWERED = 'unanswered',
26 export interface GroupMemberAddressPendingKey {
27     PrivateKey: string; // armored key
28     ActivationToken: string; // armored
31 export interface GroupMember {
32     ID: string;
33     Type: GROUP_MEMBER_TYPE;
34     AddressID?: string;
35     // the backend is currently returning Id but it should use ID
36     // TODO(plavarin): 2024-07-23, remove when fixed
37     AddressId?: string;
38     Email: string;
39     State: GROUP_MEMBER_STATE;
40     Permissions: GROUP_MEMBER_PERMISSIONS;
41     GroupMemberAddressPendingKey?: GroupMemberAddressPendingKey;
42     GroupId?: string; // here until BE change is merged, should prefer GroupID
43     GroupID: string;
46 // really just a special group member
47 export interface GroupMembership {
48     Name: string;
49     Address: string;
50     Status: string;
51     Keys: GroupMemberAddressPendingKey;
52     AddressID: string;
53     ID: string;
54     Permissions: number;
57 export interface GroupMembershipReturn {
58     Group: {
59         Name: string;
60         Address: string;
61     };
62     State: number;
63     ForwardingKeys: GroupMemberAddressPendingKey;
64     AddressId: string;
65     ID: string;
66     Permissions: number;