Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
feat(protocol): add code and reason to changeset reject events (#7954)
OTime-Coder7cc91f7f9d11
diff --git a/packages/protocol/src/ts/univer/colla-msg.ts b/packages/protocol/src/ts/univer/colla-msg.tsindex 2741bbd2ee..de1b8e0c34 100644--- a/packages/protocol/src/ts/univer/colla-msg.ts+++ b/packages/protocol/src/ts/univer/colla-msg.ts@@ -15,6 +15,7 @@*/import type { IChangeset } from './changeset';+import type { ErrorCode } from './constants/errors';import type { IUnitPermissionStrategy, IUser, ObjectScope, UnitRole, UnitShareScope } from './permission';export interface ICollaMsg {@@ -76,10 +77,18 @@ interface IChangesetAck {interface IChangesetRej {cs: IChangeset | undefined;+ /** Reject reason code. `0` (`ErrorCode.UNDEFINED`) or absent means the server did not fill it in. */+ code?: ErrorCode;+ /** Human-readable description of why the changeset was rejected. Empty or absent when not filled in. */+ reason?: string;}interface IChangesetShouldRetry {cs: IChangeset | undefined;+ /** Reject reason code. `0` (`ErrorCode.UNDEFINED`) or absent means the server did not fill it in. */+ code?: ErrorCode;+ /** Human-readable description of why the changeset was rejected. Empty or absent when not filled in. */+ reason?: string;}export interface IUpdateCursor {@@ -127,6 +136,10 @@ export interface ICollaMsgErrorEvent {interface IPermissionRej {cs: IChangeset | undefined;+ /** Reject reason code. `0` (`ErrorCode.UNDEFINED`) or absent means the server did not fill it in. */+ code?: ErrorCode;+ /** Human-readable description of why the changeset was rejected. Empty or absent when not filled in. */+ reason?: string;}export interface ICommentUpdate {