add qrcode export import

This commit is contained in:
fyears
2021-12-11 17:33:55 +08:00
parent 563c2c3ff6
commit 8624141780
9 changed files with 255 additions and 53 deletions
+46
View File
@@ -1,9 +1,45 @@
/**
* Only type defs here.
* To avoid circular dependency.
*/
export type SUPPORTED_SERVICES_TYPE = "s3" | "webdav" | "dropbox";
export interface S3Config {
s3Endpoint: string;
s3Region: string;
s3AccessKeyID: string;
s3SecretAccessKey: string;
s3BucketName: string;
}
export interface DropboxConfig {
accessToken: string;
clientID: string;
refreshToken: string;
accessTokenExpiresInSeconds: number;
accessTokenExpiresAtTime: number;
accountID: string;
username: string;
}
export type WebdavAuthType = "digest" | "basic";
export interface WebdavConfig {
address: string;
username: string;
password: string;
authType: WebdavAuthType;
}
export interface RemotelySavePluginSettings {
s3: S3Config;
webdav: WebdavConfig;
dropbox: DropboxConfig;
password: string;
serviceType: SUPPORTED_SERVICES_TYPE;
}
export interface RemoteItem {
key: string;
lastModified: number;
@@ -11,3 +47,13 @@ export interface RemoteItem {
remoteType: SUPPORTED_SERVICES_TYPE;
etag?: string;
}
export const COMMAND_URI = "remotely-save";
export const COMMAND_CALLBACK = "remotely-save-cb";
export interface UriParams {
func?: string;
vault?: string;
ver?: string;
data?: string;
}