@univerjs-pro/collaboration 0.5.1 → 0.5.2-nightly.202412281605

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,4 +1,5 @@
1
1
  import { ICollaMsgErrorEvent, ICollaMsgJoin, ICollaMsgLeave, ICommentUpdate, ILiveShareNewHost, ILiveShareOperation, ILiveShareRequestHost, ILiveShareTerminate, IChangeset as IProtocolChangeset, IShouldCloseConn, IUpdateCursor, IUpdatePermissionObj, UniverType } from '@univerjs/protocol';
2
+ import { UniscriptRun as IUniscriptRun } from '@univerjs/protocol/ts/univer/colla_msg.ts';
2
3
  import { IChangeset } from './changeset';
3
4
  /**
4
5
  * Types of all possible collaboration events.
@@ -94,7 +95,8 @@ export declare enum CollaborationEvent {
94
95
  PERMISSION_REJ = "permission_rej",
95
96
  COMMENT_UPDATE = "comment_update",
96
97
  UPDATE_PERMISSION_OBJ = "update_permission_obj",
97
- SHOULD_CLOSE_CONN = "should_close_conn"
98
+ SHOULD_CLOSE_CONN = "should_close_conn",
99
+ UNISCRIPT_RUN = "uniscript.run"
98
100
  }
99
101
  /**
100
102
  * Awaiting mutations were acknowledged by the server.
@@ -229,7 +231,11 @@ export interface IShouldCloseConnEvent {
229
231
  eventID: CollaborationEvent.SHOULD_CLOSE_CONN;
230
232
  data: IShouldCloseConn;
231
233
  }
234
+ export interface IUniscriptRunEvent {
235
+ eventID: CollaborationEvent.UNISCRIPT_RUN;
236
+ data: IUniscriptRun;
237
+ }
232
238
  /**
233
239
  * A union type of all possible collaboration events.
234
240
  */
235
- export type ICollaborationEvent = IAcknowledgementEvent | INewChangesetsEvent | IRejectionEvent | ISubmitChangesetEvent | IPseudoFetchMissingResultEvent | IUserSelectionEvent | IFetchingMissEvent | IUpdateCursorEvent | IUserJoinEvent | IUserLeaveEvent | ICustomEvent | IRequestHostEvent | IFetchOperationsEvent | ITerminateEvent | INewHostEvent | IOperationEvent | IMsgErrEvent | ICommentUpdateEvent | IPermissionUpdateEvent | IShouldCloseConnEvent;
241
+ export type ICollaborationEvent = IAcknowledgementEvent | INewChangesetsEvent | IRejectionEvent | ISubmitChangesetEvent | IPseudoFetchMissingResultEvent | IUserSelectionEvent | IFetchingMissEvent | IUpdateCursorEvent | IUserJoinEvent | IUserLeaveEvent | ICustomEvent | IRequestHostEvent | IFetchOperationsEvent | ITerminateEvent | INewHostEvent | IOperationEvent | IMsgErrEvent | ICommentUpdateEvent | IPermissionUpdateEvent | IShouldCloseConnEvent | IUniscriptRunEvent;
@@ -39,7 +39,7 @@ export declare class SnapshotService {
39
39
  private _compressMutationService;
40
40
  private _resourceManagerService;
41
41
  constructor(_revisionService: RevisionService, _univerInstanceService: IUniverInstanceService, _snapshotServerService: ISnapshotServerService, _commandService: ICommandService, _injector: Injector, _compressMutationService: CompressMutationService, _resourceManagerService: IResourceManagerService);
42
- loadSheet(unitID: string, rev: number, context?: ILogContext): Promise<Workbook>;
42
+ loadSheet(unitId: string, rev: number, context?: ILogContext): Promise<Workbook>;
43
43
  loadDoc(unitID: string, rev: number, context?: ILogContext): Promise<DocumentDataModel>;
44
44
  /**
45
45
  * @deprecated This should be moved to `ResourceLoaderService.saveUnit`.