dochub-sdk 0.1.307 → 0.1.309

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.
@@ -16,15 +16,15 @@ export class DocHubEditorProto extends DocHubComponentProto {
16
16
 
17
17
  constructor(...params) {
18
18
  super(...params);
19
- DocHub.eventBus.$on(EditorEvents.save, this.onSave);
20
- DocHub.eventBus.$on(EditorEvents.saveAs, this.onSaveAs);
21
- DocHub.eventBus.$on(EditorEvents.goto, this.onGoTo);
19
+ this.$on(EditorEvents.save, this.onSave);
20
+ this.$on(EditorEvents.saveAs, this.onSaveAs);
21
+ this.$on(EditorEvents.goto, this.onGoTo);
22
22
  }
23
23
 
24
24
  destroyed(): void {
25
- DocHub.eventBus.$off(EditorEvents.save, this.onSave);
26
- DocHub.eventBus.$off(EditorEvents.saveAs, this.onSaveAs);
27
- DocHub.eventBus.$off(EditorEvents.goto, this.onGoTo);
25
+ this.$off(EditorEvents.save, this.onSave);
26
+ this.$off(EditorEvents.saveAs, this.onSaveAs);
27
+ this.$off(EditorEvents.goto, this.onGoTo);
28
28
  }
29
29
 
30
30
  /**
@@ -160,6 +160,12 @@ export interface IDocHubTransaction {
160
160
  */
161
161
  getFileVersion(uid: string): Promise<IDocHubTransactionFile | null>;
162
162
 
163
+ /**
164
+ * Откатывает файл к указанной версии
165
+ * @param uid - Идентификатор версии в транзакции. Если undefined - откатывает к версии на сервере
166
+ */
167
+ rollbackFileTo(uid: string | undefined): Promise<void>;
168
+
163
169
  /**
164
170
  * Удаляет запись об изменении из транзакции
165
171
  * @param uids - массив идентификаторов изменений
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.307",
3
+ "version": "0.1.309",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",