@ones-editor/editor 0.0.9-beta.9 → 1.0.0

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.
@@ -207,6 +207,7 @@ export interface OnesEditorDoc {
207
207
  }[]) => void;
208
208
  localDeleteChildContainers: (containerIds: string[]) => void;
209
209
  addResources: (resourceIds: string[]) => Promise<string[]>;
210
+ patchSyncResources: (resourceIds: string[]) => Promise<string[]>;
210
211
  uploadResource: (file: File, options?: UploadResourceOptions) => Promise<UploadResourceResult>;
211
212
  buildResourceUrl: (resourceId: string, options?: BuildResourceUrlOptions) => string;
212
213
  request: <T = unknown>(url: string, options?: unknown) => Promise<T>;
@@ -36,6 +36,7 @@ export default class EditorDoc extends EventCallbacks<OnesEditorDocCallbacks> im
36
36
  onError(error: Error): void;
37
37
  uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
38
38
  addResources(resourceIds: string[]): Promise<string[]>;
39
+ patchSyncResources(resourceIds: string[]): Promise<string[]>;
39
40
  buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
40
41
  request<T = unknown>(url: string, options?: unknown): Promise<T>;
41
42
  broadcastMessage(data: unknown): void;
@@ -24,6 +24,7 @@ export declare class LocalDoc extends EventCallbacks<OnesEditorDocCallbacks> imp
24
24
  localDeleteChildContainers(containerIds: string[]): void;
25
25
  uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
26
26
  addResources(resourceIds: string[]): Promise<string[]>;
27
+ patchSyncResources(resourceIds: string[]): Promise<string[]>;
27
28
  buildResourceUrl(src: string): string;
28
29
  request<T>(url: string, opt?: any): Promise<T>;
29
30
  broadcastMessage(data: unknown): void;
@@ -30,7 +30,11 @@ export default class ShareDBClient {
30
30
  getFileUrlByHash(uploadFileUrl: string, hash: string, name: string, size: number, headers: {
31
31
  [index: string]: string;
32
32
  }): Promise<any>;
33
+ patchSyncResourceByHash(uploadFileUrl: string, hash: string[], headers: {
34
+ [index: string]: string;
35
+ }): Promise<any[]>;
33
36
  getFileUrlsByHashes(resourceHashes: string[]): Promise<any[]>;
37
+ patchSyncResourceByHashes(resourceHashes: string[]): Promise<any[]>;
34
38
  uploadFile(url: string, file: File, headers: {
35
39
  [index: string]: string;
36
40
  }, onProgress: OnProgress, options?: {
@@ -76,6 +76,7 @@ export default class ShareDBDoc extends EventCallbacks<ShareDBDocCallbacks> impl
76
76
  onUpdateComment(commentId: string, local: boolean): void;
77
77
  onCustomMessage(msg: unknown): void;
78
78
  addResources(resourceIds: string[]): Promise<string[]>;
79
+ patchSyncResources(resourceIds: string[]): Promise<any[]>;
79
80
  uploadResource(file: File, options?: UploadResourceOptions): Promise<UploadResourceResult>;
80
81
  buildResourceUrl(resourceId: string, options?: BuildResourceUrlOptions): string;
81
82
  request<T = unknown>(url: string, options?: unknown): Promise<T>;