bitwarden-estensione-browser/src/abstractions/platformUtils.service.ts

36 lines
1.4 KiB
TypeScript
Raw Normal View History

import { DeviceType } from '../enums/deviceType';
2018-01-06 21:47:23 +01:00
2018-01-25 20:26:09 +01:00
export abstract class PlatformUtilsService {
2018-03-21 16:19:05 +01:00
identityClientId: string;
2018-01-25 20:26:09 +01:00
getDevice: () => DeviceType;
getDeviceString: () => string;
isFirefox: () => boolean;
isChrome: () => boolean;
isEdge: () => boolean;
isOpera: () => boolean;
isVivaldi: () => boolean;
isSafari: () => boolean;
2018-06-08 05:36:39 +02:00
isIE: () => boolean;
2018-02-27 05:32:06 +01:00
isMacAppStore: () => boolean;
2018-01-25 20:26:09 +01:00
analyticsId: () => string;
2019-08-20 19:47:15 +02:00
isViewOpen: () => Promise<boolean>;
/**
* @deprecated This only ever returns null. Pull from your platform's storage using ConstantsService.vaultTimeoutKey
*/
2018-06-09 20:50:18 +02:00
lockTimeout: () => number;
2018-01-25 20:32:10 +01:00
launchUri: (uri: string, options?: any) => void;
2018-01-25 20:26:09 +01:00
saveFile: (win: Window, blobData: any, blobOptions: any, fileName: string) => void;
2018-01-26 16:35:44 +01:00
getApplicationVersion: () => string;
2018-02-02 04:55:49 +01:00
supportsU2f: (win: Window) => boolean;
2018-05-16 21:30:28 +02:00
supportsDuo: () => boolean;
2018-10-03 05:09:19 +02:00
showToast: (type: 'error' | 'success' | 'warning' | 'info', title: string, text: string | string[],
options?: any) => void;
2018-02-03 05:47:03 +01:00
showDialog: (text: string, title?: string, confirmText?: string, cancelText?: string,
type?: string) => Promise<boolean>;
eventTrack: (action: string, label?: string, options?: any) => void;
2018-02-13 23:23:45 +01:00
isDev: () => boolean;
2018-06-30 19:51:09 +02:00
isSelfHost: () => boolean;
2018-02-16 20:00:16 +01:00
copyToClipboard: (text: string, options?: any) => void;
2019-02-27 04:35:53 +01:00
readFromClipboard: (options?: any) => Promise<string>;
2018-01-06 21:47:23 +01:00
}