@beyondwork/xlsx-substrate-bindings 0.0.0-stage → 0.2.0
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.
- package/LICENSE.md +31 -0
- package/README.md +135 -2
- package/dist/ai/agent-metadata.d.ts +363 -0
- package/dist/ai/agent-metadata.js +227 -0
- package/dist/ai/index.d.ts +6 -0
- package/dist/ai/index.js +7 -0
- package/dist/ai/mutation-bridge.d.ts +82 -0
- package/dist/ai/mutation-bridge.js +179 -0
- package/dist/ai/types.d.ts +765 -0
- package/dist/ai/types.js +23 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +90 -0
- package/dist/runtime/index.d.ts +2 -0
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/types.d.ts +1435 -0
- package/dist/runtime/types.js +15 -0
- package/dist/shared.d.ts +69 -0
- package/dist/shared.js +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/types.d.ts +765 -0
- package/dist/ui/types.js +12 -0
- package/dist/wasm/ai-session-bridge.d.ts +97 -0
- package/dist/wasm/ai-session-bridge.js +154 -0
- package/dist/wasm/bridge-contract.d.ts +643 -0
- package/dist/wasm/bridge-contract.js +1001 -0
- package/dist/wasm/index.d.ts +50 -0
- package/dist/wasm/index.js +297 -0
- package/dist/wasm/memory-budget.d.ts +77 -0
- package/dist/wasm/memory-budget.js +532 -0
- package/dist/wasm/runtime-guard.d.ts +141 -0
- package/dist/wasm/runtime-guard.js +373 -0
- package/dist/wasm/session-router.d.ts +98 -0
- package/dist/wasm/session-router.js +184 -0
- package/dist/wasm/sheet-window-binary-reference.d.ts +9 -0
- package/dist/wasm/sheet-window-binary-reference.js +308 -0
- package/dist/wasm/sheet-window-binary.d.ts +279 -0
- package/dist/wasm/sheet-window-binary.js +636 -0
- package/dist/wasm/web.d.ts +72 -0
- package/dist/wasm/web.js +142 -0
- package/generated/wasm-web/package.json +3 -0
- package/generated/wasm-web/snippets/ironcalc_base-89b4f49381e1e289/inline0.js +42 -0
- package/generated/wasm-web/xlsx_substrate_wasm.d.ts +532 -0
- package/generated/wasm-web/xlsx_substrate_wasm.js +2493 -0
- package/generated/wasm-web/xlsx_substrate_wasm_bg.wasm +0 -0
- package/generated/wasm-web/xlsx_substrate_wasm_bg.wasm.d.ts +120 -0
- package/package.json +55 -3
|
@@ -0,0 +1,1435 @@
|
|
|
1
|
+
import type { XlsxBlocker, XlsxCellAddress, XlsxCellRange, XlsxReadbackEnvelope, XlsxRuntimeActor, XlsxScopeHandle } from "../shared.ts";
|
|
2
|
+
export type XlsxRuntimeCommandVerdict = "applied" | "applied-with-warnings" | "blocked" | "refused";
|
|
3
|
+
export interface XlsxFormulaCommitRequest {
|
|
4
|
+
readonly handle?: XlsxScopeHandle;
|
|
5
|
+
readonly targetAddress?: XlsxFormulaCommitTargetAddress;
|
|
6
|
+
readonly formulaText: string;
|
|
7
|
+
readonly actor?: XlsxRuntimeActor;
|
|
8
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
9
|
+
}
|
|
10
|
+
export interface XlsxFormulaCommitTargetAddress {
|
|
11
|
+
readonly sheetId: string;
|
|
12
|
+
readonly address: XlsxCellAddress;
|
|
13
|
+
}
|
|
14
|
+
export interface XlsxFormulaCommitResult {
|
|
15
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
16
|
+
readonly exportedBytes?: Uint8Array;
|
|
17
|
+
readonly cell?: XlsxRuntimeCellReadback;
|
|
18
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
19
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
20
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
21
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
22
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
23
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
24
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
25
|
+
}
|
|
26
|
+
export interface XlsxFormulaRecalculateRequest {
|
|
27
|
+
readonly actor?: XlsxRuntimeActor;
|
|
28
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
29
|
+
/** Explicit clock and RNG seed for volatile formulas on both recalculation paths. */
|
|
30
|
+
readonly volatileInputs?: XlsxSessionVolatileInputs;
|
|
31
|
+
}
|
|
32
|
+
export interface XlsxFormulaRecalculateResult {
|
|
33
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
34
|
+
readonly exportedBytes?: Uint8Array;
|
|
35
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
36
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
37
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
38
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
39
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
40
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
41
|
+
/** Present only on `recalculateInSession` results. */
|
|
42
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* T1 (runtime-session-mutations-v1): session receipt riding every
|
|
46
|
+
* `*InSession` result — a strict superset of the byte-based result DTOs.
|
|
47
|
+
*/
|
|
48
|
+
export interface XlsxRuntimeSessionMutationReceipt {
|
|
49
|
+
readonly handleId: string;
|
|
50
|
+
readonly revision: number;
|
|
51
|
+
/**
|
|
52
|
+
* Session identity (identity-v2): an opaque commit-chain value that
|
|
53
|
+
* advances on every applied mutation and is unchanged by refused commits
|
|
54
|
+
* and read-only operations. Every `canonicalHash` readback field emitted
|
|
55
|
+
* at the same session revision carries this same value (single-accessor
|
|
56
|
+
* sourcing), so cross-surface comparisons are equality checks. Compare for
|
|
57
|
+
* equality/advancement only — never parse, decode, or recompute it as a
|
|
58
|
+
* state hash. The full canonical state SHA survives only on
|
|
59
|
+
* `XlsxRuntimeSessionExportResult.canonicalHash` (export integrity) and
|
|
60
|
+
* the explicit integrity readback.
|
|
61
|
+
*/
|
|
62
|
+
readonly canonicalHash: string;
|
|
63
|
+
readonly dirtyCellCount: number;
|
|
64
|
+
readonly recalc: "deferred" | "dirty" | "full" | "none";
|
|
65
|
+
readonly evaluatedCellCount?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Present while the session's keep-alive calculation graph is dropped:
|
|
68
|
+
* the incremental-maintenance refusal (or structural-mutation) reason.
|
|
69
|
+
* Sessions in this state serve `recalc: "full"` until a full
|
|
70
|
+
* recalculation rebuilds the graph; surface this to diagnose permanently
|
|
71
|
+
* degraded workbooks.
|
|
72
|
+
*/
|
|
73
|
+
readonly graphDegradedReason?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface XlsxSessionVolatileInputs {
|
|
76
|
+
/** UTC epoch milliseconds, represented as a safe integer. */
|
|
77
|
+
readonly epochMillisUtc: number;
|
|
78
|
+
/** Non-negative safe integer; reuse it to replay the same random values. */
|
|
79
|
+
readonly randomSeed: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* `recalculateInSession` request: the byte-based recalculate request plus an
|
|
83
|
+
* optional mode ("dirty" default, or "full").
|
|
84
|
+
*/
|
|
85
|
+
export interface XlsxSessionRecalculateRequest extends XlsxFormulaRecalculateRequest {
|
|
86
|
+
readonly mode?: "dirty" | "full";
|
|
87
|
+
}
|
|
88
|
+
export interface XlsxRuntimeSessionExportRequest {
|
|
89
|
+
readonly actor?: XlsxRuntimeActor;
|
|
90
|
+
}
|
|
91
|
+
export interface XlsxRuntimeSessionExportResult {
|
|
92
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
93
|
+
readonly exportedBytes?: Uint8Array;
|
|
94
|
+
/**
|
|
95
|
+
* Full canonical state SHA of the exported bytes — the external integrity
|
|
96
|
+
* contract, and the one `canonicalHash` field that keeps state-hash
|
|
97
|
+
* semantics under identity-v2. The riding `session.canonicalHash` carries
|
|
98
|
+
* the opaque session identity instead.
|
|
99
|
+
*/
|
|
100
|
+
readonly canonicalHash: string;
|
|
101
|
+
readonly session: XlsxRuntimeSessionMutationReceipt;
|
|
102
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
103
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* X5-U-012: a delimited-text (CSV/TSV) export of one sheet.
|
|
107
|
+
*
|
|
108
|
+
* Values only, by contract: a delimited file carries no styles, no formulas,
|
|
109
|
+
* no second sheet and no defined names. What the format cannot carry comes
|
|
110
|
+
* back on `refusals`, so a surface can say so before the user opens the file
|
|
111
|
+
* somewhere else. What the export must not be allowed to produce comes back as
|
|
112
|
+
* a refused `verdict` with `blockers`: the walk is bounded on the range it
|
|
113
|
+
* would EMIT, so a workbook whose used range spans the grid — two cells at
|
|
114
|
+
* opposite corners is enough — is refused rather than turned into gigabytes
|
|
115
|
+
* of delimiters.
|
|
116
|
+
*/
|
|
117
|
+
export interface XlsxRuntimeSessionDelimitedExportRequest {
|
|
118
|
+
readonly dialect?: "csv" | "tsv";
|
|
119
|
+
/**
|
|
120
|
+
* The sheet to export, by opaque id — what a UI should send.
|
|
121
|
+
*
|
|
122
|
+
* A delimited file holds ONE sheet, so this is the whole content of the
|
|
123
|
+
* download. An id survives a tab move and a tab delete; an ordinal does not,
|
|
124
|
+
* and a stale ordinal is still a VALID ordinal pointing at different data.
|
|
125
|
+
*/
|
|
126
|
+
readonly sheetId?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Zero-based ordinal, for a caller that genuinely means a position. Ignored
|
|
129
|
+
* when `sheetId` is given. With neither, the export falls to the first
|
|
130
|
+
* sheet — which may be a hidden sheet the user has never seen, so a UI must
|
|
131
|
+
* send `sheetId` rather than relying on this.
|
|
132
|
+
*/
|
|
133
|
+
readonly sheetIndex?: number;
|
|
134
|
+
readonly actor?: XlsxRuntimeActor;
|
|
135
|
+
}
|
|
136
|
+
export interface XlsxDelimitedExportRefusal {
|
|
137
|
+
readonly code: string;
|
|
138
|
+
/** The engine's log wording. A surface writes its own sentence from `code`
|
|
139
|
+
* and `count` rather than showing this. */
|
|
140
|
+
readonly detail: string;
|
|
141
|
+
/** Cells for the cell-counting notes; sheets in the workbook for
|
|
142
|
+
* `delimited-single-sheet-only`. */
|
|
143
|
+
readonly count: number;
|
|
144
|
+
}
|
|
145
|
+
export interface XlsxRuntimeSessionDelimitedExportResult {
|
|
146
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
147
|
+
/** Absent on a refusal: there is no partial text to hand back. */
|
|
148
|
+
readonly text?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The sheet that is actually in the file, RESOLVED — not the request echoed
|
|
151
|
+
* back. Absent on a refusal, because no sheet was exported.
|
|
152
|
+
*/
|
|
153
|
+
readonly sheetId?: string;
|
|
154
|
+
readonly sheetIndex?: number;
|
|
155
|
+
readonly sheetName?: string;
|
|
156
|
+
readonly dialect: "csv" | "tsv";
|
|
157
|
+
/** Records written — the used range, not the count of populated rows. */
|
|
158
|
+
readonly rowCount: number;
|
|
159
|
+
readonly columnCount: number;
|
|
160
|
+
/** Cells that carried a value. */
|
|
161
|
+
readonly cellCount: number;
|
|
162
|
+
/** Fields written: `rowCount * columnCount`. */
|
|
163
|
+
readonly emittedCellCount: number;
|
|
164
|
+
readonly byteCount: number;
|
|
165
|
+
readonly refusals: readonly XlsxDelimitedExportRefusal[];
|
|
166
|
+
readonly session: XlsxRuntimeSessionMutationReceipt;
|
|
167
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
168
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
169
|
+
}
|
|
170
|
+
export interface XlsxRangeFillCommitRequest {
|
|
171
|
+
readonly sourceHandle: XlsxScopeHandle;
|
|
172
|
+
readonly sheetId: string;
|
|
173
|
+
readonly targetRange: XlsxCellRange;
|
|
174
|
+
/**
|
|
175
|
+
* X5-U-003 autofill mode. `"copy"` (default) repeats the source value;
|
|
176
|
+
* `"series"` extends a linear numeric/date series from the source along
|
|
177
|
+
* the fill axis. Non-numeric sources fall back to a repeat.
|
|
178
|
+
*/
|
|
179
|
+
readonly fillMode?: "copy" | "series";
|
|
180
|
+
readonly actor?: XlsxRuntimeActor;
|
|
181
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
182
|
+
}
|
|
183
|
+
export interface XlsxRangeFillCommitResult {
|
|
184
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
185
|
+
readonly exportedBytes?: Uint8Array;
|
|
186
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
187
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
188
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
189
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
190
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
191
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
192
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
193
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* X5-U-011: whether a range write is checked against the typed data
|
|
197
|
+
* validation governing each cell. `"enforce"` (the default) is a direct user
|
|
198
|
+
* entry — Excel validates typing; `"bypass"` is a clipboard paste, which Excel
|
|
199
|
+
* does not validate. The invalid-data marker still reports the cells.
|
|
200
|
+
*/
|
|
201
|
+
export type XlsxDataValidationEntryMode = "enforce" | "bypass";
|
|
202
|
+
export interface XlsxRangePasteCommitRequest {
|
|
203
|
+
readonly sourceHandle?: XlsxScopeHandle;
|
|
204
|
+
readonly targetHandle?: XlsxScopeHandle;
|
|
205
|
+
readonly targetAddress?: XlsxFormulaCommitTargetAddress;
|
|
206
|
+
readonly sheetId: string;
|
|
207
|
+
readonly clipboardText: string;
|
|
208
|
+
readonly actor?: XlsxRuntimeActor;
|
|
209
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
210
|
+
/** X5-U-011 (bridge v31). Absent = `"enforce"`. */
|
|
211
|
+
readonly dataValidation?: XlsxDataValidationEntryMode;
|
|
212
|
+
}
|
|
213
|
+
export interface XlsxRangePasteCommitResult {
|
|
214
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
215
|
+
readonly exportedBytes?: Uint8Array;
|
|
216
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
217
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
218
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
219
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
220
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
221
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
222
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
223
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
224
|
+
}
|
|
225
|
+
export type XlsxRangeTransferMode = "move" | "copy";
|
|
226
|
+
export interface XlsxRangeTransferCommitRequest {
|
|
227
|
+
readonly sourceHandle: XlsxScopeHandle;
|
|
228
|
+
readonly sheetId: string;
|
|
229
|
+
readonly targetRange: XlsxCellRange;
|
|
230
|
+
readonly mode?: XlsxRangeTransferMode;
|
|
231
|
+
readonly actor?: XlsxRuntimeActor;
|
|
232
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
233
|
+
}
|
|
234
|
+
export interface XlsxRangeTransferCommitResult {
|
|
235
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
236
|
+
readonly exportedBytes?: Uint8Array;
|
|
237
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
238
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
239
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
240
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
241
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
242
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
243
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
244
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* X5-U-006 insert/delete cells with shift. Insert pushes existing cells
|
|
248
|
+
* right or down; delete pulls later cells left or up. The runtime refuses a
|
|
249
|
+
* mismatched operation/direction pair typed (`invalid-payload-shape`).
|
|
250
|
+
*/
|
|
251
|
+
export type XlsxShiftCellsOperation = "insert-cells" | "delete-cells";
|
|
252
|
+
export type XlsxShiftCellsDirection = "shift-right" | "shift-down" | "shift-left" | "shift-up";
|
|
253
|
+
export interface XlsxShiftCellsCommitRequest {
|
|
254
|
+
readonly sheetId: string;
|
|
255
|
+
readonly range: XlsxCellRange;
|
|
256
|
+
readonly operation: XlsxShiftCellsOperation;
|
|
257
|
+
readonly direction: XlsxShiftCellsDirection;
|
|
258
|
+
readonly actor?: XlsxRuntimeActor;
|
|
259
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
260
|
+
}
|
|
261
|
+
export interface XlsxShiftCellsCommitResult {
|
|
262
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
263
|
+
readonly exportedBytes?: Uint8Array;
|
|
264
|
+
readonly sheetId: string;
|
|
265
|
+
readonly range: XlsxCellRange;
|
|
266
|
+
readonly operation: XlsxShiftCellsOperation;
|
|
267
|
+
readonly direction: XlsxShiftCellsDirection;
|
|
268
|
+
/** Every cell the rewritten band touched (the moved strip plus the vacated cells). */
|
|
269
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
270
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
271
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
272
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
273
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
274
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
275
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
276
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
277
|
+
}
|
|
278
|
+
export interface XlsxRangeClearCommitRequest {
|
|
279
|
+
readonly targetHandle?: XlsxScopeHandle;
|
|
280
|
+
readonly targetAddress?: XlsxFormulaCommitTargetAddress;
|
|
281
|
+
readonly sheetId?: string;
|
|
282
|
+
readonly actor?: XlsxRuntimeActor;
|
|
283
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
284
|
+
}
|
|
285
|
+
export interface XlsxRangeClearCommitResult {
|
|
286
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
287
|
+
readonly exportedBytes?: Uint8Array;
|
|
288
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
289
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
290
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
291
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
292
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
293
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
294
|
+
/** Present only on `commitRangeClearInSession` results. */
|
|
295
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
296
|
+
}
|
|
297
|
+
export type XlsxRangeNumberFormatPreset = "general" | "number" | "percent" | "currency" | "accounting" | "date" | "time" | "scientific" | "fraction" | "text";
|
|
298
|
+
/**
|
|
299
|
+
* X5-U-008 cell-appearance authoring wire shape, shared by the range and
|
|
300
|
+
* selection-set format requests. Colours are `#RRGGBB`; the clear sentinels are
|
|
301
|
+
* `"none"` (fill), `"automatic"` (font colour), `"default"` (alignment), and the
|
|
302
|
+
* empty string (font family/size). Absent fields leave the cell unchanged.
|
|
303
|
+
*/
|
|
304
|
+
export interface XlsxRangeAppearanceEdit {
|
|
305
|
+
/** Solid fill `#RRGGBB`, or `"none"` to clear the fill. */
|
|
306
|
+
readonly fillColor?: string;
|
|
307
|
+
/** Font colour `#RRGGBB`, or `"automatic"` to clear it. */
|
|
308
|
+
readonly fontColor?: string;
|
|
309
|
+
/** Font family name, or `""` to reset to the default family. */
|
|
310
|
+
readonly fontFamily?: string;
|
|
311
|
+
/** Font size in points (1-409), or `""` to reset to the default size. */
|
|
312
|
+
readonly fontSizePoints?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Horizontal alignment, or `"default"` to clear the override. X5-U-008 (iii)
|
|
315
|
+
* adds `justify` / `distributed` (bridge v29): both lay text out on several
|
|
316
|
+
* lines like `wrapText` and spread the words to the cell width.
|
|
317
|
+
*/
|
|
318
|
+
readonly horizontalAlignment?: XlsxRangeHorizontalAlignmentEdit;
|
|
319
|
+
/** Vertical alignment, or `"default"` to clear the override. */
|
|
320
|
+
readonly verticalAlignment?: "top" | "middle" | "bottom" | "default";
|
|
321
|
+
readonly wrapText?: boolean;
|
|
322
|
+
readonly borders?: XlsxRangeBorderEdit;
|
|
323
|
+
}
|
|
324
|
+
export type XlsxRangeHorizontalAlignmentEdit = "left" | "center" | "right" | "justify" | "distributed" | "default";
|
|
325
|
+
/**
|
|
326
|
+
* ECMA-376 `ST_BorderStyle` values minus `none` (an absent edge is not a
|
|
327
|
+
* style). Tokens are the attribute values verbatim, camelCase included.
|
|
328
|
+
* X5-U-008 (iii, item 4), bridge v29.
|
|
329
|
+
*/
|
|
330
|
+
export type XlsxBorderStyle = "thin" | "medium" | "thick" | "hair" | "dashed" | "dotted" | "double" | "dashDot" | "dashDotDot" | "mediumDashed" | "mediumDashDot" | "mediumDashDotDot" | "slantDashDot";
|
|
331
|
+
export declare const XLSX_BORDER_STYLES: readonly XlsxBorderStyle[];
|
|
332
|
+
/**
|
|
333
|
+
* X5-U-008 border authoring. `all` draws every edge on each targeted cell,
|
|
334
|
+
* `clear` removes every edge, and `edges` sets exactly the named edges. `color`
|
|
335
|
+
* is the resolved `#RRGGBB` (default black when omitted); `style` is the line
|
|
336
|
+
* style applied to the drawn edges (`thin` when omitted — what Excel's plain
|
|
337
|
+
* border-menu entries apply; `medium`/`thick`/`double` are its "Thick Box",
|
|
338
|
+
* "Thick Bottom" and "Double Bottom" entries). An unknown token refuses.
|
|
339
|
+
*/
|
|
340
|
+
export interface XlsxRangeBorderEdit {
|
|
341
|
+
readonly kind: "all" | "clear" | "edges";
|
|
342
|
+
readonly top?: boolean;
|
|
343
|
+
readonly right?: boolean;
|
|
344
|
+
readonly bottom?: boolean;
|
|
345
|
+
readonly left?: boolean;
|
|
346
|
+
readonly color?: string;
|
|
347
|
+
readonly style?: XlsxBorderStyle;
|
|
348
|
+
}
|
|
349
|
+
export interface XlsxRangeFormatCommitRequest extends XlsxRangeAppearanceEdit {
|
|
350
|
+
readonly targetHandle?: XlsxScopeHandle;
|
|
351
|
+
readonly targetAddress?: XlsxFormulaCommitTargetAddress;
|
|
352
|
+
readonly sheetId?: string;
|
|
353
|
+
readonly bold?: boolean;
|
|
354
|
+
readonly italic?: boolean;
|
|
355
|
+
readonly underline?: boolean;
|
|
356
|
+
readonly numberFormat?: XlsxRangeNumberFormatPreset;
|
|
357
|
+
/**
|
|
358
|
+
* X5-U-007: an arbitrary authored ECMA-376 format code (e.g. `#,##0.000` or a
|
|
359
|
+
* currency/date custom code). Validated against the display engine's parser;
|
|
360
|
+
* an unrenderable code refuses the commit. Wins over `numberFormat`.
|
|
361
|
+
*/
|
|
362
|
+
readonly numberFormatCode?: string;
|
|
363
|
+
readonly actor?: XlsxRuntimeActor;
|
|
364
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
365
|
+
}
|
|
366
|
+
export interface XlsxSelectionSetPasteCommitRequest {
|
|
367
|
+
readonly selectionSetHandles: readonly XlsxScopeHandle[];
|
|
368
|
+
readonly sheetId?: string;
|
|
369
|
+
readonly clipboardText: string;
|
|
370
|
+
readonly actor?: XlsxRuntimeActor;
|
|
371
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
372
|
+
/** X5-U-011 (bridge v31). Absent = `"enforce"`. */
|
|
373
|
+
readonly dataValidation?: XlsxDataValidationEntryMode;
|
|
374
|
+
}
|
|
375
|
+
export interface XlsxSelectionSetClearCommitRequest {
|
|
376
|
+
readonly selectionSetHandles: readonly XlsxScopeHandle[];
|
|
377
|
+
readonly sheetId?: string;
|
|
378
|
+
readonly actor?: XlsxRuntimeActor;
|
|
379
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
380
|
+
}
|
|
381
|
+
export interface XlsxSelectionSetFormatCommitRequest extends XlsxRangeAppearanceEdit {
|
|
382
|
+
readonly selectionSetHandles: readonly XlsxScopeHandle[];
|
|
383
|
+
readonly sheetId?: string;
|
|
384
|
+
readonly bold?: boolean;
|
|
385
|
+
readonly italic?: boolean;
|
|
386
|
+
readonly underline?: boolean;
|
|
387
|
+
readonly numberFormat?: XlsxRangeNumberFormatPreset;
|
|
388
|
+
/** X5-U-007: an authored ECMA-376 format code (validated in the runtime). */
|
|
389
|
+
readonly numberFormatCode?: string;
|
|
390
|
+
readonly actor?: XlsxRuntimeActor;
|
|
391
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
392
|
+
}
|
|
393
|
+
export interface XlsxRangeFormatCommitResult {
|
|
394
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
395
|
+
readonly exportedBytes?: Uint8Array;
|
|
396
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
397
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
398
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
399
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
400
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
401
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
402
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
403
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* X5-U-009 hyperlink authoring. `operation: "clear"` removes any link the
|
|
407
|
+
* target cells carry; `"set"` (the default) attaches one. The destination is
|
|
408
|
+
* re-validated runtime-side against the same allowlist the product surface
|
|
409
|
+
* uses (`http`/`https`/`mailto` for `external`, a `Sheet1!B2`-style reference
|
|
410
|
+
* or a defined name for `internal`), so a caller that skips the UI cannot
|
|
411
|
+
* write an unsafe target.
|
|
412
|
+
*/
|
|
413
|
+
export type XlsxRangeHyperlinkKind = "internal" | "external";
|
|
414
|
+
export interface XlsxRangeHyperlinkCommitRequest {
|
|
415
|
+
readonly targetHandle?: XlsxScopeHandle;
|
|
416
|
+
readonly targetAddress?: XlsxFormulaCommitTargetAddress;
|
|
417
|
+
readonly sheetId?: string;
|
|
418
|
+
readonly operation?: "set" | "clear";
|
|
419
|
+
readonly kind?: XlsxRangeHyperlinkKind;
|
|
420
|
+
readonly target?: string;
|
|
421
|
+
readonly display?: string;
|
|
422
|
+
readonly tooltip?: string;
|
|
423
|
+
readonly actor?: XlsxRuntimeActor;
|
|
424
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
425
|
+
}
|
|
426
|
+
export interface XlsxRangeHyperlinkCommitResult {
|
|
427
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
428
|
+
readonly exportedBytes?: Uint8Array;
|
|
429
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
430
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
431
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
432
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
433
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
434
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
435
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
436
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* X5-U-011 data-validation authoring (`data.validation`, bridge v31; v32
|
|
440
|
+
* adds `any`, `time` and `operator`). `operation: "clear"` removes every
|
|
441
|
+
* typed rule over the target range; `"set"` (the default) authors one. Rule
|
|
442
|
+
* shape is validated runtime-side (bounds ordered, list source a range or
|
|
443
|
+
* name, inline list within Excel's 255-character source cap), so a caller
|
|
444
|
+
* that skips the dialog is refused typed. Date bounds may be ISO
|
|
445
|
+
* `YYYY-MM-DD` and time bounds `HH:MM[:SS]`; the runtime stores serials.
|
|
446
|
+
* `any` is Excel's "Any value": no check, the rule carries the prompt.
|
|
447
|
+
*/
|
|
448
|
+
export type XlsxDataValidationRuleType = "any" | "list" | "whole" | "decimal" | "date" | "time" | "textLength" | "custom";
|
|
449
|
+
/**
|
|
450
|
+
* OOXML `operator` for the comparison kinds (`whole`, `decimal`, `date`,
|
|
451
|
+
* `time`, `textLength`). `between` (the default) and `notBetween` read
|
|
452
|
+
* `minimum` and `maximum`; every other operator reads `minimum` alone.
|
|
453
|
+
*/
|
|
454
|
+
export type XlsxDataValidationOperator = "between" | "notBetween" | "equal" | "notEqual" | "greaterThan" | "lessThan" | "greaterThanOrEqual" | "lessThanOrEqual";
|
|
455
|
+
export type XlsxDataValidationErrorStyle = "stop" | "warning" | "information";
|
|
456
|
+
export interface XlsxRangeDataValidationTargetRange {
|
|
457
|
+
readonly sheetId: string;
|
|
458
|
+
readonly range: XlsxCellRange;
|
|
459
|
+
}
|
|
460
|
+
export interface XlsxRangeDataValidationCommitRequest {
|
|
461
|
+
readonly targetHandle?: XlsxScopeHandle;
|
|
462
|
+
readonly targetAddress?: XlsxFormulaCommitTargetAddress;
|
|
463
|
+
readonly targetRange?: XlsxRangeDataValidationTargetRange;
|
|
464
|
+
readonly sheetId?: string;
|
|
465
|
+
readonly operation?: "set" | "clear";
|
|
466
|
+
readonly ruleType?: XlsxDataValidationRuleType;
|
|
467
|
+
/** Comparison kinds only; absent = `between`. */
|
|
468
|
+
readonly operator?: XlsxDataValidationOperator;
|
|
469
|
+
/** `list`: inline items (exactly one of `values` / `source`). */
|
|
470
|
+
readonly values?: readonly string[];
|
|
471
|
+
/** `list`: a range or defined-name source; `custom`: the boolean formula. */
|
|
472
|
+
readonly source?: string;
|
|
473
|
+
readonly minimum?: string;
|
|
474
|
+
readonly maximum?: string;
|
|
475
|
+
readonly allowBlank?: boolean;
|
|
476
|
+
readonly errorStyle?: XlsxDataValidationErrorStyle;
|
|
477
|
+
readonly errorTitle?: string;
|
|
478
|
+
readonly errorMessage?: string;
|
|
479
|
+
/** Default true. False makes the rule inspect-only, as in Excel. */
|
|
480
|
+
readonly showErrorMessage?: boolean;
|
|
481
|
+
readonly promptTitle?: string;
|
|
482
|
+
readonly prompt?: string;
|
|
483
|
+
readonly showInputMessage?: boolean;
|
|
484
|
+
/** Default false (in-cell dropdown shown for list rules). */
|
|
485
|
+
readonly hideDropdown?: boolean;
|
|
486
|
+
readonly actor?: XlsxRuntimeActor;
|
|
487
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
488
|
+
}
|
|
489
|
+
export interface XlsxRangeDataValidationCommitResult {
|
|
490
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
491
|
+
readonly exportedBytes?: Uint8Array;
|
|
492
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
493
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
494
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
495
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
496
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
497
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
498
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* X5-U-010b `review.comment` (bridge v33): the six verbs on ONE cell's
|
|
502
|
+
* comment thread. `create` with `threaded: false` writes a classic note
|
|
503
|
+
* (Excel's "New Note"); every other shape is the modern threaded model.
|
|
504
|
+
*/
|
|
505
|
+
export type XlsxReviewCommentVerb = "create" | "edit" | "reply" | "resolve" | "reopen" | "delete";
|
|
506
|
+
export interface XlsxReviewCommentCommitRequest {
|
|
507
|
+
readonly targetHandle?: XlsxScopeHandle;
|
|
508
|
+
readonly targetAddress?: XlsxFormulaCommitTargetAddress;
|
|
509
|
+
readonly sheetId?: string;
|
|
510
|
+
readonly verb: XlsxReviewCommentVerb;
|
|
511
|
+
/** Body text for `create` / `edit`; the reply text for `reply`. */
|
|
512
|
+
readonly text?: string;
|
|
513
|
+
/** `create` only; default true (threaded comment). */
|
|
514
|
+
readonly threaded?: boolean;
|
|
515
|
+
/** Display name of the acting person; required for `create` / `reply`. */
|
|
516
|
+
readonly author?: string;
|
|
517
|
+
/** ISO-8601 instant of the action; required for `create` / `reply`. */
|
|
518
|
+
readonly timestamp?: string;
|
|
519
|
+
readonly actor?: XlsxRuntimeActor;
|
|
520
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
521
|
+
}
|
|
522
|
+
export interface XlsxReviewCommentCommitResult {
|
|
523
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
524
|
+
readonly exportedBytes?: Uint8Array;
|
|
525
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
526
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
527
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
528
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
529
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
530
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
531
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* X5-U-038 `edit.find` (bridge v34): Excel's Find over the CANONICAL
|
|
535
|
+
* workbook. The runtime walks the cell store of the current sheet (or every
|
|
536
|
+
* visible sheet), so matches outside the loaded window and on other sheets
|
|
537
|
+
* are found; a client scan of the projected window would inherit X5-U-026's
|
|
538
|
+
* off-window blindness and is exactly what this request replaces.
|
|
539
|
+
*/
|
|
540
|
+
export type XlsxFindLookIn = "values" | "formulas";
|
|
541
|
+
export type XlsxFindScope = "sheet" | "workbook";
|
|
542
|
+
export interface XlsxFindRequest {
|
|
543
|
+
/** Excel's "Find what"; `?` one char, `*` a run, `~` escapes. */
|
|
544
|
+
readonly query: string;
|
|
545
|
+
/** Default `values` (the displayed text); `formulas` matches formula text. */
|
|
546
|
+
readonly lookIn?: XlsxFindLookIn;
|
|
547
|
+
/** Default `sheet`. */
|
|
548
|
+
readonly scope?: XlsxFindScope;
|
|
549
|
+
/** The sheet a `sheet` scope searches; defaults to the bound active sheet. */
|
|
550
|
+
readonly sheetId?: string;
|
|
551
|
+
readonly matchCase?: boolean;
|
|
552
|
+
readonly matchEntireCell?: boolean;
|
|
553
|
+
}
|
|
554
|
+
export type XlsxFindMatchKind = "value" | "formula";
|
|
555
|
+
export interface XlsxFindMatch {
|
|
556
|
+
readonly sheetId: string;
|
|
557
|
+
readonly sheetName: string;
|
|
558
|
+
readonly address: XlsxCellAddress;
|
|
559
|
+
/** `AJ106`-style label. */
|
|
560
|
+
readonly addressLabel: string;
|
|
561
|
+
readonly cellId: string;
|
|
562
|
+
/**
|
|
563
|
+
* The marker-backed cell handle the selection read / `interact` take, so a
|
|
564
|
+
* host moves the runtime selection to the match through the selection
|
|
565
|
+
* command and the grid readback and formula bar follow.
|
|
566
|
+
*/
|
|
567
|
+
readonly selectionHandle: XlsxScopeHandle;
|
|
568
|
+
readonly matchedText: string;
|
|
569
|
+
readonly kind: XlsxFindMatchKind;
|
|
570
|
+
}
|
|
571
|
+
export interface XlsxFindQueryEcho {
|
|
572
|
+
readonly query: string;
|
|
573
|
+
readonly lookIn: XlsxFindLookIn;
|
|
574
|
+
readonly scope: XlsxFindScope;
|
|
575
|
+
readonly sheetId?: string;
|
|
576
|
+
readonly matchCase: boolean;
|
|
577
|
+
readonly matchEntireCell: boolean;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* `found` carries the ordered matches (sheet tab order, then row, then
|
|
581
|
+
* column) and the count facts: `totalMatchCount` is every match the scan saw,
|
|
582
|
+
* `truncated` says the list stops at `ceiling`. Zero matches is `found` with
|
|
583
|
+
* an empty list. `refused` is the typed refusal of the query itself (empty,
|
|
584
|
+
* over-long, unknown sheet).
|
|
585
|
+
*/
|
|
586
|
+
export interface XlsxFindResult {
|
|
587
|
+
readonly status: "found" | "refused";
|
|
588
|
+
readonly query?: XlsxFindQueryEcho;
|
|
589
|
+
readonly matches: readonly XlsxFindMatch[];
|
|
590
|
+
readonly totalMatchCount: number;
|
|
591
|
+
readonly truncated: boolean;
|
|
592
|
+
readonly ceiling: number;
|
|
593
|
+
readonly scannedCellCount: number;
|
|
594
|
+
readonly scannedSheetIds: readonly string[];
|
|
595
|
+
readonly skippedHiddenSheetIds: readonly string[];
|
|
596
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* X5-U-023 `navigation.name-box` (bridge v35): what the name box was given
|
|
600
|
+
* and the sheet the grid is looking at. Unqualified references and
|
|
601
|
+
* sheet-scoped defined names resolve against `sheetId`; it defaults to the
|
|
602
|
+
* bound active sheet.
|
|
603
|
+
*/
|
|
604
|
+
export interface XlsxGoToRequest {
|
|
605
|
+
/** The typed text: `B7`, `B2:D4`, `3:3`, `B:B`, `Sheet2!C3`, a defined name. */
|
|
606
|
+
readonly reference: string;
|
|
607
|
+
readonly sheetId?: string;
|
|
608
|
+
}
|
|
609
|
+
/** `cell` (one cell), `range`, `rows` (whole rows), `columns` (whole columns). */
|
|
610
|
+
export type XlsxGoToTargetKind = "cell" | "range" | "rows" | "columns";
|
|
611
|
+
export interface XlsxGoToDefinedName {
|
|
612
|
+
readonly name: string;
|
|
613
|
+
readonly scope: "workbook" | "sheet";
|
|
614
|
+
readonly sheetId?: string;
|
|
615
|
+
}
|
|
616
|
+
export interface XlsxGoToTarget {
|
|
617
|
+
readonly kind: XlsxGoToTargetKind;
|
|
618
|
+
readonly sheetId: string;
|
|
619
|
+
readonly sheetName: string;
|
|
620
|
+
readonly range: XlsxCellRange;
|
|
621
|
+
/** The stored cell's id at a one-cell target, when the sheet has one. */
|
|
622
|
+
readonly cellId?: string;
|
|
623
|
+
/** `B2:C5`, `3:3`, `B:B`, or `'Sheet 2'!C3` for a target on another sheet. */
|
|
624
|
+
readonly label: string;
|
|
625
|
+
readonly definedName?: XlsxGoToDefinedName;
|
|
626
|
+
/**
|
|
627
|
+
* The handle the selection command (`interact` / the selection read)
|
|
628
|
+
* takes: a marker-backed cell handle for a stored cell, a derived range /
|
|
629
|
+
* row / column handle otherwise. A host moves the runtime selection with
|
|
630
|
+
* it and the grid readback and formula bar follow.
|
|
631
|
+
*/
|
|
632
|
+
readonly selectionHandle: XlsxScopeHandle;
|
|
633
|
+
}
|
|
634
|
+
/**
|
|
635
|
+
* `resolved` carries the target; `refused` the typed blockers
|
|
636
|
+
* (`invalid-payload-shape` for an empty or over-long text,
|
|
637
|
+
* `unresolved-reference` for text that is neither a reference the sheet can
|
|
638
|
+
* hold nor a visible defined name or that names a missing sheet,
|
|
639
|
+
* `name-has-no-range` for a name whose body is not a sheet range).
|
|
640
|
+
*/
|
|
641
|
+
export interface XlsxGoToResult {
|
|
642
|
+
readonly status: "resolved" | "refused";
|
|
643
|
+
readonly reference?: string;
|
|
644
|
+
readonly target?: XlsxGoToTarget;
|
|
645
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
646
|
+
}
|
|
647
|
+
/** X3-R-012: the four `Range.End` directions. */
|
|
648
|
+
export type XlsxDataRegionDirection = "up" | "down" | "left" | "right";
|
|
649
|
+
/**
|
|
650
|
+
* X3-R-012 `navigation.data-region` (bridge v40): the question one of the
|
|
651
|
+
* three chords asks the runtime about the CANONICAL cells.
|
|
652
|
+
*
|
|
653
|
+
* - `edge` (Ctrl+Arrow): `Range.End(direction)` of `active` — the edge of
|
|
654
|
+
* the contiguous filled run, the next filled cell across a blank gap, or
|
|
655
|
+
* the sheet edge when nothing follows.
|
|
656
|
+
* - `extend` (Ctrl+Shift+Arrow): the same edge as the HEAD of a selection
|
|
657
|
+
* kept on `anchor` (defaults to `active`).
|
|
658
|
+
* - `current-region` (Ctrl+A): `Range.CurrentRegion` of `active`, or the
|
|
659
|
+
* whole sheet when `selection` (the range the grid currently holds;
|
|
660
|
+
* defaults to the active cell) already covers that region — Excel's
|
|
661
|
+
* second press, and its first press on a cell whose region is only
|
|
662
|
+
* itself.
|
|
663
|
+
*/
|
|
664
|
+
export interface XlsxDataRegionRequest {
|
|
665
|
+
readonly sheetId?: string;
|
|
666
|
+
readonly active: XlsxCellAddress;
|
|
667
|
+
readonly query: "edge" | "extend" | "current-region";
|
|
668
|
+
readonly direction?: XlsxDataRegionDirection;
|
|
669
|
+
readonly anchor?: XlsxCellAddress;
|
|
670
|
+
readonly selection?: XlsxCellRange;
|
|
671
|
+
}
|
|
672
|
+
/** `cell` (Ctrl+Arrow), `range` (Ctrl+Shift+Arrow, a current region), `sheet` (the whole sheet). */
|
|
673
|
+
export type XlsxDataRegionTargetKind = "cell" | "range" | "sheet";
|
|
674
|
+
export interface XlsxDataRegionTarget {
|
|
675
|
+
readonly kind: XlsxDataRegionTargetKind;
|
|
676
|
+
readonly sheetId: string;
|
|
677
|
+
readonly sheetName: string;
|
|
678
|
+
readonly range: XlsxCellRange;
|
|
679
|
+
/** The stored cell's id at a one-cell target, when the sheet has one. */
|
|
680
|
+
readonly cellId?: string;
|
|
681
|
+
/** `extend` only: the selection's orientation (X5-U-028). */
|
|
682
|
+
readonly anchor?: XlsxCellAddress;
|
|
683
|
+
readonly head?: XlsxCellAddress;
|
|
684
|
+
/** `B3`, `B2:B3`, `A1:C3`, or the sheet name for the whole sheet. */
|
|
685
|
+
readonly label: string;
|
|
686
|
+
/**
|
|
687
|
+
* The handle the selection command takes: a marker-backed cell handle for
|
|
688
|
+
* a stored cell, a derived range handle for a blank cell or a block, a
|
|
689
|
+
* derived sheet handle for the whole sheet.
|
|
690
|
+
*/
|
|
691
|
+
readonly selectionHandle: XlsxScopeHandle;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* `resolved` carries the target; `refused` the typed blockers
|
|
695
|
+
* (`missing-target` for a sheet the workbook does not have,
|
|
696
|
+
* `invalid-payload-shape` for an address off the sheet or an unknown query).
|
|
697
|
+
*/
|
|
698
|
+
export interface XlsxDataRegionResult {
|
|
699
|
+
readonly status: "resolved" | "refused";
|
|
700
|
+
readonly target?: XlsxDataRegionTarget;
|
|
701
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
702
|
+
}
|
|
703
|
+
export type XlsxLayoutMetricAxis = "row" | "column";
|
|
704
|
+
export interface XlsxLayoutMetricResizeRequest {
|
|
705
|
+
readonly sheetId: string;
|
|
706
|
+
readonly index: number;
|
|
707
|
+
readonly targetSizePx: number;
|
|
708
|
+
readonly actor?: XlsxRuntimeActor;
|
|
709
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
710
|
+
}
|
|
711
|
+
export interface XlsxLayoutMetricResizeResult {
|
|
712
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
713
|
+
readonly exportedBytes?: Uint8Array;
|
|
714
|
+
readonly sheetId?: string;
|
|
715
|
+
readonly axis?: XlsxLayoutMetricAxis;
|
|
716
|
+
readonly index?: number;
|
|
717
|
+
readonly value?: string;
|
|
718
|
+
readonly hidden?: boolean;
|
|
719
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
720
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
721
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
722
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
723
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
724
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
725
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
726
|
+
}
|
|
727
|
+
export interface XlsxLayoutMetricVisibilityRequest {
|
|
728
|
+
readonly sheetId: string;
|
|
729
|
+
readonly index: number;
|
|
730
|
+
readonly hidden: boolean;
|
|
731
|
+
readonly actor?: XlsxRuntimeActor;
|
|
732
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
733
|
+
}
|
|
734
|
+
export interface XlsxLayoutMetricVisibilityResult {
|
|
735
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
736
|
+
readonly exportedBytes?: Uint8Array;
|
|
737
|
+
readonly sheetId?: string;
|
|
738
|
+
readonly axis?: XlsxLayoutMetricAxis;
|
|
739
|
+
readonly index?: number;
|
|
740
|
+
readonly value?: string;
|
|
741
|
+
readonly hidden?: boolean;
|
|
742
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
743
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
744
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
745
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
746
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
747
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
748
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* X5-U-004 freeze/unfreeze panes request. `unfreeze: true` clears the pane
|
|
752
|
+
* (splits ignored); otherwise `xSplit`/`ySplit` count the frozen
|
|
753
|
+
* columns/rows and at least one must be positive.
|
|
754
|
+
*/
|
|
755
|
+
export interface XlsxFrozenPaneRequest {
|
|
756
|
+
readonly sheetId: string;
|
|
757
|
+
readonly unfreeze?: boolean;
|
|
758
|
+
readonly xSplit?: number;
|
|
759
|
+
readonly ySplit?: number;
|
|
760
|
+
readonly actor?: XlsxRuntimeActor;
|
|
761
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
762
|
+
}
|
|
763
|
+
export interface XlsxFrozenPaneResult {
|
|
764
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
765
|
+
readonly exportedBytes?: Uint8Array;
|
|
766
|
+
readonly sheetId?: string;
|
|
767
|
+
readonly frozen?: boolean;
|
|
768
|
+
readonly xSplit?: number;
|
|
769
|
+
readonly ySplit?: number;
|
|
770
|
+
readonly topLeftCell?: string;
|
|
771
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
772
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
773
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
774
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
775
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
776
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
777
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* X5-U-037 merge/unmerge cells request. `unmerge: true` removes every merged
|
|
781
|
+
* region wholly inside `range`; otherwise `range` becomes one merged region
|
|
782
|
+
* (the top-left cell keeps its content, every other covered cell's value and
|
|
783
|
+
* formula is discarded — Excel's rule).
|
|
784
|
+
*
|
|
785
|
+
* The confirm is two-phase and runtime-gated. Send a merge WITHOUT
|
|
786
|
+
* `discardCoveredContent`: if it would drop content the runtime refuses with
|
|
787
|
+
* blocker code `merge-discards-content` and the result's `keptCell` /
|
|
788
|
+
* `discardedCells` / `discardedCellCount` name what a confirmed re-send would
|
|
789
|
+
* lose (computed over the canonical sheet, not a window). The host shows the
|
|
790
|
+
* user, then re-sends with `discardCoveredContent: true`. A merge that
|
|
791
|
+
* discards nothing applies on the first send, as Excel does.
|
|
792
|
+
*/
|
|
793
|
+
export interface XlsxMergeCellsRequest {
|
|
794
|
+
readonly sheetId: string;
|
|
795
|
+
readonly range: XlsxCellRange;
|
|
796
|
+
readonly unmerge?: boolean;
|
|
797
|
+
/** The host's confirm that covered-cell content may be discarded. */
|
|
798
|
+
readonly discardCoveredContent?: boolean;
|
|
799
|
+
readonly actor?: XlsxRuntimeActor;
|
|
800
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
801
|
+
}
|
|
802
|
+
export interface XlsxMergeCellsResult {
|
|
803
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
804
|
+
readonly exportedBytes?: Uint8Array;
|
|
805
|
+
readonly sheetId?: string;
|
|
806
|
+
readonly range?: XlsxCellRange;
|
|
807
|
+
/** True after a merge, false after an unmerge; absent when refused. */
|
|
808
|
+
readonly merged?: boolean;
|
|
809
|
+
/** Merge: the one new region. Unmerge: the regions removed. */
|
|
810
|
+
readonly mergedRanges: readonly XlsxCellRange[];
|
|
811
|
+
readonly keptCell?: XlsxCellAddress;
|
|
812
|
+
/**
|
|
813
|
+
* Covered cells whose value or formula the merge discarded (applied), or
|
|
814
|
+
* WOULD discard (refused `merge-discards-content` — the confirm leg).
|
|
815
|
+
*/
|
|
816
|
+
readonly discardedCells: readonly XlsxCellAddress[];
|
|
817
|
+
readonly discardedCellCount?: number;
|
|
818
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
819
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
820
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
821
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
822
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
823
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
824
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
825
|
+
}
|
|
826
|
+
export interface XlsxOutlineGroupVisibilityResult {
|
|
827
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
828
|
+
readonly exportedBytes?: Uint8Array;
|
|
829
|
+
readonly sheetId?: string;
|
|
830
|
+
readonly axis?: XlsxLayoutMetricAxis;
|
|
831
|
+
readonly startIndex?: number;
|
|
832
|
+
readonly endIndex?: number;
|
|
833
|
+
readonly outlineLevel?: number;
|
|
834
|
+
readonly hidden?: boolean;
|
|
835
|
+
readonly summaryIndex?: number;
|
|
836
|
+
readonly summaryCollapsed?: boolean;
|
|
837
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
838
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
839
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
840
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
841
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
842
|
+
/** UX-P-102 P2b: present only on `*InSession` results (strict superset receipt). */
|
|
843
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
844
|
+
}
|
|
845
|
+
export type XlsxOutlineLevelOperation = "group" | "ungroup";
|
|
846
|
+
/**
|
|
847
|
+
* X5-U-005 outline authoring request (Data > Group / Ungroup). Raises
|
|
848
|
+
* (`group`) or lowers (`ungroup`) the outline level of the inclusive
|
|
849
|
+
* `startIndex..=endIndex` span on `axis`.
|
|
850
|
+
*/
|
|
851
|
+
export interface XlsxOutlineLevelRequest {
|
|
852
|
+
readonly sheetId: string;
|
|
853
|
+
readonly axis: XlsxLayoutMetricAxis;
|
|
854
|
+
readonly operation: XlsxOutlineLevelOperation;
|
|
855
|
+
readonly startIndex: number;
|
|
856
|
+
readonly endIndex: number;
|
|
857
|
+
readonly actor?: XlsxRuntimeActor;
|
|
858
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
859
|
+
}
|
|
860
|
+
export interface XlsxOutlineLevelResult {
|
|
861
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
862
|
+
readonly exportedBytes?: Uint8Array;
|
|
863
|
+
readonly sheetId?: string;
|
|
864
|
+
readonly axis?: XlsxLayoutMetricAxis;
|
|
865
|
+
readonly startIndex?: number;
|
|
866
|
+
readonly endIndex?: number;
|
|
867
|
+
readonly operation?: XlsxOutlineLevelOperation;
|
|
868
|
+
readonly outlineLevel?: number;
|
|
869
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
870
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
871
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
872
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
873
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
874
|
+
/** UX-P-102 P2b: present only on `*InSession` results (strict superset receipt). */
|
|
875
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
876
|
+
}
|
|
877
|
+
export type XlsxSheetStructureAxis = "row" | "column";
|
|
878
|
+
export type XlsxSheetStructureOperation = "insert-before" | "insert-after" | "delete";
|
|
879
|
+
/**
|
|
880
|
+
* Row/column insert or delete over a SPAN of consecutive indexes (X5-U-029).
|
|
881
|
+
*
|
|
882
|
+
* Either form is accepted: the scalar `index` (one row/column, kept for
|
|
883
|
+
* every pre-span caller) or `startIndex`/`endIndex` (inclusive, one-based;
|
|
884
|
+
* `endIndex` defaults to `startIndex`). Sending both `index` and a different
|
|
885
|
+
* `startIndex` is a payload error. Semantics follow Excel's selection
|
|
886
|
+
* commands: `insert-before` inserts `count` rows/columns above/left of the
|
|
887
|
+
* span, `insert-after` inserts `count` below/right of its last index, and
|
|
888
|
+
* `delete` removes the span — all in ONE command, one audit record and one
|
|
889
|
+
* undo boundary. The result's `index` is the span's first index and `count`
|
|
890
|
+
* its length.
|
|
891
|
+
*/
|
|
892
|
+
export interface XlsxSheetStructureMutationRequest {
|
|
893
|
+
readonly sheetId: string;
|
|
894
|
+
readonly axis: XlsxSheetStructureAxis;
|
|
895
|
+
readonly operation: XlsxSheetStructureOperation;
|
|
896
|
+
readonly index?: number;
|
|
897
|
+
readonly startIndex?: number;
|
|
898
|
+
readonly endIndex?: number;
|
|
899
|
+
readonly actor?: XlsxRuntimeActor;
|
|
900
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
901
|
+
}
|
|
902
|
+
export interface XlsxSheetStructureMutationResult {
|
|
903
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
904
|
+
readonly exportedBytes?: Uint8Array;
|
|
905
|
+
readonly sheetId?: string;
|
|
906
|
+
readonly axis?: XlsxSheetStructureAxis;
|
|
907
|
+
readonly operation?: XlsxSheetStructureOperation;
|
|
908
|
+
readonly index?: number;
|
|
909
|
+
readonly count?: number;
|
|
910
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
911
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
912
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
913
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
914
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
915
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
916
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
917
|
+
}
|
|
918
|
+
export interface XlsxTableAppendRowRequest {
|
|
919
|
+
readonly sheetId: string;
|
|
920
|
+
readonly tableId: string;
|
|
921
|
+
readonly values: readonly XlsxTableAppendCellValue[];
|
|
922
|
+
readonly actor?: XlsxRuntimeActor;
|
|
923
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
924
|
+
}
|
|
925
|
+
export interface XlsxTableAppendRowResult {
|
|
926
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
927
|
+
readonly exportedBytes?: Uint8Array;
|
|
928
|
+
readonly sheetId?: string;
|
|
929
|
+
readonly tableId?: string;
|
|
930
|
+
readonly tableName?: string;
|
|
931
|
+
readonly oldRange?: XlsxCellRange;
|
|
932
|
+
readonly newRange?: XlsxCellRange;
|
|
933
|
+
readonly appendedRange?: XlsxCellRange;
|
|
934
|
+
readonly cells: readonly XlsxRuntimeCellReadback[];
|
|
935
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
936
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
937
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
938
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
939
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
940
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
941
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
942
|
+
}
|
|
943
|
+
export type XlsxFilterCriterionKind = "values" | "custom" | "dynamic" | "color" | "top10";
|
|
944
|
+
export interface XlsxFilterCondition {
|
|
945
|
+
/** OOXML operator: equal | notEqual | greaterThan | greaterThanOrEqual | lessThan | lessThanOrEqual. */
|
|
946
|
+
readonly op: string;
|
|
947
|
+
readonly value: string;
|
|
948
|
+
}
|
|
949
|
+
export interface XlsxFilterCriterion {
|
|
950
|
+
readonly kind: XlsxFilterCriterionKind;
|
|
951
|
+
/** `values`: the discrete value set (and whether blanks match). */
|
|
952
|
+
readonly values?: readonly string[];
|
|
953
|
+
readonly blank?: boolean;
|
|
954
|
+
/** `custom`: AND the (1-2) conditions, else OR. */
|
|
955
|
+
readonly and?: boolean;
|
|
956
|
+
readonly conditions?: readonly XlsxFilterCondition[];
|
|
957
|
+
/** `dynamic`: the relative kind (today | aboveAverage | ...). */
|
|
958
|
+
readonly dynamicKind?: string;
|
|
959
|
+
/** `color`. */
|
|
960
|
+
readonly dxfId?: number;
|
|
961
|
+
readonly cellColor?: boolean;
|
|
962
|
+
/** `top10`. */
|
|
963
|
+
readonly top?: boolean;
|
|
964
|
+
readonly percent?: boolean;
|
|
965
|
+
readonly value?: string;
|
|
966
|
+
}
|
|
967
|
+
export interface XlsxFilterColumn {
|
|
968
|
+
/** 0-based OOXML colId: offset from the filter range's first column. */
|
|
969
|
+
readonly colId: number;
|
|
970
|
+
readonly criterion: XlsxFilterCriterion;
|
|
971
|
+
}
|
|
972
|
+
export interface XlsxRangeFilterApplyRequest {
|
|
973
|
+
readonly sheetId: string;
|
|
974
|
+
readonly range: XlsxCellRange;
|
|
975
|
+
readonly columns: readonly XlsxFilterColumn[];
|
|
976
|
+
readonly actor?: XlsxRuntimeActor;
|
|
977
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
978
|
+
}
|
|
979
|
+
export interface XlsxRangeFilterClearRequest {
|
|
980
|
+
readonly sheetId: string;
|
|
981
|
+
readonly range: XlsxCellRange;
|
|
982
|
+
readonly actor?: XlsxRuntimeActor;
|
|
983
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
984
|
+
}
|
|
985
|
+
export interface XlsxRangeFilterResult {
|
|
986
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
987
|
+
readonly exportedBytes?: Uint8Array;
|
|
988
|
+
readonly sheetId?: string;
|
|
989
|
+
readonly range?: XlsxCellRange;
|
|
990
|
+
/** True when a filter was applied, false when it was cleared. */
|
|
991
|
+
readonly filtered: boolean;
|
|
992
|
+
/** The derived filter-hidden body rows (sorted ascending). */
|
|
993
|
+
readonly hiddenRows: readonly number[];
|
|
994
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
995
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
996
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
997
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
998
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
999
|
+
/** UX-P-102 P2b: present only on `*InSession` results (strict superset receipt). */
|
|
1000
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
1001
|
+
}
|
|
1002
|
+
export interface XlsxSortColumn {
|
|
1003
|
+
/** Absolute 1-based worksheet column; must fall inside the sort range. */
|
|
1004
|
+
readonly column: number;
|
|
1005
|
+
readonly descending?: boolean;
|
|
1006
|
+
}
|
|
1007
|
+
export interface XlsxRangeSortRequest {
|
|
1008
|
+
readonly sheetId: string;
|
|
1009
|
+
readonly range: XlsxCellRange;
|
|
1010
|
+
/** Sort keys in priority order (the first is primary). */
|
|
1011
|
+
readonly columns: readonly XlsxSortColumn[];
|
|
1012
|
+
readonly actor?: XlsxRuntimeActor;
|
|
1013
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
1014
|
+
}
|
|
1015
|
+
export interface XlsxRangeSortResult {
|
|
1016
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
1017
|
+
readonly exportedBytes?: Uint8Array;
|
|
1018
|
+
readonly sheetId?: string;
|
|
1019
|
+
readonly range?: XlsxCellRange;
|
|
1020
|
+
/** The applied permutation: original 1-based rows in their new order. */
|
|
1021
|
+
readonly rowOrder: readonly number[];
|
|
1022
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
1023
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
1024
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
1025
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
1026
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
1027
|
+
/** UX-P-102 P2b: present only on `*InSession` results (strict superset receipt). */
|
|
1028
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
1029
|
+
}
|
|
1030
|
+
export type XlsxSheetTabMutationOperation = "add" | "rename" | "duplicate" | "delete" | "move-left" | "move-right";
|
|
1031
|
+
export interface XlsxSheetTabMutationRequest {
|
|
1032
|
+
readonly sheetId?: string;
|
|
1033
|
+
readonly operation: XlsxSheetTabMutationOperation;
|
|
1034
|
+
readonly name?: string;
|
|
1035
|
+
readonly actor?: XlsxRuntimeActor;
|
|
1036
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
1037
|
+
}
|
|
1038
|
+
export interface XlsxSheetTabMutationResult {
|
|
1039
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
1040
|
+
readonly exportedBytes?: Uint8Array;
|
|
1041
|
+
readonly operation?: XlsxSheetTabMutationOperation;
|
|
1042
|
+
readonly sheetId?: string;
|
|
1043
|
+
readonly newSheetId?: string;
|
|
1044
|
+
readonly activeSheetId?: string;
|
|
1045
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
1046
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
1047
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
1048
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
1049
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
1050
|
+
/** Present only on `*InSession` results (strict superset receipt). */
|
|
1051
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
1052
|
+
}
|
|
1053
|
+
/** X5-U-023 (bridge v44): one Name Manager edit. */
|
|
1054
|
+
export type XlsxDefinedNameMutationOperation = "create" | "update" | "delete";
|
|
1055
|
+
export interface XlsxDefinedNameMutationRequest {
|
|
1056
|
+
readonly operation: XlsxDefinedNameMutationOperation;
|
|
1057
|
+
/** The name to create, or the existing name an update or delete addresses (Excel's name fold). */
|
|
1058
|
+
readonly name: string;
|
|
1059
|
+
/** The scope sheet's id; absent for a workbook-level name. An update keeps the scope. */
|
|
1060
|
+
readonly sheetScope?: string;
|
|
1061
|
+
/** Update only: the new spelling. */
|
|
1062
|
+
readonly newName?: string;
|
|
1063
|
+
/** The "Refers to" body, with or without its leading `=`; required for create. */
|
|
1064
|
+
readonly refersTo?: string;
|
|
1065
|
+
/** The sheet in view: a bare reference body on a workbook-level name is qualified with it. */
|
|
1066
|
+
readonly activeSheetId?: string;
|
|
1067
|
+
readonly actor?: XlsxRuntimeActor;
|
|
1068
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
1069
|
+
}
|
|
1070
|
+
/** The name as the edit left it (for a delete, the name removed). */
|
|
1071
|
+
export interface XlsxDefinedNameReadback {
|
|
1072
|
+
readonly name: string;
|
|
1073
|
+
readonly sheetScope?: string;
|
|
1074
|
+
/** The body as stored: no leading `=`, Excel's `_xlfn.` storage prefixes applied. */
|
|
1075
|
+
readonly refersTo: string;
|
|
1076
|
+
/** The sheet and range the body names when it is one sheet range. */
|
|
1077
|
+
readonly targetSheetId?: string;
|
|
1078
|
+
readonly targetRange?: XlsxCellRange;
|
|
1079
|
+
}
|
|
1080
|
+
export interface XlsxDefinedNameMutationResult {
|
|
1081
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
1082
|
+
readonly exportedBytes?: Uint8Array;
|
|
1083
|
+
readonly operation?: XlsxDefinedNameMutationOperation;
|
|
1084
|
+
readonly definedName?: XlsxDefinedNameReadback;
|
|
1085
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
1086
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
1087
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
1088
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
1089
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
1090
|
+
/** Present only on `defineNameInSession` results (strict superset receipt). */
|
|
1091
|
+
readonly session?: XlsxRuntimeSessionMutationReceipt;
|
|
1092
|
+
}
|
|
1093
|
+
export type XlsxKernelLanguage = "python" | "sql" | "javascript" | "ai-prompt";
|
|
1094
|
+
export type XlsxKernelBindingState = "fresh" | "stale" | "running" | "failed" | "detached";
|
|
1095
|
+
export type XlsxKernelCachePosture = "fresh" | "stale" | "missing" | "failed" | "running" | "detached";
|
|
1096
|
+
export interface XlsxKernelPanelReadback {
|
|
1097
|
+
readonly envelope: XlsxReadbackEnvelope;
|
|
1098
|
+
readonly workbookId: string;
|
|
1099
|
+
/**
|
|
1100
|
+
* Session identity at emission — opaque; equality/advancement only (see
|
|
1101
|
+
* `XlsxRuntimeSessionMutationReceipt.canonicalHash`).
|
|
1102
|
+
*/
|
|
1103
|
+
readonly canonicalHash: string;
|
|
1104
|
+
readonly bindings: readonly XlsxKernelPanelBinding[];
|
|
1105
|
+
}
|
|
1106
|
+
export interface XlsxKernelPanelBinding {
|
|
1107
|
+
readonly bindingId: string;
|
|
1108
|
+
readonly label: string;
|
|
1109
|
+
readonly language: XlsxKernelLanguage;
|
|
1110
|
+
readonly anchorLabel: string;
|
|
1111
|
+
readonly anchor: XlsxKernelAnchor;
|
|
1112
|
+
readonly source: string;
|
|
1113
|
+
readonly sourceEditable: boolean;
|
|
1114
|
+
readonly state: XlsxKernelBindingState;
|
|
1115
|
+
readonly cachePosture: XlsxKernelCachePosture;
|
|
1116
|
+
readonly outputRegionId?: string;
|
|
1117
|
+
readonly outputSheetId?: string;
|
|
1118
|
+
readonly outputRange?: XlsxCellRange;
|
|
1119
|
+
readonly outputLabel?: string;
|
|
1120
|
+
readonly declaredInputs: readonly XlsxKernelDeclaredInput[];
|
|
1121
|
+
readonly lastRunId?: string;
|
|
1122
|
+
readonly activeRunId?: string;
|
|
1123
|
+
readonly adapterIdentity?: string;
|
|
1124
|
+
readonly logsSummary?: string;
|
|
1125
|
+
readonly progressSummary?: string;
|
|
1126
|
+
readonly diagnostics?: XlsxKernelRunDiagnostics;
|
|
1127
|
+
readonly emulated: false;
|
|
1128
|
+
readonly actions: XlsxKernelPanelActions;
|
|
1129
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
1130
|
+
}
|
|
1131
|
+
export interface XlsxKernelPanelActions {
|
|
1132
|
+
readonly run?: "runtime.kernel.run";
|
|
1133
|
+
readonly cancel?: "runtime.kernel.cancel";
|
|
1134
|
+
readonly editSource?: "runtime.kernel.updateSource";
|
|
1135
|
+
readonly detach?: "runtime.kernel.detach";
|
|
1136
|
+
readonly delete?: "runtime.kernel.delete";
|
|
1137
|
+
}
|
|
1138
|
+
export interface XlsxKernelAnchor {
|
|
1139
|
+
readonly sheetId: string;
|
|
1140
|
+
readonly address?: XlsxCellAddress;
|
|
1141
|
+
readonly range?: XlsxCellRange;
|
|
1142
|
+
}
|
|
1143
|
+
export interface XlsxKernelDeclaredInput {
|
|
1144
|
+
readonly label: string;
|
|
1145
|
+
readonly target: XlsxKernelAnchor;
|
|
1146
|
+
readonly handle?: string;
|
|
1147
|
+
}
|
|
1148
|
+
export type XlsxKernelActionKind = "update-source" | "run" | "cancel" | "detach" | "delete";
|
|
1149
|
+
/**
|
|
1150
|
+
* CO-2 (bridge v19): `runtime.kernel.create` request. Create is not a
|
|
1151
|
+
* `XlsxKernelActionKind` member because it targets no existing binding — the
|
|
1152
|
+
* runtime mints the binding and output-region ids; the request carries the
|
|
1153
|
+
* anchor, the blank output range (which must contain the anchor cell), the
|
|
1154
|
+
* language, the source, and optional anchor-bearing declared inputs.
|
|
1155
|
+
*/
|
|
1156
|
+
export interface XlsxKernelCreateRequest {
|
|
1157
|
+
readonly anchor: XlsxKernelAnchor;
|
|
1158
|
+
readonly outputRange: XlsxCellRange;
|
|
1159
|
+
readonly language: XlsxKernelLanguage;
|
|
1160
|
+
readonly source: string;
|
|
1161
|
+
readonly declaredInputs?: readonly XlsxKernelDeclaredInput[];
|
|
1162
|
+
readonly actor?: XlsxRuntimeActor;
|
|
1163
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
1164
|
+
/**
|
|
1165
|
+
* Optimistic concurrency for the BYTE-BASED kernel exports (the kernel
|
|
1166
|
+
* mutation family loads from workbook bytes): compared against the state
|
|
1167
|
+
* SHA of the workbook bytes passed with this request. Valid sources are
|
|
1168
|
+
* state-hash surfaces — `XlsxRuntimeSessionExportResult.canonicalHash`
|
|
1169
|
+
* (the hash of the exported bytes you are now mutating) or a byte-path
|
|
1170
|
+
* readback's `workbookCanonicalHash`. Session chain identities (receipt/
|
|
1171
|
+
* binding/audit `canonicalHash` values from `*InSession` surfaces) are
|
|
1172
|
+
* NOT valid here and refuse as stale — they identify a live session, not
|
|
1173
|
+
* a byte package. Opaque — never synthesized by callers.
|
|
1174
|
+
*/
|
|
1175
|
+
readonly expectedCanonicalHash?: string;
|
|
1176
|
+
}
|
|
1177
|
+
export interface XlsxKernelActionRequest {
|
|
1178
|
+
readonly bindingId: string;
|
|
1179
|
+
readonly action: XlsxKernelActionKind;
|
|
1180
|
+
readonly actor?: XlsxRuntimeActor;
|
|
1181
|
+
readonly workflowContext?: XlsxWorkflowContextInput;
|
|
1182
|
+
/**
|
|
1183
|
+
* Optimistic concurrency for the BYTE-BASED kernel exports (the kernel
|
|
1184
|
+
* mutation family loads from workbook bytes): compared against the state
|
|
1185
|
+
* SHA of the workbook bytes passed with this request. Valid sources are
|
|
1186
|
+
* state-hash surfaces — `XlsxRuntimeSessionExportResult.canonicalHash`
|
|
1187
|
+
* (the hash of the exported bytes you are now mutating) or a byte-path
|
|
1188
|
+
* readback's `workbookCanonicalHash`. Session chain identities (receipt/
|
|
1189
|
+
* binding/audit `canonicalHash` values from `*InSession` surfaces) are
|
|
1190
|
+
* NOT valid here and refuse as stale — they identify a live session, not
|
|
1191
|
+
* a byte package. Opaque — never synthesized by callers.
|
|
1192
|
+
*/
|
|
1193
|
+
readonly expectedCanonicalHash?: string;
|
|
1194
|
+
readonly reason?: string;
|
|
1195
|
+
readonly source?: string;
|
|
1196
|
+
readonly declaredInputs?: readonly XlsxKernelDeclaredInput[];
|
|
1197
|
+
readonly runId?: string;
|
|
1198
|
+
readonly adapterIdentity?: string;
|
|
1199
|
+
readonly auditCorrelationId?: string;
|
|
1200
|
+
readonly progressSummary?: string;
|
|
1201
|
+
readonly logsSummary?: string;
|
|
1202
|
+
readonly result?: XlsxKernelRunResult;
|
|
1203
|
+
readonly deletePolicy?: "detach-cached-output-to-literals" | "clear-cached-output";
|
|
1204
|
+
}
|
|
1205
|
+
export interface XlsxKernelActionValidation {
|
|
1206
|
+
readonly verdict: "validated" | "refused";
|
|
1207
|
+
readonly action: XlsxKernelActionKind;
|
|
1208
|
+
readonly bindingId: string;
|
|
1209
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
1210
|
+
}
|
|
1211
|
+
export interface XlsxKernelMutationResult {
|
|
1212
|
+
readonly verdict: XlsxRuntimeCommandVerdict;
|
|
1213
|
+
readonly exportedBytes?: Uint8Array;
|
|
1214
|
+
readonly mutation?: XlsxKernelMutationReadback;
|
|
1215
|
+
readonly panel?: XlsxKernelPanelReadback;
|
|
1216
|
+
readonly audit?: XlsxRuntimeAuditEnvelope;
|
|
1217
|
+
readonly invalidation: XlsxRuntimeInvalidationReceipt;
|
|
1218
|
+
readonly undoBoundary?: XlsxRuntimeUndoBoundary;
|
|
1219
|
+
readonly blockers: readonly XlsxBlocker[];
|
|
1220
|
+
readonly warnings: readonly XlsxRuntimeWarning[];
|
|
1221
|
+
}
|
|
1222
|
+
export interface XlsxKernelMutationReadback {
|
|
1223
|
+
readonly bindingId: string;
|
|
1224
|
+
readonly outputRegionId?: string;
|
|
1225
|
+
readonly affectedRange?: {
|
|
1226
|
+
readonly sheetId: string;
|
|
1227
|
+
readonly range: XlsxCellRange;
|
|
1228
|
+
};
|
|
1229
|
+
readonly status: "created" | "source-updated" | "run-started" | "run-succeeded" | "run-failed" | "run-cancelled" | "deleted-detached" | "deleted-cleared" | "detached";
|
|
1230
|
+
readonly cachePosture?: XlsxKernelCachePosture;
|
|
1231
|
+
/**
|
|
1232
|
+
* Session identity of the workbook this readback was emitted from —
|
|
1233
|
+
* opaque; equality/advancement only (see
|
|
1234
|
+
* `XlsxRuntimeSessionMutationReceipt.canonicalHash`).
|
|
1235
|
+
*/
|
|
1236
|
+
readonly workbookCanonicalHash: string;
|
|
1237
|
+
}
|
|
1238
|
+
export type XlsxKernelRunResult = {
|
|
1239
|
+
readonly status: "succeeded";
|
|
1240
|
+
readonly adapterIdentity?: string;
|
|
1241
|
+
readonly logsSummary?: string;
|
|
1242
|
+
readonly output: XlsxKernelRunOutput;
|
|
1243
|
+
readonly diagnostics?: XlsxKernelRunDiagnostics;
|
|
1244
|
+
} | {
|
|
1245
|
+
readonly status: "failed" | "cancelled";
|
|
1246
|
+
readonly adapterIdentity?: string;
|
|
1247
|
+
readonly logsSummary?: string;
|
|
1248
|
+
readonly diagnostics?: XlsxKernelRunDiagnostics;
|
|
1249
|
+
};
|
|
1250
|
+
export type XlsxKernelRunOutput = {
|
|
1251
|
+
readonly kind: "scalar";
|
|
1252
|
+
readonly value: XlsxKernelCellValue;
|
|
1253
|
+
} | {
|
|
1254
|
+
readonly kind: "table";
|
|
1255
|
+
readonly rows: readonly (readonly XlsxKernelCellValue[])[];
|
|
1256
|
+
};
|
|
1257
|
+
export type XlsxKernelCellValue = {
|
|
1258
|
+
readonly kind: "number";
|
|
1259
|
+
readonly value: string;
|
|
1260
|
+
} | {
|
|
1261
|
+
readonly kind: "text";
|
|
1262
|
+
readonly value: string;
|
|
1263
|
+
} | {
|
|
1264
|
+
readonly kind: "boolean";
|
|
1265
|
+
readonly value: boolean;
|
|
1266
|
+
} | {
|
|
1267
|
+
readonly kind: "error";
|
|
1268
|
+
readonly value: string;
|
|
1269
|
+
};
|
|
1270
|
+
/**
|
|
1271
|
+
* X5-U-083 (bridge v46): one cell of a table-append row. `{ kind: "empty" }`
|
|
1272
|
+
* leaves the cell empty, so a calculated column takes the column's formula
|
|
1273
|
+
* for the new row, as Excel fills it; any other column stays empty.
|
|
1274
|
+
*/
|
|
1275
|
+
export type XlsxTableAppendCellValue = XlsxKernelCellValue | {
|
|
1276
|
+
readonly kind: "empty";
|
|
1277
|
+
};
|
|
1278
|
+
export interface XlsxKernelRunDiagnostics {
|
|
1279
|
+
readonly accessedReferences: readonly string[];
|
|
1280
|
+
readonly stdoutDigest?: string;
|
|
1281
|
+
readonly stderrDigest?: string;
|
|
1282
|
+
readonly errorClass?: string;
|
|
1283
|
+
readonly errorLine?: number;
|
|
1284
|
+
readonly runtimeIdentity?: string;
|
|
1285
|
+
readonly resourceSummary?: string;
|
|
1286
|
+
readonly outputSchema?: string;
|
|
1287
|
+
readonly truncation?: string;
|
|
1288
|
+
readonly sqlConnectionId?: string;
|
|
1289
|
+
readonly queryFingerprint?: string;
|
|
1290
|
+
readonly rowCount?: number;
|
|
1291
|
+
readonly columnCount?: number;
|
|
1292
|
+
readonly policySummary?: string;
|
|
1293
|
+
}
|
|
1294
|
+
export interface XlsxRuntimeCellReadback {
|
|
1295
|
+
readonly sheetId: string;
|
|
1296
|
+
readonly cellId: string;
|
|
1297
|
+
readonly address: XlsxCellAddress;
|
|
1298
|
+
readonly valueKind?: "number" | "text" | "boolean" | "error";
|
|
1299
|
+
readonly formulaText?: string;
|
|
1300
|
+
readonly displayFingerprint: string;
|
|
1301
|
+
readonly status: "present" | "cleared-detached";
|
|
1302
|
+
/**
|
|
1303
|
+
* Session identity of the workbook this readback was emitted from —
|
|
1304
|
+
* opaque; equality/advancement only (see
|
|
1305
|
+
* `XlsxRuntimeSessionMutationReceipt.canonicalHash`).
|
|
1306
|
+
*/
|
|
1307
|
+
readonly workbookCanonicalHash: string;
|
|
1308
|
+
}
|
|
1309
|
+
export interface XlsxRuntimeAuditEnvelope {
|
|
1310
|
+
readonly command: string;
|
|
1311
|
+
readonly actor: XlsxRuntimeActor;
|
|
1312
|
+
readonly targetIds: readonly string[];
|
|
1313
|
+
readonly operations: readonly string[];
|
|
1314
|
+
readonly operationIds: readonly string[];
|
|
1315
|
+
/**
|
|
1316
|
+
* Session identities at the commit boundaries — opaque;
|
|
1317
|
+
* equality/advancement only. `afterCanonicalHash` equals every other
|
|
1318
|
+
* `canonicalHash` readback emitted at the same revision, which is what
|
|
1319
|
+
* FD-3 stale-card demotion compares against (see
|
|
1320
|
+
* `XlsxRuntimeSessionMutationReceipt.canonicalHash`).
|
|
1321
|
+
*/
|
|
1322
|
+
readonly beforeCanonicalHash?: string;
|
|
1323
|
+
readonly afterCanonicalHash?: string;
|
|
1324
|
+
readonly formulaGraphDelta: XlsxRuntimeAuditDeltaSummary;
|
|
1325
|
+
readonly outputRegionDelta: XlsxRuntimeAuditDeltaSummary;
|
|
1326
|
+
readonly operationPatternHints: readonly XlsxOperationPatternHint[];
|
|
1327
|
+
readonly validationExportPosture: string;
|
|
1328
|
+
readonly readbackStatus: "verified" | "not-applicable" | "mismatch";
|
|
1329
|
+
}
|
|
1330
|
+
export interface XlsxOperationPatternHint {
|
|
1331
|
+
readonly kind: "value-fill-repeat" | "rectangular-value-paste";
|
|
1332
|
+
readonly source: "runtime.range.fill" | "runtime.range.paste";
|
|
1333
|
+
readonly sheetId: string;
|
|
1334
|
+
readonly sourceRange: XlsxCellRange;
|
|
1335
|
+
readonly targetRange: XlsxCellRange;
|
|
1336
|
+
readonly rowCount: number;
|
|
1337
|
+
readonly columnCount: number;
|
|
1338
|
+
readonly cellCount: number;
|
|
1339
|
+
readonly valueKindCounts: XlsxOperationPatternValueKindCounts;
|
|
1340
|
+
readonly reconciliationStatus: "verified";
|
|
1341
|
+
}
|
|
1342
|
+
export interface XlsxOperationPatternValueKindCounts {
|
|
1343
|
+
readonly numbers: number;
|
|
1344
|
+
readonly text: number;
|
|
1345
|
+
readonly booleans: number;
|
|
1346
|
+
readonly errors: number;
|
|
1347
|
+
}
|
|
1348
|
+
export interface XlsxRuntimeAuditDeltaSummary {
|
|
1349
|
+
/**
|
|
1350
|
+
* `"unchanged"` / `"changed"` when the delta was measured for this commit
|
|
1351
|
+
* (`added`/`removed`/`changed` are real counts). `"unavailable"` when NO
|
|
1352
|
+
* delta was measured — emitted on in-session commits whose keep-alive
|
|
1353
|
+
* graph maintenance refused the edit (defined-name/structured/spill
|
|
1354
|
+
* formulas, output-region intersections) or was already degraded; the
|
|
1355
|
+
* counts are 0 only because nothing was measured, and consumers must not
|
|
1356
|
+
* treat the envelope as "measured as unchanged". `detail` carries the
|
|
1357
|
+
* reason.
|
|
1358
|
+
*/
|
|
1359
|
+
readonly status: string;
|
|
1360
|
+
readonly detail: string;
|
|
1361
|
+
readonly added: number;
|
|
1362
|
+
readonly removed: number;
|
|
1363
|
+
readonly changed: number;
|
|
1364
|
+
}
|
|
1365
|
+
export interface XlsxRuntimeInvalidationReceipt {
|
|
1366
|
+
readonly classes: readonly XlsxRuntimeInvalidationClass[];
|
|
1367
|
+
readonly buckets: readonly XlsxRuntimeInvalidationBucket[];
|
|
1368
|
+
readonly reason: string;
|
|
1369
|
+
}
|
|
1370
|
+
export type XlsxRuntimeInvalidationClass = "noop" | "display-only" | "formula-graph" | "range-bounded" | "sheet-window" | "sheet-full" | "workbook-full" | "geometry-only" | "workflow-lane" | "export-risk";
|
|
1371
|
+
export type XlsxRuntimeInvalidationBucket = {
|
|
1372
|
+
readonly type: "workbook";
|
|
1373
|
+
} | {
|
|
1374
|
+
readonly type: "sheet";
|
|
1375
|
+
readonly sheetId: string;
|
|
1376
|
+
} | {
|
|
1377
|
+
readonly type: "range";
|
|
1378
|
+
readonly sheetId: string;
|
|
1379
|
+
readonly range: string;
|
|
1380
|
+
};
|
|
1381
|
+
export interface XlsxRuntimeUndoBoundary {
|
|
1382
|
+
readonly id: string;
|
|
1383
|
+
readonly operationDescriptors: readonly string[];
|
|
1384
|
+
}
|
|
1385
|
+
export interface XlsxRuntimeWarning {
|
|
1386
|
+
readonly code: "package-diagnostics-present" | "calculation-diagnostics-present" | "session-request-fields-stripped" | "recalculation-not-refreshed"
|
|
1387
|
+
/** X5-U-011: a `warning` / `information` rule was violated; the value committed. */
|
|
1388
|
+
| "data-validation-warning";
|
|
1389
|
+
readonly message: string;
|
|
1390
|
+
}
|
|
1391
|
+
export interface XlsxWorkflowContextInput {
|
|
1392
|
+
readonly revision?: number;
|
|
1393
|
+
readonly postureFacts?: readonly XlsxWorkflowPostureFactInput[];
|
|
1394
|
+
readonly laneSnapshot?: XlsxWorkflowLaneSnapshotInput;
|
|
1395
|
+
}
|
|
1396
|
+
export interface XlsxWorkflowPostureFactInput {
|
|
1397
|
+
readonly id: string;
|
|
1398
|
+
readonly target: XlsxWorkflowTargetInput;
|
|
1399
|
+
readonly kind: XlsxWorkflowPostureKindInput;
|
|
1400
|
+
readonly severity: XlsxWorkflowSeverityInput;
|
|
1401
|
+
readonly message: string;
|
|
1402
|
+
readonly blocking?: boolean;
|
|
1403
|
+
}
|
|
1404
|
+
export type XlsxWorkflowPostureKindInput = "workflow-lock" | "protected-range" | "validation-issue" | "comment-present" | "suggestion-present" | "issue-present" | "audit-linked-change";
|
|
1405
|
+
export type XlsxWorkflowSeverityInput = "info" | "warning" | "blocking";
|
|
1406
|
+
export interface XlsxWorkflowLaneSnapshotInput {
|
|
1407
|
+
readonly snapshotId?: string;
|
|
1408
|
+
readonly revision?: number;
|
|
1409
|
+
readonly entries?: readonly XlsxWorkflowLaneEntryInput[];
|
|
1410
|
+
}
|
|
1411
|
+
export interface XlsxWorkflowLaneEntryInput {
|
|
1412
|
+
readonly id: string;
|
|
1413
|
+
readonly target: XlsxWorkflowTargetInput;
|
|
1414
|
+
readonly laneKind: XlsxWorkflowOverlayLaneKindInput;
|
|
1415
|
+
readonly status: XlsxWorkflowLaneEntryStatusInput;
|
|
1416
|
+
readonly severity: XlsxWorkflowSeverityInput;
|
|
1417
|
+
readonly label: string;
|
|
1418
|
+
readonly scopeId?: string;
|
|
1419
|
+
}
|
|
1420
|
+
export type XlsxWorkflowOverlayLaneKindInput = "comments" | "issues" | "suggestions" | "protected-ranges" | "validations";
|
|
1421
|
+
export type XlsxWorkflowLaneEntryStatusInput = "open" | "pending" | "resolved" | "informational";
|
|
1422
|
+
export type XlsxWorkflowTargetInput = {
|
|
1423
|
+
readonly type: "workbook";
|
|
1424
|
+
readonly workbookId: string;
|
|
1425
|
+
} | {
|
|
1426
|
+
readonly type: "sheet";
|
|
1427
|
+
readonly sheetId: string;
|
|
1428
|
+
} | {
|
|
1429
|
+
readonly type: "cell";
|
|
1430
|
+
readonly cellId: string;
|
|
1431
|
+
} | {
|
|
1432
|
+
readonly type: "range";
|
|
1433
|
+
readonly sheetId: string;
|
|
1434
|
+
readonly range: XlsxCellRange;
|
|
1435
|
+
};
|