@univerjs/protocol 0.1.49 → 0.20.1-insiders.20260418-3a69981

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.
Files changed (84) hide show
  1. package/README.md +1 -3
  2. package/lib/cjs/index.js +463 -1
  3. package/lib/es/index.js +446 -36
  4. package/lib/index.js +447 -0
  5. package/lib/types/index.d.ts +41 -38
  6. package/lib/types/other/sheet-block.d.ts +27 -0
  7. package/lib/types/ts/univer/changeset.d.ts +20 -6
  8. package/lib/types/ts/univer/colla-msg.d.ts +176 -0
  9. package/lib/types/ts/univer/constants/errors.d.ts +33 -19
  10. package/lib/types/ts/univer/constants/univer.d.ts +15 -1
  11. package/lib/types/ts/univer/doc.d.ts +18 -4
  12. package/lib/types/ts/univer/drawing.d.ts +16 -2
  13. package/lib/types/ts/univer/initial-sheet.d.ts +46 -0
  14. package/lib/types/ts/univer/permission.d.ts +19 -5
  15. package/lib/types/ts/univer/range.d.ts +16 -2
  16. package/lib/types/ts/univer/resource.d.ts +16 -2
  17. package/lib/types/ts/univer/snapshot.d.ts +23 -9
  18. package/lib/types/ts/univer/unit-template.d.ts +23 -0
  19. package/lib/types/ts/univer/univer-file.d.ts +27 -0
  20. package/lib/types/ts/univer/workbook.d.ts +30 -53
  21. package/lib/types/ts/univercloud/stats/v1/stats.d.ts +34 -0
  22. package/lib/types/ts/univerpro/v1/apply.d.ts +129 -0
  23. package/lib/types/ts/univerpro/v1/helper.d.ts +36 -0
  24. package/lib/types/ts/univerpro/v1/ssc.d.ts +72 -0
  25. package/lib/types/ts/univerpro/v1/ssr.d.ts +28 -0
  26. package/lib/types/ts/universer/v1/access-key.d.ts +51 -0
  27. package/lib/types/ts/universer/v1/authz.d.ts +102 -87
  28. package/lib/types/ts/universer/v1/comb.d.ts +40 -61
  29. package/lib/types/ts/universer/v1/comment.d.ts +45 -49
  30. package/lib/types/ts/universer/v1/file.d.ts +57 -42
  31. package/lib/types/ts/universer/v1/history.d.ts +52 -49
  32. package/lib/types/ts/universer/v1/license.d.ts +54 -39
  33. package/lib/types/ts/universer/v1/snapshot.d.ts +146 -143
  34. package/lib/types/ts/universer/v1/user.d.ts +28 -275
  35. package/lib/types/utils.d.ts +17 -2
  36. package/lib/umd/index.js +1 -1
  37. package/package.json +33 -11
  38. package/lib/types/ts/univer/colla_msg.d.ts +0 -178
  39. package/lib/types/ts/univer/constants/biz.d.ts +0 -17
  40. package/lib/types/ts/univer/event_sync.d.ts +0 -10
  41. package/lib/types/ts/univer/initial_sheet.d.ts +0 -31
  42. package/lib/types/ts/univer/unit_template.d.ts +0 -9
  43. package/lib/types/ts/univer/univer_file.d.ts +0 -33
  44. package/lib/types/ts/universer/v1/access_key.d.ts +0 -36
  45. package/lib/types/ts/universer/v1/access_key_logs.d.ts +0 -43
  46. package/lib/types/ts/universer/v1/activity.d.ts +0 -22
  47. package/lib/types/ts/universer/v1/analyse_cmn.d.ts +0 -27
  48. package/lib/types/ts/universer/v1/analyse_data_source.d.ts +0 -86
  49. package/lib/types/ts/universer/v1/analyse_task.d.ts +0 -232
  50. package/lib/types/ts/universer/v1/clipsheet_task.d.ts +0 -72
  51. package/lib/types/ts/universer/v1/conf.d.ts +0 -570
  52. package/lib/types/ts/universer/v1/connector.d.ts +0 -74
  53. package/lib/types/ts/universer/v1/conversation.d.ts +0 -578
  54. package/lib/types/ts/universer/v1/email.d.ts +0 -28
  55. package/lib/types/ts/universer/v1/entitlement.d.ts +0 -663
  56. package/lib/types/ts/universer/v1/exchange.d.ts +0 -101
  57. package/lib/types/ts/universer/v1/feedback.d.ts +0 -71
  58. package/lib/types/ts/universer/v1/frontend_logs.d.ts +0 -36
  59. package/lib/types/ts/universer/v1/go_config_center.d.ts +0 -91
  60. package/lib/types/ts/universer/v1/inbox.d.ts +0 -59
  61. package/lib/types/ts/universer/v1/invite_code.d.ts +0 -47
  62. package/lib/types/ts/universer/v1/license_manage.d.ts +0 -157
  63. package/lib/types/ts/universer/v1/oauth2.d.ts +0 -24
  64. package/lib/types/ts/universer/v1/oidc.d.ts +0 -167
  65. package/lib/types/ts/universer/v1/redemption_code.d.ts +0 -32
  66. package/lib/types/ts/universer/v1/referral.d.ts +0 -55
  67. package/lib/types/ts/universer/v1/scraper.d.ts +0 -144
  68. package/lib/types/ts/universer/v1/source_connector/api.d.ts +0 -110
  69. package/lib/types/ts/universer/v1/source_connector/conf.d.ts +0 -29
  70. package/lib/types/ts/universer/v1/source_connector/displayer.d.ts +0 -16
  71. package/lib/types/ts/universer/v1/source_connector/source.d.ts +0 -46
  72. package/lib/types/ts/universer/v1/source_connector/stream_view.d.ts +0 -31
  73. package/lib/types/ts/universer/v1/survey.d.ts +0 -25
  74. package/lib/types/ts/universer/v1/template.d.ts +0 -48
  75. package/lib/types/ts/universer/v1/toolkit.d.ts +0 -23
  76. package/lib/types/ts/universer/v1/trigger.d.ts +0 -102
  77. package/lib/types/ts/universer/v1/uniscript.d.ts +0 -104
  78. package/lib/types/ts/universer/v1/uniscript_logs.d.ts +0 -157
  79. package/lib/types/ts/universer/v1/univer_go_template.d.ts +0 -65
  80. package/lib/types/ts/universer/v1/user_event.d.ts +0 -23
  81. package/lib/types/ts/universer/v1/user_settings.d.ts +0 -22
  82. package/lib/types/ts/universer/v1/usip.d.ts +0 -62
  83. package/lib/types/ts/universer/v1/video_task.d.ts +0 -196
  84. package/lib/types/ts/universer/v1/workspace.d.ts +0 -273
package/README.md CHANGED
@@ -1,3 +1 @@
1
- # @univerjs/protocol
2
-
3
- Files under `ts/` fold is auto-generated. Please DO NOT edit them mannually.
1
+ # @univerjs/protocl
package/lib/cjs/index.js CHANGED
@@ -1 +1,463 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var N=(_=>(_[_.OpenOrReOpen=0]="OpenOrReOpen",_[_.Solved=1]="Solved",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(N||{}),I=(_=>(_[_.Unknown=0]="Unknown",_[_.Add=1]="Add",_[_.Reply=2]="Reply",_[_.Edit=3]="Edit",_[_.Delete=4]="Delete",_[_.Solve=5]="Solve",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(I||{}),E=(_=>(_[_.UNDEFINED=0]="UNDEFINED",_[_.OK=1]="OK",_[_.INTERNAL_ERROR=2]="INTERNAL_ERROR",_[_.PERMISSION_DENIED=3]="PERMISSION_DENIED",_[_.NOT_FOUND=4]="NOT_FOUND",_[_.UNAUTHENTICATED=5]="UNAUTHENTICATED",_[_.ALREADY_EXISTS=6]="ALREADY_EXISTS",_[_.INVALID_ARGUMENT=7]="INVALID_ARGUMENT",_[_.TOO_MANY_REQUESTS=8]="TOO_MANY_REQUESTS",_[_.COMPLETION_FINISHED=9]="COMPLETION_FINISHED",_[_.LOGIN_FAILED=10]="LOGIN_FAILED",_[_.MOBILE_VERIFY_CODE_MISMATCH=11]="MOBILE_VERIFY_CODE_MISMATCH",_[_.MOBILE_VERIFY_CODE_NOT_FOUND_OR_EXPIRED=12]="MOBILE_VERIFY_CODE_NOT_FOUND_OR_EXPIRED",_[_.EMAIL_VERIFY_CODE_MISMATCH=13]="EMAIL_VERIFY_CODE_MISMATCH",_[_.EMAIL_VERIFY_CODE_NOT_FOUND_OR_EXPIRED=14]="EMAIL_VERIFY_CODE_NOT_FOUND_OR_EXPIRED",_[_.AUTHORIZE_CODE_ILLEGAL=15]="AUTHORIZE_CODE_ILLEGAL",_[_.LOGIN_TOKEN_PROCESSING_FAILED=16]="LOGIN_TOKEN_PROCESSING_FAILED",_[_.CURRENT_STATUS_CANNOT_OPERATE=100]="CURRENT_STATUS_CANNOT_OPERATE",_[_.ERROR_AGAIN=101]="ERROR_AGAIN",_[_.USER_NOT_FOUND=201]="USER_NOT_FOUND",_[_.USER_IS_ANONYMOUS=202]="USER_IS_ANONYMOUS",_[_.CHANGESET_REVISION_CONFILICT=5001]="CHANGESET_REVISION_CONFILICT",_[_.SNAPSHOT_INVALID_SNAPSHOT=6001]="SNAPSHOT_INVALID_SNAPSHOT",_[_.SNAPSHOT_HAS_BEEN_REMOVED=6002]="SNAPSHOT_HAS_BEEN_REMOVED",_[_.ENSURE_SNAPSHOT_EXECUTION=6003]="ENSURE_SNAPSHOT_EXECUTION",_[_.APPLY_REJECT=7001]="APPLY_REJECT",_[_.APPLY_NON_SEQUENTIAL_REVISION=7002]="APPLY_NON_SEQUENTIAL_REVISION",_[_.APPLY_REVISION_CONFILICT=7003]="APPLY_REVISION_CONFILICT",_[_.APPLY_PERMISSION_DENIED=7004]="APPLY_PERMISSION_DENIED",_[_.APPLY_DUPLICATED=7005]="APPLY_DUPLICATED",_[_.CONNECTOR_DATA_TOO_LARGE=8001]="CONNECTOR_DATA_TOO_LARGE",_[_.LICENSE_MAX_UNITS_EXCEEDED=9001]="LICENSE_MAX_UNITS_EXCEEDED",_[_.LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED=9002]="LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED",_[_.LICENSE_IMPORT_SIZE_EXCEEDED=9003]="LICENSE_IMPORT_SIZE_EXCEEDED",_[_.LICENSE_EXPORT_SIZE_EXCEEDED=9004]="LICENSE_EXPORT_SIZE_EXCEEDED",_[_.LICENSE_DISTRO_REJECTED=9005]="LICENSE_DISTRO_REJECTED",_[_.YUUMI_UNABLE_LOAD_URL=10001]="YUUMI_UNABLE_LOAD_URL",_[_.YUUMI_URL_COL_OUT_OF_RANGE=10002]="YUUMI_URL_COL_OUT_OF_RANGE",_[_.YUUMI_RATE_OVER_LIMIT=10003]="YUUMI_RATE_OVER_LIMIT",_[_.YUUMI_SUBSCRIPTION_NOT_FOUND=10004]="YUUMI_SUBSCRIPTION_NOT_FOUND",_[_.YUUMI_NO_CUBOID_FOR_QUESTION=10010]="YUUMI_NO_CUBOID_FOR_QUESTION",_[_.YUUMI_ASYNCIO_CANCELLED=10011]="YUUMI_ASYNCIO_CANCELLED",_[_.YUUMI_TABLE_NOT_FOUND_IN_UNIT=10012]="YUUMI_TABLE_NOT_FOUND_IN_UNIT",_[_.YUUMI_ALL_TABLES_IS_INVALID=10013]="YUUMI_ALL_TABLES_IS_INVALID",_[_.YUUMI_PROMPT_MAX_TOKENS_EXCEEDED=10014]="YUUMI_PROMPT_MAX_TOKENS_EXCEEDED",_[_.YUUMI_AI_RUN_FAILED=10015]="YUUMI_AI_RUN_FAILED",_[_.YUUMI_CONNECTOR_URL_NOT_FOUND=10016]="YUUMI_CONNECTOR_URL_NOT_FOUND",_[_.PY_RUNTIME_SCRIPT_ERROR=11001]="PY_RUNTIME_SCRIPT_ERROR",_[_.INVITE_CODE_HAS_BEEN_UES=12001]="INVITE_CODE_HAS_BEEN_UES",_[_.INVALID_INVITE_CODE=12002]="INVALID_INVITE_CODE",_[_.INVITE_CODE_REQUIRED=12003]="INVITE_CODE_REQUIRED",_[_.USER_NOT_INVITED_CODE=12004]="USER_NOT_INVITED_CODE",_[_.INVITE_CODE_ALREADY_BOUND=12005]="INVITE_CODE_ALREADY_BOUND",_[_.WECHAT_HAS_BEEN_BOUND=13001]="WECHAT_HAS_BEEN_BOUND",_[_.MOBILE_HAS_BEEN_BOUND=13002]="MOBILE_HAS_BEEN_BOUND",_[_.EMAIL_HAS_BEEN_BOUND=13003]="EMAIL_HAS_BEEN_BOUND",_[_.ENTITLE_CAN_NOT_BUY_LOWER_OTP=14001]="ENTITLE_CAN_NOT_BUY_LOWER_OTP",_[_.ENTITLE_UPDOWN_GRADE_NOT_SUPPORT=14002]="ENTITLE_UPDOWN_GRADE_NOT_SUPPORT",_[_.ENTITLE_DUP_SUBSCRIPTION=14003]="ENTITLE_DUP_SUBSCRIPTION",_[_.PAYMENT_CHANNEL_NOT_SUPPORT=14004]="PAYMENT_CHANNEL_NOT_SUPPORT",_[_.ENTITLE_INVALID_COUPON_CODE=14005]="ENTITLE_INVALID_COUPON_CODE",_[_.ENTITLE_COUPON_EXPIRED=14006]="ENTITLE_COUPON_EXPIRED",_[_.ENTITLE_COUPON_USED_UP=14007]="ENTITLE_COUPON_USED_UP",_[_.ENTITLE_USE_COUPON_NOT_1ST_TRADE=14008]="ENTITLE_USE_COUPON_NOT_1ST_TRADE",_[_.ENTITLE_CHAT_LIMIT_EXCEED=14101]="ENTITLE_CHAT_LIMIT_EXCEED",_[_.ENTITLE_REPORT_LIMIT_EXCEED=14102]="ENTITLE_REPORT_LIMIT_EXCEED",_[_.ENTITLE_INSUFFICIENT_QUOTA=14103]="ENTITLE_INSUFFICIENT_QUOTA",_[_.ENTITLE_NEED_BILLING_ADDRESS=14301]="ENTITLE_NEED_BILLING_ADDRESS",_[_.REDEMPTION_INVALID_CODE=15001]="REDEMPTION_INVALID_CODE",_[_.REDEMPTION_CODE_INACTIVE=15002]="REDEMPTION_CODE_INACTIVE",_[_.REDEMPTION_CODE_FULLY_REDEEMED=15003]="REDEMPTION_CODE_FULLY_REDEEMED",_[_.REDEMPTION_CODE_NOT_STARTED=15004]="REDEMPTION_CODE_NOT_STARTED",_[_.REDEMPTION_USER_NOT_ELIGIBLE=15005]="REDEMPTION_USER_NOT_ELIGIBLE",_[_.REDEMPTION_USER_REDEEM_TIMES_EXCEED=15006]="REDEMPTION_USER_REDEEM_TIMES_EXCEED",_[_.REDEMPTION_CODE_HAS_BEEN_CREATED=15007]="REDEMPTION_CODE_HAS_BEEN_CREATED",_[_.DATA_SOURCE_TOO_LARGE=16001]="DATA_SOURCE_TOO_LARGE",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(E||{}),O=(_=>(_[_.UNIVER_UNKNOWN=0]="UNIVER_UNKNOWN",_[_.UNIVER_DOC=1]="UNIVER_DOC",_[_.UNIVER_SHEET=2]="UNIVER_SHEET",_[_.UNIVER_SLIDE=3]="UNIVER_SLIDE",_[_.UNIVER_PROJECT=4]="UNIVER_PROJECT",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(O||{}),D=(_=>(_[_.UNDEFINED=0]="UNDEFINED",_[_.TEXT=1]="TEXT",_[_.URL=2]="URL",_[_.IMAGE=3]="IMAGE",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(D||{}),R=(_=>(_[_.View=0]="View",_[_.Edit=1]="Edit",_[_.ManageCollaborator=2]="ManageCollaborator",_[_.Print=3]="Print",_[_.Duplicate=4]="Duplicate",_[_.Comment=5]="Comment",_[_.Copy=6]="Copy",_[_.Share=7]="Share",_[_.Export=8]="Export",_[_.MoveWorksheet=9]="MoveWorksheet",_[_.DeleteWorksheet=10]="DeleteWorksheet",_[_.HideWorksheet=11]="HideWorksheet",_[_.RenameWorksheet=12]="RenameWorksheet",_[_.CreateWorksheet=13]="CreateWorksheet",_[_.SetWorksheetStyle=14]="SetWorksheetStyle",_[_.EditWorksheetCell=15]="EditWorksheetCell",_[_.InsertHyperlink=16]="InsertHyperlink",_[_.Sort=17]="Sort",_[_.Filter=18]="Filter",_[_.PivotTable=19]="PivotTable",_[_.FloatImg=20]="FloatImg",_[_.History=21]="History",_[_.RwHgtClWdt=22]="RwHgtClWdt",_[_.ViemRwHgtClWdt=23]="ViemRwHgtClWdt",_[_.ViewFilter=24]="ViewFilter",_[_.MoveSheet=25]="MoveSheet",_[_.DeleteSheet=26]="DeleteSheet",_[_.HideSheet=27]="HideSheet",_[_.CopySheet=28]="CopySheet",_[_.RenameSheet=29]="RenameSheet",_[_.CreateSheet=30]="CreateSheet",_[_.SelectProtectedCells=31]="SelectProtectedCells",_[_.SelectUnProtectedCells=32]="SelectUnProtectedCells",_[_.SetCellStyle=33]="SetCellStyle",_[_.SetCellValue=34]="SetCellValue",_[_.SetRowStyle=35]="SetRowStyle",_[_.SetColumnStyle=36]="SetColumnStyle",_[_.InsertRow=37]="InsertRow",_[_.InsertColumn=38]="InsertColumn",_[_.DeleteRow=39]="DeleteRow",_[_.DeleteColumn=40]="DeleteColumn",_[_.EditExtraObject=41]="EditExtraObject",_[_.Delete=42]="Delete",_[_.RecoverHistory=43]="RecoverHistory",_[_.ViewHistory=44]="ViewHistory",_[_.CreatePermissionObject=45]="CreatePermissionObject",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(R||{}),T=(_=>(_[_.Reader=0]="Reader",_[_.Editor=1]="Editor",_[_.Owner=2]="Owner",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(T||{}),S=(_=>(_[_.Unkonwn=0]="Unkonwn",_[_.Workbook=1]="Workbook",_[_.Worksheet=2]="Worksheet",_[_.SelectRange=3]="SelectRange",_[_.Document=4]="Document",_[_.Slide=5]="Slide",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(S||{}),L=(_=>(_[_.Private=0]="Private",_[_.Public=1]="Public",_[_.Organization=2]="Organization",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(L||{}),a=(_=>(_[_.SomeCollaborator=0]="SomeCollaborator",_[_.AllCollaborator=1]="AllCollaborator",_[_.OneSelf=2]="OneSelf",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(a||{}),P=(_=>(_[_.UNKNOWN=0]="UNKNOWN",_[_.STRING=1]="STRING",_[_.NUMBER=2]="NUMBER",_[_.BOOLEAN=3]="BOOLEAN",_[_.FORCE_STRING=4]="FORCE_STRING",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(P||{}),U=(_=>(_[_.Unknown=0]="Unknown",_[_.Colla=1]="Colla",_[_.Import=2]="Import",_[_.Export=3]="Export",_[_.CreateUnit=4]="CreateUnit",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(U||{}),M=(_=>(_[_.valueBetween=0]="valueBetween",_[_.valueEqual=1]="valueEqual",_[_.valueGreaterThan=2]="valueGreaterThan",_[_.valueGreaterThanOrEqual=3]="valueGreaterThanOrEqual",_[_.valueLessThan=4]="valueLessThan",_[_.valueLessThanOrEqual=5]="valueLessThanOrEqual",_[_.valueNotBetween=6]="valueNotBetween",_[_.valueNotEqual=7]="valueNotEqual",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(M||{}),A=(_=>(_[_.DataFragmentationType_None=0]="DataFragmentationType_None",_[_.DataFragmentationType_Charts=1]="DataFragmentationType_Charts",_[_.DataFragmentationType_Unit=2]="DataFragmentationType_Unit",_[_.DataFragmentationType_WorkSheetRef=3]="DataFragmentationType_WorkSheetRef",_[_.DataFragmentationType_Code=4]="DataFragmentationType_Code",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(A||{}),l=(_=>(_[_.AnalyseTaskStatus_None=0]="AnalyseTaskStatus_None",_[_.AnalyseTaskStatus_Analysing=1]="AnalyseTaskStatus_Analysing",_[_.AnalyseTaskStatus_Failed=2]="AnalyseTaskStatus_Failed",_[_.AnalyseTaskStatus_Completed=3]="AnalyseTaskStatus_Completed",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(l||{}),G=(_=>(_[_.UNKNOWN_CMD=0]="UNKNOWN_CMD",_[_.HELLO=1]="HELLO",_[_.JOIN=2]="JOIN",_[_.LEAVE=3]="LEAVE",_[_.INGEST=4]="INGEST",_[_.HEARTBEAT=5]="HEARTBEAT",_[_.RECV=6]="RECV",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(G||{}),H=(_=>(_[_.UNKNOWN_CODE=0]="UNKNOWN_CODE",_[_.OK=1]="OK",_[_.FAIL=2]="FAIL",_[_.JOIN_ROOM_FULL=1001]="JOIN_ROOM_FULL",_[_.JOIN_ROOM_NOT_EXISTS=1002]="JOIN_ROOM_NOT_EXISTS",_[_.JOIN_ROOM_PERMISSION_DENIED=1003]="JOIN_ROOM_PERMISSION_DENIED",_[_.GLOBAL_ROOMS_CNT_EXCEEDS=1004]="GLOBAL_ROOMS_CNT_EXCEEDS",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(H||{}),Z=(_=>(_[_.Completion_None=0]="Completion_None",_[_.Completion_Completed=1]="Completion_Completed",_[_.Completion_UserCancelled=2]="Completion_UserCancelled",_[_.Completion_SystemErr=3]="Completion_SystemErr",_[_.Completion_Interrupted=4]="Completion_Interrupted",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(Z||{}),V=(_=>(_[_.RoleType_None=0]="RoleType_None",_[_.RoleType_User=1]="RoleType_User",_[_.RoleType_Agent=2]="RoleType_Agent",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(V||{}),B=(_=>(_[_.ContentBlockType_None=0]="ContentBlockType_None",_[_.ContentBlockType_Prompt=1]="ContentBlockType_Prompt",_[_.ContentBlockType_Thinking=2]="ContentBlockType_Thinking",_[_.ContentBlockType_Report=3]="ContentBlockType_Report",_[_.ContentBlockType_PromptV2=4]="ContentBlockType_PromptV2",_[_.ContentBlockType_HITL=103]="ContentBlockType_HITL",_[_.ContentBlockType_ToolCallStart=105]="ContentBlockType_ToolCallStart",_[_.ContentBlockType_ToolCallResult=106]="ContentBlockType_ToolCallResult",_[_.ContentBlockType_SubAgentsCallStart=107]="ContentBlockType_SubAgentsCallStart",_[_.ContentBlockType_SubAgentsCallResult=108]="ContentBlockType_SubAgentsCallResult",_[_.ContentBlockType_SubAgentRunStarted=109]="ContentBlockType_SubAgentRunStarted",_[_.ContentBlockType_SubAgentRunFinished=110]="ContentBlockType_SubAgentRunFinished",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(B||{}),h=(_=>(_[_.ContentType_None=0]="ContentType_None",_[_.ContentType_PlainText=1]="ContentType_PlainText",_[_.ContentType_Markdown=2]="ContentType_Markdown",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(h||{}),Y=(_=>(_[_.AttachmentType_None=0]="AttachmentType_None",_[_.AttachmentType_Unit=1]="AttachmentType_Unit",_[_.AttachmentType_Recommendation=3]="AttachmentType_Recommendation",_[_.AttachmentType_DataSource=4]="AttachmentType_DataSource",_[_.AttachmentType_HitlAnswer=5]="AttachmentType_HitlAnswer",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(Y||{}),s=(_=>(_[_.Reaction_NoReact=0]="Reaction_NoReact",_[_.Reaction_ThumbsUp=1]="Reaction_ThumbsUp",_[_.Reaction_ThumbsDown=2]="Reaction_ThumbsDown",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(s||{}),g=(_=>(_[_.ChatSSEBlockType_None=0]="ChatSSEBlockType_None",_[_.ChatSSEBlockType_EndOfStream=1]="ChatSSEBlockType_EndOfStream",_[_.ChatSSEBlockType_Reject=2]="ChatSSEBlockType_Reject",_[_.ChatSSEBlockType_ModConversation=3]="ChatSSEBlockType_ModConversation",_[_.ChatSSEBlockType_PromptAck=4]="ChatSSEBlockType_PromptAck",_[_.ChatSSEBlockType_ChatContent=5]="ChatSSEBlockType_ChatContent",_[_.ChatSSEBlockType_Attachment=6]="ChatSSEBlockType_Attachment",_[_.ChatSSEBlockType_RespMeta=7]="ChatSSEBlockType_RespMeta",_[_.ChatSSEBlockType_StreamErr=8]="ChatSSEBlockType_StreamErr",_[_.ChatSSEBlockType_ChatThinking=9]="ChatSSEBlockType_ChatThinking",_[_.ChatSSEBlockType_Fragmentation=10]="ChatSSEBlockType_Fragmentation",_[_.ChatSSEBlockType_RawMessage=101]="ChatSSEBlockType_RawMessage",_[_.ChatSSEBlockType_EditThinking=102]="ChatSSEBlockType_EditThinking",_[_.ChatSSEBlockType_HITL=103]="ChatSSEBlockType_HITL",_[_.ChatSSEBlockType_ToolCallStart=105]="ChatSSEBlockType_ToolCallStart",_[_.ChatSSEBlockType_ToolCallResult=106]="ChatSSEBlockType_ToolCallResult",_[_.ChatSSEBlockType_SubAgentsCallStart=107]="ChatSSEBlockType_SubAgentsCallStart",_[_.ChatSSEBlockType_SubAgentsCallResult=108]="ChatSSEBlockType_SubAgentsCallResult",_[_.ChatSSEBlockType_SubAgentRunStarted=109]="ChatSSEBlockType_SubAgentRunStarted",_[_.ChatSSEBlockType_SubAgentRunFinished=110]="ChatSSEBlockType_SubAgentRunFinished",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(g||{}),u=(_=>(_[_.ChatSSEStatus_None=0]="ChatSSEStatus_None",_[_.ChatSSEStatus_Appending=1]="ChatSSEStatus_Appending",_[_.ChatSSEStatus_Success=2]="ChatSSEStatus_Success",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(u||{}),C=(_=>(_[_.UNDEFINED=0]="UNDEFINED",_[_.UNIT=1]="UNIT",_[_.JSON=2]="JSON",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(C||{}),W=(_=>(_[_.ImportScene_Unspecified=0]="ImportScene_Unspecified",_[_.ImportScene_General=1]="ImportScene_General",_[_.ImportScene_AIAnalyse=2]="ImportScene_AIAnalyse",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(W||{}),F=(_=>(_[_.Undefined=0]="Undefined",_[_.HttpImport=1]="HttpImport",_[_.HttpExport=2]="HttpExport",_[_.UnitEmbedded=3]="UnitEmbedded",_[_.UnitSnapshot=4]="UnitSnapshot",_[_.UserProfileImg=5]="UserProfileImg",_[_.ClipsheetFragments=6]="ClipsheetFragments",_[_.LLMInputData=7]="LLMInputData",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(F||{}),X=(_=>(_[_.UNDEFINED_ENV=0]="UNDEFINED_ENV",_[_.NODE=1]="NODE",_[_.BROWSER=2]="BROWSER",_[_.PYTHON=3]="PYTHON",_[_.REQUIREMENTS_TXT=4]="REQUIREMENTS_TXT",_[_.WORKSPACE_ENV_VARS=5]="WORKSPACE_ENV_VARS",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(X||{}),k=(_=>(_[_.UNKNOWN=0]="UNKNOWN",_[_.ROOT=1]="ROOT",_[_.TRASH=2]="TRASH",_[_.DEBUG=3]="DEBUG",_[_.AI_STASH=4]="AI_STASH",_[_.UNRECOGNIZED=-1]="UNRECOGNIZED",_))(k||{});function e(_){return!!(_&&_.code&&_.code!==E.OK&&_.code!=="OK")}exports.AnalyseTaskStatus=l;exports.AttachmentTypeEnum=Y;exports.CellType=D;exports.CellValueType=P;exports.ChatSSEBlockTypeEnum=g;exports.ChatSSEStatusEnum=u;exports.CmdRspCode=H;exports.CombCmd=G;exports.CommentSolvedStatus=N;exports.CommentUpdateEventType=I;exports.CompletionStatusEnum=Z;exports.ConversationRoleTypeEnum=V;exports.DataFragmentationTypeEnum=A;exports.ErrorCode=E;exports.FileSource=F;exports.IRecordType=U;exports.IRootType=k;exports.ImportOutputTypeEnum=C;exports.ImportSceneEnum=W;exports.MessageContentBlockTypeEnum=B;exports.MessageContentTypeEnum=h;exports.MessageReactionEnum=s;exports.NumberFilterEnum=M;exports.ObjectScope=a;exports.UniscriptEnv=X;exports.UnitAction=R;exports.UnitObject=S;exports.UnitRole=T;exports.UnitShareScope=L;exports.UniverType=O;exports.isError=e;
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ //#region src/ts/univer/colla-msg.ts
4
+ let CommentSolvedStatus = /* @__PURE__ */ function(CommentSolvedStatus) {
5
+ CommentSolvedStatus[CommentSolvedStatus["OpenOrReOpen"] = 0] = "OpenOrReOpen";
6
+ CommentSolvedStatus[CommentSolvedStatus["Solved"] = 1] = "Solved";
7
+ CommentSolvedStatus[CommentSolvedStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
8
+ return CommentSolvedStatus;
9
+ }({});
10
+ let CommentUpdateEventType = /* @__PURE__ */ function(CommentUpdateEventType) {
11
+ CommentUpdateEventType[CommentUpdateEventType["Unknown"] = 0] = "Unknown";
12
+ CommentUpdateEventType[CommentUpdateEventType["Add"] = 1] = "Add";
13
+ CommentUpdateEventType[CommentUpdateEventType["Reply"] = 2] = "Reply";
14
+ CommentUpdateEventType[CommentUpdateEventType["Edit"] = 3] = "Edit";
15
+ CommentUpdateEventType[CommentUpdateEventType["Delete"] = 4] = "Delete";
16
+ CommentUpdateEventType[CommentUpdateEventType["Solve"] = 5] = "Solve";
17
+ CommentUpdateEventType[CommentUpdateEventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
18
+ return CommentUpdateEventType;
19
+ }({});
20
+
21
+ //#endregion
22
+ //#region src/ts/univer/constants/errors.ts
23
+ /**
24
+ * Copyright 2023-present DreamNum Co., Ltd.
25
+ *
26
+ * Licensed under the Apache License, Version 2.0 (the "License");
27
+ * you may not use this file except in compliance with the License.
28
+ * You may obtain a copy of the License at
29
+ *
30
+ * http://www.apache.org/licenses/LICENSE-2.0
31
+ *
32
+ * Unless required by applicable law or agreed to in writing, software
33
+ * distributed under the License is distributed on an "AS IS" BASIS,
34
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35
+ * See the License for the specific language governing permissions and
36
+ * limitations under the License.
37
+ */
38
+ let ErrorCode = /* @__PURE__ */ function(ErrorCode) {
39
+ /** UNDEFINED - general codes */
40
+ ErrorCode[ErrorCode["UNDEFINED"] = 0] = "UNDEFINED";
41
+ ErrorCode[ErrorCode["OK"] = 1] = "OK";
42
+ ErrorCode[ErrorCode["INTERNAL_ERROR"] = 2] = "INTERNAL_ERROR";
43
+ ErrorCode[ErrorCode["PERMISSION_DENIED"] = 3] = "PERMISSION_DENIED";
44
+ ErrorCode[ErrorCode["NOT_FOUND"] = 4] = "NOT_FOUND";
45
+ ErrorCode[ErrorCode["UNAUTHENTICATED"] = 5] = "UNAUTHENTICATED";
46
+ ErrorCode[ErrorCode["ALREADY_EXISTS"] = 6] = "ALREADY_EXISTS";
47
+ ErrorCode[ErrorCode["INVALID_ARGUMENT"] = 7] = "INVALID_ARGUMENT";
48
+ ErrorCode[ErrorCode["TOO_MANY_REQUESTS"] = 8] = "TOO_MANY_REQUESTS";
49
+ ErrorCode[ErrorCode["COMPLETION_FINISHED"] = 9] = "COMPLETION_FINISHED";
50
+ /** LOGIN_FAILED - login */
51
+ ErrorCode[ErrorCode["LOGIN_FAILED"] = 10] = "LOGIN_FAILED";
52
+ ErrorCode[ErrorCode["MOBILE_VERIFY_CODE_MISMATCH"] = 11] = "MOBILE_VERIFY_CODE_MISMATCH";
53
+ ErrorCode[ErrorCode["MOBILE_VERIFY_CODE_NOT_FOUND_OR_EXPIRED"] = 12] = "MOBILE_VERIFY_CODE_NOT_FOUND_OR_EXPIRED";
54
+ ErrorCode[ErrorCode["EMAIL_VERIFY_CODE_MISMATCH"] = 13] = "EMAIL_VERIFY_CODE_MISMATCH";
55
+ ErrorCode[ErrorCode["EMAIL_VERIFY_CODE_NOT_FOUND_OR_EXPIRED"] = 14] = "EMAIL_VERIFY_CODE_NOT_FOUND_OR_EXPIRED";
56
+ ErrorCode[ErrorCode["AUTHORIZE_CODE_ILLEGAL"] = 15] = "AUTHORIZE_CODE_ILLEGAL";
57
+ ErrorCode[ErrorCode["LOGIN_TOKEN_PROCESSING_FAILED"] = 16] = "LOGIN_TOKEN_PROCESSING_FAILED";
58
+ /** CURRENT_STATUS_CANNOT_OPERATE - biz cmn codes with 100 shift */
59
+ ErrorCode[ErrorCode["CURRENT_STATUS_CANNOT_OPERATE"] = 100] = "CURRENT_STATUS_CANNOT_OPERATE";
60
+ ErrorCode[ErrorCode["ERROR_AGAIN"] = 101] = "ERROR_AGAIN";
61
+ /** USER_NOT_FOUND - user codes with 200 shift */
62
+ ErrorCode[ErrorCode["USER_NOT_FOUND"] = 201] = "USER_NOT_FOUND";
63
+ ErrorCode[ErrorCode["USER_IS_ANONYMOUS"] = 202] = "USER_IS_ANONYMOUS";
64
+ /** CHANGESET_REVISION_CONFILICT - changeset codes with 5000 shift */
65
+ ErrorCode[ErrorCode["CHANGESET_REVISION_CONFILICT"] = 5001] = "CHANGESET_REVISION_CONFILICT";
66
+ /** SNAPSHOT_INVALID_SNAPSHOT - snapshotError codes with 6000 shift */
67
+ ErrorCode[ErrorCode["SNAPSHOT_INVALID_SNAPSHOT"] = 6001] = "SNAPSHOT_INVALID_SNAPSHOT";
68
+ ErrorCode[ErrorCode["SNAPSHOT_HAS_BEEN_REMOVED"] = 6002] = "SNAPSHOT_HAS_BEEN_REMOVED";
69
+ ErrorCode[ErrorCode["ENSURE_SNAPSHOT_EXECUTION"] = 6003] = "ENSURE_SNAPSHOT_EXECUTION";
70
+ /** APPLY_REJECT - apply service codes with 7000 shift */
71
+ ErrorCode[ErrorCode["APPLY_REJECT"] = 7001] = "APPLY_REJECT";
72
+ /** APPLY_NON_SEQUENTIAL_REVISION - apply service expects sequential revisions, otherwise return this code */
73
+ ErrorCode[ErrorCode["APPLY_NON_SEQUENTIAL_REVISION"] = 7002] = "APPLY_NON_SEQUENTIAL_REVISION";
74
+ /** APPLY_REVISION_CONFILICT - save changeset failed because of revision exists */
75
+ ErrorCode[ErrorCode["APPLY_REVISION_CONFILICT"] = 7003] = "APPLY_REVISION_CONFILICT";
76
+ /** APPLY_PERMISSION_DENIED - apply failed because of the user permission denied */
77
+ ErrorCode[ErrorCode["APPLY_PERMISSION_DENIED"] = 7004] = "APPLY_PERMISSION_DENIED";
78
+ /** APPLY_DUPLICATED - if the changeset has been applied before, return this code */
79
+ ErrorCode[ErrorCode["APPLY_DUPLICATED"] = 7005] = "APPLY_DUPLICATED";
80
+ /** CONNECTOR_DATA_TOO_LARGE - connector codes with 8000 shift */
81
+ ErrorCode[ErrorCode["CONNECTOR_DATA_TOO_LARGE"] = 8001] = "CONNECTOR_DATA_TOO_LARGE";
82
+ /** LICENSE_MAX_UNITS_EXCEEDED - license code with 9000 shift */
83
+ ErrorCode[ErrorCode["LICENSE_MAX_UNITS_EXCEEDED"] = 9001] = "LICENSE_MAX_UNITS_EXCEEDED";
84
+ ErrorCode[ErrorCode["LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED"] = 9002] = "LICENSE_MAX_MEMBERS_PER_UNIT_EXCEEDED";
85
+ ErrorCode[ErrorCode["LICENSE_IMPORT_SIZE_EXCEEDED"] = 9003] = "LICENSE_IMPORT_SIZE_EXCEEDED";
86
+ ErrorCode[ErrorCode["LICENSE_EXPORT_SIZE_EXCEEDED"] = 9004] = "LICENSE_EXPORT_SIZE_EXCEEDED";
87
+ /** LICENSE_DISTRO_REJECTED - the feature not allowed for the distro */
88
+ ErrorCode[ErrorCode["LICENSE_DISTRO_REJECTED"] = 9005] = "LICENSE_DISTRO_REJECTED";
89
+ /** YUUMI_UNABLE_LOAD_URL - yuumi */
90
+ ErrorCode[ErrorCode["YUUMI_UNABLE_LOAD_URL"] = 10001] = "YUUMI_UNABLE_LOAD_URL";
91
+ ErrorCode[ErrorCode["YUUMI_URL_COL_OUT_OF_RANGE"] = 10002] = "YUUMI_URL_COL_OUT_OF_RANGE";
92
+ ErrorCode[ErrorCode["YUUMI_RATE_OVER_LIMIT"] = 10003] = "YUUMI_RATE_OVER_LIMIT";
93
+ ErrorCode[ErrorCode["YUUMI_SUBSCRIPTION_NOT_FOUND"] = 10004] = "YUUMI_SUBSCRIPTION_NOT_FOUND";
94
+ /** YUUMI_NO_CUBOID_FOR_QUESTION - yuumi AI */
95
+ ErrorCode[ErrorCode["YUUMI_NO_CUBOID_FOR_QUESTION"] = 10010] = "YUUMI_NO_CUBOID_FOR_QUESTION";
96
+ ErrorCode[ErrorCode["YUUMI_ASYNCIO_CANCELLED"] = 10011] = "YUUMI_ASYNCIO_CANCELLED";
97
+ ErrorCode[ErrorCode["YUUMI_TABLE_NOT_FOUND_IN_UNIT"] = 10012] = "YUUMI_TABLE_NOT_FOUND_IN_UNIT";
98
+ ErrorCode[ErrorCode["YUUMI_ALL_TABLES_IS_INVALID"] = 10013] = "YUUMI_ALL_TABLES_IS_INVALID";
99
+ ErrorCode[ErrorCode["YUUMI_PROMPT_MAX_TOKENS_EXCEEDED"] = 10014] = "YUUMI_PROMPT_MAX_TOKENS_EXCEEDED";
100
+ ErrorCode[ErrorCode["YUUMI_AI_RUN_FAILED"] = 10015] = "YUUMI_AI_RUN_FAILED";
101
+ ErrorCode[ErrorCode["YUUMI_CONNECTOR_URL_NOT_FOUND"] = 10016] = "YUUMI_CONNECTOR_URL_NOT_FOUND";
102
+ /** PY_RUNTIME_SCRIPT_ERROR - py-runtime */
103
+ ErrorCode[ErrorCode["PY_RUNTIME_SCRIPT_ERROR"] = 11001] = "PY_RUNTIME_SCRIPT_ERROR";
104
+ /** INVITE_CODE_HAS_BEEN_UES - invite-code */
105
+ ErrorCode[ErrorCode["INVITE_CODE_HAS_BEEN_UES"] = 12001] = "INVITE_CODE_HAS_BEEN_UES";
106
+ ErrorCode[ErrorCode["INVALID_INVITE_CODE"] = 12002] = "INVALID_INVITE_CODE";
107
+ ErrorCode[ErrorCode["INVITE_CODE_REQUIRED"] = 12003] = "INVITE_CODE_REQUIRED";
108
+ ErrorCode[ErrorCode["USER_NOT_INVITED_CODE"] = 12004] = "USER_NOT_INVITED_CODE";
109
+ ErrorCode[ErrorCode["INVITE_CODE_ALREADY_BOUND"] = 12005] = "INVITE_CODE_ALREADY_BOUND";
110
+ /** WECHAT_HAS_BEEN_BOUND - user profile */
111
+ ErrorCode[ErrorCode["WECHAT_HAS_BEEN_BOUND"] = 13001] = "WECHAT_HAS_BEEN_BOUND";
112
+ ErrorCode[ErrorCode["MOBILE_HAS_BEEN_BOUND"] = 13002] = "MOBILE_HAS_BEEN_BOUND";
113
+ ErrorCode[ErrorCode["EMAIL_HAS_BEEN_BOUND"] = 13003] = "EMAIL_HAS_BEEN_BOUND";
114
+ /** ENTITLE_CAN_NOT_BUY_LOWER_OTP - entitlement domain errors */
115
+ ErrorCode[ErrorCode["ENTITLE_CAN_NOT_BUY_LOWER_OTP"] = 14001] = "ENTITLE_CAN_NOT_BUY_LOWER_OTP";
116
+ /** ENTITLE_UPDOWN_GRADE_NOT_SUPPORT - subscription upgrade/downgrade is not supported */
117
+ ErrorCode[ErrorCode["ENTITLE_UPDOWN_GRADE_NOT_SUPPORT"] = 14002] = "ENTITLE_UPDOWN_GRADE_NOT_SUPPORT";
118
+ /** ENTITLE_DUP_SUBSCRIPTION - duplicate subscription */
119
+ ErrorCode[ErrorCode["ENTITLE_DUP_SUBSCRIPTION"] = 14003] = "ENTITLE_DUP_SUBSCRIPTION";
120
+ /** PAYMENT_CHANNEL_NOT_SUPPORT - payment channel is not supported */
121
+ ErrorCode[ErrorCode["PAYMENT_CHANNEL_NOT_SUPPORT"] = 14004] = "PAYMENT_CHANNEL_NOT_SUPPORT";
122
+ /** ENTITLE_INVALID_COUPON_CODE - invalid coupon code */
123
+ ErrorCode[ErrorCode["ENTITLE_INVALID_COUPON_CODE"] = 14005] = "ENTITLE_INVALID_COUPON_CODE";
124
+ /** ENTITLE_COUPON_EXPIRED - coupon expired */
125
+ ErrorCode[ErrorCode["ENTITLE_COUPON_EXPIRED"] = 14006] = "ENTITLE_COUPON_EXPIRED";
126
+ /** ENTITLE_COUPON_USED_UP - coupon used up */
127
+ ErrorCode[ErrorCode["ENTITLE_COUPON_USED_UP"] = 14007] = "ENTITLE_COUPON_USED_UP";
128
+ /** ENTITLE_USE_COUPON_NOT_1ST_TRADE - not the first purchase, cannot use coupon */
129
+ ErrorCode[ErrorCode["ENTITLE_USE_COUPON_NOT_1ST_TRADE"] = 14008] = "ENTITLE_USE_COUPON_NOT_1ST_TRADE";
130
+ /** ENTITLE_CHAT_LIMIT_EXCEED - chat rate limit exceeded */
131
+ ErrorCode[ErrorCode["ENTITLE_CHAT_LIMIT_EXCEED"] = 14101] = "ENTITLE_CHAT_LIMIT_EXCEED";
132
+ /** ENTITLE_REPORT_LIMIT_EXCEED - report rate limit exceeded */
133
+ ErrorCode[ErrorCode["ENTITLE_REPORT_LIMIT_EXCEED"] = 14102] = "ENTITLE_REPORT_LIMIT_EXCEED";
134
+ /** ENTITLE_INSUFFICIENT_QUOTA - insufficient quota */
135
+ ErrorCode[ErrorCode["ENTITLE_INSUFFICIENT_QUOTA"] = 14103] = "ENTITLE_INSUFFICIENT_QUOTA";
136
+ /** ENTITLE_NEED_BILLING_ADDRESS - billing address required */
137
+ ErrorCode[ErrorCode["ENTITLE_NEED_BILLING_ADDRESS"] = 14301] = "ENTITLE_NEED_BILLING_ADDRESS";
138
+ /** REDEMPTION_INVALID_CODE - redemption code domain errors */
139
+ ErrorCode[ErrorCode["REDEMPTION_INVALID_CODE"] = 15001] = "REDEMPTION_INVALID_CODE";
140
+ /** REDEMPTION_CODE_INACTIVE - code inactive */
141
+ ErrorCode[ErrorCode["REDEMPTION_CODE_INACTIVE"] = 15002] = "REDEMPTION_CODE_INACTIVE";
142
+ /** REDEMPTION_CODE_FULLY_REDEEMED - fully redeemed */
143
+ ErrorCode[ErrorCode["REDEMPTION_CODE_FULLY_REDEEMED"] = 15003] = "REDEMPTION_CODE_FULLY_REDEEMED";
144
+ /** REDEMPTION_CODE_NOT_STARTED - not started yet */
145
+ ErrorCode[ErrorCode["REDEMPTION_CODE_NOT_STARTED"] = 15004] = "REDEMPTION_CODE_NOT_STARTED";
146
+ /** REDEMPTION_USER_NOT_ELIGIBLE - user not eligible */
147
+ ErrorCode[ErrorCode["REDEMPTION_USER_NOT_ELIGIBLE"] = 15005] = "REDEMPTION_USER_NOT_ELIGIBLE";
148
+ /** REDEMPTION_USER_REDEEM_TIMES_EXCEED - user redemption limit exceeded */
149
+ ErrorCode[ErrorCode["REDEMPTION_USER_REDEEM_TIMES_EXCEED"] = 15006] = "REDEMPTION_USER_REDEEM_TIMES_EXCEED";
150
+ /** REDEMPTION_CODE_HAS_BEEN_CREATED - redemption code already exists */
151
+ ErrorCode[ErrorCode["REDEMPTION_CODE_HAS_BEEN_CREATED"] = 15007] = "REDEMPTION_CODE_HAS_BEEN_CREATED";
152
+ /** DATA_SOURCE_TOO_LARGE - data source errors */
153
+ ErrorCode[ErrorCode["DATA_SOURCE_TOO_LARGE"] = 16001] = "DATA_SOURCE_TOO_LARGE";
154
+ ErrorCode[ErrorCode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
155
+ return ErrorCode;
156
+ }({});
157
+
158
+ //#endregion
159
+ //#region src/ts/univer/constants/univer.ts
160
+ /**
161
+ * Copyright 2023-present DreamNum Co., Ltd.
162
+ *
163
+ * Licensed under the Apache License, Version 2.0 (the "License");
164
+ * you may not use this file except in compliance with the License.
165
+ * You may obtain a copy of the License at
166
+ *
167
+ * http://www.apache.org/licenses/LICENSE-2.0
168
+ *
169
+ * Unless required by applicable law or agreed to in writing, software
170
+ * distributed under the License is distributed on an "AS IS" BASIS,
171
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
172
+ * See the License for the specific language governing permissions and
173
+ * limitations under the License.
174
+ */
175
+ let UniverType = /* @__PURE__ */ function(UniverType) {
176
+ UniverType[UniverType["UNIVER_UNKNOWN"] = 0] = "UNIVER_UNKNOWN";
177
+ UniverType[UniverType["UNIVER_DOC"] = 1] = "UNIVER_DOC";
178
+ UniverType[UniverType["UNIVER_SHEET"] = 2] = "UNIVER_SHEET";
179
+ UniverType[UniverType["UNIVER_SLIDE"] = 3] = "UNIVER_SLIDE";
180
+ UniverType[UniverType["UNIVER_PROJECT"] = 4] = "UNIVER_PROJECT";
181
+ UniverType[UniverType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
182
+ return UniverType;
183
+ }({});
184
+
185
+ //#endregion
186
+ //#region src/ts/univer/initial-sheet.ts
187
+ /**
188
+ * Copyright 2023-present DreamNum Co., Ltd.
189
+ *
190
+ * Licensed under the Apache License, Version 2.0 (the "License");
191
+ * you may not use this file except in compliance with the License.
192
+ * You may obtain a copy of the License at
193
+ *
194
+ * http://www.apache.org/licenses/LICENSE-2.0
195
+ *
196
+ * Unless required by applicable law or agreed to in writing, software
197
+ * distributed under the License is distributed on an "AS IS" BASIS,
198
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
+ * See the License for the specific language governing permissions and
200
+ * limitations under the License.
201
+ */
202
+ let CellType = /* @__PURE__ */ function(CellType) {
203
+ CellType[CellType["UNDEFINED"] = 0] = "UNDEFINED";
204
+ CellType[CellType["TEXT"] = 1] = "TEXT";
205
+ CellType[CellType["URL"] = 2] = "URL";
206
+ CellType[CellType["IMAGE"] = 3] = "IMAGE";
207
+ CellType[CellType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
208
+ return CellType;
209
+ }({});
210
+
211
+ //#endregion
212
+ //#region src/ts/univer/permission.ts
213
+ /**
214
+ * Copyright 2023-present DreamNum Co., Ltd.
215
+ *
216
+ * Licensed under the Apache License, Version 2.0 (the "License");
217
+ * you may not use this file except in compliance with the License.
218
+ * You may obtain a copy of the License at
219
+ *
220
+ * http://www.apache.org/licenses/LICENSE-2.0
221
+ *
222
+ * Unless required by applicable law or agreed to in writing, software
223
+ * distributed under the License is distributed on an "AS IS" BASIS,
224
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
225
+ * See the License for the specific language governing permissions and
226
+ * limitations under the License.
227
+ */
228
+ let UnitAction = /* @__PURE__ */ function(UnitAction) {
229
+ UnitAction[UnitAction["View"] = 0] = "View";
230
+ UnitAction[UnitAction["Edit"] = 1] = "Edit";
231
+ UnitAction[UnitAction["ManageCollaborator"] = 2] = "ManageCollaborator";
232
+ UnitAction[UnitAction["Print"] = 3] = "Print";
233
+ /** Duplicate - create a copy */
234
+ UnitAction[UnitAction["Duplicate"] = 4] = "Duplicate";
235
+ UnitAction[UnitAction["Comment"] = 5] = "Comment";
236
+ UnitAction[UnitAction["Copy"] = 6] = "Copy";
237
+ UnitAction[UnitAction["Share"] = 7] = "Share";
238
+ UnitAction[UnitAction["Export"] = 8] = "Export";
239
+ /** @deprecated */
240
+ UnitAction[UnitAction["MoveWorksheet"] = 9] = "MoveWorksheet";
241
+ /** @deprecated */
242
+ UnitAction[UnitAction["DeleteWorksheet"] = 10] = "DeleteWorksheet";
243
+ /** @deprecated */
244
+ UnitAction[UnitAction["HideWorksheet"] = 11] = "HideWorksheet";
245
+ /** @deprecated */
246
+ UnitAction[UnitAction["RenameWorksheet"] = 12] = "RenameWorksheet";
247
+ /** @deprecated */
248
+ UnitAction[UnitAction["CreateWorksheet"] = 13] = "CreateWorksheet";
249
+ /** @deprecated */
250
+ UnitAction[UnitAction["SetWorksheetStyle"] = 14] = "SetWorksheetStyle";
251
+ /** @deprecated */
252
+ UnitAction[UnitAction["EditWorksheetCell"] = 15] = "EditWorksheetCell";
253
+ UnitAction[UnitAction["InsertHyperlink"] = 16] = "InsertHyperlink";
254
+ UnitAction[UnitAction["Sort"] = 17] = "Sort";
255
+ UnitAction[UnitAction["Filter"] = 18] = "Filter";
256
+ UnitAction[UnitAction["PivotTable"] = 19] = "PivotTable";
257
+ /** @deprecated */
258
+ UnitAction[UnitAction["FloatImg"] = 20] = "FloatImg";
259
+ /** @deprecated */
260
+ UnitAction[UnitAction["IHistory"] = 21] = "IHistory";
261
+ /**
262
+ * RwHgtClWdt - row height, column width
263
+ *
264
+ * @deprecated
265
+ */
266
+ UnitAction[UnitAction["RwHgtClWdt"] = 22] = "RwHgtClWdt";
267
+ /**
268
+ * ViemRwHgtClWdt - row height, column width in view mode
269
+ *
270
+ * @deprecated
271
+ */
272
+ UnitAction[UnitAction["ViemRwHgtClWdt"] = 23] = "ViemRwHgtClWdt";
273
+ /**
274
+ * ViewFilter - filter in view mode
275
+ *
276
+ * @deprecated
277
+ */
278
+ UnitAction[UnitAction["ViewFilter"] = 24] = "ViewFilter";
279
+ UnitAction[UnitAction["MoveSheet"] = 25] = "MoveSheet";
280
+ /** DeleteSheet - delete the sub sheet */
281
+ UnitAction[UnitAction["DeleteSheet"] = 26] = "DeleteSheet";
282
+ UnitAction[UnitAction["HideSheet"] = 27] = "HideSheet";
283
+ UnitAction[UnitAction["CopySheet"] = 28] = "CopySheet";
284
+ UnitAction[UnitAction["RenameSheet"] = 29] = "RenameSheet";
285
+ UnitAction[UnitAction["CreateSheet"] = 30] = "CreateSheet";
286
+ UnitAction[UnitAction["SelectProtectedCells"] = 31] = "SelectProtectedCells";
287
+ UnitAction[UnitAction["SelectUnProtectedCells"] = 32] = "SelectUnProtectedCells";
288
+ UnitAction[UnitAction["SetCellStyle"] = 33] = "SetCellStyle";
289
+ UnitAction[UnitAction["SetCellValue"] = 34] = "SetCellValue";
290
+ UnitAction[UnitAction["SetRowStyle"] = 35] = "SetRowStyle";
291
+ UnitAction[UnitAction["SetColumnStyle"] = 36] = "SetColumnStyle";
292
+ UnitAction[UnitAction["InsertRow"] = 37] = "InsertRow";
293
+ UnitAction[UnitAction["InsertColumn"] = 38] = "InsertColumn";
294
+ UnitAction[UnitAction["DeleteRow"] = 39] = "DeleteRow";
295
+ UnitAction[UnitAction["DeleteColumn"] = 40] = "DeleteColumn";
296
+ UnitAction[UnitAction["EditExtraObject"] = 41] = "EditExtraObject";
297
+ /** Delete - delete the unit file */
298
+ UnitAction[UnitAction["Delete"] = 42] = "Delete";
299
+ UnitAction[UnitAction["RecoverHistory"] = 43] = "RecoverHistory";
300
+ UnitAction[UnitAction["ViewHistory"] = 44] = "ViewHistory";
301
+ UnitAction[UnitAction["CreatePermissionObject"] = 45] = "CreatePermissionObject";
302
+ UnitAction[UnitAction["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
303
+ return UnitAction;
304
+ }({});
305
+ let UnitRole = /* @__PURE__ */ function(UnitRole) {
306
+ UnitRole[UnitRole["Reader"] = 0] = "Reader";
307
+ UnitRole[UnitRole["Editor"] = 1] = "Editor";
308
+ UnitRole[UnitRole["Owner"] = 2] = "Owner";
309
+ UnitRole[UnitRole["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
310
+ return UnitRole;
311
+ }({});
312
+ let UnitObject = /* @__PURE__ */ function(UnitObject) {
313
+ UnitObject[UnitObject["Unkonwn"] = 0] = "Unkonwn";
314
+ UnitObject[UnitObject["Workbook"] = 1] = "Workbook";
315
+ UnitObject[UnitObject["Worksheet"] = 2] = "Worksheet";
316
+ UnitObject[UnitObject["SelectRange"] = 3] = "SelectRange";
317
+ UnitObject[UnitObject["Document"] = 4] = "Document";
318
+ UnitObject[UnitObject["Slide"] = 5] = "Slide";
319
+ UnitObject[UnitObject["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
320
+ return UnitObject;
321
+ }({});
322
+ let ObjectScope = /* @__PURE__ */ function(ObjectScope) {
323
+ ObjectScope[ObjectScope["SomeCollaborator"] = 0] = "SomeCollaborator";
324
+ ObjectScope[ObjectScope["AllCollaborator"] = 1] = "AllCollaborator";
325
+ ObjectScope[ObjectScope["OneSelf"] = 2] = "OneSelf";
326
+ ObjectScope[ObjectScope["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
327
+ return ObjectScope;
328
+ }({});
329
+
330
+ //#endregion
331
+ //#region src/ts/univer/workbook.ts
332
+ let CellValueType = /* @__PURE__ */ function(CellValueType) {
333
+ CellValueType[CellValueType["UNKNOWN"] = 0] = "UNKNOWN";
334
+ CellValueType[CellValueType["STRING"] = 1] = "STRING";
335
+ CellValueType[CellValueType["NUMBER"] = 2] = "NUMBER";
336
+ CellValueType[CellValueType["BOOLEAN"] = 3] = "BOOLEAN";
337
+ CellValueType[CellValueType["FORCE_STRING"] = 4] = "FORCE_STRING";
338
+ CellValueType[CellValueType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
339
+ return CellValueType;
340
+ }({});
341
+
342
+ //#endregion
343
+ //#region src/ts/univercloud/stats/v1/stats.ts
344
+ /**
345
+ * Copyright 2023-present DreamNum Co., Ltd.
346
+ *
347
+ * Licensed under the Apache License, Version 2.0 (the "License");
348
+ * you may not use this file except in compliance with the License.
349
+ * You may obtain a copy of the License at
350
+ *
351
+ * http://www.apache.org/licenses/LICENSE-2.0
352
+ *
353
+ * Unless required by applicable law or agreed to in writing, software
354
+ * distributed under the License is distributed on an "AS IS" BASIS,
355
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
356
+ * See the License for the specific language governing permissions and
357
+ * limitations under the License.
358
+ */
359
+ let IRecordType = /* @__PURE__ */ function(IRecordType) {
360
+ /** Unknown - don't use */
361
+ IRecordType[IRecordType["Unknown"] = 0] = "Unknown";
362
+ IRecordType[IRecordType["Colla"] = 1] = "Colla";
363
+ IRecordType[IRecordType["Import"] = 2] = "Import";
364
+ IRecordType[IRecordType["Export"] = 3] = "Export";
365
+ IRecordType[IRecordType["ICreateUnit"] = 4] = "ICreateUnit";
366
+ IRecordType[IRecordType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
367
+ return IRecordType;
368
+ }({});
369
+
370
+ //#endregion
371
+ //#region src/ts/universer/v1/comb.ts
372
+ /** more details: https://c3fgartrp2.feishu.cn/docx/OS47dk8BCo1ZeKxXiNvcDLuZn2g#PymGdupuyoYfvTxv1EBciV7in9b */
373
+ let CombCmd = /* @__PURE__ */ function(CombCmd) {
374
+ /** UNKNOWN_CMD - unknown cmd */
375
+ CombCmd[CombCmd["UNKNOWN_CMD"] = 0] = "UNKNOWN_CMD";
376
+ /** HELLO - call hello to get comb info, this is essential after you connect to the server */
377
+ CombCmd[CombCmd["HELLO"] = 1] = "HELLO";
378
+ /** JOIN - call join to join couple of rooms */
379
+ CombCmd[CombCmd["JOIN"] = 2] = "JOIN";
380
+ /** LEAVE - call leave to leave a room */
381
+ CombCmd[CombCmd["LEAVE"] = 3] = "LEAVE";
382
+ /** INGEST - call ingest to broadcast a message to a room */
383
+ CombCmd[CombCmd["INGEST"] = 4] = "INGEST";
384
+ /** HEARTBEAT - call heartbeat to keep the connection alive */
385
+ CombCmd[CombCmd["HEARTBEAT"] = 5] = "HEARTBEAT";
386
+ /**
387
+ * RECV - RECV not a cmd actually, you never call a RECV cmd.
388
+ * when you receive a message from comb(may be created by another user), the cmd will be RECV
389
+ */
390
+ CombCmd[CombCmd["RECV"] = 6] = "RECV";
391
+ CombCmd[CombCmd["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
392
+ return CombCmd;
393
+ }({});
394
+ let CmdRspCode = /* @__PURE__ */ function(CmdRspCode) {
395
+ CmdRspCode[CmdRspCode["UNKNOWN_CODE"] = 0] = "UNKNOWN_CODE";
396
+ CmdRspCode[CmdRspCode["OK"] = 1] = "OK";
397
+ CmdRspCode[CmdRspCode["FAIL"] = 2] = "FAIL";
398
+ /**
399
+ * JOIN_ROOM_FULL - 1000~1999 room related
400
+ * max room member reached
401
+ */
402
+ CmdRspCode[CmdRspCode["JOIN_ROOM_FULL"] = 1001] = "JOIN_ROOM_FULL";
403
+ /** JOIN_ROOM_NOT_EXISTS - the specified room does not exists */
404
+ CmdRspCode[CmdRspCode["JOIN_ROOM_NOT_EXISTS"] = 1002] = "JOIN_ROOM_NOT_EXISTS";
405
+ /** JOIN_ROOM_PERMISSION_DENIED - has no permission to join the room */
406
+ CmdRspCode[CmdRspCode["JOIN_ROOM_PERMISSION_DENIED"] = 1003] = "JOIN_ROOM_PERMISSION_DENIED";
407
+ /** GLOBAL_ROOMS_CNT_EXCEEDS - global live collaboration rooms count exceeds */
408
+ CmdRspCode[CmdRspCode["GLOBAL_ROOMS_CNT_EXCEEDS"] = 1004] = "GLOBAL_ROOMS_CNT_EXCEEDS";
409
+ CmdRspCode[CmdRspCode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
410
+ return CmdRspCode;
411
+ }({});
412
+
413
+ //#endregion
414
+ //#region src/ts/universer/v1/file.ts
415
+ let FileSource = /* @__PURE__ */ function(FileSource) {
416
+ FileSource[FileSource["Undefined"] = 0] = "Undefined";
417
+ /** HttpImport - assign UserID */
418
+ FileSource[FileSource["HttpImport"] = 1] = "HttpImport";
419
+ /** HttpExport - assign UserID */
420
+ FileSource[FileSource["HttpExport"] = 2] = "HttpExport";
421
+ /** UnitEmbedded - assign UnitID */
422
+ FileSource[FileSource["UnitEmbedded"] = 3] = "UnitEmbedded";
423
+ /** UnitSnapshot - assign UnitID */
424
+ FileSource[FileSource["UnitSnapshot"] = 4] = "UnitSnapshot";
425
+ /** UserProfileImg - assign UserID */
426
+ FileSource[FileSource["UserProfileImg"] = 5] = "UserProfileImg";
427
+ /** ClipsheetFragments - assign UserID, fragmented file will be deleted after 30 days */
428
+ FileSource[FileSource["ClipsheetFragments"] = 6] = "ClipsheetFragments";
429
+ /** LLMInputData - assign UserID */
430
+ FileSource[FileSource["LLMInputData"] = 7] = "LLMInputData";
431
+ FileSource[FileSource["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
432
+ return FileSource;
433
+ }({});
434
+
435
+ //#endregion
436
+ //#region src/utils.ts
437
+ /**
438
+ * To examine if a response is an error.
439
+ *
440
+ * @param error error interface
441
+ * @returns if the response is an error
442
+ */
443
+ function isError(error) {
444
+ if (error && error.code && error.code !== ErrorCode.OK && error.code !== "OK") return true;
445
+ return false;
446
+ }
447
+
448
+ //#endregion
449
+ exports.CellType = CellType;
450
+ exports.CellValueType = CellValueType;
451
+ exports.CmdRspCode = CmdRspCode;
452
+ exports.CombCmd = CombCmd;
453
+ exports.CommentSolvedStatus = CommentSolvedStatus;
454
+ exports.CommentUpdateEventType = CommentUpdateEventType;
455
+ exports.ErrorCode = ErrorCode;
456
+ exports.FileSource = FileSource;
457
+ exports.IRecordType = IRecordType;
458
+ exports.ObjectScope = ObjectScope;
459
+ exports.UnitAction = UnitAction;
460
+ exports.UnitObject = UnitObject;
461
+ exports.UnitRole = UnitRole;
462
+ exports.UniverType = UniverType;
463
+ exports.isError = isError;