@kitionstage/sdk 0.0.0-stage → 0.5.2-stage.2

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 (259) hide show
  1. package/README.md +73 -2
  2. package/dist/LICENSE +177 -0
  3. package/dist/THIRD_PARTY_NOTICES +28 -0
  4. package/dist/lib/assets/kitEngine.worker-3iMvwtlI.js +12732 -0
  5. package/dist/lib/assets/loro_wasm_bg-Gulzks_0.wasm +0 -0
  6. package/dist/lib/chunks/batch-BWpAyHvP.js +789 -0
  7. package/dist/lib/chunks/canonical-BIWfVCL-.js +87 -0
  8. package/dist/lib/chunks/envelope-D6MGY-ZN.js +61 -0
  9. package/dist/lib/chunks/replica-D8w3I4sn.js +2472 -0
  10. package/dist/lib/chunks/runtime-BVJHE1Pg.js +997 -0
  11. package/dist/lib/chunks/session-BqXC9a1-.js +281 -0
  12. package/dist/lib/chunks/toolIds-BCeSGHpV.js +821 -0
  13. package/dist/lib/chunks/workspaceTree-Destqupf.js +23 -0
  14. package/dist/lib/convergence/index.js +1035 -0
  15. package/dist/lib/convergence/node.js +8 -0
  16. package/dist/lib/embed-server/callbacks.js +37 -0
  17. package/dist/lib/embed-server/cli.js +19 -0
  18. package/dist/lib/embed-server/index.js +272 -0
  19. package/dist/lib/extensions/index.js +439 -0
  20. package/dist/lib/extensions/panel.html +208 -0
  21. package/dist/lib/extensions/runtime.js +198 -0
  22. package/dist/lib/extensions/sandbox.html +35 -0
  23. package/dist/lib/kdm/index.js +437 -0
  24. package/dist/lib/kit-dev-host/checkUiIds.mjs +44 -0
  25. package/dist/lib/kit-dev-host/index.js +308 -0
  26. package/dist/lib/kit-dev-host/lineRow.mjs +47 -0
  27. package/dist/lib/kit-dev-host/modeSmoke.mjs +178 -0
  28. package/dist/lib/kit-editor/index.js +6481 -0
  29. package/dist/lib/kit-editor/styles.css +807 -0
  30. package/dist/lib/kit-editor/workspaceTree.js +1 -0
  31. package/dist/lib/kit-engine/index.js +7 -0
  32. package/dist/lib/kit-host/index.js +530 -0
  33. package/dist/lib/kit-ui-protocol/index.js +336 -0
  34. package/dist/lib/node-only/embed-server-callbacks.js +2 -0
  35. package/dist/lib/node-only/embed-server.js +2 -0
  36. package/dist/lib/sync/index.js +1008 -0
  37. package/dist/lib/sync/openToken.js +201 -0
  38. package/dist/lib/sync/replicaVersions.js +51 -0
  39. package/dist/standalone/chunks/batch-CAGYk6m4.js +789 -0
  40. package/dist/standalone/chunks/client-B9xkOcvf.js +772 -0
  41. package/dist/standalone/chunks/collab-CTQZ9h7J.js +1022 -0
  42. package/dist/standalone/chunks/comment-Ds9t8xSE.js +94 -0
  43. package/dist/standalone/chunks/comments-uVDS8Wxp.js +41 -0
  44. package/dist/standalone/chunks/document-B5MMuYyN.js +324 -0
  45. package/dist/standalone/chunks/envelope-GX4Cynkx.js +7612 -0
  46. package/dist/standalone/chunks/index-BEgEEnhU.js +287 -0
  47. package/dist/standalone/chunks/index-EEl8hGbP.js +1967 -0
  48. package/dist/standalone/chunks/kits-Cp51mDlw.js +9 -0
  49. package/dist/standalone/chunks/replica-Di2iCPiD.js +3281 -0
  50. package/dist/standalone/chunks/replicaVersions-C3rJxnk9.js +50 -0
  51. package/dist/standalone/chunks/touched-T9jKJjxn.js +78 -0
  52. package/dist/standalone/index.js +12 -0
  53. package/dist/standalone/script/index.js +339 -0
  54. package/dist/standalone/script/kits/board.js +5 -0
  55. package/dist/standalone/script/kits/cad.js +5 -0
  56. package/dist/standalone/script/kits/design.js +5 -0
  57. package/dist/standalone/script/kits/doc.js +5 -0
  58. package/dist/standalone/script/kits/film.js +5 -0
  59. package/dist/standalone/script/kits/html.js +5 -0
  60. package/dist/standalone/script/kits/index.js +38 -0
  61. package/dist/standalone/script/kits/layout.js +5 -0
  62. package/dist/standalone/script/kits/motion.js +5 -0
  63. package/dist/standalone/script/kits/note.js +5 -0
  64. package/dist/standalone/script/kits/pdf.js +5 -0
  65. package/dist/standalone/script/kits/photo.js +5 -0
  66. package/dist/standalone/script/kits/scene.js +5 -0
  67. package/dist/standalone/script/kits/sheet.js +5 -0
  68. package/dist/standalone/script/kits/slide.js +5 -0
  69. package/dist/standalone/script/kits/table.js +5 -0
  70. package/dist/standalone/script/kits/vector.js +5 -0
  71. package/dist/standalone/script/node.js +401 -0
  72. package/dist/standalone/script/proxy.js +254 -0
  73. package/dist/types/convergence/src/adapter.d.ts +131 -0
  74. package/dist/types/convergence/src/engine.d.ts +66 -0
  75. package/dist/types/convergence/src/index.d.ts +21 -0
  76. package/dist/types/convergence/src/net.d.ts +52 -0
  77. package/dist/types/convergence/src/node.d.ts +6 -0
  78. package/dist/types/convergence/src/report.d.ts +56 -0
  79. package/dist/types/convergence/src/rng.d.ts +12 -0
  80. package/dist/types/convergence/src/scenarios.d.ts +15 -0
  81. package/dist/types/convergence/src/state.d.ts +67 -0
  82. package/dist/types/embed/src/agent.d.ts +88 -0
  83. package/dist/types/embed/src/blobs.d.ts +2 -0
  84. package/dist/types/embed/src/collab.d.ts +250 -0
  85. package/dist/types/embed/src/comments.d.ts +30 -0
  86. package/dist/types/embed/src/errors.d.ts +24 -0
  87. package/dist/types/embed/src/handlers.d.ts +92 -0
  88. package/dist/types/embed/src/index.d.ts +20 -0
  89. package/dist/types/embed/src/mount.d.ts +39 -0
  90. package/dist/types/embed/src/replicaStore.d.ts +3 -0
  91. package/dist/types/embed/src/rooms.d.ts +40 -0
  92. package/dist/types/embed/src/schemas.d.ts +7 -0
  93. package/dist/types/embed/src/syncClients.d.ts +28 -0
  94. package/dist/types/embed/src/theme.d.ts +7 -0
  95. package/dist/types/embed/src/types.d.ts +596 -0
  96. package/dist/types/embed/src/ui.d.ts +33 -0
  97. package/dist/types/embed/src/version.d.ts +2 -0
  98. package/dist/types/embed-server/src/callbacks.d.ts +30 -0
  99. package/dist/types/embed-server/src/cli.d.ts +1 -0
  100. package/dist/types/embed-server/src/index.d.ts +19 -0
  101. package/dist/types/embed-server/src/page.d.ts +15 -0
  102. package/dist/types/embed-server/src/server.d.ts +39 -0
  103. package/dist/types/embed-server/src/session.d.ts +22 -0
  104. package/dist/types/extensions/src/gate.d.ts +17 -0
  105. package/dist/types/extensions/src/generated/runtime.d.ts +8 -0
  106. package/dist/types/extensions/src/host.d.ts +135 -0
  107. package/dist/types/extensions/src/index.d.ts +13 -0
  108. package/dist/types/extensions/src/manifest.d.ts +82 -0
  109. package/dist/types/extensions/src/protocol.d.ts +159 -0
  110. package/dist/types/extensions/src/rpc.d.ts +52 -0
  111. package/dist/types/extensions/src/runtime/document.d.ts +40 -0
  112. package/dist/types/extensions/src/runtime/index.d.ts +10 -0
  113. package/dist/types/extensions/src/runtime/panel.d.ts +19 -0
  114. package/dist/types/extensions/src/runtime/runtime.d.ts +54 -0
  115. package/dist/types/extensions/src/runtime/worker.d.ts +1 -0
  116. package/dist/types/extensions/src/sandbox.d.ts +41 -0
  117. package/dist/types/kdm/src/args.d.ts +12 -0
  118. package/dist/types/kdm/src/batch.d.ts +118 -0
  119. package/dist/types/kdm/src/canonical.d.ts +25 -0
  120. package/dist/types/kdm/src/comment.d.ts +114 -0
  121. package/dist/types/kdm/src/diff.d.ts +125 -0
  122. package/dist/types/kdm/src/envelope.d.ts +27 -0
  123. package/dist/types/kdm/src/errors.d.ts +28 -0
  124. package/dist/types/kdm/src/footprint.d.ts +21 -0
  125. package/dist/types/kdm/src/ids.d.ts +57 -0
  126. package/dist/types/kdm/src/index.d.ts +18 -0
  127. package/dist/types/kdm/src/marks.d.ts +32 -0
  128. package/dist/types/kdm/src/op.d.ts +124 -0
  129. package/dist/types/kdm/src/origin.d.ts +41 -0
  130. package/dist/types/kdm/src/overlay.d.ts +92 -0
  131. package/dist/types/kdm/src/projection.d.ts +29 -0
  132. package/dist/types/kdm/src/read.d.ts +90 -0
  133. package/dist/types/kdm/src/replica.d.ts +403 -0
  134. package/dist/types/kdm/src/schema.d.ts +185 -0
  135. package/dist/types/kdm/src/testing.d.ts +28 -0
  136. package/dist/types/kdm/src/toolIds.d.ts +61 -0
  137. package/dist/types/kdm/src/touched.d.ts +24 -0
  138. package/dist/types/kdm/src/tx.d.ts +215 -0
  139. package/dist/types/kdm/src/value.d.ts +23 -0
  140. package/dist/types/kit-dev-host/src/checkNoPaths.d.ts +19 -0
  141. package/dist/types/kit-dev-host/src/checkUiIds.d.mts +2 -0
  142. package/dist/types/kit-dev-host/src/index.d.ts +179 -0
  143. package/dist/types/kit-dev-host/src/lineRow.d.mts +14 -0
  144. package/dist/types/kit-dev-host/src/memoryFiles.d.ts +15 -0
  145. package/dist/types/kit-dev-host/src/modeSmoke.d.mts +8 -0
  146. package/dist/types/kit-editor/src/CommandDialog.d.ts +22 -0
  147. package/dist/types/kit-editor/src/CommentsPanel.d.ts +45 -0
  148. package/dist/types/kit-editor/src/CustomizeDialog.d.ts +32 -0
  149. package/dist/types/kit-editor/src/HostButtons.d.ts +11 -0
  150. package/dist/types/kit-editor/src/RenderFailure.d.ts +7 -0
  151. package/dist/types/kit-editor/src/TextSink.d.ts +6 -0
  152. package/dist/types/kit-editor/src/brand.d.ts +2 -0
  153. package/dist/types/kit-editor/src/catalogMenus.d.ts +27 -0
  154. package/dist/types/kit-editor/src/chart.d.ts +138 -0
  155. package/dist/types/kit-editor/src/conflicts.d.ts +12 -0
  156. package/dist/types/kit-editor/src/drawing.d.ts +83 -0
  157. package/dist/types/kit-editor/src/editor.d.ts +544 -0
  158. package/dist/types/kit-editor/src/engine/KitCanvas.d.ts +70 -0
  159. package/dist/types/kit-editor/src/engine/backdrop.d.ts +32 -0
  160. package/dist/types/kit-editor/src/engine/createKitFile.d.ts +12 -0
  161. package/dist/types/kit-editor/src/engine/decorations.d.ts +14 -0
  162. package/dist/types/kit-editor/src/engine/engineOverlays.d.ts +197 -0
  163. package/dist/types/kit-editor/src/engine/engineTools.d.ts +116 -0
  164. package/dist/types/kit-editor/src/engine/kitDraft.d.ts +70 -0
  165. package/dist/types/kit-editor/src/engine/kitEngine.d.ts +390 -0
  166. package/dist/types/kit-editor/src/engine/kitEngine.worker.d.ts +30 -0
  167. package/dist/types/kit-editor/src/engine/kitHost.d.ts +41 -0
  168. package/dist/types/kit-editor/src/engine/kitModel.d.ts +32 -0
  169. package/dist/types/kit-editor/src/engine/kitModelRunner.d.ts +99 -0
  170. package/dist/types/kit-editor/src/engine/kitModule.d.ts +185 -0
  171. package/dist/types/kit-editor/src/engine/kitShortcuts.d.ts +32 -0
  172. package/dist/types/kit-editor/src/engine/kitTools.d.ts +79 -0
  173. package/dist/types/kit-editor/src/engine/lazyFonts.d.ts +34 -0
  174. package/dist/types/kit-editor/src/engine/lentFiles.d.ts +29 -0
  175. package/dist/types/kit-editor/src/engine/rasterViewport.d.ts +178 -0
  176. package/dist/types/kit-editor/src/engine/readOnly.d.ts +78 -0
  177. package/dist/types/kit-editor/src/engine/refusal.d.ts +39 -0
  178. package/dist/types/kit-editor/src/engine/replica.d.ts +23 -0
  179. package/dist/types/kit-editor/src/engine/useKitDocument.d.ts +154 -0
  180. package/dist/types/kit-editor/src/engine/workerRelay.d.ts +62 -0
  181. package/dist/types/kit-editor/src/files.d.ts +74 -0
  182. package/dist/types/kit-editor/src/frame/EditorFrame.d.ts +74 -0
  183. package/dist/types/kit-editor/src/frame/FocusBar.d.ts +10 -0
  184. package/dist/types/kit-editor/src/frame/MenuNodes.d.ts +20 -0
  185. package/dist/types/kit-editor/src/frame/MenuRibbon.d.ts +8 -0
  186. package/dist/types/kit-editor/src/frame/ModeButton.d.ts +7 -0
  187. package/dist/types/kit-editor/src/frame/menus.d.ts +64 -0
  188. package/dist/types/kit-editor/src/frame/modes.d.ts +51 -0
  189. package/dist/types/kit-editor/src/frame/useFrameLayout.d.ts +34 -0
  190. package/dist/types/kit-editor/src/host.d.ts +127 -0
  191. package/dist/types/kit-editor/src/index.d.ts +85 -0
  192. package/dist/types/kit-editor/src/ink.d.ts +26 -0
  193. package/dist/types/kit-editor/src/lease.d.ts +53 -0
  194. package/dist/types/kit-editor/src/oneInFlight.d.ts +7 -0
  195. package/dist/types/kit-editor/src/phrases.d.ts +25 -0
  196. package/dist/types/kit-editor/src/presence.d.ts +79 -0
  197. package/dist/types/kit-editor/src/strings.d.ts +6 -0
  198. package/dist/types/kit-editor/src/toolIcons.d.ts +32 -0
  199. package/dist/types/kit-editor/src/uiCatalog.d.ts +59 -0
  200. package/dist/types/kit-editor/src/uiConfig.d.ts +53 -0
  201. package/dist/types/kit-editor/src/uiContext.d.ts +65 -0
  202. package/dist/types/kit-editor/src/uiStore.d.ts +20 -0
  203. package/dist/types/kit-editor/src/useCommentAnchors.d.ts +29 -0
  204. package/dist/types/kit-editor/src/useKitSession.d.ts +115 -0
  205. package/dist/types/kit-editor/src/workspaceTree.d.ts +5 -0
  206. package/dist/types/kit-engine/src/contract.d.ts +154 -0
  207. package/dist/types/kit-engine/src/index.d.ts +2 -0
  208. package/dist/types/kit-engine/src/session.d.ts +133 -0
  209. package/dist/types/kit-host/src/files.d.ts +163 -0
  210. package/dist/types/kit-host/src/index.d.ts +315 -0
  211. package/dist/types/kit-ui-protocol/src/index.d.ts +1145 -0
  212. package/dist/types/loro-crdt.d.ts +9 -0
  213. package/dist/types/script/kits/board.d.ts +534 -0
  214. package/dist/types/script/kits/cad.d.ts +2937 -0
  215. package/dist/types/script/kits/design.d.ts +3213 -0
  216. package/dist/types/script/kits/doc.d.ts +2575 -0
  217. package/dist/types/script/kits/film.d.ts +4067 -0
  218. package/dist/types/script/kits/html.d.ts +38 -0
  219. package/dist/types/script/kits/index.d.ts +20 -0
  220. package/dist/types/script/kits/layout.d.ts +3483 -0
  221. package/dist/types/script/kits/motion.d.ts +4826 -0
  222. package/dist/types/script/kits/note.d.ts +631 -0
  223. package/dist/types/script/kits/pdf.d.ts +829 -0
  224. package/dist/types/script/kits/photo.d.ts +7574 -0
  225. package/dist/types/script/kits/scene.d.ts +2962 -0
  226. package/dist/types/script/kits/sheet.d.ts +2419 -0
  227. package/dist/types/script/kits/slide.d.ts +1894 -0
  228. package/dist/types/script/kits/table.d.ts +654 -0
  229. package/dist/types/script/kits/vector.d.ts +5167 -0
  230. package/dist/types/script/src/agentRelay.d.ts +48 -0
  231. package/dist/types/script/src/capabilities.d.ts +21 -0
  232. package/dist/types/script/src/document.d.ts +87 -0
  233. package/dist/types/script/src/drafts.d.ts +141 -0
  234. package/dist/types/script/src/exchange.d.ts +30 -0
  235. package/dist/types/script/src/headless.d.ts +190 -0
  236. package/dist/types/script/src/index.d.ts +15 -0
  237. package/dist/types/script/src/kitModel.d.ts +17 -0
  238. package/dist/types/script/src/kits.d.ts +8 -0
  239. package/dist/types/script/src/node.d.ts +42 -0
  240. package/dist/types/script/src/port.d.ts +89 -0
  241. package/dist/types/script/src/proxy.d.ts +132 -0
  242. package/dist/types/script/src/room.d.ts +162 -0
  243. package/dist/types/script/src/sources.d.ts +73 -0
  244. package/dist/types/sync/src/backoff.d.ts +9 -0
  245. package/dist/types/sync/src/blobSection.d.ts +23 -0
  246. package/dist/types/sync/src/capabilities.d.ts +20 -0
  247. package/dist/types/sync/src/client.d.ts +253 -0
  248. package/dist/types/sync/src/framing.d.ts +35 -0
  249. package/dist/types/sync/src/hash.d.ts +2 -0
  250. package/dist/types/sync/src/index.d.ts +19 -0
  251. package/dist/types/sync/src/leases.d.ts +82 -0
  252. package/dist/types/sync/src/openToken.d.ts +104 -0
  253. package/dist/types/sync/src/protocol.d.ts +484 -0
  254. package/dist/types/sync/src/relay.d.ts +52 -0
  255. package/dist/types/sync/src/replicaVersions.d.ts +17 -0
  256. package/dist/types/sync/src/saveMachine.d.ts +83 -0
  257. package/dist/types/sync/src/saveRun.d.ts +52 -0
  258. package/dist/types/sync/src/transport.d.ts +19 -0
  259. package/package.json +229 -4
@@ -0,0 +1,829 @@
1
+ import type { CommandMap, ModelDocument, ModelList, ModelMap, ModelObject, RequestContext } from '../src/index.js';
2
+ import { type KitDescriptor } from '../src/kits.js';
3
+ type Json = null | boolean | number | string | Json[] | {
4
+ [key: string]: Json;
5
+ };
6
+ type BlobRef = {
7
+ hash: string;
8
+ mime: string;
9
+ size: number;
10
+ };
11
+ /** kit.pdf: registered with @kition/sdk/script when this module loads. */
12
+ export declare const pdfKit: KitDescriptor;
13
+ /** The fields a new `Pdf` takes (`list.add(fields)`). */
14
+ export type PdfFields = {
15
+ base: BlobRef;
16
+ baseMax: number;
17
+ epoch: string;
18
+ };
19
+ /** A `Pdf` of kit.pdf. */
20
+ export interface Pdf extends ModelObject {
21
+ base: BlobRef;
22
+ baseMax: number;
23
+ epoch: string;
24
+ readonly overlay: ModelMap<Json>;
25
+ readonly pages: ModelList<Page, PageFields>;
26
+ readonly fields: ModelList<Field, FieldFields>;
27
+ readonly bookmarks: ModelList<Bookmark, BookmarkFields>;
28
+ }
29
+ /** The fields a new `Page` takes (`list.add(fields)`). */
30
+ export type PageFields = {
31
+ label?: string | null;
32
+ width: number;
33
+ height: number;
34
+ rotation: number;
35
+ boxes: Json;
36
+ };
37
+ /** A `Page` of kit.pdf. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
38
+ export interface Page extends ModelObject {
39
+ label: string | null;
40
+ width: number;
41
+ height: number;
42
+ rotation: number;
43
+ boxes: Json;
44
+ readonly comments: ModelList<Comment, CommentFields>;
45
+ readonly links: ModelList<Link, LinkFields>;
46
+ }
47
+ /** The fields a new `Link` takes (`list.add(fields)`). */
48
+ export type LinkFields = {
49
+ index: number;
50
+ rect?: Json | null;
51
+ url?: string | null;
52
+ toPage?: string | null;
53
+ other?: string | null;
54
+ visible: boolean;
55
+ color?: string | null;
56
+ width?: number | null;
57
+ highlight: string;
58
+ };
59
+ /** A `Link` of kit.pdf. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
60
+ export interface Link extends ModelObject {
61
+ index: number;
62
+ rect: Json | null;
63
+ url: string | null;
64
+ toPage: string | null;
65
+ other: string | null;
66
+ visible: boolean;
67
+ color: string | null;
68
+ width: number | null;
69
+ highlight: string;
70
+ }
71
+ /** The fields a new `Bookmark` takes (`list.add(fields)`). */
72
+ export type BookmarkFields = {
73
+ title: string;
74
+ page?: string | null;
75
+ open: boolean;
76
+ };
77
+ /** A `Bookmark` of kit.pdf. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
78
+ export interface Bookmark extends ModelObject {
79
+ title: string;
80
+ page: string | null;
81
+ open: boolean;
82
+ readonly children: ModelList<Bookmark, BookmarkFields>;
83
+ }
84
+ /** The fields a new `Comment` takes (`list.add(fields)`). */
85
+ export type CommentFields = {
86
+ type?: string | null;
87
+ index: number;
88
+ contents?: string | null;
89
+ author?: string | null;
90
+ modified?: string | null;
91
+ rect?: Json | null;
92
+ color?: string | null;
93
+ fill?: string | null;
94
+ opacity?: number | null;
95
+ width?: number | null;
96
+ locked: boolean;
97
+ replyTo?: string | null;
98
+ state?: string | null;
99
+ status?: string | null;
100
+ marked: boolean;
101
+ };
102
+ /** A `Comment` of kit.pdf. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
103
+ export interface Comment extends ModelObject {
104
+ index: number;
105
+ contents: string | null;
106
+ author: string | null;
107
+ modified: string | null;
108
+ rect: Json | null;
109
+ color: string | null;
110
+ fill: string | null;
111
+ opacity: number | null;
112
+ width: number | null;
113
+ locked: boolean;
114
+ replyTo: string | null;
115
+ state: string | null;
116
+ status: string | null;
117
+ marked: boolean;
118
+ }
119
+ /** The fields a new `Field` takes (`list.add(fields)`). */
120
+ export type FieldFields = {
121
+ type: string;
122
+ value: Json;
123
+ default: Json;
124
+ flags: number;
125
+ maxLength?: number | null;
126
+ options: Json;
127
+ tooltip?: string | null;
128
+ appearance: string;
129
+ align: number;
130
+ actions: string;
131
+ widgets: Json;
132
+ };
133
+ /** A `Field` of kit.pdf. Read-only: the kit keeps it as it is (rule OM8); scripts read it and run commands. */
134
+ export interface Field extends ModelObject {
135
+ /** Read-only: the kit keeps it as it is. */
136
+ readonly name: string;
137
+ value: Json;
138
+ default: Json;
139
+ flags: number;
140
+ maxLength: number | null;
141
+ options: Json;
142
+ tooltip: string | null;
143
+ appearance: string;
144
+ align: number;
145
+ actions: string;
146
+ widgets: Json;
147
+ }
148
+ /** The fields a new `Conflict` takes (`list.add(fields)`). */
149
+ export type ConflictFields = {
150
+ kind: string;
151
+ summary: string;
152
+ objects: Json;
153
+ kept?: Json | null;
154
+ by?: string | null;
155
+ };
156
+ /** A `Conflict` of kit.pdf. */
157
+ export interface Conflict extends ModelObject {
158
+ kind: string;
159
+ summary: string;
160
+ objects: Json;
161
+ kept: Json | null;
162
+ by: string | null;
163
+ }
164
+ /** Every command of kit.pdf, by id, with its parameters. */
165
+ export interface PdfCommands extends CommandMap {
166
+ /** Inspect a document. Metadata, page sizes and labels, bookmarks, annotations, form fields, links, layers, attachments, fonts, security and repair notes. Params: Metadata, page sizes and labels, bookmarks, annotations, form fields, links, layers, attachments, fonts, security and repair notes. */
167
+ "doc_info": Record<string, never>;
168
+ /** Render a page. Render one page to a PNG image (default 96 dpi, at most 600). Params: Render one page to a PNG image (default 96 dpi, at most 600). */
169
+ "page_render": {
170
+ dpi?: number; /** (minimum 1) */
171
+ page: number;
172
+ };
173
+ /** List editable objects. List existing paragraphs, Image/Form artwork and added content once, with source kind/index references, displayed rectangles and document generation. Indexes change when content changes; use generation in object_move to reject stale references. Params: List existing paragraphs, Image/Form artwork and added content once, with source kind/index references, displayed rectangles and document generation. Indexes change when content changes; use generation in object_move to reject stale references. */
174
+ "object_list": {
175
+ page: number;
176
+ };
177
+ /** Move objects together. Atomically translate 1?1000 mixed references from object_list by [dx, dy] in displayed points (right/down). Preserves glyph codes, fonts, image data and relative spacing; success is one undo step. Clipping and vertical text are refused. A bad/stale reference refuses the entire move. Params: Atomically translate 1?1000 mixed references from object_list by [dx, dy] in displayed points (right/down). Preserves glyph codes, fonts, image data and relative spacing; success is one undo step. Clipping and vertical text are refused. A bad/stale reference refuses the entire move. Changes the document. */
178
+ "object_move": {
179
+ generation?: number; /** (maxItems 1000, minItems 1) */
180
+ objects: Array<{
181
+ index: number;
182
+ kind: "added" | "text" | "image";
183
+ }>; /** (maxItems 2, minItems 2) */
184
+ offset: Array<number>; /** (minimum 1) */
185
+ page: number;
186
+ };
187
+ /** Extract text. Extract the text of some or all pages, in reading order. With rect, only the text inside that rectangle on each page, as Column select takes it: one row per visual line, side-by-side pieces (table cells) separated by a tab. Params: Extract the text of some or all pages, in reading order. With rect, only the text inside that rectangle on each page, as Column select takes it: one row per visual line, side-by-side pieces (table cells) separated by a tab. */
188
+ "text_extract": {
189
+ pages?: Array<number>; /** Column select: [x0, y0, x1, y1] in points from the top-left of the displayed page; a glyph counts when its centre is inside. (maxItems 4, minItems 4) */
190
+ rect?: Array<number>;
191
+ };
192
+ /** Find text. Find a phrase (case-insensitive, whitespace-normalised) and return each match with its page and line rectangles in points (origin top-left). Params: Find a phrase (case-insensitive, whitespace-normalised) and return each match with its page and line rectangles in points (origin top-left). */
193
+ "text_find": {
194
+ limit?: number; /** (minLength 1) */
195
+ query: string;
196
+ };
197
+ /** Select text. Read text and highlight rectangles between inclusive nearest-glyph endpoints in displayed page-local top-left points (rotation and crop already applied). Range selection normalizes direction and page order; intermediate pages are complete. Column selection includes glyph centers inside the rectangle and requires one page. Returns {text,pages:[{page,text,rects}]}, retaining blank pages and joining page text with a newline. Refuses spans over 64 pages, text over 1 MiB UTF-8 including page separators, or over 16384 rectangles; never returns a partial selection. Params: Read text and highlight rectangles between inclusive nearest-glyph endpoints in displayed page-local top-left points (rotation and crop already applied). Range selection normalizes direction and page order; intermediate pages are complete. Column selection includes glyph centers inside the rectangle and requires one page. Returns {text,pages:[{page,text,rects}]}, retaining blank pages and joining page text with a newline. Refuses spans over 64 pages, text over 1 MiB UTF-8 including page separators, or over 16384 rectangles; never returns a partial selection. */
198
+ "text_select": {
199
+ anchor: Array<number>; /** Focus page; defaults to page. (minimum 1) */
200
+ end_page?: number; /** (maxItems 2, minItems 2) */
201
+ focus: Array<number>;
202
+ mode?: "range" | "column"; /** (minimum 1) */
203
+ page: number;
204
+ };
205
+ /** Rotate pages. Rotate pages by a multiple of 90 degrees (positive is clockwise): the listed pages (default all), filtered like Acrobat's Rotate Pages by subset (all, even, odd page numbers) and orientation (all, landscape, portrait). Undoable. Params: Rotate pages by a multiple of 90 degrees (positive is clockwise): the listed pages (default all), filtered like Acrobat's Rotate Pages by subset (all, even, odd page numbers) and orientation (all, landscape, portrait). Undoable. Changes the document. */
206
+ "page_rotate": {
207
+ degrees: number;
208
+ orientation?: "all" | "landscape" | "portrait"; /** 1-based page numbers to rotate (default: all). (minItems 1) */
209
+ pages?: Array<number>;
210
+ subset?: "all" | "even" | "odd";
211
+ };
212
+ /** Delete pages. Delete pages. Undoable until saved. Params: Delete pages. Undoable until saved. Changes the document. */
213
+ "page_delete": {
214
+ pages: Array<number>;
215
+ };
216
+ /** Move pages. Move pages so the first of them lands at position `to` (1-based, counted before the move). Undoable. Params: Move pages so the first of them lands at position `to` (1-based, counted before the move). Undoable. Changes the document. */
217
+ "page_move": {
218
+ pages: Array<number>; /** (minimum 1) */
219
+ to: number;
220
+ };
221
+ /** Insert a blank page. Insert a blank page so it becomes page `at`. Size defaults to the neighbouring page. Undoable. Params: Insert a blank page so it becomes page `at`. Size defaults to the neighbouring page. Undoable. Changes the document. */
222
+ "page_insert_blank": {
223
+ at: number; /** Points. */
224
+ height?: number; /** Points. */
225
+ width?: number;
226
+ };
227
+ /** List bookmarks. The bookmarks in outline order, one page at a time: each with its path (1-based, as the other bookmark tools take it), title, target page and open state, and its children on the same page. next is the offset of the following page, or null at the end. Bookmarks nested deeper than 33 levels are not listed. Params: The bookmarks in outline order, one page at a time: each with its path (1-based, as the other bookmark tools take it), title, target page and open state, and its children on the same page. next is the offset of the following page, or null at the end. Bookmarks nested deeper than 33 levels are not listed. */
228
+ "bookmark_list": {
229
+ limit?: number; /** Where the page starts, counted from 0 (the previous page's next) (minimum 0) */
230
+ offset?: number;
231
+ };
232
+ /** Add a bookmark. Add a bookmark that goes to a page, under a parent bookmark (or at the top level), at a position. Undoable. Params: Add a bookmark that goes to a page, under a parent bookmark (or at the top level), at a position. Undoable. Changes the document. */
233
+ "bookmark_add": {
234
+ page: number; /** Parent bookmark (omit for the top level): 1-based positions from the top level, e.g. [2, 1] = the first child of the second bookmark. */
235
+ parent?: Array<number>; /** 1-based position among the parent's children (default: last). (minimum 1) */
236
+ position?: number; /** (minLength 1) */
237
+ title: string;
238
+ };
239
+ /** New bookmarks from structure. Make bookmarks from the document's tagged headings (H, H1-H6), nested by level under a new first bookmark titled "Untitled". Fails if the document has no tagged headings. Returns the first page of the bookmark tree (see bookmark_list). Undoable. Params: Make bookmarks from the document's tagged headings (H, H1-H6), nested by level under a new first bookmark titled "Untitled". Fails if the document has no tagged headings. Returns the first page of the bookmark tree (see bookmark_list). Undoable. Changes the document. */
240
+ "bookmark_from_structure": Record<string, never>;
241
+ /** Number pages. Label a range of pages (e.g. i, ii, iii for front matter, or A-1, A-2 for an appendix). Later pages keep their labels. Undoable. Params: Label a range of pages (e.g. i, ii, iii for front matter, or A-1, A-2 for an appendix). Later pages keep their labels. Undoable. Changes the document. */
242
+ "page_number": {
243
+ from: number;
244
+ prefix?: string; /** Number of the first page in the range (default 1). (minimum 1) */
245
+ start?: number; /** Numbering style (default decimal; none = prefix only). */
246
+ style?: "decimal" | "upper-roman" | "lower-roman" | "upper-alpha" | "lower-alpha" | "none"; /** (minimum 1) */
247
+ to: number;
248
+ };
249
+ /** List form fields. Every interactive form field: name, type (text, checkbox, radio, combo, list, button, signature), value, options, page, rect (top-left-origin points) and rotation (0, 90, 180 or 270 degrees counterclockwise), read-only and required flags. Params: Every interactive form field: name, type (text, checkbox, radio, combo, list, button, signature), value, options, page, rect (top-left-origin points) and rotation (0, 90, 180 or 270 degrees counterclockwise), read-only and required flags. */
250
+ "form_fields": Record<string, never>;
251
+ /** Fill in form fields. Set several fields at once (one undo step). values maps field names (from form_fields) to: a string for text fields, combo boxes and radio groups (an option), true/false for check boxes, an array of strings for multi-select lists. Appearances are regenerated so every viewer shows the values. Params: Set several fields at once (one undo step). values maps field names (from form_fields) to: a string for text fields, combo boxes and radio groups (an option), true/false for check boxes, an array of strings for multi-select lists. Appearances are regenerated so every viewer shows the values. Changes the document. */
252
+ "form_fill": {
253
+ values: {
254
+ [key: string]: Json;
255
+ };
256
+ };
257
+ /** Clear form. Reset fields to their default values: all of them, or only those listed. Undoable. Params: Reset fields to their default values: all of them, or only those listed. Undoable. Changes the document. */
258
+ "form_reset": {
259
+ fields?: Array<string>;
260
+ };
261
+ /** Prepare form: add a field. Add a form field on a page. type: text, date, checkbox, radio, combo, list, button, image (a picture placeholder; fill it with form_set_image), signature. rect in points from the top-left of the displayed page [x0, y0, x1, y1]. name defaults to Acrobat's next free name (Text1, Check Box1, Group1, Dropdown1, List Box1, Button1, Image1, Signature1, Date1). Radio buttons join the radio group named by group (a new group otherwise) with the export value export. Returns the field's name. Undoable. Params: Add a form field on a page. type: text, date, checkbox, radio, combo, list, button, image (a picture placeholder; fill it with form_set_image), signature. rect in points from the top-left of the displayed page [x0, y0, x1, y1]. name defaults to Acrobat's next free name (Text1, Check Box1, Group1, Dropdown1, List Box1, Button1, Image1, Signature1, Date1). Radio buttons join the radio group named by group (a new group otherwise) with the export value export. Returns the field's name. Undoable. Changes the document. */
262
+ "form_add_field": {
263
+ caption?: string; /** Combo box accepts typed text. */
264
+ editable?: boolean; /** Radio button export value (default Choice1). */
265
+ export?: string; /** Radio group to join. */
266
+ group?: string;
267
+ multi_select?: boolean;
268
+ multiline?: boolean;
269
+ name?: string; /** Combo box / list box items. */
270
+ options?: Array<string>; /** (minimum 1) */
271
+ page: number; /** (maxItems 4, minItems 4) */
272
+ rect: Array<number>;
273
+ type: "text" | "date" | "checkbox" | "radio" | "combo" | "list" | "button" | "image" | "signature";
274
+ };
275
+ /** Field properties. Change field properties: give field for one field, or fields for a list of unique field names (1?1000). A bulk change is atomic and one Undo step; an invalid or locked field leaves every field unchanged. Only the given properties change, and partial appearance changes preserve each field's other colours and font. name (rename), rect (position) and rotation require a single field. General and Options: tooltip, read_only, required, multiline, max_length (0 = no limit), options (combo/list items), font_size (0 = auto), format, validate, calculate (Acrobat's native AF rules). Options: align (left, center, right), default (Reset form's value; check boxes/radio buttons use their on state, "" for off), flags { scroll, rich_text, password, file_select, spell_check, comb (needs max_length), sort, editable, multi_select, commit_immediately }, check_style (check boxes/radio buttons: check, circle, cross, diamond, square, star). rotation is 0, 90, 180 or 270 degrees counterclockwise and swaps width/height when the axis changes. Undoable. Params: Change field properties: give field for one field, or fields for a list of unique field names (1?1000). A bulk change is atomic and one Undo step; an invalid or locked field leaves every field unchanged. Only the given properties change, and partial appearance changes preserve each field's other colours and font. name (rename), rect (position) and rotation require a single field. General and Options: tooltip, read_only, required, multiline, max_length (0 = no limit), options (combo/list items), font_size (0 = auto), format, validate, calculate (Acrobat's native AF rules). Options: align (left, center, right), default (Reset form's value; check boxes/radio buttons use their on state, "" for off), flags { scroll, rich_text, password, file_select, spell_check, comb (needs max_length), sort, editable, multi_select, commit_immediately }, check_style (check boxes/radio buttons: check, circle, cross, diamond, square, star). rotation is 0, 90, 180 or 270 degrees counterclockwise and swaps width/height when the axis changes. Undoable. Changes the document. */
276
+ "form_set_props": {
277
+ align?: "left" | "center" | "right"; /** Appearance tab: border, fill, text_color (#RRGGBB, a name or "none"), width (0?12 points; 1 thin, 2 medium, 3 thick), style (solid, dashed, beveled, inset, underline), font (helvetica, times, courier). */
278
+ appearance?: {
279
+ [key: string]: Json;
280
+ }; /** Calculate tab: {"op": "sum"|"product"|"average"|"min"|"max", "fields": ["a", "b"]}, {"notation": "Price * Qty"} (simplified field notation), or "none". */
281
+ calculate?: Json; /** Check boxes and radio buttons: the mark shown when on. */
282
+ check_style?: "check" | "circle" | "cross" | "diamond" | "square" | "star";
283
+ default?: string; /** The field's current name. */
284
+ field?: string; /** Apply the same changes to these fields in one atomic edit. Use either field or fields. (maxItems 1000, minItems 1) */
285
+ fields?: Array<string>;
286
+ flags?: {
287
+ [key: string]: Json;
288
+ }; /** (minimum 0) */
289
+ font_size?: number; /** Format tab: {"type": "number", "decimals": 2, "currency": "$", "separator": 0-4, "negative": 0-3}, {"type": "percent"}, {"type": "date"|"time", "pattern": "mm/dd/yyyy"}, {"type": "zip"|"zip4"|"phone"|"ssn"}, {"type": "mask", "mask": "AA-9999"}, or "none". */
290
+ format?: Json; /** Lock the field's properties (only unlocking is accepted while locked). */
291
+ locked?: boolean; /** (minimum 0) */
292
+ max_length?: number;
293
+ multiline?: boolean;
294
+ name?: string;
295
+ options?: Array<string>;
296
+ read_only?: boolean; /** Move/resize: points from the top-left of the displayed page. (maxItems 4, minItems 4) */
297
+ rect?: Array<number>;
298
+ required?: boolean; /** Widget rotation in degrees, counterclockwise. Changing between horizontal and vertical swaps the rectangle around its center. */
299
+ rotation?: 0 | 90 | 180 | 270;
300
+ tooltip?: string; /** Validate tab: {"min": 0, "max": 100} (either may be left out) or "none". */
301
+ validate?: Json;
302
+ };
303
+ /** Set the tab order. Set the tab order of pages (default all): row (top to bottom, left to right), column, structure, or annotations (unspecified). Or order tabs manually: `field` with `move` earlier|later moves that field one place on its page. Returns the resulting order of fields. Undoable. Params: Set the tab order of pages (default all): row (top to bottom, left to right), column, structure, or annotations (unspecified). Or order tabs manually: `field` with `move` earlier|later moves that field one place on its page. Returns the resulting order of fields. Undoable. Changes the document. */
304
+ "form_tab_order": {
305
+ field?: string;
306
+ move?: "earlier" | "later";
307
+ order?: "row" | "column" | "structure" | "annotations"; /** 1-based page numbers to set (default: all). (minItems 1) */
308
+ pages?: Array<number>;
309
+ };
310
+ /** Delete a field. Delete a form field and all its widgets. Undoable. Params: Delete a form field and all its widgets. Undoable. Changes the document. */
311
+ "form_delete_field": {
312
+ field: string;
313
+ };
314
+ /** Mark for redaction. Mark content for redaction (nothing is removed until redact_apply). One of: rect [x0, y0, x1, y1] (points from the top-left of the displayed page) with page; find (text, every match); words (a list of words or phrases, every match of each; the result's matched_words says how many marks each made); pattern (phone, email, credit-card, ssn, date: every match, Acrobat's Search & Redact patterns); whole_pages: true. find, words, pattern and whole_pages work on pages (default all). overlay: text shown on the box once applied, or code_set (foia: U.S. FOIA (b)(1)(A)...(b)(9); privacy-act: U.S. Privacy Act (d)(5), (j)(1)...(k)(7)) with codes, shown as "(b)(6), (b)(7)(C)"; fill: box colour (default black). Undoable. Params: Mark content for redaction (nothing is removed until redact_apply). One of: rect [x0, y0, x1, y1] (points from the top-left of the displayed page) with page; find (text, every match); words (a list of words or phrases, every match of each; the result's matched_words says how many marks each made); pattern (phone, email, credit-card, ssn, date: every match, Acrobat's Search & Redact patterns); whole_pages: true. find, words, pattern and whole_pages work on pages (default all). overlay: text shown on the box once applied, or code_set (foia: U.S. FOIA (b)(1)(A)...(b)(9); privacy-act: U.S. Privacy Act (d)(5), (j)(1)...(k)(7)) with codes, shown as "(b)(6), (b)(7)(C)"; fill: box colour (default black). Undoable. Changes the document. */
315
+ "redact_mark": {
316
+ author?: string;
317
+ code_set?: "foia" | "privacy-act"; /** Redaction codes from code_set, e.g. ["(b)(6)"]. (minItems 1) */
318
+ codes?: Array<string>; /** #RRGGBB or a colour name. */
319
+ fill?: string; /** (minLength 1) */
320
+ find?: string;
321
+ overlay?: string; /** (minimum 1) */
322
+ page?: number; /** 1-based page numbers to search or mark (default: all). (minItems 1) */
323
+ pages?: Array<number>;
324
+ pattern?: "phone" | "email" | "credit-card" | "ssn" | "date"; /** (maxItems 4, minItems 4) */
325
+ rect?: Array<number>;
326
+ whole_pages?: boolean; /** (maxItems 1000, minItems 1) */
327
+ words?: Array<string>;
328
+ };
329
+ /** Apply redactions. Apply the redaction marks (all, or those on pages): text, images, vectors, comments and form fields under them are removed for good and boxes are drawn in their place. A verification pass fails the operation if anything readable remains. Undoable until saved; the saved file no longer contains the content. Params: Apply the redaction marks (all, or those on pages): text, images, vectors, comments and form fields under them are removed for good and boxes are drawn in their place. A verification pass fails the operation if anything readable remains. Undoable until saved; the saved file no longer contains the content. Changes the document. */
330
+ "redact_apply": {
331
+ pages?: Array<number>;
332
+ };
333
+ /** Remove redaction marks. Remove every redaction mark without applying it. Undoable. Params: Remove every redaction mark without applying it. Undoable. Changes the document. */
334
+ "redact_clear": Record<string, never>;
335
+ /** Find hidden information. What Remove Hidden Information would remove, by category (metadata, attachments, comments, form-fields, hidden-text, hidden-layers, bookmarks, links-actions-scripts, private-data) with counts. Params: What Remove Hidden Information would remove, by category (metadata, attachments, comments, form-fields, hidden-text, hidden-layers, bookmarks, links-actions-scripts, private-data) with counts. */
336
+ "doc_hidden_info": Record<string, never>;
337
+ /** Remove hidden information / Sanitize. Remove the listed categories (see doc_hidden_info), or every category when none are listed (Sanitize Document). Form fields are flattened so their values stay visible. The next save rewrites the whole file. Undoable until saved. Params: Remove the listed categories (see doc_hidden_info), or every category when none are listed (Sanitize Document). Form fields are flattened so their values stay visible. The next save rewrites the whole file. Undoable until saved. Changes the document. */
338
+ "doc_remove_hidden": {
339
+ categories?: Array<"metadata" | "attachments" | "comments" | "form-fields" | "hidden-text" | "hidden-layers" | "bookmarks" | "links-actions-scripts" | "private-data">;
340
+ };
341
+ /** List added content. Text and images added with page_add_text/page_add_image (or Edit a PDF ? Add content), per page with a 1-based index, rect (points from the top-left of the page), and text style. Params: Text and images added with page_add_text/page_add_image (or Edit a PDF ? Add content), per page with a 1-based index, rect (points from the top-left of the page), and text style. */
342
+ "content_list": Record<string, never>;
343
+ /** Add text to a page. Add text as page content (not a comment). Place it with at [x, y] (top-left, points from the top-left of the displayed page) and width (wrap width, default 200), or rect. Newlines start new lines; long lines wrap. Style: font helvetica/times/courier or a document font by family (kition-fonts, or one the host added, such as Lora), size, bold, italic, color (#RRGGBB or a name), align left/center/right. Characters the standard fonts lack (Chinese, Japanese) are drawn from a document font that has them; the standard families are drawn from Arimo, Tinos and Cousine when the host added them, so the page embeds every font it uses. It stays editable with content_update. Undoable. Params: Add text as page content (not a comment). Place it with at [x, y] (top-left, points from the top-left of the displayed page) and width (wrap width, default 200), or rect. Newlines start new lines; long lines wrap. Style: font helvetica/times/courier or a document font by family (kition-fonts, or one the host added, such as Lora), size, bold, italic, color (#RRGGBB or a name), align left/center/right. Characters the standard fonts lack (Chinese, Japanese) are drawn from a document font that has them; the standard families are drawn from Arimo, Tinos and Cousine when the host added them, so the page embeds every font it uses. It stays editable with content_update. Undoable. Changes the document. */
344
+ "page_add_text": {
345
+ align?: "left" | "center" | "right" | "justify"; /** (maxItems 2, minItems 2) */
346
+ at?: Array<number>;
347
+ bold?: boolean;
348
+ color?: string;
349
+ font?: "helvetica" | "times" | "courier";
350
+ italic?: boolean; /** (minimum 1) */
351
+ page: number; /** (maxItems 4, minItems 4) */
352
+ rect?: Array<number>; /** (maximum 500, minimum 1) */
353
+ size?: number; /** (minLength 1) */
354
+ text: string;
355
+ width?: number;
356
+ };
357
+ /** Edit added content. Move/resize (rect), retype (text) or restyle (font, size, bold, italic, color, align) an added item (page, index from content_list). Images: rotate (degrees, multiple of 90, counter-clockwise), flip_h / flip_v (toggle), crop [left, bottom, right, top] as fractions trimmed, image (a file that replaces the picture). Undoable. Params: Move/resize (rect), retype (text) or restyle (font, size, bold, italic, color, align) an added item (page, index from content_list). Images: rotate (degrees, multiple of 90, counter-clockwise), flip_h / flip_v (toggle), crop [left, bottom, right, top] as fractions trimmed, image (a file that replaces the picture). Undoable. Changes the document. */
358
+ "content_update": {
359
+ align?: "left" | "center" | "right" | "justify";
360
+ bold?: boolean;
361
+ color?: string; /** (maxItems 4, minItems 4) */
362
+ crop?: Array<number>;
363
+ flip_h?: boolean;
364
+ flip_v?: boolean;
365
+ font?: "helvetica" | "times" | "courier"; /** (minimum 1) */
366
+ index: number;
367
+ italic?: boolean; /** (minimum 1) */
368
+ page: number; /** (maxItems 4, minItems 4) */
369
+ rect?: Array<number>;
370
+ rotate?: number; /** (maximum 500, minimum 1) */
371
+ size?: number;
372
+ text?: string;
373
+ };
374
+ /** Delete added content. Delete an added item (page, index from content_list). Undoable. Params: Delete an added item (page, index from content_list). Undoable. Changes the document. */
375
+ "content_delete": {
376
+ index: number; /** (minimum 1) */
377
+ page: number;
378
+ };
379
+ /** List links. Every link: page, 1-based index (for link_edit/link_delete), rect (points from the top-left of the page), and where it goes (url or to_page). Params: Every link: page, 1-based index (for link_edit/link_delete), rect (points from the top-left of the page), and where it goes (url or to_page). */
380
+ "link_list": Record<string, never>;
381
+ /** Add a link. Add a link over rect on page that opens url or goes to to_page. Appearance: visible (rectangle), color, width 1-3, highlight none/invert/outline/inset. Undoable. Params: Add a link over rect on page that opens url or goes to to_page. Appearance: visible (rectangle), color, width 1-3, highlight none/invert/outline/inset. Undoable. Changes the document. */
382
+ "link_add": {
383
+ color?: string;
384
+ highlight?: "none" | "invert" | "outline" | "inset"; /** (minimum 1) */
385
+ page: number; /** (maxItems 4, minItems 4) */
386
+ rect: Array<number>; /** (minimum 1) */
387
+ to_page?: number;
388
+ url?: string;
389
+ visible?: boolean;
390
+ width?: number;
391
+ };
392
+ /** Edit a link. Change a link's rect, destination (url or to_page) or appearance. Undoable. Params: Change a link's rect, destination (url or to_page) or appearance. Undoable. Changes the document. */
393
+ "link_edit": {
394
+ color?: string;
395
+ highlight?: "none" | "invert" | "outline" | "inset"; /** (minimum 1) */
396
+ index: number; /** (minimum 1) */
397
+ page: number; /** (maxItems 4, minItems 4) */
398
+ rect?: Array<number>; /** (minimum 1) */
399
+ to_page?: number;
400
+ url?: string;
401
+ visible?: boolean;
402
+ width?: number;
403
+ };
404
+ /** Delete a link. Delete one link (page, index from link_list). Undoable. Params: Delete one link (page, index from link_list). Undoable. Changes the document. */
405
+ "link_delete": {
406
+ index: number; /** (minimum 1) */
407
+ page: number;
408
+ };
409
+ /** Create links from URLs. Find web addresses (http://, https://, www.) in the text of every page and make them clickable links. Returns the URLs. Undoable. Params: Find web addresses (http://, https://, www.) in the text of every page and make them clickable links. Returns the URLs. Undoable. Changes the document. */
410
+ "links_from_urls": Record<string, never>;
411
+ /** Remove all links. Remove every link in the document. Undoable. Params: Remove every link in the document. Undoable. Changes the document. */
412
+ "links_remove": Record<string, never>;
413
+ /** Measure distance. Add an undoable two-point distance annotation using the scale of the first point's viewport. Params: Add an undoable two-point distance annotation using the scale of the first point's viewport. Changes the document. */
414
+ "measure_distance": {
415
+ author?: string; /** (maxLength 512) */
416
+ label?: string; /** (minimum 1) */
417
+ page: number; /** (maxItems 2048, minItems 1) */
418
+ points: Array<Array<number>>;
419
+ };
420
+ /** Measure perimeter. Add an undoable connected-line length annotation. To include a closing edge, repeat the first point at the end. Params: Add an undoable connected-line length annotation. To include a closing edge, repeat the first point at the end. Changes the document. */
421
+ "measure_perimeter": {
422
+ author?: string; /** (maxLength 512) */
423
+ label?: string; /** (minimum 1) */
424
+ page: number; /** (maxItems 2048, minItems 1) */
425
+ points: Array<Array<number>>;
426
+ };
427
+ /** Measure area. Add an undoable area annotation from a simple polygon. The last edge closes automatically. Params: Add an undoable area annotation from a simple polygon. The last edge closes automatically. Changes the document. */
428
+ "measure_area": {
429
+ author?: string; /** (maxLength 512) */
430
+ label?: string; /** (minimum 1) */
431
+ page: number; /** (maxItems 2048, minItems 1) */
432
+ points: Array<Array<number>>;
433
+ };
434
+ /** Read a measurement. Calculate a live distance, perimeter or area, deltas, angle and scale without adding an annotation. Incomplete paths are allowed. Params: Calculate a live distance, perimeter or area, deltas, angle and scale without adding an annotation. Incomplete paths are allowed. */
435
+ "measure_info": {
436
+ page: number; /** (maxItems 2048, minItems 1) */
437
+ points: Array<Array<number>>;
438
+ type?: "distance" | "perimeter" | "area";
439
+ };
440
+ /** List measurements. Saved measurement annotations with calculated values, scale and vertices in display coordinates. Measurements with unsupported imported formats (compound or fractional units, non-rectilinear scales) or invalid geometry are listed under unsupported with a reason. Params: Saved measurement annotations with calculated values, scale and vertices in display coordinates. Measurements with unsupported imported formats (compound or fractional units, non-rectilinear scales) or invalid geometry are listed under unsupported with a reason. */
441
+ "measure_list": {
442
+ page?: number;
443
+ };
444
+ /** Set or read a measurement scale. Read the scale at a point, or add a rectangular viewport using units_per_point or two calibration points and their real-world distance. Existing measurements retain their original scales. Undoable. Params: Read the scale at a point, or add a rectangular viewport using units_per_point or two calibration points and their real-world distance. Existing measurements retain their original scales. Undoable. Changes the document. */
445
+ "measure_scale": {
446
+ at?: Array<number>;
447
+ distance?: number;
448
+ name?: string; /** (minimum 1) */
449
+ page: number; /** (maxItems 2048, minItems 1) */
450
+ points?: Array<Array<number>>; /** (maximum 6, minimum 0) */
451
+ precision?: number; /** (maxItems 4, minItems 4) */
452
+ rect?: Array<number>;
453
+ unit?: string;
454
+ units_per_point?: number;
455
+ };
456
+ /** Snap a measurement vertex. Snap a point to vector paths, endpoints, midpoints or intersections. Coordinates and tolerance are in display points. Bounded extraction reports truncated geometry. Params: Snap a point to vector paths, endpoints, midpoints or intersections. Coordinates and tolerance are in display points. Bounded extraction reports truncated geometry. */
457
+ "measure_snap": {
458
+ at: Array<number>;
459
+ endpoints?: boolean;
460
+ intersections?: boolean;
461
+ midpoints?: boolean; /** (minimum 1) */
462
+ page: number; /** (maximum 10000, minimum 0) */
463
+ tolerance?: number;
464
+ };
465
+ /** List comments. Every comment (annotation other than links, form widgets and pop-ups) with its page, index, id, type, author, text, date, rectangle, colour, review status and replies. Params: Every comment (annotation other than links, form widgets and pop-ups) with its page, index, id, type, author, text, date, rectangle, colour, review status and replies. */
466
+ "comment_list": {
467
+ page?: number;
468
+ };
469
+ /** Add a comment. Add a comment as Acrobat's commenting tools do. Geometry is in points with the origin at the top-left of the displayed page, y down (as in page_render images at 72 dpi and text_find rects). note: `at` [x, y] (icon top-left). stamp: `at` [x, y] (its centre) and `stamp`: approved, completed, confidential, draft, final, for comment, for public release, information only, not approved, not for public release, preliminary results, void, accepted, initial here, rejected, sign here, witness; dynamic: true for the dynamic approved/confidential/received/reviewed/revised stamps with a By ... at ... line. highlight/underline/strikeout/squiggly: `find` (text on the page to mark; every match with all: true) or `quads`. rectangle/oval/textbox: `rect` [x0, y0, x1, y1]. line/arrow: `from`, `to`. Optional `endings` (two names: start, end) for a line, arrow or polyline, or one name for a callout: None, Square, Circle, Diamond, OpenArrow, ClosedArrow, Butt, ROpenArrow, RClosedArrow, Slash. An arrow without endings is None then OpenArrow. ink: `strokes` [[[x, y], ...], ...]. polygon/cloud/polyline (connected lines): `points` [[x, y], ...]. callout: `rect` (its text box), `to` (the point the arrow touches), optional `knee` (where the leader bends before it runs into the side of the box facing it; outside the box, else placed for you). caret (inserted text): `at`, the insertion point on the baseline. replace (Replace Text): `find` or `quads` like highlight, `contents` the replacement. attachment: `path` (the file), `at`, optional `icon` (PushPin, Paperclip, Graph, Tag). Undoable. Params: Add a comment as Acrobat's commenting tools do. Geometry is in points with the origin at the top-left of the displayed page, y down (as in page_render images at 72 dpi and text_find rects). note: `at` [x, y] (icon top-left). stamp: `at` [x, y] (its centre) and `stamp`: approved, completed, confidential, draft, final, for comment, for public release, information only, not approved, not for public release, preliminary results, void, accepted, initial here, rejected, sign here, witness; dynamic: true for the dynamic approved/confidential/received/reviewed/revised stamps with a By ... at ... line. highlight/underline/strikeout/squiggly: `find` (text on the page to mark; every match with all: true) or `quads`. rectangle/oval/textbox: `rect` [x0, y0, x1, y1]. line/arrow: `from`, `to`. Optional `endings` (two names: start, end) for a line, arrow or polyline, or one name for a callout: None, Square, Circle, Diamond, OpenArrow, ClosedArrow, Butt, ROpenArrow, RClosedArrow, Slash. An arrow without endings is None then OpenArrow. ink: `strokes` [[[x, y], ...], ...]. polygon/cloud/polyline (connected lines): `points` [[x, y], ...]. callout: `rect` (its text box), `to` (the point the arrow touches), optional `knee` (where the leader bends before it runs into the side of the box facing it; outside the box, else placed for you). caret (inserted text): `at`, the insertion point on the baseline. replace (Replace Text): `find` or `quads` like highlight, `contents` the replacement. attachment: `path` (the file), `at`, optional `icon` (PushPin, Paperclip, Graph, Tag). Undoable. Changes the document. */
470
+ "comment_add": {
471
+ all?: boolean; /** [x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2) */
472
+ at?: Array<number>;
473
+ author?: string; /** #RRGGBB or a name: yellow, red, orange, green, blue, purple, pink, black, gray, white. */
474
+ color?: string; /** The comment text (what a text box shows). */
475
+ contents?: string;
476
+ dynamic?: boolean; /** Line endings. Two names (start, end) for a line, arrow or polyline; one name for a callout. (maxItems 2, minItems 1) */
477
+ endings?: Array<"None" | "Square" | "Circle" | "Diamond" | "OpenArrow" | "ClosedArrow" | "Butt" | "ROpenArrow" | "RClosedArrow" | "Slash">; /** #RRGGBB or a name: yellow, red, orange, green, blue, purple, pink, black, gray, white. */
478
+ fill?: string; /** Text on the page to mark up (case-insensitive). */
479
+ find?: string;
480
+ font_size?: number; /** [x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2) */
481
+ from?: Array<number>; /** note: Comment, Note, Help, Insert, Key, NewParagraph, Paragraph; attachment: PushPin, Paperclip, Graph, Tag. */
482
+ icon?: string; /** [x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2) */
483
+ knee?: Array<number>; /** (maximum 1, minimum 0) */
484
+ opacity?: number; /** (minimum 1) */
485
+ page: number; /** (minItems 2) */
486
+ points?: Array<Array<number>>;
487
+ quads?: Array<Array<number>>; /** (maxItems 4, minItems 4) */
488
+ rect?: Array<number>;
489
+ stamp?: string;
490
+ strokes?: Array<Array<Array<number>>>; /** [x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2) */
491
+ to?: Array<number>;
492
+ type: "note" | "highlight" | "underline" | "strikeout" | "squiggly" | "replace" | "rectangle" | "oval" | "line" | "arrow" | "ink" | "textbox" | "stamp" | "polygon" | "cloud" | "polyline" | "callout" | "caret" | "attachment"; /** Line width in points. (minimum 0) */
493
+ width?: number;
494
+ };
495
+ /** Reply to a comment. Add a reply to a comment's thread. Undoable. Params: Add a reply to a comment's thread. Undoable. Acts on `id`. Changes the document. */
496
+ "comment_reply": {
497
+ author?: string; /** The comment's id (from comment_list). */
498
+ id?: string; /** 1-based position on the page, as comment_list reports. (minimum 1) */
499
+ index?: number; /** With `index`, instead of `id`. (minimum 1) */
500
+ page?: number; /** (minLength 1) */
501
+ text: string;
502
+ };
503
+ /** Set a comment's status. Set a comment's review status (Acrobat: Set status), recorded as a status reply. Undoable. Params: Set a comment's review status (Acrobat: Set status), recorded as a status reply. Undoable. Acts on `id`. Changes the document. */
504
+ "comment_set_status": {
505
+ author?: string; /** The comment's id (from comment_list). */
506
+ id?: string; /** 1-based position on the page, as comment_list reports. (minimum 1) */
507
+ index?: number; /** With `index`, instead of `id`. (minimum 1) */
508
+ page?: number;
509
+ status: "none" | "accepted" | "rejected" | "cancelled" | "completed";
510
+ };
511
+ /** List and validate signatures. Every signature field with its validation: status (valid, unknown = intact but the signer isn't trusted, invalid, unsigned), signer and certificate, date, reason, location, certification level, page and rect, the revision it covers and changes made after signing (none, allowed, disallowed), with Acrobat-style explanations. Params: Every signature field with its validation: status (valid, unknown = intact but the signer isn't trusted, invalid, unsigned), signer and certificate, date, reason, location, certification level, page and rect, the revision it covers and changes made after signing (none, allowed, disallowed), with Acrobat-style explanations. */
512
+ "sign_list": Record<string, never>;
513
+ /** Mark a comment with a checkmark. Mark or unmark a comment with a checkmark (Acrobat: Mark with checkmark), recorded as a private reply. Undoable. Params: Mark or unmark a comment with a checkmark (Acrobat: Mark with checkmark), recorded as a private reply. Undoable. Acts on `id`. Changes the document. */
514
+ "comment_mark": {
515
+ author?: string; /** The comment's id (from comment_list). */
516
+ id?: string; /** 1-based position on the page, as comment_list reports. (minimum 1) */
517
+ index?: number; /** Default true. */
518
+ marked?: boolean; /** With `index`, instead of `id`. (minimum 1) */
519
+ page?: number;
520
+ };
521
+ /** Lock a comment. Lock or unlock a comment (Properties ? Locked). Locked comments can't be moved, resized, restyled or deleted; their text stays editable. Undoable. Params: Lock or unlock a comment (Properties ? Locked). Locked comments can't be moved, resized, restyled or deleted; their text stays editable. Undoable. Acts on `id`. Changes the document. */
522
+ "comment_lock": {
523
+ id?: string; /** 1-based position on the page, as comment_list reports. (minimum 1) */
524
+ index?: number; /** Default true. */
525
+ locked?: boolean; /** With `index`, instead of `id`. (minimum 1) */
526
+ page?: number;
527
+ };
528
+ /** Hide all comments. Hide or show every comment on the page (fields and links still draw). A view setting: the file doesn't change. Params: Hide or show every comment on the page (fields and links still draw). A view setting: the file doesn't change. Changes the document. */
529
+ "comments_hide": {
530
+ hidden?: boolean;
531
+ };
532
+ /** Edit a comment. Change a comment's text, colour, opacity, line width, fill (rectangle/oval/polygon; "none" removes it), rectangle (rectangle/oval/text box/stamp) or position (`move` [dx, dy] in points). Stamps keep their original appearance when resized. One undo step. Params: Change a comment's text, colour, opacity, line width, fill (rectangle/oval/polygon; "none" removes it), rectangle (rectangle/oval/text box/stamp) or position (`move` [dx, dy] in points). Stamps keep their original appearance when resized. One undo step. Acts on `id`. Changes the document. */
533
+ "comment_edit": {
534
+ color?: string;
535
+ contents?: string; /** Interior colour of a rectangle, oval or polygon: #RRGGBB, a colour name, or "none" for no fill. */
536
+ fill?: string; /** The comment's id (from comment_list). */
537
+ id?: string; /** 1-based position on the page, as comment_list reports. (minimum 1) */
538
+ index?: number; /** [x, y] in points from the top-left of the displayed page. (maxItems 2, minItems 2) */
539
+ move?: Array<number>; /** (maximum 1, minimum 0) */
540
+ opacity?: number; /** With `index`, instead of `id`. (minimum 1) */
541
+ page?: number; /** (maxItems 4, minItems 4) */
542
+ rect?: Array<number>; /** (minimum 0) */
543
+ width?: number;
544
+ };
545
+ /** Preview image signature layers. Return a PNG of the page without the selected image signature/initials (layer=background, default), or its embedded image with alpha (layer=image). Includes the displayed rectangle, document rotation, image_rotation (how far clockwise the image is shown turned) and annotation opacity. Cache these layers for live placement/resizing; commit once with comment_edit. Does not change the document or undo history. Params: Return a PNG of the page without the selected image signature/initials (layer=background, default), or its embedded image with alpha (layer=image). Includes the displayed rectangle, document rotation, image_rotation (how far clockwise the image is shown turned) and annotation opacity. Cache these layers for live placement/resizing; commit once with comment_edit. Does not change the document or undo history. */
546
+ "comment_image_preview": {
547
+ dpi?: number; /** The comment's id (from comment_list). */
548
+ id?: string; /** 1-based position on the page, as comment_list reports. (minimum 1) */
549
+ index?: number;
550
+ layer?: "background" | "image"; /** With `index`, instead of `id`. (minimum 1) */
551
+ page?: number;
552
+ };
553
+ /** Delete a comment. Delete a comment with its pop-up and replies. Undoable. Params: Delete a comment with its pop-up and replies. Undoable. Acts on `id`. Changes the document. */
554
+ "comment_delete": {
555
+ id?: string; /** 1-based position on the page, as comment_list reports. (minimum 1) */
556
+ index?: number; /** With `index`, instead of `id`. (minimum 1) */
557
+ page?: number;
558
+ };
559
+ /** Protect with passwords. Encrypt the document (applied by the next doc_save, a full rewrite). open_password is needed to open it. permissions_password is needed to change security and lifts the restrictions given by printing/changes/copy/accessibility; those restrictions (and their defaults) apply only when permissions_password is given. With open_password alone the document is encrypted and everything stays allowed, so passing a restriction without permissions_password is an error. Passwords are never echoed back. Undoable. Params: Encrypt the document (applied by the next doc_save, a full rewrite). open_password is needed to open it. permissions_password is needed to change security and lifts the restrictions given by printing/changes/copy/accessibility; those restrictions (and their defaults) apply only when permissions_password is given. With open_password alone the document is encrypted and everything stays allowed, so passing a restriction without permissions_password is an error. Passwords are never echoed back. Undoable. Changes the document. */
560
+ "doc_protect": {
561
+ accessibility?: boolean; /** Needs permissions_password. Default none. */
562
+ changes?: "none" | "pages" | "fill-sign" | "comment-fill-sign" | "any-except-extract"; /** Default aes-256 (Acrobat X and later). */
563
+ compatibility?: "aes-256" | "aes-128" | "rc4-128" | "rc4-40"; /** Allow copying text and images (needs permissions_password; default false). */
564
+ copy?: boolean; /** Default true. */
565
+ encrypt_metadata?: boolean; /** Required to open the document. On its own it restricts nothing. (minLength 1) */
566
+ open_password?: string; /** Required to change security; enables printing/changes/copy/accessibility and their defaults. (minLength 1) */
567
+ permissions_password?: string; /** Needs permissions_password. Default high. */
568
+ printing?: "none" | "low" | "high";
569
+ };
570
+ /** Remove security. Remove password security (the document must have been opened with its permissions password, or have none). Applied by the next doc_save. Undoable. Params: Remove password security (the document must have been opened with its permissions password, or have none). Applied by the next doc_save. Undoable. Changes the document. */
571
+ "doc_unprotect": Record<string, never>;
572
+ /** Duplicate pages. Insert copies of pages after the last of them (fonts and images are shared, not copied). Undoable. Params: Insert copies of pages after the last of them (fonts and images are shared, not copied). Undoable. Changes the document. */
573
+ "page_duplicate": {
574
+ pages: Array<number>;
575
+ };
576
+ /** Set page boxes / crop. Set a page box (crop by default; also trim, bleed, art, media) on pages: either margins in points from the media box [left, bottom, right, top], or an absolute rect in points from the top-left of the displayed page. Omit both to reset the box to its default. Undoable. Params: Set a page box (crop by default; also trim, bleed, art, media) on pages: either margins in points from the media box [left, bottom, right, top], or an absolute rect in points from the top-left of the displayed page. Omit both to reset the box to its default. Undoable. Changes the document. */
577
+ "page_set_box": {
578
+ box?: "crop" | "trim" | "bleed" | "art" | "media"; /** (maxItems 4, minItems 4) */
579
+ margins?: Array<number>; /** 1-based page numbers to change (default: all). (minItems 1) */
580
+ pages?: Array<number>; /** (maxItems 4, minItems 4) */
581
+ rect?: Array<number>;
582
+ };
583
+ /** Add header and footer. Add a header and/or footer to pages. Text boxes: header_left/center/right, footer_left/center/right. Tokens: <<1>> page number, <<n>> page count, <<1 of n>>, <<Page 1 of n>>, <<1/n>>, dates <<m/d/yyyy>> <<yyyy-mm-dd>> <<mmmm d, yyyy>> (and more), Bates <<Bates Number#6#1#PREFIX#SUFFIX>>. replace: true swaps out existing ones (Update). Undoable. Params: Add a header and/or footer to pages. Text boxes: header_left/center/right, footer_left/center/right. Tokens: <<1>> page number, <<n>> page count, <<1 of n>>, <<Page 1 of n>>, <<1/n>>, dates <<m/d/yyyy>> <<yyyy-mm-dd>> <<mmmm d, yyyy>> (and more), Bates <<Bates Number#6#1#PREFIX#SUFFIX>>. replace: true swaps out existing ones (Update). Undoable. Changes the document. */
584
+ "doc_header_footer": {
585
+ color?: string;
586
+ font_size?: number;
587
+ footer_center?: string;
588
+ footer_left?: string;
589
+ footer_right?: string;
590
+ header_center?: string;
591
+ header_left?: string;
592
+ header_right?: string; /** Top, bottom, left, right in points (default 36, 36, 72, 72). (maxItems 4, minItems 4) */
593
+ margins?: Array<number>; /** 1-based page numbers to mark (default: all). (minItems 1) */
594
+ pages?: Array<number>;
595
+ replace?: boolean; /** (minimum 1) */
596
+ start_number?: number;
597
+ };
598
+ /** Add watermark. Add a watermark to pages: text, or a picture from `file` (an image, or page `file_page` of a PDF) at `scale` of the page (default 0.5); rotated (degrees counter-clockwise, default 45), semi-transparent (opacity 0?1, default 0.5), text fitted to the page unless font_size is given, on top unless behind: true. replace: true swaps out existing ones. Undoable. Params: Add a watermark to pages: text, or a picture from `file` (an image, or page `file_page` of a PDF) at `scale` of the page (default 0.5); rotated (degrees counter-clockwise, default 45), semi-transparent (opacity 0?1, default 0.5), text fitted to the page unless font_size is given, on top unless behind: true. replace: true swaps out existing ones. Undoable. Changes the document. */
599
+ "doc_watermark": {
600
+ behind?: boolean;
601
+ color?: string; /** (minimum 1) */
602
+ file_page?: number;
603
+ font_size?: number; /** (maximum 1, minimum 0) */
604
+ opacity?: number; /** 1-based page numbers to mark (default: all). (minItems 1) */
605
+ pages?: Array<number>;
606
+ replace?: boolean;
607
+ rotation?: number; /** (maximum 1) */
608
+ scale?: number; /** (minLength 1) */
609
+ text?: string;
610
+ };
611
+ /** Add background. Fill page backgrounds with a colour, or a picture from `file` (an image, or page `file_page` of a PDF) fitted at `scale` (default 1), behind the content. Undoable. Params: Fill page backgrounds with a colour, or a picture from `file` (an image, or page `file_page` of a PDF) fitted at `scale` (default 1), behind the content. Undoable. Changes the document. */
612
+ "doc_background": {
613
+ color?: string; /** (minimum 1) */
614
+ file_page?: number; /** (maximum 1, minimum 0) */
615
+ opacity?: number; /** 1-based page numbers to fill (default: all). (minItems 1) */
616
+ pages?: Array<number>;
617
+ replace?: boolean; /** (maximum 1) */
618
+ scale?: number;
619
+ };
620
+ /** Remove header & footer, watermark or background. Remove every header and footer, watermark or background Kition PDF (or a compatible tool) added. Undoable. Params: Remove every header and footer, watermark or background Kition PDF (or a compatible tool) added. Undoable. Changes the document. */
621
+ "doc_remove_marks": {
622
+ kind: "header_footer" | "watermark" | "background"; /** 1-based page numbers to remove marks from (default: all). (minItems 1) */
623
+ pages?: Array<number>;
624
+ };
625
+ /** Check for accessibility. Run the Accessibility Checker's full check (32 rules in 7 categories: document, page_content, forms, alternate_text, tables, lists, headings). Each rule is passed, failed (with findings and pages), manual (needs a person) or skipped. Colour contrast is off unless all is true; rules (ids such as tagged-pdf, figures-alt-text) or categories narrow the check; pages limit the page rules. Params: Run the Accessibility Checker's full check (32 rules in 7 categories: document, page_content, forms, alternate_text, tables, lists, headings). Each rule is passed, failed (with findings and pages), manual (needs a person) or skipped. Colour contrast is off unless all is true; rules (ids such as tagged-pdf, figures-alt-text) or categories narrow the check; pages limit the page rules. */
626
+ "accessibility_check": {
627
+ all?: boolean;
628
+ categories?: Array<"document" | "page_content" | "forms" | "alternate_text" | "tables" | "lists" | "headings">; /** 1-based page numbers for the page rules (default: all). (minItems 1) */
629
+ pages?: Array<number>;
630
+ rules?: Array<string>;
631
+ };
632
+ /** Fix an accessibility problem. Apply the checker's automatic fix for a rule: primary-language (value: the language, e.g. en-US), title (value: the title; default the current title or file name; also shows it in the title bar) or tab-order (every page tabs in structure order). Returns the rule's new status. Undoable. Params: Apply the checker's automatic fix for a rule: primary-language (value: the language, e.g. en-US), title (value: the title; default the current title or file name; also shows it in the title bar) or tab-order (every page tabs in structure order). Returns the rule's new status. Undoable. Changes the document. */
633
+ "accessibility_fix": {
634
+ rule: "primary-language" | "title" | "tab-order";
635
+ value?: string;
636
+ };
637
+ /** List figures. The tagged figures (Figure elements, through the role map) in document order: figure number, page, alternate text and where the figure is drawn (top-left-origin points). Params: The tagged figures (Figure elements, through the role map) in document order: figure number, page, alternate text and where the figure is drawn (top-left-origin points). */
638
+ "accessibility_figures": Record<string, never>;
639
+ /** Set alternate text. Set a figure's alternate text (alt; empty or omitted clears it), or mark it decorative (decorative: true: its content becomes an artifact and the figure leaves the tags). figure is a number from accessibility_figures. Returns the figures. Undoable. Params: Set a figure's alternate text (alt; empty or omitted clears it), or mark it decorative (decorative: true: its content becomes an artifact and the figure leaves the tags). figure is a number from accessibility_figures. Returns the figures. Undoable. Changes the document. */
640
+ "accessibility_set_alt": {
641
+ alt?: string;
642
+ decorative?: boolean; /** (minimum 1) */
643
+ figure: number;
644
+ };
645
+ /** Run JavaScript. Run Acrobat JavaScript in the document, as the JavaScript console does (or as push button `field`'s Mouse Up script when field is given; on a laid-out XFA form, `field` runs that button's XFA click script instead, JavaScript or FormCalc, which can add and remove rows and show or hide subforms). The form object model is available: this/getField, event, app, util, console, display, color, and the document-level scripts. Field changes and resetForm are applied as one undoable step; returns the script's alerts, console output, requests (print, page, url, submit) and error. Params: Run Acrobat JavaScript in the document, as the JavaScript console does (or as push button `field`'s Mouse Up script when field is given; on a laid-out XFA form, `field` runs that button's XFA click script instead, JavaScript or FormCalc, which can add and remove rows and show or hide subforms). The form object model is available: this/getField, event, app, util, console, display, color, and the document-level scripts. Field changes and resetForm are applied as one undoable step; returns the script's alerts, console output, requests (print, page, url, submit) and error. Changes the document. */
646
+ "js_run": {
647
+ field?: string;
648
+ script: string;
649
+ };
650
+ /** Document JavaScripts. List the document-level JavaScripts (name and source), which define functions field scripts use. Params: List the document-level JavaScripts (name and source), which define functions field scripts use. */
651
+ "js_document_scripts": Record<string, never>;
652
+ /** Edit a document JavaScript. Add or replace the document-level JavaScript `name` with `script`, or delete it (script omitted). Undoable. Params: Add or replace the document-level JavaScript `name` with `script`, or delete it (script omitted). Undoable. Changes the document. */
653
+ "js_set_document_script": {
654
+ name: string;
655
+ script?: string;
656
+ };
657
+ /** Set a field's JavaScript. Field Properties ? Run custom script: set field's JavaScript for event keystroke, format, validate or calculate (the field's actions; calculated fields join the calculation order) or mouse_up (a button's action). Omit script to remove it. The scripts use Acrobat's object model (event.value, event.rc, getField, util.printf, ...) and run when the field changes. Undoable. Params: Field Properties ? Run custom script: set field's JavaScript for event keystroke, format, validate or calculate (the field's actions; calculated fields join the calculation order) or mouse_up (a button's action). Omit script to remove it. The scripts use Acrobat's object model (event.value, event.rc, getField, util.printf, ...) and run when the field changes. Undoable. Changes the document. */
658
+ "form_set_script": {
659
+ event: "keystroke" | "format" | "validate" | "calculate" | "mouse_up";
660
+ field: string;
661
+ script?: string;
662
+ };
663
+ /** Verify PDF/A. Standards ? Verify PDF/A compliance: the PDF/A-2b or 3b rules the document breaks (ISO 19005 clause, message, page, whether Save as PDF/A can fix it), plus what it declares. Params: Standards ? Verify PDF/A compliance: the PDF/A-2b or 3b rules the document breaks (ISO 19005 clause, message, page, whether Save as PDF/A can fix it), plus what it declares. */
664
+ "pdfa_verify": {
665
+ level?: "2b" | "3b";
666
+ };
667
+ /** Save as PDF/A. Standards ? Save as PDF/A: fix what can be fixed for PDF/A-2b or 3b (XMP identification and metadata, an sRGB output intent, forbidden actions and JavaScript, annotation print flags, image interpolation, encryption). Returns what was fixed and what remains (e.g. fonts that aren't embedded). Undoable; save the document to keep it. Params: Standards ? Save as PDF/A: fix what can be fixed for PDF/A-2b or 3b (XMP identification and metadata, an sRGB output intent, forbidden actions and JavaScript, annotation print flags, image interpolation, encryption). Returns what was fixed and what remains (e.g. fonts that aren't embedded). Undoable; save the document to keep it. Changes the document. */
668
+ "pdfa_convert": {
669
+ level?: "2b" | "3b";
670
+ };
671
+ /** List actions. Action Wizard: the built-in actions (name, description, steps) and every step an action can use (id, label, whether it takes a text argument). Params: Action Wizard: the built-in actions (name, description, steps) and every step an action can use (id, label, whether it takes a text argument). */
672
+ "action_list": Record<string, never>;
673
+ /** Compare files. Compare the text of two open documents: other is the older version, doc the newer. Returns counts and each change (replaced, inserted, deleted) with the old and new text, pages (1-based) and rectangles (points, origin bottom-left). Params: Compare the text of two open documents: other is the older version, doc the newer. Returns counts and each change (replaced, inserted, deleted) with the old and new text, pages (1-based) and rectangles (points, origin bottom-left). */
674
+ "doc_compare": {
675
+ limit?: number; /** The older document (from doc_open). */
676
+ other: number; /** Also compare how pages look (page n with page n): regions that differ visually. */
677
+ visual?: boolean;
678
+ };
679
+ /** Mark differences as comments. Add the differences from other (older) to doc (newer) as comments in doc: highlights over replaced (blue) and inserted (green) text, notes where text was deleted (red), authored Compare. Undoable. Params: Add the differences from other (older) to doc (newer) as comments in doc: highlights over replaced (blue) and inserted (green) text, notes where text was deleted (red), authored Compare. Undoable. Changes the document. */
680
+ "doc_compare_mark": {
681
+ other: number;
682
+ };
683
+ /** Detect form fields. Prepare a form ? automatic field detection: find the blanks a printed form asks to be filled (underscore runs, lines, empty boxes, small squares for check boxes) and name each field from its label. With add (default true) the fields are created as one undoable step; otherwise they are only proposed. Returns page (1-based), kind, name and rect (points, origin bottom-left). Params: Prepare a form ? automatic field detection: find the blanks a printed form asks to be filled (underscore runs, lines, empty boxes, small squares for check boxes) and name each field from its label. With add (default true) the fields are created as one undoable step; otherwise they are only proposed. Returns page (1-based), kind, name and rect (points, origin bottom-left). Changes the document. */
684
+ "form_detect_fields": {
685
+ add?: boolean; /** 1-based page numbers to look at (default: all). (minItems 1) */
686
+ pages?: Array<number>;
687
+ };
688
+ /** Field actions. Field Properties ? Actions: the field's action for each trigger (mouse_up, mouse_down, mouse_enter, mouse_exit, on_focus, on_blur). Params: Field Properties ? Actions: the field's action for each trigger (mouse_up, mouse_down, mouse_enter, mouse_exit, on_focus, on_blur). */
689
+ "form_actions": {
690
+ field: string;
691
+ };
692
+ /** Set field actions. Field Properties ? Actions: replace the field's actions. Each item: trigger (mouse_up, mouse_down, mouse_enter, mouse_exit, on_focus, on_blur) and one of javascript (source), url, reset (field names; [] for all), menu (Print, NextPage, PrevPage, FirstPage, LastPage), page (1-based), show / hide (field names), submit (URL). Triggers not listed lose their action. Undoable. Params: Field Properties ? Actions: replace the field's actions. Each item: trigger (mouse_up, mouse_down, mouse_enter, mouse_exit, on_focus, on_blur) and one of javascript (source), url, reset (field names; [] for all), menu (Print, NextPage, PrevPage, FirstPage, LastPage), page (1-based), show / hide (field names), submit (URL). Triggers not listed lose their action. Undoable. Changes the document. */
693
+ "form_set_actions": {
694
+ actions: Array<{
695
+ hide?: Array<string>;
696
+ javascript?: string;
697
+ menu?: string;
698
+ page?: number;
699
+ reset?: Array<string>;
700
+ show?: Array<string>;
701
+ submit?: string;
702
+ trigger: "mouse_up" | "mouse_down" | "mouse_enter" | "mouse_exit" | "on_focus" | "on_blur";
703
+ url?: string;
704
+ }>;
705
+ field: string;
706
+ };
707
+ /** JavaScript on or off. Preferences ? JavaScript ? Enable Acrobat JavaScript: set it with `enabled`, or read it. With JavaScript off, field scripts other than Acrobat's AF calls don't run. Params: Preferences ? JavaScript ? Enable Acrobat JavaScript: set it with `enabled`, or read it. With JavaScript off, field scripts other than Acrobat's AF calls don't run. Changes the document. */
708
+ "js_enabled": {
709
+ enabled?: boolean;
710
+ };
711
+ /** Recognize text (OCR). Scan & OCR ? Recognize text: render pages, read the words in them and add them as invisible text over the page image, so scanned pages become searchable and selectable (a searchable image; the image is not changed). Pages that already have text are skipped unless skip_text_pages is false. Returns each page's recognised text, word count or why it was skipped. Needs the OCR models (ocr_status). Undoable as one step. Params: Scan & OCR ? Recognize text: render pages, read the words in them and add them as invisible text over the page image, so scanned pages become searchable and selectable (a searchable image; the image is not changed). Pages that already have text are skipped unless skip_text_pages is false. Returns each page's recognised text, word count or why it was skipped. Needs the OCR models (ocr_status). Undoable as one step. Changes the document. */
712
+ "ocr_recognize": {
713
+ dpi?: number; /** Document language (default en). */
714
+ language?: "en"; /** 1-based page numbers to recognise (default: all). (minItems 1) */
715
+ pages?: Array<number>; /** Leave pages that already contain text alone (default true). */
716
+ skip_text_pages?: boolean;
717
+ };
718
+ /** OCR status. Whether text recognition is available (its models are installed: release packages include them; a source build fetches them with `cargo xtask models`; KITION_PDF_MODELS overrides), where it looks for them, and the languages it reads. Params: Whether text recognition is available (its models are installed: release packages include them; a source build fetches them with `cargo xtask models`; KITION_PDF_MODELS overrides), where it looks for them, and the languages it reads. */
719
+ "ocr_status": Record<string, never>;
720
+ /** Fill & Sign: type text or place a mark. Fill in a form that has no fields, as Acrobat's Fill & Sign does: type text (`text`, 10 pt), place a check, cross, dot or line, today's date (in Preferences ? Date format, see fill_sign_date_format, or `format`), or a signature or initials (either `text` drawn in a script font, or `path` to a local PNG/JPEG image up to 4 MiB and 4 megapixels, preserving transparency). `at` [x, y] is in points from the top-left of the page: text's top-left, mark's centre, signature's left edge centred vertically. Image signatures fit within 150 pt wide and 32 pt tall (24 pt for initials). Creates movable, undoable annotations. Params: Fill in a form that has no fields, as Acrobat's Fill & Sign does: type text (`text`, 10 pt), place a check, cross, dot or line, today's date (in Preferences ? Date format, see fill_sign_date_format, or `format`), or a signature or initials (either `text` drawn in a script font, or `path` to a local PNG/JPEG image up to 4 MiB and 4 megapixels, preserving transparency). `at` [x, y] is in points from the top-left of the page: text's top-left, mark's centre, signature's left edge centred vertically. Image signatures fit within 150 pt wide and 32 pt tall (24 pt for initials). Creates movable, undoable annotations. Changes the document. */
721
+ "fill_sign_add": {
722
+ at: Array<number>;
723
+ author?: string; /** For type date: this pattern instead of the date-format preference, e.g. "dd.mm.yyyy". */
724
+ format?: string; /** For type date: month and weekday names in this language code (see fill_sign_date_format) instead of the preference. */
725
+ language?: string; /** (minimum 1) */
726
+ page: number; /** (minLength 1) */
727
+ text?: string;
728
+ type: "text" | "check" | "cross" | "dot" | "line" | "date" | "signature" | "initials";
729
+ };
730
+ /** Date format for Fill & Sign. Preferences ? Date format: the pattern Fill & Sign dates use (default m/d/yyyy). Set it with `format` (Acrobat date codes yyyy yy mmmm mmm mm m dddd ddd dd d, other runs of y, m or d are refused; H h M s t are time letters and need \ before them; \ shows the next character as is), or read it. `language` sets the language of month and weekday names (a code from `languages`, or `auto` to follow the app's interface language; English headless). Returns the format, the language, today in them, `unwritable` (characters of today's date that Fill & Sign can't write into a PDF yet, Western European only; fill_sign_add refuses such a date), the ready-made presets and the languages. Params: Preferences ? Date format: the pattern Fill & Sign dates use (default m/d/yyyy). Set it with `format` (Acrobat date codes yyyy yy mmmm mmm mm m dddd ddd dd d, other runs of y, m or d are refused; H h M s t are time letters and need \ before them; \ shows the next character as is), or read it. `language` sets the language of month and weekday names (a code from `languages`, or `auto` to follow the app's interface language; English headless). Returns the format, the language, today in them, `unwritable` (characters of today's date that Fill & Sign can't write into a PDF yet, Western European only; fill_sign_add refuses such a date), the ready-made presets and the languages. Changes the document. */
731
+ "fill_sign_date_format": {
732
+ format?: string;
733
+ language?: string;
734
+ };
735
+ /** Create a PDF. Create a new, unsaved document and return it like doc_open: `blank` (pages, width, height in points; default 1 US Letter page), `images` (paths of PNG, JPEG, TIFF (every page), GIF or BMP files, one page each at the image's resolution) or `text` (a .txt path, or `text` directly). Save it with doc_save and a path. Params: Create a new, unsaved document and return it like doc_open: `blank` (pages, width, height in points; default 1 US Letter page), `images` (paths of PNG, JPEG, TIFF (every page), GIF or BMP files, one page each at the image's resolution) or `text` (a .txt path, or `text` directly). Save it with doc_save and a path. Changes the document. */
736
+ "doc_create": {
737
+ dpi?: number;
738
+ from: "blank" | "images" | "text"; /** (minimum 3) */
739
+ height?: number; /** Name for the new document (default derived from the source). */
740
+ name?: string; /** (maximum 10000, minimum 1) */
741
+ pages?: number;
742
+ text?: string; /** (minimum 3) */
743
+ width?: number;
744
+ };
745
+ /** Initial view. Read or change how the document opens (Document Properties ? Initial View) and its reading options: navigation (page, bookmarks, pages, attachments, layers), layout (default, single, continuous, two_up, two_up_continuous, two_up_cover, two_up_continuous_cover), magnification (default, actual, fit_page, fit_width, fit_height, fit_visible, or a percentage), page, window options (fit_window, center_window, full_screen, display_title), interface options (hide_menubar, hide_toolbar, hide_window_ui), language and binding (left, right). Only the given ones change; returns the result. Undoable. Params: Read or change how the document opens (Document Properties ? Initial View) and its reading options: navigation (page, bookmarks, pages, attachments, layers), layout (default, single, continuous, two_up, two_up_continuous, two_up_cover, two_up_continuous_cover), magnification (default, actual, fit_page, fit_width, fit_height, fit_visible, or a percentage), page, window options (fit_window, center_window, full_screen, display_title), interface options (hide_menubar, hide_toolbar, hide_window_ui), language and binding (left, right). Only the given ones change; returns the result. Undoable. Changes the document. */
746
+ "doc_initial_view": {
747
+ binding?: "left" | "right";
748
+ center_window?: boolean;
749
+ display_title?: boolean;
750
+ fit_window?: boolean;
751
+ full_screen?: boolean;
752
+ hide_menubar?: boolean;
753
+ hide_toolbar?: boolean;
754
+ hide_window_ui?: boolean;
755
+ language?: string;
756
+ layout?: "default" | "single" | "continuous" | "two_up" | "two_up_continuous" | "two_up_cover" | "two_up_continuous_cover";
757
+ magnification?: Json;
758
+ navigation?: "page" | "bookmarks" | "pages" | "attachments" | "layers"; /** (minimum 1) */
759
+ page?: number;
760
+ };
761
+ /** Audit space usage. How many bytes each kind of content takes and its share of the file (PDF Optimizer ? Audit space usage): images, content streams, fonts, forms, comments, structure, bookmarks, ... and document overhead. Params: How many bytes each kind of content takes and its share of the file (PDF Optimizer ? Audit space usage): images, content streams, fonts, forms, comments, structure, bookmarks, ... and document overhead. */
762
+ "doc_audit_space": Record<string, never>;
763
+ /** List text lines. The lines of existing text on a page (Edit a PDF ? Edit text): number, text, box (top-left-origin points), font and size. Use the number with text_edit. Params: The lines of existing text on a page (Edit a PDF ? Edit text): number, text, box (top-left-origin points), font and size. Use the number with text_edit. */
764
+ "text_lines": {
765
+ page: number;
766
+ };
767
+ /** List page images. The raster images and grouped Form artwork a page draws (Edit a PDF): number, box (top-left-origin points), kind (image/form), pixel size ([0,0] for forms) and resource name. Forms include nested graphics and are edited as a whole. Numbers count forms and images together in drawing order, so a page with forms numbers its images differently than before forms were listed: always take numbers from a fresh page_images call. Params: The raster images and grouped Form artwork a page draws (Edit a PDF): number, box (top-left-origin points), kind (image/form), pixel size ([0,0] for forms) and resource name. Forms include nested graphics and are edited as a whole. Numbers count forms and images together in drawing order, so a page with forms numbers its images differently than before forms were listed: always take numbers from a fresh page_images call. */
768
+ "page_images": {
769
+ page: number;
770
+ };
771
+ /** Edit an image. Change one of a page's images (number from page_images): action move (rect: new box in top-left-origin points), rotate (quarters clockwise, default 1), flip_horizontal, flip_vertical, replace (path: an image file, drawn in the same place) or delete. Undoable. Form artwork supports move/resize/rotate/flip/delete as a group; replace and image_save only support raster images. Params: Change one of a page's images (number from page_images): action move (rect: new box in top-left-origin points), rotate (quarters clockwise, default 1), flip_horizontal, flip_vertical, replace (path: an image file, drawn in the same place) or delete. Undoable. Form artwork supports move/resize/rotate/flip/delete as a group; replace and image_save only support raster images. Changes the document. */
772
+ "image_edit": {
773
+ action: "move" | "rotate" | "flip_horizontal" | "flip_vertical" | "replace" | "delete"; /** (minimum 1) */
774
+ image: number; /** (minimum 1) */
775
+ page: number;
776
+ quarters?: number; /** (maxItems 4, minItems 4) */
777
+ rect?: Array<number>;
778
+ };
779
+ /** List paragraphs. The paragraphs on a page (lines grouped by font, size, alignment and spacing): number, text, its line numbers, box (top-left-origin points), font and size. Use the number with text_edit's paragraph. Params: The paragraphs on a page (lines grouped by font, size, alignment and spacing): number, text, its line numbers, box (top-left-origin points), font and size. Use the number with text_edit's paragraph. */
780
+ "text_paragraphs": {
781
+ page: number;
782
+ };
783
+ /** Edit text. Replace the text of one paragraph (paragraph, from text_paragraphs: rewrapped to the paragraph's width with its line spacing) or one line (line, from text_lines) in place, keeping position, size and colour. For a paragraph, also change its formatting: font (helvetica, times, courier) with bold/italic, size (points), color (#rrggbb), align (left, center, right, justify), underline, line_spacing (? size), char_spacing (points) and scale (horizontal, percent), or move it (dx, dy in points; up is +dy) and rewrap it to a new width (points); text may then be omitted. Its own font is reused when it can show every character and no font/weight change is requested; otherwise it uses a standard font matching the source style or, for Japanese and other text no standard font can show (Cyrillic, Greek), real Mincho/Gothic fallback outlines matching the requested/source family and available weight, from a face that has every character (the result shows the font used). Missing Japanese weights use Regular, not synthetic bold; the small web build has only Gothic Regular. Paragraph bold may be set without font to keep the source family. Text that no available font can show is refused. Undoable. Params: Replace the text of one paragraph (paragraph, from text_paragraphs: rewrapped to the paragraph's width with its line spacing) or one line (line, from text_lines) in place, keeping position, size and colour. For a paragraph, also change its formatting: font (helvetica, times, courier) with bold/italic, size (points), color (#rrggbb), align (left, center, right, justify), underline, line_spacing (? size), char_spacing (points) and scale (horizontal, percent), or move it (dx, dy in points; up is +dy) and rewrap it to a new width (points); text may then be omitted. Its own font is reused when it can show every character and no font/weight change is requested; otherwise it uses a standard font matching the source style or, for Japanese and other text no standard font can show (Cyrillic, Greek), real Mincho/Gothic fallback outlines matching the requested/source family and available weight, from a face that has every character (the result shows the font used). Missing Japanese weights use Regular, not synthetic bold; the small web build has only Gothic Regular. Paragraph bold may be set without font to keep the source family. Text that no available font can show is refused. Undoable. Changes the document. */
784
+ "text_edit": {
785
+ align?: "left" | "center" | "right" | "justify";
786
+ bold?: boolean; /** Points. */
787
+ char_spacing?: number; /** #rrggbb */
788
+ color?: string; /** Paragraph only: move right by this many points (negative: left). */
789
+ dx?: number; /** Paragraph only: move up by this many points (negative: down). */
790
+ dy?: number;
791
+ font?: "helvetica" | "times" | "courier";
792
+ italic?: boolean; /** (minimum 1) */
793
+ line?: number; /** Multiple of the font size (1.2 is ordinary). */
794
+ line_spacing?: number; /** (minimum 1) */
795
+ page: number; /** (minimum 1) */
796
+ paragraph?: number; /** Horizontal scale in percent. */
797
+ scale?: number;
798
+ size?: number;
799
+ text?: string;
800
+ underline?: boolean; /** Paragraph only: rewrap to this width in points (dragging the box's edge). */
801
+ width?: number;
802
+ };
803
+ /** List revisions. List the document's saved revisions (oldest first): each incremental update is one. Returns revision number, where it ends in the file and its size, and which signatures sign exactly that revision. Params: List the document's saved revisions (oldest first): each incremental update is one. Returns revision number, where it ends in the file and its size, and which signatures sign exactly that revision. Changes the document. */
804
+ "doc_revisions": Record<string, never>;
805
+ /** Flatten. Merge comment and/or form field appearances into the page content, so they print and display everywhere but can no longer be edited. Undoable until saved. Params: Merge comment and/or form field appearances into the page content, so they print and display everywhere but can no longer be edited. Undoable until saved. Changes the document. */
806
+ "doc_flatten": {
807
+ comments?: boolean; /** Flatten form fields. Default: true, or the opposite of comments when only comments is given. */
808
+ fields?: boolean;
809
+ };
810
+ /** Undo. Undo the last edit of a document in one undo history: the person's or the agents' (scope), else that of who runs the tool. Params: Undo the last edit of a document in one undo history: the person's or the agents' (scope), else that of who runs the tool. Changes the document. */
811
+ "edit.undo": {
812
+ scope?: "person" | "agent";
813
+ };
814
+ /** Redo. Redo the last undone edit of a document in one undo history: the person's or the agents' (scope), else that of who runs the tool. Params: Redo the last undone edit of a document in one undo history: the person's or the agents' (scope), else that of who runs the tool. Changes the document. */
815
+ "edit.redo": {
816
+ scope?: "person" | "agent";
817
+ };
818
+ /** Inspect open documents. With doc, return doc_info; otherwise return information for every open document (empty documents array when none are open). Params: With doc, return doc_info; otherwise return information for every open document (empty documents array when none are open). */
819
+ "doc_inspect": Record<string, never>;
820
+ /** Render a preview. Render a PNG bounded by max_side (default 1024), without changing or saving the document. Page defaults to 1; doc may be omitted when exactly one document is open. Params: Render a PNG bounded by max_side (default 1024), without changing or saving the document. Page defaults to 1; doc may be omitted when exactly one document is open. */
821
+ "render_preview": {
822
+ max_side?: number; /** (minimum 1) */
823
+ page?: number;
824
+ };
825
+ }
826
+ /** A Pdf file opened with `openDocument<Pdf, PdfCommands>`. */
827
+ export type PdfDocument = ModelDocument<Pdf, PdfCommands>;
828
+ export type PdfContext = RequestContext<Pdf, PdfCommands>;
829
+ export {};