Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / packages / shared / lib / interfaces / drive / invitation.ts
blob6953369d8f6af67dcd6a6e68d0cfc53fbb3178bf
1 import type { SHARE_EXTERNAL_INVITATION_STATE, SHARE_MEMBER_STATE } from '../../drive/constants';
2 import type { SHARE_MEMBER_PERMISSIONS } from '../../drive/permissions';
3 import type { LinkType } from './link';
5 interface InviteEmailDetailsPayload {
6     Message?: string;
7     ItemName?: string;
9 export interface InviteProtonUserPayload {
10     Invitation: {
11         InviterEmail: string;
12         InviteeEmail: string;
13         Permissions: SHARE_MEMBER_PERMISSIONS;
14         KeyPacket: string;
15         KeyPacketSignature: string;
16         ExternalInvitationID?: string;
17     };
18     EmailDetails?: InviteEmailDetailsPayload;
21 export interface InviteExternalUserPayload {
22     ExternalInvitation: {
23         InviterAddressID: string;
24         InviteeEmail: string;
25         Permissions: number;
26         ExternalInvitationSignature: string;
27     };
28     EmailDetails?: InviteEmailDetailsPayload;
31 export interface ShareInvitationPayload {
32     InvitationID: string;
33     InviterEmail: string;
34     InviteeEmail: string;
35     Permissions: SHARE_MEMBER_PERMISSIONS;
36     KeyPacket: string;
37     KeyPacketSignature: string;
38     CreateTime: number;
39     State: SHARE_MEMBER_STATE;
42 export interface ShareInvitationSharePayload {
43     ShareID: string;
44     VolumeID: string;
45     Passphrase: string;
46     ShareKey: string;
47     CreatorEmail: string;
50 export interface ShareInvitationLinkPayload {
51     Type: LinkType;
52     LinkID: string;
53     Name: string;
54     MIMEType: string;
57 export interface ShareInvitationDetailsPayload {
58     Invitation: ShareInvitationPayload;
59     Share: ShareInvitationSharePayload;
60     Link: ShareInvitationLinkPayload;
63 export interface ShareInvitationListingPayload {
64     InvitationIDs: string[];
65     More: boolean;
66     LastAnchorID: string;
69 export interface ShareExternalInvitationPayload {
70     ExternalInvitationID: string;
71     InviterEmail: string;
72     InviteeEmail: string;
73     CreateTime: number;
74     Permissions: SHARE_MEMBER_PERMISSIONS;
75     State: SHARE_EXTERNAL_INVITATION_STATE;
76     ExternalInvitationSignature: string;