@secrecy/lib 1.0.0-dev.4 → 1.0.0-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,8 @@
1
1
  import type { MailType } from "./../zeus/index";
2
2
  import type { DownloadProgress } from "ky";
3
- import type { CancelToken } from "axios";
4
3
  import { BaseClient } from "../BaseClient.js";
5
4
  import type { Progress } from "../crypto/file.js";
6
- import type { ReceivedMail, SentMail, Folder, VFileWithFolder, FolderFull, UserAppSettings, File as SecrecyFile, WaitingReceivedMail, DraftMail, VFile, Mail } from "./types/index.js";
5
+ import type { ReceivedMail, SentMail, Folder, VFileWithFolder, FolderFull, UserAppSettings, UserAppNotifications, File as SecrecyFile, WaitingReceivedMail, DraftMail, VFile, Mail } from "./types/index.js";
7
6
  import type { KeyPair } from "../crypto/index.js";
8
7
  import type { SecrecyEnv } from "./helpers.js";
9
8
  import type { Rights } from "../zeus/index.js";
@@ -26,19 +25,19 @@ export declare class SecrecyClient extends BaseClient {
26
25
  fileId: string;
27
26
  vFileId: string;
28
27
  }): Promise<VFile>;
29
- uploadFile({ file, encryptProgress, uploadProgress, cancelToken }: {
28
+ uploadFile({ file, encryptProgress, uploadProgress, signal }: {
30
29
  file: globalThis.File | Uint8Array;
31
- cancelToken?: CancelToken;
32
30
  encryptProgress?: ProgressCallback;
33
31
  uploadProgress?: ProgressCallback;
32
+ signal?: AbortSignal;
34
33
  }): Promise<string | null>;
35
- uploadFileInCloud({ file, name, folderId, cancelToken, encryptProgress, uploadProgress }: {
34
+ uploadFileInCloud({ file, name, folderId, encryptProgress, uploadProgress, signal }: {
36
35
  file: globalThis.File | Uint8Array;
37
36
  name: string;
38
- cancelToken?: CancelToken;
39
37
  folderId?: string;
40
38
  encryptProgress?: ProgressCallback;
41
39
  uploadProgress?: ProgressCallback;
40
+ signal?: AbortSignal;
42
41
  }): Promise<VFileWithFolder>;
43
42
  logout(sessionId?: string | null | undefined): Promise<void>;
44
43
  createFolder({ name, parentFolderId }: {
@@ -83,6 +82,8 @@ export declare class SecrecyClient extends BaseClient {
83
82
  isFavorite?: boolean | null | undefined;
84
83
  deletedAt?: Date | null | undefined;
85
84
  }): Promise<FolderFull>;
85
+ updateAppNotifications(notifications: Partial<UserAppNotifications>): Promise<UserAppNotifications | null>;
86
+ appNotifications(): Promise<UserAppNotifications | null>;
86
87
  createMail(data: NewMail, customMessage?: string | null | undefined): Promise<boolean>;
87
88
  waitingReceivedMails(): Promise<WaitingReceivedMail[]>;
88
89
  updateDraftMail(draftId: string, { body, subject, files, recipientsIds, replyTo }: Partial<NewMail>): Promise<DraftMail | null>;
@@ -138,11 +139,11 @@ export declare class SecrecyClient extends BaseClient {
138
139
  sendDraftMail(draftId: string, customMessage?: string | null | undefined): Promise<boolean>;
139
140
  sendWaitingEmails(): Promise<boolean>;
140
141
  createDraftMail({ body, subject, files, recipientsIds, replyTo }: NewMail): Promise<DraftMail | null>;
141
- fileContent({ fileId, onDownloadProgress, progressDecrypt, abort }: {
142
+ fileContent({ fileId, onDownloadProgress, progressDecrypt, signal }: {
142
143
  fileId: string;
143
144
  onDownloadProgress?: (progress: DownloadProgress) => void;
144
145
  progressDecrypt?: ProgressCallback;
145
- abort?: AbortController;
146
+ signal?: AbortSignal;
146
147
  }): Promise<Uint8Array>;
147
148
  updateFile({ fileId, filename, isFavorite, deletedAt }: {
148
149
  fileId: string;