@officesdk/editor-sdk-core 0.0.0-15 → 0.0.0-17

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 (117) hide show
  1. package/cjs/docx/index.js +1 -1
  2. package/cjs/docx/menu.js +1 -1
  3. package/cjs/docx/sdk.js +1 -1
  4. package/cjs/docx/theme.js +1 -1
  5. package/cjs/docx/toolbar.js +3 -0
  6. package/cjs/index.js +25 -0
  7. package/cjs/presentation/export.js +14 -0
  8. package/cjs/presentation/index.js +4 -2
  9. package/cjs/presentation/sdk.js +2 -12
  10. package/cjs/shared/attachment.js +1 -1
  11. package/cjs/shared/checkpoints.js +19 -0
  12. package/cjs/shared/collaboration.js +3 -0
  13. package/cjs/shared/collaborators.js +3 -0
  14. package/cjs/shared/comments.js +1 -1
  15. package/cjs/shared/decryption.js +3 -0
  16. package/cjs/shared/download.js +3 -0
  17. package/cjs/shared/editor.js +1 -1
  18. package/cjs/shared/export.js +1 -1
  19. package/cjs/shared/feature.js +3 -0
  20. package/cjs/shared/file-picker.js +1 -1
  21. package/cjs/shared/file.js +50 -0
  22. package/cjs/shared/follow-mode.js +3 -0
  23. package/cjs/shared/history.js +3 -0
  24. package/cjs/shared/index.js +1 -1
  25. package/cjs/shared/link.js +1 -1
  26. package/cjs/shared/mention.js +3 -0
  27. package/cjs/shared/menu.js +1 -1
  28. package/cjs/shared/performance.js +3 -0
  29. package/cjs/shared/print.js +1 -1
  30. package/cjs/shared/render.js +3 -0
  31. package/cjs/shared/tool-box.js +40 -0
  32. package/cjs/shared/toolbar.js +1 -1
  33. package/cjs/shared/ui.js +18 -0
  34. package/cjs/shared/version.js +3 -0
  35. package/cjs/sheet/cell.js +29 -1
  36. package/cjs/sheet/chart.js +3 -0
  37. package/cjs/sheet/checklist.js +3 -0
  38. package/cjs/sheet/combine-sheets.js +3 -0
  39. package/cjs/sheet/comments.js +3 -0
  40. package/cjs/sheet/data-transfer.js +3 -0
  41. package/cjs/sheet/export.js +3 -0
  42. package/cjs/sheet/font.js +3 -0
  43. package/cjs/sheet/form.js +3 -0
  44. package/cjs/sheet/import-formula.js +3 -0
  45. package/cjs/sheet/index.js +4 -2
  46. package/cjs/sheet/lock.js +14 -0
  47. package/cjs/sheet/mention.js +13 -0
  48. package/cjs/sheet/range.js +1 -1
  49. package/cjs/sheet/render.js +3 -0
  50. package/cjs/sheet/sdk.js +1 -1
  51. package/cjs/sheet/sensitization.js +3 -0
  52. package/cjs/sheet/sheet2table.js +3 -0
  53. package/cjs/sheet/worksheet.js +1 -1
  54. package/cjs/table/sdk.js +1 -1
  55. package/esm/docx/index.js +1 -1
  56. package/esm/docx/menu.js +1 -1
  57. package/esm/docx/sdk.js +1 -1
  58. package/esm/docx/theme.js +1 -1
  59. package/esm/docx/toolbar.js +2 -0
  60. package/esm/index.js +9 -0
  61. package/esm/presentation/export.js +11 -0
  62. package/esm/presentation/index.js +2 -1
  63. package/esm/presentation/sdk.js +1 -11
  64. package/esm/shared/attachment.js +1 -1
  65. package/esm/shared/checkpoints.js +16 -0
  66. package/esm/shared/collaboration.js +2 -0
  67. package/esm/shared/collaborators.js +2 -0
  68. package/esm/shared/comments.js +1 -1
  69. package/esm/shared/decryption.js +2 -0
  70. package/esm/shared/download.js +2 -0
  71. package/esm/shared/editor.js +1 -1
  72. package/esm/shared/export.js +1 -1
  73. package/esm/shared/feature.js +2 -0
  74. package/esm/shared/file-picker.js +1 -1
  75. package/esm/shared/file.js +47 -0
  76. package/esm/shared/follow-mode.js +2 -0
  77. package/esm/shared/history.js +2 -0
  78. package/esm/shared/index.js +1 -1
  79. package/esm/shared/link.js +1 -1
  80. package/esm/shared/mention.js +2 -0
  81. package/esm/shared/menu.js +1 -1
  82. package/esm/shared/performance.js +2 -0
  83. package/esm/shared/print.js +1 -1
  84. package/esm/shared/render.js +2 -0
  85. package/esm/shared/tool-box.js +37 -0
  86. package/esm/shared/toolbar.js +1 -1
  87. package/esm/shared/ui.js +15 -0
  88. package/esm/shared/version.js +2 -0
  89. package/esm/sheet/cell.js +28 -2
  90. package/esm/sheet/chart.js +2 -0
  91. package/esm/sheet/checklist.js +2 -0
  92. package/esm/sheet/combine-sheets.js +2 -0
  93. package/esm/sheet/comments.js +2 -0
  94. package/esm/sheet/data-transfer.js +2 -0
  95. package/esm/sheet/export.js +2 -0
  96. package/esm/sheet/font.js +2 -0
  97. package/esm/sheet/form.js +2 -0
  98. package/esm/sheet/import-formula.js +2 -0
  99. package/esm/sheet/index.js +2 -1
  100. package/esm/sheet/lock.js +11 -0
  101. package/esm/sheet/mention.js +10 -0
  102. package/esm/sheet/range.js +1 -1
  103. package/esm/sheet/render.js +2 -0
  104. package/esm/sheet/sdk.js +1 -1
  105. package/esm/sheet/sensitization.js +2 -0
  106. package/esm/sheet/sheet2table.js +2 -0
  107. package/esm/sheet/worksheet.js +1 -1
  108. package/esm/table/sdk.js +1 -1
  109. package/package.json +4 -1
  110. package/types/diagram.d.ts +769 -41
  111. package/types/docs.d.ts +769 -41
  112. package/types/docx.d.ts +878 -43
  113. package/types/pdf.d.ts +769 -41
  114. package/types/presentation.d.ts +769 -41
  115. package/types/shared.d.ts +769 -41
  116. package/types/sheet.d.ts +1238 -76
  117. package/types/table.d.ts +781 -48
package/types/docx.d.ts CHANGED
@@ -65,6 +65,43 @@ export declare abstract class AbstractedEditorFileUploader {
65
65
  abstract resume(taskIds?: string[]): void;
66
66
  }
67
67
 
68
+ export declare type CheckLimitationResult = {
69
+ status: 'limited';
70
+ /**
71
+ * 被限制原因
72
+ */
73
+ reason?: string;
74
+ } | {
75
+ status: 'unlimited';
76
+ };
77
+
78
+ /**
79
+ * 协作者信息接口
80
+ */
81
+ export declare interface CollaboratorInfo {
82
+ /** 协作者唯一标识 */
83
+ id: number;
84
+ /** 协作者名称 */
85
+ name: string;
86
+ /** 协作者头像URL */
87
+ avatar: string;
88
+ }
89
+
90
+ export declare interface ConfirmButtonConfig {
91
+ /**
92
+ * 按钮文本
93
+ */
94
+ label?: string;
95
+ /**
96
+ * 是否隐藏
97
+ */
98
+ hidden?: boolean;
99
+ /**
100
+ * 按钮点击回调
101
+ */
102
+ onClick?: () => void;
103
+ }
104
+
68
105
  /**
69
106
  * 传统文档右键菜单功能按钮
70
107
  */
@@ -208,15 +245,28 @@ export declare interface DocxInfoOptions {
208
245
  name: string;
209
246
  }
210
247
 
248
+ /**
249
+ * 传统文档菜单栏自定义菜单
250
+ * 可以通过指定泛型T来指定自定义菜单的类型,自定义菜单目前只支持button和link两种类型
251
+ */
252
+ export declare type DocxMenuCustomConfig<T extends 'button' | 'link' = 'button' | 'link'> = (EditorMenuButtonMenuItemConfig<string> | EditorMenuLinkMenuItemConfig<string>) & {
253
+ type: T;
254
+ };
255
+
211
256
  /**
212
257
  * 传统文档菜单栏一级菜单
258
+ * 可以通过指定泛型T来指定一级菜单的类型,例如DocxMenuEntryConfig<'button'>,不指定则默认为所有类型都有可能
213
259
  */
214
- export declare type DocxMenuEntryConfig = EditorMenuEntryConfig<DocxMenuFeatureButtonName>;
260
+ export declare type DocxMenuEntryConfig<T extends EditorMenuItemType = EditorMenuItemType> = EditorMenuEntryConfig<DocxMenuFeatureButtonName> & {
261
+ type: T;
262
+ };
215
263
 
216
264
  /**
217
265
  * 传统文档菜单栏内置功能按钮
218
266
  */
219
- export declare type DocxMenuFeatureButtonName = 'file' | 'edit' | 'insert' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'export' | 'saveTemplate' | 'viewHistory' | 'saveHistory' | 'exportImage' | 'exportPDF' | 'exportWPS' | 'exportImagePDF' | 'insertAttachment' | 'insertCloudFile' | 'insertSignature' | 'insertImageFromUrl';
267
+ export declare type DocxMenuFeatureButtonName = 'file' | 'edit' | 'insert' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'export' | 'saveTemplate' | 'viewHistory' | 'saveHistory' | 'exportWord' | 'exportImage' | 'exportPDF' | 'exportWPS' | 'exportImagePDF' | 'insertAttachment' | 'insertFilesFromDrive' | 'insertSignature' | 'insertImage' | 'insertImageFromLocal' | 'insertImageFromUrl';
268
+
269
+ export declare type DocxMenuFeatureConfig = EditorMenuFeatureConfig;
220
270
 
221
271
  /**
222
272
  * 传统文档菜单栏相关配置,目前菜单栏不是所有套件都支持,
@@ -407,6 +457,10 @@ export declare interface DocxSDKOptions extends EditorOptions {
407
457
  * 主题字体相关配置
408
458
  */
409
459
  theme?: DocxThemeOptions;
460
+ /**
461
+ * 工具栏设置
462
+ */
463
+ toolbar?: DocxToolbarOptions;
410
464
  }
411
465
 
412
466
  /**
@@ -612,9 +666,11 @@ export declare interface DocxThemeFontsSchemeItem {
612
666
  * 其他单独字体配置
613
667
  * key 表示script值
614
668
  * 例如:
669
+ * ```xml
615
670
  * <a:font script="Hans" typeface="黑体"/\>
616
671
  * <a:font script="Jpan" typeface="HG明朝B"/\>
617
672
  * <a:font script="Arab" typeface="Times New Roman"/\>
673
+ * ```
618
674
  */
619
675
  font: Record<string, DocxThemeFont>;
620
676
  }
@@ -765,6 +821,94 @@ export declare interface DocxTOCs {
765
821
  }) => Promise<boolean>;
766
822
  }
767
823
 
824
+ /**
825
+ * 传统文档工具栏功能按钮
826
+ */
827
+ export declare type DocxToolbarFeatureButton = EditorToolbarFeatureButton<DocxToolbarFeatureButtonName>;
828
+
829
+ /**
830
+ * 传统文档工具栏功能按钮配置
831
+ */
832
+ export declare type DocxToolbarFeatureButtonConfig = EditorToolbarFeatureButtonConfig<DocxToolbarFeatureButtonName>;
833
+
834
+ /**
835
+ * Docx 工具栏按钮名称类型
836
+ */
837
+ export declare type DocxToolbarFeatureButtonName =
838
+ /** 撤销 */
839
+ 'undo'
840
+ /** 重做 */
841
+ | 'redo'
842
+ /** 格式刷 */
843
+ | 'formatPainter'
844
+ /** 清除格式 */
845
+ | 'clearFormat'
846
+ /** 缩放 */
847
+ | 'zoom'
848
+ /** 样式 */
849
+ | 'styles'
850
+ /** 字体 */
851
+ | 'font'
852
+ /** 字号 */
853
+ | 'fontSize'
854
+ /** 增加字号 */
855
+ | 'increaseFontSize'
856
+ /** 减少字号 */
857
+ | 'decreaseFontSize'
858
+ /** 粗体 */
859
+ | 'bold'
860
+ /** 斜体 */
861
+ | 'italic'
862
+ /** 下划线 */
863
+ | 'underline'
864
+ /** 删除线 */
865
+ | 'strikeThrough'
866
+ /** 文字颜色 */
867
+ | 'textColor'
868
+ /** 高亮颜色 */
869
+ | 'highlightColor'
870
+ /** 上标 */
871
+ | 'superScript'
872
+ /** 下标 */
873
+ | 'subScript'
874
+ /** 左对齐 */
875
+ | 'leftAlign'
876
+ /** 居中 */
877
+ | 'center'
878
+ /** 右对齐 */
879
+ | 'rightAlign'
880
+ /** 两端对齐 */
881
+ | 'justify'
882
+ /** 编号列表 */
883
+ | 'numberedList'
884
+ /** 项目符号列表 */
885
+ | 'bulletedList'
886
+ /** 增加缩进 */
887
+ | 'increaseIndent'
888
+ /** 减少缩进 */
889
+ | 'decreaseIndent'
890
+ /** 行距 */
891
+ | 'lineSpacing'
892
+ /** 插入图片 */
893
+ | 'insertImage'
894
+ /** 插入图片-从本地 */
895
+ | 'insertImageFromLocal'
896
+ /** 插入图片-来自链接 */
897
+ | 'insertImageFromURL'
898
+ /** 插入表格 */
899
+ | 'insertTable'
900
+ /** 链接 */
901
+ | 'insertLink'
902
+ /** 开启限制编辑 */
903
+ | 'enableEditingRestriction'
904
+ /** 添加评论 */
905
+ | 'addComments';
906
+
907
+ /**
908
+ * 传统文档工具栏配置
909
+ */
910
+ export declare type DocxToolbarOptions = EditorToolbarOptions<DocxToolbarFeatureButtonName>;
911
+
768
912
  /**
769
913
  * 文本水印操作接口,
770
914
  * 水印属于文档的一种特殊业务,水印是 OOXML 是形状的一种业务形态封装,
@@ -1150,8 +1294,9 @@ export declare interface EditorAttachmentMaxSizeOptions {
1150
1294
  * 编辑器附件信息
1151
1295
  */
1152
1296
  export declare interface EditorAttachmentOptions {
1153
- uploader: AbstractedEditorFileUploader;
1154
- download: (url: string) => void;
1297
+ picker?: EditorFilePicker;
1298
+ uploader?: AbstractedEditorFileUploader;
1299
+ download?: (url: string) => void;
1155
1300
  /**
1156
1301
  * 图片附件相关配置
1157
1302
  */
@@ -1225,6 +1370,80 @@ export declare interface EditorBrandOptions {
1225
1370
  };
1226
1371
  }
1227
1372
 
1373
+ export declare interface EditorCheckpointsOptions {
1374
+ /**
1375
+ * 获取功能卡点限制
1376
+ * undefined代表无限制
1377
+ */
1378
+ getFeatureLimitation?: (key: string) => Limitation | undefined;
1379
+ /**
1380
+ * 检查是否超限
1381
+ * @param key 功能卡点key
1382
+ * @param value 功能卡点检查值,如文件大小/行列数量等
1383
+ */
1384
+ checkFeatureLimitation?: (key: string, value: number) => CheckLimitationResult;
1385
+ /**
1386
+ * 获取功能卡点状态,如某功能入口是否开启
1387
+ */
1388
+ getFeatureStatus?: (key: string) => FeatureStatus;
1389
+ }
1390
+
1391
+ export declare interface EditorCollaborationOptions {
1392
+ /**
1393
+ * 是否允许离线编辑
1394
+ */
1395
+ offlineEditable: boolean;
1396
+ /**
1397
+ * 保存状态外部接口委托
1398
+ */
1399
+ saveStatus: SaveStatusDelegation;
1400
+ /**
1401
+ * 同步状态外部接口委托(部分套件不支持离线编辑)
1402
+ */
1403
+ syncStatus?: SyncStatusDelegation;
1404
+ /**
1405
+ * 是否使用严格的长度校验规则,默认关闭,在开启后如果出现长度校验失败会立刻禁止编辑器继续编写,并将保存状态设置为错误状态
1406
+ */
1407
+ strictCLC?: boolean;
1408
+ }
1409
+
1410
+ /**
1411
+ * 编辑器协作者管理接口
1412
+ */
1413
+ export declare interface EditorCollaborators {
1414
+ /**
1415
+ * 获取当前所有协作者列表
1416
+ * @returns 返回所有协作者信息数组
1417
+ */
1418
+ getCollaborators: () => CollaboratorInfo[];
1419
+ /**
1420
+ * 开始监听协作者状态变化
1421
+ * 调用此方法后,将开始接收协作者进入/离开的事件
1422
+ */
1423
+ start: () => void;
1424
+ /**
1425
+ * 停止监听协作者状态变化
1426
+ * 调用此方法后,将不再接收协作者进入/离开的事件
1427
+ */
1428
+ stop: () => void;
1429
+ /**
1430
+ * 添加协作者进入事件监听器
1431
+ * @param listener - 监听器回调函数,参数如下:
1432
+ * - allUsers: 当前所有协作者列表
1433
+ * - enteredUsers: 新进入的协作者列表
1434
+ * @returns 返回一个函数,调用该函数可以移除监听器
1435
+ */
1436
+ addUserEnterListener: (listener: (allUsers: CollaboratorInfo[], enteredUsers: CollaboratorInfo[]) => void) => () => void;
1437
+ /**
1438
+ * 添加协作者离开事件监听器
1439
+ * @param listener - 监听器回调函数
1440
+ * - allUsers: 当前所有协作者列表
1441
+ * - leftUsers: 离开的协作者列表
1442
+ * @returns 返回一个函数,调用该函数可以移除监听器
1443
+ */
1444
+ addUserLeaveListener: (listener: (allUsers: CollaboratorInfo[], leftUsers: CollaboratorInfo[]) => void) => () => void;
1445
+ }
1446
+
1228
1447
  /**
1229
1448
  * 单条评论数据
1230
1449
  */
@@ -1291,7 +1510,7 @@ export declare interface EditorComments {
1291
1510
  /**
1292
1511
  * 编辑器评论初始化配置
1293
1512
  */
1294
- export declare interface EditorCommentsOptions {
1513
+ export declare interface EditorCommentsOptions extends EditorFeatureConfig {
1295
1514
  /**
1296
1515
  * 评论作者信息,如果这里的信息为空,将会使用 user 信息
1297
1516
  */
@@ -1320,6 +1539,12 @@ export declare interface EditorCommentsOptions {
1320
1539
  */
1321
1540
  mode: 'none' | 'card';
1322
1541
  };
1542
+ /**
1543
+ * 评论变化监听
1544
+ * @param listener
1545
+ * @returns 返回一个函数,调用该函数可以移除监听器
1546
+ */
1547
+ addChangedListener?: (listener: (type: 'create' | 'update' | 'close', data: EditorCommentItem) => void) => () => void;
1323
1548
  }
1324
1549
 
1325
1550
  export declare interface EditorContent<Delta = EditorDelta> {
@@ -1345,6 +1570,19 @@ export declare interface EditorContent<Delta = EditorDelta> {
1345
1570
  */
1346
1571
  export declare type EditorContextMenuOptions<TName extends string> = EditorMenuOptions<TName>;
1347
1572
 
1573
+ /**
1574
+ * 编辑器解密选项接口
1575
+ * 用于配置编辑器中需要解密的内容的相关选项
1576
+ */
1577
+ export declare interface EditorDecryptionOptions {
1578
+ /**
1579
+ * 图片附件解密函数
1580
+ * @param buffer - 需要解密的二进制数据
1581
+ * @returns 解密后的二进制数据
1582
+ */
1583
+ decrypt?: (buffer: ArrayBuffer) => ArrayBuffer;
1584
+ }
1585
+
1348
1586
  export declare interface EditorDelta {
1349
1587
  compose: (other: EditorDelta, isDocument?: boolean) => EditorDelta;
1350
1588
  transform: (other: EditorDelta, priority?: boolean) => EditorDelta;
@@ -1404,16 +1642,81 @@ export declare interface EditorEmbeddedObjectOptions {
1404
1642
  export declare interface EditorExportOptions {
1405
1643
  /**
1406
1644
  * 可导出类型
1407
- * @description
1408
1645
  */
1409
1646
  supportedTypes?: string[];
1410
1647
  /**
1411
1648
  * 导出文件
1412
- * @description
1413
1649
  */
1414
1650
  exportFile: (type: string) => Promise<void>;
1415
1651
  }
1416
1652
 
1653
+ export declare interface EditorFeatureConfig {
1654
+ /**
1655
+ * 功能是否被禁用(入口还在)
1656
+ */
1657
+ disabled?: boolean;
1658
+ /**
1659
+ * 功能入口是否被隐藏
1660
+ */
1661
+ hidden?: boolean;
1662
+ }
1663
+
1664
+ export declare interface EditorFileOptions {
1665
+ /**
1666
+ * 文件guid
1667
+ */
1668
+ guid: string;
1669
+ /**
1670
+ * 文件名
1671
+ */
1672
+ name?: string;
1673
+ }
1674
+
1675
+ export declare interface EditorFilePicker {
1676
+ open: (option: EditorFilePickerOpenOptions) => Promise<EditorPickedFile[]>;
1677
+ }
1678
+
1679
+ export declare interface EditorFilePickerOpenOptions {
1680
+ mimeTypes?: string[];
1681
+ maxSize?: number;
1682
+ extensions?: string[];
1683
+ multiple?: boolean;
1684
+ directory?: boolean;
1685
+ }
1686
+
1687
+ export declare interface EditorFollowMode {
1688
+ /**
1689
+ * 演讲者/跟随者进入跟随模式
1690
+ * 当演讲者调用此方法时,其他用户将可以开始跟随该演讲者
1691
+ */
1692
+ enter: () => void;
1693
+ /**
1694
+ * 当前是否处于跟随模式
1695
+ * @returns 返回布尔值,true表示正在跟随,false表示未在跟随
1696
+ */
1697
+ isFollowModeActive: () => boolean;
1698
+ /**
1699
+ * 获取当前演讲者信息
1700
+ * @returns 返回包含演讲者ID、姓名和头像信息的对象
1701
+ */
1702
+ getSpeaker: () => Speaker;
1703
+ /**
1704
+ * 添加跟随状态变化的监听器
1705
+ * @param listener 状态变化时的回调函数
1706
+ * @returns 返回一个用于移除监听器的函数
1707
+ */
1708
+ addChangedListener: (listener: () => void) => () => void;
1709
+ }
1710
+
1711
+ export declare interface EditorFollowModeOptions extends EditorFeatureConfig {
1712
+ /**
1713
+ * 推送跟随消息的 socket 对象
1714
+ * 实际类型为socketIO.client
1715
+ * TODO: 抽象为接口
1716
+ */
1717
+ socket?: unknown;
1718
+ }
1719
+
1417
1720
  export declare interface EditorFontFace {
1418
1721
  /**
1419
1722
  * 字体的名称,用于在用户界面上显示的名称
@@ -1492,6 +1795,19 @@ export declare interface EditorFontsOptions {
1492
1795
  list: EditorFontsList;
1493
1796
  }
1494
1797
 
1798
+ export declare interface EditorHistory {
1799
+ /**
1800
+ * 显示历史记录侧边栏
1801
+ */
1802
+ showSidebar: () => void;
1803
+ /**
1804
+ * 隐藏历史记录侧边栏
1805
+ */
1806
+ hideSidebar: () => void;
1807
+ }
1808
+
1809
+ export declare type EditorHistoryOptions = EditorFeatureConfig;
1810
+
1495
1811
  /**
1496
1812
  * i18n 相关设置
1497
1813
  */
@@ -1512,13 +1828,39 @@ export declare type EditorImageCropPoint = 'nw' | 'north' | 'ne' | 'west' | 'cen
1512
1828
  * 链接配置,抽象打开链接等操作
1513
1829
  */
1514
1830
  export declare interface EditorLinkOptions {
1831
+ /**
1832
+ * 链接识别配置
1833
+ */
1834
+ detection?: {
1835
+ /**
1836
+ * 支持识别的链接格式
1837
+ */
1838
+ pattern?: string | RegExp | (string | RegExp)[];
1839
+ /**
1840
+ * 是否启用链接识别,默认关闭
1841
+ */
1842
+ enabled?: boolean;
1843
+ };
1515
1844
  /**
1516
1845
  * 打开链接,如果取消了打开链接操作,返回 false
1517
1846
  * @param url
1518
1847
  * @param target
1519
1848
  * @returns
1520
1849
  */
1521
- open: (url: string, target: string) => Promise<boolean>;
1850
+ open?: (url: string, target: string) => Promise<boolean>;
1851
+ /**
1852
+ * 根据文件guid以及其他参数生成链接
1853
+ */
1854
+ generate?: (params: FileLinkParams) => Promise<string>;
1855
+ /**
1856
+ * 从文档链接中解析得到文件guid等参数
1857
+ */
1858
+ parse?: (url: string) => Promise<FileLinkParams | undefined>;
1859
+ /**
1860
+ * 生成sdk2.0内部链接
1861
+ * 使用场景:专业表格跨表格引用
1862
+ */
1863
+ generateInternal?: (params: FileLinkParams) => Promise<string>;
1522
1864
  }
1523
1865
 
1524
1866
  /**
@@ -1603,29 +1945,27 @@ export declare interface EditorMenuEntryMenuItemConfig<TName extends string> ext
1603
1945
  /**
1604
1946
  * 菜单功能按钮配置
1605
1947
  */
1606
- export declare interface EditorMenuFeatureConfig {
1948
+ export declare interface EditorMenuFeatureConfig extends EditorFeatureConfig {
1607
1949
  /**
1608
- * 是否隐藏菜单项,设置为true则隐藏菜单项
1950
+ * 按钮标签(显示文本)一般工具栏上的按钮不会显示文本,如果需要显示文本,配置此项。
1609
1951
  */
1610
- hidden?: boolean;
1952
+ label?: string;
1611
1953
  /**
1612
- * 是否禁用菜单项,设置为true则变为灰色不可点击
1954
+ * 按钮图标,可以是 base64 的图片信息,也可以是图片 url
1613
1955
  */
1614
- disabled?: boolean;
1615
- }
1616
-
1617
- /**
1618
- * 菜单功能按钮配置
1619
- */
1620
- export declare interface EditorMenuFeatureConfig {
1956
+ icon?: string;
1621
1957
  /**
1622
- * 是否隐藏菜单项,设置为true则隐藏菜单项
1958
+ * 按钮点击事件.接受一个函数,可以自定义点击事件。
1623
1959
  */
1624
- hidden?: boolean;
1960
+ callback?: () => void;
1625
1961
  /**
1626
- * 是否禁用菜单项,设置为true则变为灰色不可点击
1962
+ * 按钮提示文本,鼠标悬浮到按钮上时显示的tooltip文字
1627
1963
  */
1628
- disabled?: boolean;
1964
+ tooltip?: string;
1965
+ /**
1966
+ * 按钮在工具栏中位置,不设置则按照默认位置
1967
+ */
1968
+ index?: number;
1629
1969
  }
1630
1970
 
1631
1971
  /**
@@ -1683,9 +2023,9 @@ export declare interface EditorMenuOptions<TName extends string> {
1683
2023
  entries?: EditorMenuEntryConfig<TName>[];
1684
2024
  /**
1685
2025
  * 菜单栏功能按钮配置
1686
- * TODO 此配置目前没有用到,后续看是保留还是和custom合并
2026
+ * 更加间接的配置项
1687
2027
  */
1688
- features?: Record<TName, EditorMenuFeatureConfig>;
2028
+ features?: Partial<Record<TName, EditorMenuFeatureConfig>>;
1689
2029
  /**
1690
2030
  * 自定义按钮配置
1691
2031
  */
@@ -1755,6 +2095,10 @@ export declare interface EditorOptions {
1755
2095
  * 匿名用户的缺省信息
1756
2096
  */
1757
2097
  anonymous?: EditorAnonymousOptions;
2098
+ /**
2099
+ * 当前文件信息
2100
+ */
2101
+ file?: EditorFileOptions;
1758
2102
  /**
1759
2103
  * i18n 相关设置
1760
2104
  */
@@ -1762,13 +2106,13 @@ export declare interface EditorOptions {
1762
2106
  /**
1763
2107
  * 品牌相关设置
1764
2108
  */
1765
- brand?: EditorBrandOptions;
2109
+ brand?: MaybePromiseValue<EditorBrandOptions>;
1766
2110
  /**
1767
2111
  * 编辑器内部资源请求配置
1768
2112
  */
1769
2113
  assets?: EditorAssetsOptions;
1770
2114
  /**
1771
- * 编辑器内部超链接设置
2115
+ * 编辑器链接相关配置
1772
2116
  */
1773
2117
  link?: EditorLinkOptions;
1774
2118
  /**
@@ -1795,6 +2139,38 @@ export declare interface EditorOptions {
1795
2139
  * 导出设置
1796
2140
  */
1797
2141
  export?: EditorExportOptions;
2142
+ /**
2143
+ * 解密设置
2144
+ */
2145
+ decryption?: EditorDecryptionOptions;
2146
+ /**
2147
+ * 网络请求设置
2148
+ */
2149
+ http?: HTTPProxy;
2150
+ /**
2151
+ * 编辑器渲染设置项
2152
+ */
2153
+ render?: EditorRenderOptions;
2154
+ /**
2155
+ * 编辑器 UI 相关
2156
+ */
2157
+ ui?: EditorUiOptions;
2158
+ /**
2159
+ * 编辑器卡点限制
2160
+ */
2161
+ checkpoints?: EditorCheckpointsOptions;
2162
+ /**
2163
+ * 编辑器工具箱设置
2164
+ */
2165
+ toolbox?: EditorToolboxOptions;
2166
+ /**
2167
+ * 编辑器历史设置
2168
+ */
2169
+ history?: EditorHistoryOptions;
2170
+ /**
2171
+ * 编辑器协作相关
2172
+ */
2173
+ collaboration?: EditorCollaborationOptions;
1798
2174
  }
1799
2175
 
1800
2176
  /**
@@ -1855,10 +2231,33 @@ export declare interface EditorOutlineOptions {
1855
2231
  visible?: boolean;
1856
2232
  }
1857
2233
 
2234
+ export declare interface EditorPickedFile {
2235
+ /**
2236
+ * 文件大小
2237
+ */
2238
+ size: number;
2239
+ /**
2240
+ * 文件名
2241
+ */
2242
+ name: string;
2243
+ /**
2244
+ * 文件路径,仅显示有意义的相对路径,可用在上传文件夹和识别文件使用
2245
+ */
2246
+ path?: string;
2247
+ /**
2248
+ * 文件类型,mime-type
2249
+ */
2250
+ type: string;
2251
+ /**
2252
+ * 文件原始数据,用于给上传控件使用
2253
+ */
2254
+ raw: File;
2255
+ }
2256
+
1858
2257
  /**
1859
2258
  * 编辑器打印设置
1860
2259
  */
1861
- export declare interface EditorPrintOptions {
2260
+ export declare interface EditorPrintOptions extends EditorFeatureConfig {
1862
2261
  /**
1863
2262
  * 部分套件如果绕过了编辑器预设的打印接口,直接通过拉起了浏览器的打印页面,这时打印页面无法获取到编辑器的内容,
1864
2263
  * 这种情况下就会 fallback 到这个 options 上,显示一个提示信息。
@@ -1866,10 +2265,6 @@ export declare interface EditorPrintOptions {
1866
2265
  fallback?: {
1867
2266
  message: string;
1868
2267
  };
1869
- /**
1870
- * 是否禁用打印功能
1871
- */
1872
- disabled?: boolean;
1873
2268
  }
1874
2269
 
1875
2270
  /**
@@ -1883,6 +2278,13 @@ export declare interface EditorRemoteUploadableFile extends EditorBaseUploadable
1883
2278
  raw?: never;
1884
2279
  }
1885
2280
 
2281
+ export declare interface EditorRenderOptions {
2282
+ /**
2283
+ * 渲染的容器
2284
+ */
2285
+ container?: HTMLElement;
2286
+ }
2287
+
1886
2288
  /**
1887
2289
  * 编辑器通用接口
1888
2290
  */
@@ -1917,8 +2319,24 @@ export declare abstract class EditorSDK {
1917
2319
  abstract get mode(): EditorMode;
1918
2320
  /**
1919
2321
  * 编辑器评论相关接口
2322
+ * 部分环境不存在,如离线客户端
2323
+ */
2324
+ abstract get comments(): EditorComments | undefined;
2325
+ /**
2326
+ * 编辑器协作者相关接口
2327
+ * 部分环境不存在,如离线客户端
2328
+ */
2329
+ abstract get collaborators(): EditorCollaborators | undefined;
2330
+ /**
2331
+ * 编辑器历史相关接口
2332
+ * 部分环境不存在,如离线客户端
2333
+ */
2334
+ abstract get history(): EditorHistory | undefined;
2335
+ /**
2336
+ * 编辑器版本相关接口
2337
+ * 部分环境不存在,如离线客户端
1920
2338
  */
1921
- abstract get comments(): EditorComments;
2339
+ abstract get version(): EditorVersion | undefined;
1922
2340
  }
1923
2341
 
1924
2342
  /**
@@ -2054,11 +2472,11 @@ export declare interface EditorTextOptions<Color = string> {
2054
2472
  /**
2055
2473
  * 工具栏功能按钮配置(包括内置按钮和自定义按钮)
2056
2474
  */
2057
- export declare interface EditorToolbarFeatureButton<TName extends string> {
2475
+ export declare interface EditorToolbarFeatureButton<TName extends string> extends EditorFeatureConfig {
2058
2476
  /**
2059
2477
  * 按钮的唯一标识,用以确定配置的是哪个按钮。
2060
2478
  */
2061
- name: TName;
2479
+ name?: TName;
2062
2480
  /**
2063
2481
  * 按钮标签(显示文本)一般工具栏上的按钮不会显示文本,如果需要显示文本,配置此项。
2064
2482
  */
@@ -2067,14 +2485,6 @@ export declare interface EditorToolbarFeatureButton<TName extends string> {
2067
2485
  * 按钮图标,可以是 base64 的图片信息,也可以是图片 url
2068
2486
  */
2069
2487
  icon?: string;
2070
- /**
2071
- * 按钮是否隐藏,设置为true则隐藏按钮
2072
- */
2073
- hidden?: boolean;
2074
- /**
2075
- * 按钮是否禁用,设置为true则变为灰色不可点击
2076
- */
2077
- disabled?: boolean;
2078
2488
  /**
2079
2489
  * 按钮点击事件.接受一个函数,可以自定义点击事件。
2080
2490
  */
@@ -2118,6 +2528,90 @@ export declare interface EditorToolbarOptions<TName extends string> {
2118
2528
  custom?: EditorToolbarFeatureButtonConfig<string>;
2119
2529
  }
2120
2530
 
2531
+ /**
2532
+ * 编辑器工具箱配置选项接口
2533
+ */
2534
+ export declare interface EditorToolboxOptions {
2535
+ /**
2536
+ * 获取工具箱配置
2537
+ * @param attachGuidList - 附件GUID列表
2538
+ * @returns 返回工具箱工具项列表
2539
+ */
2540
+ getToolbox?: (attachGuidList: string[]) => Promise<{
2541
+ tools: ToolboxToolItem[];
2542
+ }>;
2543
+ }
2544
+
2545
+ /**
2546
+ * 编辑器UI选项接口
2547
+ * 定义了编辑器可以使用的UI相关功能
2548
+ */
2549
+ export declare interface EditorUiOptions {
2550
+ /**
2551
+ * 侧边栏
2552
+ */
2553
+ sidebar?: {
2554
+ /**
2555
+ * 打开使用指南/快捷键侧边栏
2556
+ */
2557
+ open?: (activeKey: 'userGuide' | 'shortcut') => void;
2558
+ };
2559
+ /**
2560
+ * 升级弹窗
2561
+ */
2562
+ upgrade?: {
2563
+ /**
2564
+ * 显示升级弹窗
2565
+ */
2566
+ showModal?: (options: ShowUpgradeModalProps) => Promise<ShowUpgradeModalResponse>;
2567
+ };
2568
+ notification?: {
2569
+ /**
2570
+ * 渲染通知条
2571
+ */
2572
+ render?: (params: RenderNotificationProps) => void;
2573
+ };
2574
+ /**
2575
+ * 用户名片
2576
+ */
2577
+ userCard?: {
2578
+ /**
2579
+ * 需要排除的用户卡片字段(不会在用户卡片中展示)
2580
+ */
2581
+ excludeFields?: string[];
2582
+ /**
2583
+ * 渲染用户卡片
2584
+ */
2585
+ render?: (params: RenderUserCardProps) => RenderUserCardResult;
2586
+ };
2587
+ /**
2588
+ * toast
2589
+ */
2590
+ toast?: {
2591
+ /**
2592
+ * 显示自定义toast
2593
+ */
2594
+ show?: (options: ShowToastOptions) => void;
2595
+ /**
2596
+ * 是否禁用toast
2597
+ */
2598
+ disabled?: boolean;
2599
+ };
2600
+ /**
2601
+ * confirm
2602
+ */
2603
+ confirm?: {
2604
+ /**
2605
+ * 显示自定义confirm
2606
+ */
2607
+ show?: (options: ShowConfirmOptions) => void;
2608
+ /**
2609
+ * 是否禁用confirm
2610
+ */
2611
+ disabled?: boolean;
2612
+ };
2613
+ }
2614
+
2121
2615
  export declare type EditorUploadableFile = EditorLocalUploadableFile;
2122
2616
 
2123
2617
  /**
@@ -2181,6 +2675,13 @@ export declare interface EditorUserOptions {
2181
2675
  defaultAvatar?: string;
2182
2676
  }
2183
2677
 
2678
+ export declare interface EditorVersion {
2679
+ /**
2680
+ * 保存版本
2681
+ */
2682
+ createRevision: () => void;
2683
+ }
2684
+
2184
2685
  /**
2185
2686
  * 编辑器外部水印信息
2186
2687
  */
@@ -2204,6 +2705,86 @@ export declare type EditorWatermarkResource = {
2204
2705
  url: string;
2205
2706
  };
2206
2707
 
2708
+ export declare enum FeatureStatus {
2709
+ /**
2710
+ * 隐藏
2711
+ */
2712
+ Hidden = 0,
2713
+ /**
2714
+ * 正常
2715
+ */
2716
+ Normal = 1,
2717
+ /**
2718
+ * 禁用
2719
+ */
2720
+ Disabled = 2
2721
+ }
2722
+
2723
+ export declare interface FileLinkParams {
2724
+ /**
2725
+ * 文件guid
2726
+ */
2727
+ fileGuid: string;
2728
+ /**
2729
+ * 文件类型,如docs,sheets
2730
+ */
2731
+ type: string;
2732
+ /**
2733
+ * 用于定位到 mention、评论等位置。
2734
+ */
2735
+ hash?: string;
2736
+ /**
2737
+ * 其他自定义字段
2738
+ */
2739
+ [key: string]: unknown;
2740
+ }
2741
+
2742
+ /**
2743
+ * 文件子类型枚举
2744
+ */
2745
+ export declare enum FileSubtype {
2746
+ /** 专业版幻灯片 */
2747
+ ProSlide = -10,
2748
+ /** 白板 */
2749
+ Whiteboard = -9,
2750
+ /** 表单 */
2751
+ Form = -8,
2752
+ /** 思维导图 */
2753
+ Mind = -7,
2754
+ /** 专业文档 */
2755
+ ProDoc = -6,
2756
+ /** 幻灯片 */
2757
+ Slide = -5,
2758
+ /** 新表格 */
2759
+ NewSheet = -4,
2760
+ /** 老表格 */
2761
+ Sheet = -3,
2762
+ /** 新文档 */
2763
+ NewDoc = -2,
2764
+ /** 老老表格 */
2765
+ OldSheet = -1,
2766
+ /** 旧文档 */
2767
+ OldDoc = 0,
2768
+ /** 文件夹 */
2769
+ Folder = 1,
2770
+ /** 协作 */
2771
+ Collaboration = 2
2772
+ }
2773
+
2774
+ /**
2775
+ * 文件类型枚举
2776
+ */
2777
+ export declare enum FileType {
2778
+ /** 未知类型 */
2779
+ Unknown = 0,
2780
+ /** 文件夹或空间 */
2781
+ FolderOrSpace = 1,
2782
+ /** 石墨文件 */
2783
+ ShimoFile = 2,
2784
+ /** 云文件 */
2785
+ CloudFile = 3
2786
+ }
2787
+
2207
2788
  /**
2208
2789
  * 请求、响应头
2209
2790
  */
@@ -2311,6 +2892,260 @@ export declare interface HTTPResponse<Data = unknown> {
2311
2892
  */
2312
2893
  export declare type HTTPResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
2313
2894
 
2895
+ export declare interface Limitation {
2896
+ /**
2897
+ * 限制原因(错误码)
2898
+ */
2899
+ code?: number;
2900
+ /**
2901
+ * 单位(不参与计算,仅作显示)
2902
+ * minutes、MB
2903
+ */
2904
+ unit?: string;
2905
+ /**
2906
+ * 描述
2907
+ */
2908
+ desc?: string;
2909
+ /**
2910
+ * min/max int64 默认表示 MB/个/分钟/行
2911
+ */
2912
+ max?: number;
2913
+ min?: number;
2914
+ }
2915
+
2314
2916
  export declare type MaybePromiseValue<T> = T | Promise<T>;
2315
2917
 
2918
+ /**
2919
+ * 升级弹窗类型
2920
+ * 个人版或企业版
2921
+ */
2922
+ export declare type OpenType = 'personal' | 'enterprise';
2923
+
2924
+ export declare interface RenderNotificationProps {
2925
+ /**
2926
+ * 渲染的容器
2927
+ */
2928
+ container: HTMLElement;
2929
+ /**
2930
+ * 自定义样式,实际类型为React.CSSProperties
2931
+ */
2932
+ style?: Record<string, string | number>;
2933
+ }
2934
+
2935
+ export declare interface RenderUserCardProps {
2936
+ uid: string | number;
2937
+ rect: {
2938
+ left: number;
2939
+ top: number;
2940
+ width: number;
2941
+ height: number;
2942
+ hasReducedHeaderHeight?: boolean;
2943
+ };
2944
+ position?: 'top' | 'left' | 'right' | 'bottom' | 'left_top' | 'left_bottom' | 'right_top' | 'bottom_top' | 'top_left' | 'top_right' | 'bottom_left' | 'bottom_right';
2945
+ trigger: 'hover' | 'click';
2946
+ }
2947
+
2948
+ export declare interface RenderUserCardResult {
2949
+ /**
2950
+ * 关闭用户卡片
2951
+ */
2952
+ close: (force?: boolean) => void;
2953
+ }
2954
+
2955
+ /**
2956
+ * 升级操作结果类型枚举
2957
+ */
2958
+ export declare enum ResultType {
2959
+ /** 操作成功 */
2960
+ Success = "success",
2961
+ /** 用户取消操作 */
2962
+ Cancel = "cancel",
2963
+ /** 发生错误 */
2964
+ Error = "error",
2965
+ /** 跳转(目前仅在企业版用户过期时返回) */
2966
+ Redirect = "redirect"
2967
+ }
2968
+
2969
+ export declare interface SaveContext {
2970
+ clientId: string;
2971
+ }
2972
+
2973
+ export declare interface SaveStatusDelegation {
2974
+ /**
2975
+ * 保存状态发生变化时触发回调
2976
+ * @param state
2977
+ * @returns
2978
+ */
2979
+ onChangeState: (state: unknown, context: SaveContext) => void;
2980
+ /**
2981
+ * 出现致命错误时触发回调,出现致命错误后,编辑器将无法继续编辑
2982
+ * @param error
2983
+ * @returns
2984
+ */
2985
+ onError: (error: unknown, context: SaveContext) => void;
2986
+ }
2987
+
2988
+ /**
2989
+ * 付费场景类型
2990
+ */
2991
+ export declare type Scene = 'history' | 'version' | 'public' | 'search' | 'attachments';
2992
+
2993
+ export declare interface ShowConfirmOptions {
2994
+ /**
2995
+ * 确认框标题
2996
+ */
2997
+ title: string;
2998
+ /**
2999
+ * 确认框描述
3000
+ */
3001
+ description: string;
3002
+ /**
3003
+ * 确认按钮配置
3004
+ */
3005
+ confirmButton?: ConfirmButtonConfig;
3006
+ /**
3007
+ * 取消按钮配置
3008
+ */
3009
+ cancelButton?: ConfirmButtonConfig;
3010
+ }
3011
+
3012
+ export declare interface ShowToastOptions {
3013
+ /**
3014
+ * toast标题
3015
+ */
3016
+ title: string;
3017
+ /**
3018
+ * toast类型
3019
+ */
3020
+ type: 'success' | 'error' | 'warn' | 'info';
3021
+ /**
3022
+ * 显示时长,默认3s
3023
+ */
3024
+ duration?: number;
3025
+ /**
3026
+ * 是否自动隐藏,默认true
3027
+ */
3028
+ autoHide?: boolean;
3029
+ }
3030
+
3031
+ /**
3032
+ * 升级弹窗配置选项接口
3033
+ */
3034
+ export declare interface ShowUpgradeModalProps {
3035
+ /** 打开个人升级弹窗还是企业弹窗 */
3036
+ openType: OpenType;
3037
+ /** 触发功能的Key值 */
3038
+ serviceKey: string;
3039
+ /** 文件类型(如果业务能够获取到则为必传) */
3040
+ fileType?: FileType;
3041
+ /** 文件子类型(如果业务能够获取到则为必传) */
3042
+ fileSubtype?: FileSubtype;
3043
+ /** 付费场景,用于升级弹窗的定制化文案显示 */
3044
+ scene?: Scene;
3045
+ }
3046
+
3047
+ /**
3048
+ * 升级弹窗响应接口
3049
+ */
3050
+ export declare interface ShowUpgradeModalResponse {
3051
+ /** 操作结果 */
3052
+ result: ResultType;
3053
+ /** 错误信息(供开发人员查看) */
3054
+ errorMsg?: string;
3055
+ }
3056
+
3057
+ /**
3058
+ * 演讲者信息接口
3059
+ * 包含演讲者的基本信息
3060
+ */
3061
+ export declare interface Speaker {
3062
+ /** 演讲者ID */
3063
+ id: number;
3064
+ /** 演讲者姓名 */
3065
+ name: string;
3066
+ /** 演讲者头像URL */
3067
+ avatar: string;
3068
+ }
3069
+
3070
+ export declare interface SyncContext {
3071
+ clientId: string;
3072
+ timestamp: number;
3073
+ }
3074
+
3075
+ export declare interface SyncStatusDelegation {
3076
+ /**
3077
+ * 同步状态发生变化时触发回调
3078
+ * @param state
3079
+ * @param context
3080
+ * @returns
3081
+ */
3082
+ onChangeState: (state: unknown, context: SyncContext) => void;
3083
+ /**
3084
+ * 出现致命错误时触发回调,出现致命错误后,编辑器将无法继续编辑
3085
+ * @param error
3086
+ * @param context
3087
+ * @returns
3088
+ */
3089
+ onError: (error: unknown, context: SyncContext) => void;
3090
+ }
3091
+
3092
+ /**
3093
+ * 工具箱工具项接口
3094
+ */
3095
+ export declare interface ToolboxToolItem {
3096
+ /** 工具类型 */
3097
+ type: ToolTypes;
3098
+ /** 工具名称 */
3099
+ name: string;
3100
+ /** 工具图标 */
3101
+ icon: string;
3102
+ /** 工具分组 */
3103
+ group: ToolGroupTypes;
3104
+ /** 分组名称 */
3105
+ groupName: string;
3106
+ /** 是否为测试版功能 */
3107
+ isBeta: boolean;
3108
+ /** 工具回调函数 */
3109
+ callback: () => Promise<{
3110
+ result: 'success' | 'failed';
3111
+ error?: unknown;
3112
+ }>;
3113
+ }
3114
+
3115
+ /**
3116
+ * 工具分组类型枚举
3117
+ */
3118
+ export declare enum ToolGroupTypes {
3119
+ /** 转换工具组 */
3120
+ Convert = "convert",
3121
+ /** 处理工具组 */
3122
+ Processing = "processing",
3123
+ /** 智能工具组 */
3124
+ Intelligent = "intelligent"
3125
+ }
3126
+
3127
+ /**
3128
+ * 工具类型枚举
3129
+ */
3130
+ export declare enum ToolTypes {
3131
+ /** PDF转Word */
3132
+ PdfToWord = "pdfToWord",
3133
+ /** PDF转Excel */
3134
+ PdfToExcel = "pdfToExcel",
3135
+ /** PDF转PPT */
3136
+ PdfToPpt = "pdfToPpt",
3137
+ /** 图片转PDF */
3138
+ ImgToPdf = "imgToPdf",
3139
+ /** PDF合并 */
3140
+ PdfMerge = "pdfMerge",
3141
+ /** PDF拆分 */
3142
+ PdfSplit = "pdfSplit",
3143
+ /** 文件内容提取 */
3144
+ FileContentExtraction = "fileContentExtraction",
3145
+ /** 图片转文字 */
3146
+ COR = "imgToText",
3147
+ /** 音频转文字 */
3148
+ STT = "audioToText"
3149
+ }
3150
+
2316
3151
  export { }