1 import type { CLIENT_TYPES } from '@proton/shared/lib/constants';
3 export interface BugPayload {
4 ClientType: CLIENT_TYPES;
13 Browser: string | undefined;
14 BrowserVersion: string | undefined;
16 DeviceName: string | undefined;
17 DeviceModel: string | undefined;
20 export const reportBug = (data: BugPayload, input?: 'form') => ({
22 url: 'core/v4/reports/bug',
27 export const closeTicket = (ticketID: number, RequesterID: number, CreatedAt: string, BrandID?: number) => ({
29 url: `core/v4/reports/bug/${ticketID}`,
37 interface PhishingPayload {
39 MIMEType: 'text/plain' | 'text/html';
43 export const reportPhishing = ({ MessageID, MIMEType, Body }: PhishingPayload) => ({
45 url: 'core/v4/reports/phishing',
46 data: { MessageID, MIMEType, Body },
49 interface CancelPlanPayload {
55 Browser: string | undefined;
56 BrowserVersion: string | undefined;
58 ClientVersion: string;
59 ClientType: CLIENT_TYPES;
63 export const reportCancelPlan = (data: CancelPlanPayload) => ({
65 url: 'core/v4/reports/cancel-plan',