@jsb188/mday 1.1.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.
- package/package.json +142 -0
- package/src/constants/agentMemory.ts +166 -0
- package/src/constants/agentNote.ts +212 -0
- package/src/constants/aiChat.ts +10 -0
- package/src/constants/billing.ts +126 -0
- package/src/constants/campaign.ts +236 -0
- package/src/constants/contact.ts +72 -0
- package/src/constants/csvExport.ts +133 -0
- package/src/constants/dataTable.ts +22 -0
- package/src/constants/dataTableFieldTypes.generated.ts +59 -0
- package/src/constants/docAccess.ts +33 -0
- package/src/constants/dt.ts +234 -0
- package/src/constants/email.ts +146 -0
- package/src/constants/fieldDoc.ts +104 -0
- package/src/constants/graphqlReactivity.ts +196 -0
- package/src/constants/inboundContact.ts +8 -0
- package/src/constants/integration.ts +13 -0
- package/src/constants/log.ts +21 -0
- package/src/constants/logDisplay/README.md +88 -0
- package/src/constants/logDisplay/defaults.ts +39 -0
- package/src/constants/logDisplay/index.ts +27 -0
- package/src/constants/logDisplay/operations/arable.ts +16 -0
- package/src/constants/logDisplay/operations/farmersMarket.ts +10 -0
- package/src/constants/logDisplay/operations/foodManufacturing.ts +13 -0
- package/src/constants/logDisplay/shared/accounting.ts +13 -0
- package/src/constants/logDisplay/shared/interactions.ts +13 -0
- package/src/constants/logDisplay/shared/rackTemperatures.ts +42 -0
- package/src/constants/logTaxonomy.generated.ts +2199 -0
- package/src/constants/noteDoc.ts +77 -0
- package/src/constants/organization.ts +60 -0
- package/src/constants/pageRoute.ts +23 -0
- package/src/constants/qrCode.ts +30 -0
- package/src/constants/sheet.ts +132 -0
- package/src/constants/sms.ts +18 -0
- package/src/constants/square.ts +16 -0
- package/src/constants/storage.ts +85 -0
- package/src/constants/usage.ts +82 -0
- package/src/constants/workflowSteps.ts +60 -0
- package/src/schemas/editLogEntry.ts +879 -0
- package/src/schemas/inboundContact.ts +77 -0
- package/src/schemas/logsQuery.ts +93 -0
- package/src/types/account.d.ts +81 -0
- package/src/types/agentMemory.d.ts +100 -0
- package/src/types/agentNote.d.ts +441 -0
- package/src/types/billing.d.ts +537 -0
- package/src/types/campaign.d.ts +1533 -0
- package/src/types/contact.d.ts +15 -0
- package/src/types/csvExport.d.ts +213 -0
- package/src/types/dataAnalysis.d.ts +44 -0
- package/src/types/dataTable.d.ts +159 -0
- package/src/types/definitionElement.d.ts +35 -0
- package/src/types/docAccess.d.ts +96 -0
- package/src/types/dt.d.ts +257 -0
- package/src/types/email.d.ts +231 -0
- package/src/types/emailReplyReport.d.ts +76 -0
- package/src/types/fieldDoc.d.ts +702 -0
- package/src/types/fieldDocContract.d.ts +90 -0
- package/src/types/inboundContact.d.ts +65 -0
- package/src/types/integration.d.ts +42 -0
- package/src/types/log.d.ts +338 -0
- package/src/types/logDisplay.types.ts +85 -0
- package/src/types/organization.d.ts +350 -0
- package/src/types/pageRoute.d.ts +48 -0
- package/src/types/qrCode.d.ts +96 -0
- package/src/types/richText.d.ts +81 -0
- package/src/types/sheet.d.ts +847 -0
- package/src/types/sms.d.ts +38 -0
- package/src/types/storage.d.ts +481 -0
- package/src/types/usage.d.ts +106 -0
- package/src/types/workflow.d.ts +435 -0
- package/src/utils/agentMemory.ts +15 -0
- package/src/utils/agentNote.ts +850 -0
- package/src/utils/aiChat.ts +43 -0
- package/src/utils/aiChatWork.ts +64 -0
- package/src/utils/billing.ts +37 -0
- package/src/utils/campaign.ts +1173 -0
- package/src/utils/campaignAI.ts +72 -0
- package/src/utils/campaignAccess.ts +239 -0
- package/src/utils/campaignEmail.ts +601 -0
- package/src/utils/campaignEmailCompiler.ts +372 -0
- package/src/utils/campaignEmailImages.ts +60 -0
- package/src/utils/campaignEmailStyles.ts +544 -0
- package/src/utils/campaignLifecycle.ts +104 -0
- package/src/utils/campaignPreview.ts +285 -0
- package/src/utils/contact.ts +50 -0
- package/src/utils/csvExport.ts +19 -0
- package/src/utils/dataTable.ts +311 -0
- package/src/utils/dataTableFieldTypeRegistry.ts +106 -0
- package/src/utils/dataTableRelativeDate.ts +447 -0
- package/src/utils/definitionElement.ts +84 -0
- package/src/utils/docAccess.ts +383 -0
- package/src/utils/documentName.ts +53 -0
- package/src/utils/email.ts +379 -0
- package/src/utils/emailReplyReport.test.ts +187 -0
- package/src/utils/emailReplyReport.ts +143 -0
- package/src/utils/fieldDoc.ts +157 -0
- package/src/utils/fieldDocAnswers.ts +128 -0
- package/src/utils/fieldDocDefaults.ts +36 -0
- package/src/utils/fieldDocProgram.ts +36 -0
- package/src/utils/fieldDocSummary.ts +30 -0
- package/src/utils/log.ts +357 -0
- package/src/utils/logDisplay.helpers.ts +177 -0
- package/src/utils/logDisplay.ts +87 -0
- package/src/utils/logRegistryValue.ts +90 -0
- package/src/utils/logStoreRead.ts +262 -0
- package/src/utils/logTaxonomy.helpers.ts +17 -0
- package/src/utils/logTaxonomy.ts +76 -0
- package/src/utils/logTaxonomyDisplay.ts +395 -0
- package/src/utils/noteDoc.ts +609 -0
- package/src/utils/organization.ts +669 -0
- package/src/utils/pageRoute.ts +71 -0
- package/src/utils/qrCode.helpers.ts +189 -0
- package/src/utils/qrCode.test.ts +519 -0
- package/src/utils/qrCode.ts +273 -0
- package/src/utils/richTextHTML.ts +385 -0
- package/src/utils/sheet.ts +262 -0
- package/src/utils/sheetAxisMove.ts +616 -0
- package/src/utils/sheetBootstrap.ts +1402 -0
- package/src/utils/sheetCellLiteral.ts +101 -0
- package/src/utils/sheetCommand.ts +358 -0
- package/src/utils/sheetDesign.ts +705 -0
- package/src/utils/sheetExport.ts +186 -0
- package/src/utils/sheetFeatureReference.ts +183 -0
- package/src/utils/sheetFormulaArgs.ts +168 -0
- package/src/utils/sheetFormulaCompile.ts +475 -0
- package/src/utils/sheetFormulaConditionalAggregate.ts +254 -0
- package/src/utils/sheetFormulaCriteria.ts +656 -0
- package/src/utils/sheetFormulaDate.ts +444 -0
- package/src/utils/sheetFormulaEvaluation.ts +899 -0
- package/src/utils/sheetFormulaEvaluator.ts +997 -0
- package/src/utils/sheetFormulaFunctionHandlers.ts +403 -0
- package/src/utils/sheetFormulaLogical.ts +116 -0
- package/src/utils/sheetFormulaLookup.ts +488 -0
- package/src/utils/sheetFormulaMath.ts +48 -0
- package/src/utils/sheetFormulaParser.ts +729 -0
- package/src/utils/sheetFormulaRange.ts +330 -0
- package/src/utils/sheetFormulaReference.ts +703 -0
- package/src/utils/sheetFormulaReferenceAggregates.ts +313 -0
- package/src/utils/sheetFormulaReferenceDates.ts +237 -0
- package/src/utils/sheetFormulaReferenceLogical.ts +330 -0
- package/src/utils/sheetFormulaReferenceLookup.ts +341 -0
- package/src/utils/sheetFormulaReferenceMath.ts +95 -0
- package/src/utils/sheetFormulaReferenceRewrite.ts +220 -0
- package/src/utils/sheetFormulaReferenceText.ts +462 -0
- package/src/utils/sheetFormulaSyntax.ts +1027 -0
- package/src/utils/sheetFormulaText.ts +430 -0
- package/src/utils/sheetJournal.ts +200 -0
- package/src/utils/sheetNumberFormat.ts +1012 -0
- package/src/utils/sheetPreview.ts +68 -0
- package/src/utils/sheetSequence.ts +118 -0
- package/src/utils/sheetSnapshot.ts +739 -0
- package/src/utils/sheetStructureEdit.ts +914 -0
- package/src/utils/sheetStructureReferences.ts +389 -0
- package/src/utils/square.ts +32 -0
- package/src/utils/storage.ts +198 -0
- package/src/utils/table-route.ts +262 -0
- package/src/utils/time.ts +12 -0
- package/src/utils/workflow.ts +506 -0
- package/src/utils/workflowLogFingerprint.ts +302 -0
- package/src/utils/workflowLogRevisionSnapshot.ts +424 -0
- package/src/utils/workflowProgress.ts +280 -0
- package/src/utils/workflowTriggers.ts +61 -0
- package/tests/agentNote.test.ts +395 -0
- package/tests/campaignAI.test.ts +119 -0
- package/tests/campaignAccess.test.ts +239 -0
- package/tests/campaignEmail.test.ts +441 -0
- package/tests/campaignLifecycle.test.ts +134 -0
- package/tests/campaignPublication.test.ts +309 -0
- package/tests/dataTableFieldTypeRegistry.test.ts +111 -0
- package/tests/dataTableRelativeDate.test.ts +412 -0
- package/tests/docAccess.test.ts +525 -0
- package/tests/editLogEntry.test.ts +112 -0
- package/tests/email.test.ts +39 -0
- package/tests/fieldDocProgram.test.ts +114 -0
- package/tests/logDisplay.fixtures.ts +67 -0
- package/tests/logDisplay.test.ts +227 -0
- package/tests/noteDoc.test.ts +514 -0
- package/tests/richTextHTML.test.ts +185 -0
- package/tests/sheetAxisMove.test.ts +352 -0
- package/tests/sheetBootstrap.test.ts +1967 -0
- package/tests/sheetFeatureReference.test.ts +22 -0
- package/tests/sheetFormulaCriteria.test.ts +269 -0
- package/tests/sheetFormulaEvaluator.test.ts +468 -0
- package/tests/sheetFormulaFunctions.test.ts +538 -0
- package/tests/sheetFormulaLanguage.test.ts +361 -0
- package/tests/sheetFormulaParity.fixtures.ts +872 -0
- package/tests/sheetFormulaParity.test.ts +188 -0
- package/tests/sheetFormulaRange.test.ts +167 -0
- package/tests/sheetFormulaReference.test.ts +78 -0
- package/tests/sheetFormulaReferenceRewrite.test.ts +117 -0
- package/tests/sheetFormulaTextDate.test.ts +512 -0
- package/tests/sheetSequence.test.ts +22 -0
- package/tests/sheetSnapshot.test.ts +134 -0
- package/tests/sheetStructureEdit.test.ts +537 -0
- package/tests/sheetStructureReferences.test.ts +589 -0
- package/tests/workflowLifecycleStatus.test.ts +60 -0
- package/tests/workflowLogFingerprint.test.ts +203 -0
- package/tests/workflowLogRevisionSnapshot.test.ts +96 -0
- package/tests/workflowProgress.test.ts +180 -0
- package/tests/workflowTriggers.test.ts +29 -0
- package/tsconfig.json +12 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,847 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GRID_ITEM_SORT_ENUMS,
|
|
3
|
+
SHEET_CELL_NUMBER_FORMAT_TYPE_ENUMS,
|
|
4
|
+
SHEET_CELL_TEXT_ALIGN_ENUMS,
|
|
5
|
+
SHEET_CELL_TEXT_WRAP_ENUMS,
|
|
6
|
+
SHEET_CELL_VALUE_TYPE_ENUMS,
|
|
7
|
+
SHEET_CELL_VERTICAL_ALIGN_ENUMS,
|
|
8
|
+
SHEET_EXPORT_FORMAT_ENUMS,
|
|
9
|
+
SHEET_STRUCTURE_OPERATION_ENUMS,
|
|
10
|
+
} from '../constants/sheet.ts';
|
|
11
|
+
import type { SheetFormulaASTNode } from '../utils/sheetFormulaSyntax.ts';
|
|
12
|
+
import type { SheetComputedCellPayload } from '../utils/sheetJournal.ts';
|
|
13
|
+
import type { DocAccessBaseObj } from './docAccess.d.ts';
|
|
14
|
+
|
|
15
|
+
/* Explicit authored scalar interpretation; null retains ordinary automatic input parsing. */
|
|
16
|
+
export type SheetCellLiteralType = 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'DATETIME';
|
|
17
|
+
|
|
18
|
+
export type SheetCellTextAlignEnum = (typeof SHEET_CELL_TEXT_ALIGN_ENUMS)[number];
|
|
19
|
+
export type SheetCellTextWrapEnum = (typeof SHEET_CELL_TEXT_WRAP_ENUMS)[number];
|
|
20
|
+
export type SheetCellVerticalAlignEnum = (typeof SHEET_CELL_VERTICAL_ALIGN_ENUMS)[number];
|
|
21
|
+
|
|
22
|
+
export type SheetStructureOperationEnum = (typeof SHEET_STRUCTURE_OPERATION_ENUMS)[number];
|
|
23
|
+
export type SheetCellValueTypeEnum = (typeof SHEET_CELL_VALUE_TYPE_ENUMS)[number];
|
|
24
|
+
export type SheetCellNumberFormatTypeEnum = (typeof SHEET_CELL_NUMBER_FORMAT_TYPE_ENUMS)[number];
|
|
25
|
+
export type GridItemSortEnum = (typeof GRID_ITEM_SORT_ENUMS)[number];
|
|
26
|
+
export type SheetExportFormatEnum = (typeof SHEET_EXPORT_FORMAT_ENUMS)[number];
|
|
27
|
+
export type SheetFormulaReferenceKind = 'SHEET_CELL' | 'SHEET_RANGE';
|
|
28
|
+
export type SheetFormulaReferenceStatusEnum = 'READY' | 'LOADING' | 'ERROR' | 'NOT_FOUND';
|
|
29
|
+
|
|
30
|
+
/* Durable Sheet command lifecycle returned by mutations and acknowledgements. */
|
|
31
|
+
export type SheetCommandStatusEnum = 'COMMITTED' | 'REPLAYED' | 'CONFLICTED';
|
|
32
|
+
|
|
33
|
+
/* Client-side lifecycle while a durable command is waiting for authority. */
|
|
34
|
+
export type SheetClientCommandStatusEnum = 'PENDING' | 'IN_FLIGHT' | SheetCommandStatusEnum | 'FAILED';
|
|
35
|
+
|
|
36
|
+
/* Design entity addressed by one property-level design command intent. */
|
|
37
|
+
export type SheetDesignOperationTargetType =
|
|
38
|
+
| 'COLUMN'
|
|
39
|
+
| 'ROW'
|
|
40
|
+
| 'GRID'
|
|
41
|
+
| 'DEFAULT_CELL_STYLE'
|
|
42
|
+
| 'DEFAULT_CELL_FORMAT'
|
|
43
|
+
| 'NAMED_RANGE'
|
|
44
|
+
| 'MERGED_RANGE'
|
|
45
|
+
| 'METADATA';
|
|
46
|
+
|
|
47
|
+
/* Mutation requested for one canonical design target/property. */
|
|
48
|
+
export type SheetDesignOperationType = 'SET_PROPERTY' | 'DELETE_PROPERTY' | 'UPSERT_ENTITY' | 'DELETE_ENTITY';
|
|
49
|
+
|
|
50
|
+
/* Client intent deliberately excludes `before`; the server captures authority. */
|
|
51
|
+
export interface SheetDesignCommandIntent {
|
|
52
|
+
operation: SheetDesignOperationType;
|
|
53
|
+
property?: string | null;
|
|
54
|
+
targetKey: string;
|
|
55
|
+
targetType: SheetDesignOperationTargetType;
|
|
56
|
+
value?: unknown;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Sparse UI design delta converted to keyed command intents before transport. */
|
|
60
|
+
export interface SheetDesignPatchInput {
|
|
61
|
+
columns?: string | null;
|
|
62
|
+
defaultCellFormat?: string | null;
|
|
63
|
+
defaultCellStyle?: SheetCellStyleObj | null;
|
|
64
|
+
grid?: SheetGridDesignGQL | null;
|
|
65
|
+
metadata?: string | null;
|
|
66
|
+
namedRanges?: SheetNamedRangeObj[] | null;
|
|
67
|
+
rows?: string | null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Ordered mutation family accepted by one atomic compound Sheet command. */
|
|
71
|
+
export type SheetCompoundCommandFamily = 'CELLS' | 'DESIGN';
|
|
72
|
+
|
|
73
|
+
/* Cell intent embedded in an atomic compound Sheet command. */
|
|
74
|
+
export interface SheetCompoundCellEditInput {
|
|
75
|
+
cell: {
|
|
76
|
+
columnIndex: number;
|
|
77
|
+
rowIndex: number;
|
|
78
|
+
format?: string | null;
|
|
79
|
+
note?: string | null;
|
|
80
|
+
rawInput?: string | null;
|
|
81
|
+
literalType?: SheetCellLiteralType | null;
|
|
82
|
+
|
|
83
|
+
style?: SheetCellStyleObj | null;
|
|
84
|
+
value?: string | null;
|
|
85
|
+
};
|
|
86
|
+
clear?: boolean | null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/*
|
|
90
|
+
* One reusable, serialized authority condition evaluated before a Sheet
|
|
91
|
+
* command mutates any target. More condition kinds can extend this union.
|
|
92
|
+
*/
|
|
93
|
+
export type SheetCommandPrecondition = {
|
|
94
|
+
baseDesignRevision: SheetJournalSeq;
|
|
95
|
+
baseRevision: SheetJournalSeq;
|
|
96
|
+
|
|
97
|
+
kind: 'CELL_TARGETS_UNCHANGED';
|
|
98
|
+
sheetCells: SheetCompoundCellEditInput[];
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* One ordered compound component. Optional GraphQL fields are intentionally
|
|
103
|
+
* represented as a discriminated union in shared application code.
|
|
104
|
+
*/
|
|
105
|
+
export type SheetCompoundCommandOperationInput =
|
|
106
|
+
| {
|
|
107
|
+
family: 'CELLS';
|
|
108
|
+
cells: SheetCompoundCellEditInput[];
|
|
109
|
+
}
|
|
110
|
+
| {
|
|
111
|
+
family: 'DESIGN';
|
|
112
|
+
designOperations: SheetDesignCommandIntent[];
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/* Durable command family of one Sheet command (GraphQL enum SheetCommandType). */
|
|
116
|
+
export type SheetCommandTypeEnum = 'EDIT_CELLS' | 'EDIT_DESIGN' | 'EDIT_COMPOUND' | 'EDIT_STRUCTURE' | 'MOVE_AXIS' | 'UNDO' | 'REDO';
|
|
117
|
+
|
|
118
|
+
/* Compact semantic row/column permutation accepted by MOVE_AXIS commands. */
|
|
119
|
+
export interface SheetAxisMoveCommandInput {
|
|
120
|
+
axis: 'COLUMN' | 'ROW';
|
|
121
|
+
sourceEndIndex: number;
|
|
122
|
+
sourceStartIndex: number;
|
|
123
|
+
targetStartIndex: number;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/*
|
|
127
|
+
* One command of a sealed Sheet command envelope (wire contract v4, DESIGN
|
|
128
|
+
* §1.1). Base revisions are the client's applied cursors of the tab at seal
|
|
129
|
+
* time; `recordUndo: false` marks a command the server keeps no undo record
|
|
130
|
+
* for. The server validates which optional payload belongs to the family.
|
|
131
|
+
*/
|
|
132
|
+
export interface SheetCommandInput {
|
|
133
|
+
axisMove?: SheetAxisMoveCommandInput | null;
|
|
134
|
+
baseDesignRevision: SheetJournalSeqInput;
|
|
135
|
+
baseRevision: SheetJournalSeqInput;
|
|
136
|
+
cells?: SheetCompoundCellEditInput[] | null;
|
|
137
|
+
commandId: string;
|
|
138
|
+
commandType: SheetCommandTypeEnum;
|
|
139
|
+
confirmDestructive?: boolean | null;
|
|
140
|
+
compoundOperations?: SheetCompoundCommandOperationInput[] | null;
|
|
141
|
+
|
|
142
|
+
designOperations?: SheetDesignCommandIntent[] | null;
|
|
143
|
+
precondition?: SheetCommandPrecondition | null;
|
|
144
|
+
recordUndo?: boolean | null;
|
|
145
|
+
sheetTabId: string | number | bigint;
|
|
146
|
+
structureIndex?: number | null;
|
|
147
|
+
structureOperation?: SheetStructureOperationEnum | null;
|
|
148
|
+
targetCommandId?: string | null;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/*
|
|
152
|
+
* One sealed command envelope: a random idempotency key, the per-document
|
|
153
|
+
* client id and its strictly increasing sequence, and the sessionStorage
|
|
154
|
+
* session that scopes undo (DESIGN §0 D2).
|
|
155
|
+
*/
|
|
156
|
+
export interface SheetCommandEnvelopeInput {
|
|
157
|
+
contractVersion: 4;
|
|
158
|
+
clientId: string;
|
|
159
|
+
clientSeq: number;
|
|
160
|
+
commands: SheetCommandInput[];
|
|
161
|
+
envelopeId: string;
|
|
162
|
+
sessionId: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Authoritative operation persisted after the server captures before/after state. */
|
|
166
|
+
export interface SheetStoredDesignOperation extends Omit<SheetDesignCommandIntent, 'value'> {
|
|
167
|
+
after?: unknown;
|
|
168
|
+
before?: unknown;
|
|
169
|
+
commandId: string;
|
|
170
|
+
designRevision: SheetJournalSeq;
|
|
171
|
+
operationIndex: number;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type SheetCellValue = string | number | boolean | null | Record<string, any> | any[];
|
|
175
|
+
|
|
176
|
+
export type SheetCellBorderStyleValue = 'solid' | 'dashed' | 'dotted' | 'double';
|
|
177
|
+
|
|
178
|
+
export interface SheetCellStyleObj {
|
|
179
|
+
fontSize?: number | null;
|
|
180
|
+
textColor?: string | null;
|
|
181
|
+
fillColor?: string | null;
|
|
182
|
+
textWrap?: SheetCellTextWrapEnum | null;
|
|
183
|
+
textAlign?: SheetCellTextAlignEnum | null;
|
|
184
|
+
verticalAlign?: SheetCellVerticalAlignEnum | null;
|
|
185
|
+
disableMarkdown?: boolean | null;
|
|
186
|
+
bold?: boolean | null;
|
|
187
|
+
italic?: boolean | null;
|
|
188
|
+
underline?: boolean | null;
|
|
189
|
+
strikethrough?: boolean | null;
|
|
190
|
+
borderTopWidth?: number | null;
|
|
191
|
+
borderTopColor?: string | null;
|
|
192
|
+
borderTopStyle?: SheetCellBorderStyleValue | null;
|
|
193
|
+
borderRightWidth?: number | null;
|
|
194
|
+
borderRightColor?: string | null;
|
|
195
|
+
borderRightStyle?: SheetCellBorderStyleValue | null;
|
|
196
|
+
borderBottomWidth?: number | null;
|
|
197
|
+
borderBottomColor?: string | null;
|
|
198
|
+
borderBottomStyle?: SheetCellBorderStyleValue | null;
|
|
199
|
+
borderLeftWidth?: number | null;
|
|
200
|
+
borderLeftColor?: string | null;
|
|
201
|
+
borderLeftStyle?: SheetCellBorderStyleValue | null;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface SheetCellNumberFormatObj {
|
|
205
|
+
type: SheetCellNumberFormatTypeEnum;
|
|
206
|
+
/* Google-Sheets-style pattern; presets resolve from type, CUSTOM requires it */
|
|
207
|
+
pattern?: string | null;
|
|
208
|
+
/* ISO 4217 code used to resolve the currency symbol in currency-family presets */
|
|
209
|
+
currency?: string | null;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export interface SheetCellFormatObj {
|
|
213
|
+
numberFormat?: SheetCellNumberFormatObj | null;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface SheetGridDesignObj {
|
|
217
|
+
rowCount: number;
|
|
218
|
+
columnCount: number;
|
|
219
|
+
frozenRows?: number | null;
|
|
220
|
+
frozenColumns?: number | null;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface SheetAxisDesignObj {
|
|
224
|
+
width?: number | null;
|
|
225
|
+
height?: number | null;
|
|
226
|
+
hidden?: boolean | null;
|
|
227
|
+
style?: SheetCellStyleObj | null;
|
|
228
|
+
format?: SheetCellFormatObj | null;
|
|
229
|
+
metadata?: Record<string, any> | null;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface SheetNamedRangeObj {
|
|
233
|
+
name?: string | null;
|
|
234
|
+
startRowIndex: number;
|
|
235
|
+
startColumnIndex: number;
|
|
236
|
+
endRowIndex: number;
|
|
237
|
+
endColumnIndex: number;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export interface SheetMergedRangeObj {
|
|
241
|
+
startRowIndex: number;
|
|
242
|
+
startColumnIndex: number;
|
|
243
|
+
endRowIndex: number;
|
|
244
|
+
endColumnIndex: number;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface SheetDesignObj {
|
|
248
|
+
version: number;
|
|
249
|
+
grid: SheetGridDesignObj;
|
|
250
|
+
columns?: Record<string, SheetAxisDesignObj>;
|
|
251
|
+
rows?: Record<string, SheetAxisDesignObj>;
|
|
252
|
+
defaultCellStyle?: SheetCellStyleObj;
|
|
253
|
+
defaultCellFormat?: SheetCellFormatObj;
|
|
254
|
+
namedRanges?: SheetNamedRangeObj[];
|
|
255
|
+
metadata?: Record<string, any>;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export type SheetEditorObj = Partial<{
|
|
259
|
+
textColors: string[];
|
|
260
|
+
fillColors: string[];
|
|
261
|
+
}>;
|
|
262
|
+
|
|
263
|
+
export interface SheetFormulaReferenceObj {
|
|
264
|
+
id?: string | null;
|
|
265
|
+
kind: SheetFormulaReferenceKind;
|
|
266
|
+
text: string;
|
|
267
|
+
status?: SheetFormulaReferenceStatusEnum | null;
|
|
268
|
+
sheetName?: string | null;
|
|
269
|
+
sheetTabId?: number | bigint | string | null;
|
|
270
|
+
rowIndex?: number | null;
|
|
271
|
+
columnIndex?: number | null;
|
|
272
|
+
columnLabel?: string | null;
|
|
273
|
+
startRowIndex?: number | null;
|
|
274
|
+
startColumnIndex?: number | null;
|
|
275
|
+
endRowIndex?: number | null;
|
|
276
|
+
endColumnIndex?: number | null;
|
|
277
|
+
|
|
278
|
+
value?: SheetCellValue;
|
|
279
|
+
textValue?: string | null;
|
|
280
|
+
numberValue?: number | null;
|
|
281
|
+
booleanValue?: boolean | null;
|
|
282
|
+
dateValue?: Date | string | null;
|
|
283
|
+
datetimeValue?: Date | string | null;
|
|
284
|
+
error?: SheetFormulaErrorObj | null;
|
|
285
|
+
cells?: SheetCellData[] | SheetCellGQL[] | null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface SheetFormulaErrorObj {
|
|
289
|
+
code: string;
|
|
290
|
+
message: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface SheetFormulaObj {
|
|
294
|
+
version: number;
|
|
295
|
+
engine: string;
|
|
296
|
+
text: string;
|
|
297
|
+
references?: SheetFormulaReferenceObj[];
|
|
298
|
+
error?: SheetFormulaErrorObj | null;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export interface SheetCompiledFormulaDiagnosticObj {
|
|
302
|
+
code: string;
|
|
303
|
+
message: string;
|
|
304
|
+
sheetName?: string | null;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface SheetCompiledFormulaCellReferenceObj {
|
|
308
|
+
rowIndex: number;
|
|
309
|
+
columnIndex: number;
|
|
310
|
+
sheetName?: string | null;
|
|
311
|
+
sheetTabId?: number | bigint | string | null;
|
|
312
|
+
status: SheetFormulaReferenceStatusEnum;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export interface SheetCompiledFormulaRangeReferenceObj {
|
|
316
|
+
startRowIndex: number;
|
|
317
|
+
startColumnIndex: number;
|
|
318
|
+
endRowIndex: number;
|
|
319
|
+
endColumnIndex: number;
|
|
320
|
+
sheetName?: string | null;
|
|
321
|
+
sheetTabId?: number | bigint | string | null;
|
|
322
|
+
status: SheetFormulaReferenceStatusEnum;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface SheetCompiledFormulaObj {
|
|
326
|
+
version: number;
|
|
327
|
+
text: string;
|
|
328
|
+
volatile: boolean;
|
|
329
|
+
cells: SheetCompiledFormulaCellReferenceObj[];
|
|
330
|
+
ranges: SheetCompiledFormulaRangeReferenceObj[];
|
|
331
|
+
|
|
332
|
+
diagnostics: SheetCompiledFormulaDiagnosticObj[];
|
|
333
|
+
/* Stored parse tree for current compile-cache evaluation. It is null on a
|
|
334
|
+
* parse failure; consumers reparse canonical formula text on a cache miss. */
|
|
335
|
+
ast?: SheetFormulaASTNode | null;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface SheetData {
|
|
339
|
+
__table: 'sheets';
|
|
340
|
+
|
|
341
|
+
id: number | bigint;
|
|
342
|
+
organizationId: number | bigint;
|
|
343
|
+
name: string;
|
|
344
|
+
title: string;
|
|
345
|
+
description?: string | null;
|
|
346
|
+
position: number;
|
|
347
|
+
editor?: SheetEditorObj | null;
|
|
348
|
+
access?: DocAccessBaseObj | null;
|
|
349
|
+
deletedAt?: Date | string | null;
|
|
350
|
+
hiddenByJobId?: number | bigint | null;
|
|
351
|
+
accessEpoch?: number | bigint;
|
|
352
|
+
manifestRevision?: SheetJournalSeq | bigint;
|
|
353
|
+
createdAt: Date;
|
|
354
|
+
updatedAt: Date;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface SheetTabData {
|
|
358
|
+
__table: 'sheet_tabs';
|
|
359
|
+
|
|
360
|
+
id: number | bigint;
|
|
361
|
+
organizationId: number | bigint;
|
|
362
|
+
sheetId: number | bigint;
|
|
363
|
+
name: string;
|
|
364
|
+
position: number;
|
|
365
|
+
hidden: boolean;
|
|
366
|
+
design: SheetDesignObj;
|
|
367
|
+
cellsRevision: SheetJournalSeq | bigint;
|
|
368
|
+
designRevision: SheetJournalSeq | bigint;
|
|
369
|
+
hiddenByJobId?: number | bigint | null;
|
|
370
|
+
createdAt: Date;
|
|
371
|
+
updatedAt: Date;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface SheetCellData {
|
|
375
|
+
__table: 'sheet_cells';
|
|
376
|
+
|
|
377
|
+
id: number | bigint | string;
|
|
378
|
+
organizationId: number | bigint;
|
|
379
|
+
sheetId: number | bigint;
|
|
380
|
+
sheetTabId: number | bigint;
|
|
381
|
+
rowIndex: number;
|
|
382
|
+
columnIndex: number;
|
|
383
|
+
rawInput?: string | null;
|
|
384
|
+
literalType?: SheetCellLiteralType | null;
|
|
385
|
+
|
|
386
|
+
formulaText?: string | null;
|
|
387
|
+
compiledFormula?: SheetCompiledFormulaObj | null;
|
|
388
|
+
value?: SheetCellValue;
|
|
389
|
+
formulaValue?: SheetCellValue;
|
|
390
|
+
textValue?: string | null;
|
|
391
|
+
numberValue?: number | null;
|
|
392
|
+
booleanValue?: boolean | null;
|
|
393
|
+
dateValue?: Date | string | null;
|
|
394
|
+
datetimeValue?: Date | string | null;
|
|
395
|
+
errorCode?: string | null;
|
|
396
|
+
errorMessage?: string | null;
|
|
397
|
+
computedAt?: Date | string | null;
|
|
398
|
+
revision: number | bigint;
|
|
399
|
+
volatile?: boolean;
|
|
400
|
+
formula?: SheetFormulaObj | null;
|
|
401
|
+
style?: SheetCellStyleObj | null;
|
|
402
|
+
format?: Record<string, any> | null;
|
|
403
|
+
note?: string | null;
|
|
404
|
+
|
|
405
|
+
deletedAt?: Date | string | null;
|
|
406
|
+
deletionJobId?: number | bigint | null;
|
|
407
|
+
|
|
408
|
+
createdAt: Date;
|
|
409
|
+
updatedAt: Date;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
export interface SheetGridViewportObj {
|
|
413
|
+
startRowIndex: number;
|
|
414
|
+
startColumnIndex: number;
|
|
415
|
+
rowCount: number;
|
|
416
|
+
columnCount: number;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export interface SheetGridRowObj {
|
|
420
|
+
rowIndex: number;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface SheetGridPageInfoObj {
|
|
424
|
+
hasMoreRows: boolean;
|
|
425
|
+
lastContentRowIndex?: number | null;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export interface SheetGridObj {
|
|
429
|
+
id: number | bigint;
|
|
430
|
+
viewport: SheetGridViewportObj;
|
|
431
|
+
rows: SheetGridRowObj[];
|
|
432
|
+
cells: SheetCellData[];
|
|
433
|
+
|
|
434
|
+
pageInfo: SheetGridPageInfoObj;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface SheetGridDesignGQL {
|
|
438
|
+
rowCount?: number | null;
|
|
439
|
+
columnCount?: number | null;
|
|
440
|
+
frozenRows?: number | null;
|
|
441
|
+
frozenColumns?: number | null;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/* Canonical on-wire representation for sheet_tabs.cellsRevision and journal seq. */
|
|
445
|
+
export type SheetJournalSeq = string;
|
|
446
|
+
|
|
447
|
+
/* Internal database callers may supply bigint; wire callers use decimal strings. */
|
|
448
|
+
export type SheetJournalSeqInput = SheetJournalSeq | bigint | null | undefined;
|
|
449
|
+
|
|
450
|
+
export interface SheetDesignGQL {
|
|
451
|
+
id?: string | null;
|
|
452
|
+
version?: number | null;
|
|
453
|
+
grid?: SheetGridDesignGQL | null;
|
|
454
|
+
columns?: string | null;
|
|
455
|
+
rows?: string | null;
|
|
456
|
+
defaultCellStyle?: SheetCellStyleObj | null;
|
|
457
|
+
defaultCellFormat?: string | null;
|
|
458
|
+
namedRanges?: SheetNamedRangeObj[];
|
|
459
|
+
metadata?: string | null;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export type SheetEditorGQL = Partial<{
|
|
463
|
+
textColors: string[];
|
|
464
|
+
fillColors: string[];
|
|
465
|
+
}>;
|
|
466
|
+
|
|
467
|
+
export interface SheetAccessInfoGQL {
|
|
468
|
+
sheetId?: string | null;
|
|
469
|
+
organizationId?: string | null;
|
|
470
|
+
canView?: boolean | null;
|
|
471
|
+
canEdit?: boolean | null;
|
|
472
|
+
signInRequired?: boolean | null;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export type SheetBootstrapMode = 'SNAPSHOT' | 'DELTA';
|
|
476
|
+
export type SheetBootstrapStatus = 'DENIED' | 'READY' | 'RETRY' | 'UNAVAILABLE';
|
|
477
|
+
export type SheetReplicaSyncReason =
|
|
478
|
+
| 'FORMULA_DEPENDENCY'
|
|
479
|
+
| 'INITIAL'
|
|
480
|
+
| 'MANIFEST_REFRESH'
|
|
481
|
+
| 'PERSISTED_RESTORE'
|
|
482
|
+
| 'REALTIME_GAP'
|
|
483
|
+
| 'SELECTION';
|
|
484
|
+
|
|
485
|
+
export interface SheetReplicaSyncRequirement {
|
|
486
|
+
minimumCellsRevision?: SheetJournalSeqInput;
|
|
487
|
+
minimumDesignRevision?: SheetJournalSeqInput;
|
|
488
|
+
requireSnapshot?: boolean;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export interface SheetTabSummaryGQL {
|
|
492
|
+
id?: string | null;
|
|
493
|
+
name?: string | null;
|
|
494
|
+
position?: number | null;
|
|
495
|
+
hidden?: boolean | null;
|
|
496
|
+
currentSeq?: SheetJournalSeq | null;
|
|
497
|
+
referencedTabIds?: string[] | null;
|
|
498
|
+
updatedAt?: string | null;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/* Versioned workbook/tab catalog delivered by bootstrap and realtime. */
|
|
502
|
+
export interface SheetManifestGQL {
|
|
503
|
+
id: string;
|
|
504
|
+
manifestRevision: SheetJournalSeq;
|
|
505
|
+
tabs: SheetTabSummaryGQL[];
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface SheetBootstrapSnapshotGQL {
|
|
509
|
+
seq?: SheetJournalSeq | null;
|
|
510
|
+
encodingVersion?: number | null;
|
|
511
|
+
viewport?: SheetGridViewportObj | null;
|
|
512
|
+
payload?: string | null;
|
|
513
|
+
checksum?: string | null;
|
|
514
|
+
cellCount?: number | null;
|
|
515
|
+
payloadBytes?: string | null;
|
|
516
|
+
createdAt?: string | null;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export interface SheetTabChangeGQL {
|
|
520
|
+
causationId?: string | null;
|
|
521
|
+
commandId?: string | null;
|
|
522
|
+
commandType?: string | null;
|
|
523
|
+
sheetTabId?: string | null;
|
|
524
|
+
seq?: SheetJournalSeq | null;
|
|
525
|
+
kind?: string | null;
|
|
526
|
+
payload?: string | null;
|
|
527
|
+
sessionId?: string | null;
|
|
528
|
+
createdAt?: string | null;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export interface SheetRealtimeTabWatermark {
|
|
532
|
+
currentSeq: SheetJournalSeq;
|
|
533
|
+
designRevision: SheetJournalSeq;
|
|
534
|
+
sheetTabId: string;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
export interface SheetRealtimeWatermarks {
|
|
538
|
+
manifestRevision: SheetJournalSeq;
|
|
539
|
+
tabs: SheetRealtimeTabWatermark[];
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
export interface SheetGQL {
|
|
543
|
+
__deleted?: boolean;
|
|
544
|
+
|
|
545
|
+
id?: string | null;
|
|
546
|
+
cursor?: string | null;
|
|
547
|
+
organizationId?: string | null;
|
|
548
|
+
name?: string | null;
|
|
549
|
+
title?: string | null;
|
|
550
|
+
description?: string | null;
|
|
551
|
+
position?: number | null;
|
|
552
|
+
editor?: SheetEditorGQL | null;
|
|
553
|
+
access?: DocAccessBaseObj | null;
|
|
554
|
+
deletedAt?: string | null;
|
|
555
|
+
/* Monotonic workbook/tab catalog revision serialized as BigInt text. */
|
|
556
|
+
manifestRevision?: SheetJournalSeq;
|
|
557
|
+
tabs?: SheetTabGQL[];
|
|
558
|
+
/* Mutation-only acknowledgement for an already-committed structure opId. */
|
|
559
|
+
structureCommandReplayed?: boolean | null;
|
|
560
|
+
createdAt?: string | null;
|
|
561
|
+
updatedAt?: string | null;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export interface SheetTabMutationResultGQL {
|
|
565
|
+
changed: boolean;
|
|
566
|
+
commandId: string;
|
|
567
|
+
deletedSheetTabId?: string | null;
|
|
568
|
+
manifestRevision: SheetJournalSeq;
|
|
569
|
+
replayed: boolean;
|
|
570
|
+
tab?: SheetTabGQL | null;
|
|
571
|
+
tabs: SheetTabGQL[];
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface SheetTabGQL {
|
|
575
|
+
__deleted?: boolean;
|
|
576
|
+
|
|
577
|
+
id?: string | null;
|
|
578
|
+
organizationId?: string | null;
|
|
579
|
+
sheetId?: string | null;
|
|
580
|
+
name?: string | null;
|
|
581
|
+
position?: number | null;
|
|
582
|
+
hidden?: boolean | null;
|
|
583
|
+
design?: SheetDesignGQL | null;
|
|
584
|
+
/* BigInt is serialized as a canonical base-10 string. */
|
|
585
|
+
cellsRevision?: SheetJournalSeq;
|
|
586
|
+
/* Monotonic revision for property-level design operations. */
|
|
587
|
+
designRevision?: SheetJournalSeq;
|
|
588
|
+
createdAt?: string | null;
|
|
589
|
+
updatedAt?: string | null;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/*
|
|
593
|
+
* Internal, token-authorized first-tab payload for a browser screenshot.
|
|
594
|
+
*/
|
|
595
|
+
export interface OverallSheetPreviewCaptureObj {
|
|
596
|
+
sheetId: string;
|
|
597
|
+
sheetTabId: string;
|
|
598
|
+
revision: string;
|
|
599
|
+
timeZone: string | null;
|
|
600
|
+
sheetTab: SheetTabGQL;
|
|
601
|
+
cells: SheetCellGQL[];
|
|
602
|
+
viewport: SheetGridViewportObj;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export interface SheetBootstrapGQL {
|
|
606
|
+
access: SheetAccessInfoGQL;
|
|
607
|
+
contractVersion: number;
|
|
608
|
+
realtimeToken?: string | null;
|
|
609
|
+
status: SheetBootstrapStatus;
|
|
610
|
+
unavailableReason?: string | null;
|
|
611
|
+
sheet?: SheetGQL | null;
|
|
612
|
+
tabs?: SheetTabSummaryGQL[] | null;
|
|
613
|
+
selectedTab?: SheetTabGQL | null;
|
|
614
|
+
mode?: SheetBootstrapMode | null;
|
|
615
|
+
currentSeq?: SheetJournalSeq | null;
|
|
616
|
+
servedViewport?: SheetGridViewportObj | null;
|
|
617
|
+
snapshot?: SheetBootstrapSnapshotGQL | null;
|
|
618
|
+
changes?: SheetTabChangeGQL[] | null;
|
|
619
|
+
/*
|
|
620
|
+
* SNAPSHOT answers to a request with sinceSeq: the STRUCTURE rows (their op
|
|
621
|
+
* only) in (sinceSeq, snapshot.seq] the image absorbed; every such row when
|
|
622
|
+
* topologyComplete is true, none when false; both null otherwise.
|
|
623
|
+
*/
|
|
624
|
+
topologyChanges?: SheetTabChangeGQL[] | null;
|
|
625
|
+
topologyComplete?: boolean | null;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export type SheetTabBootstrapGQL = Omit<SheetBootstrapGQL, 'sheet' | 'tabs'> & {
|
|
629
|
+
sheet?: never;
|
|
630
|
+
tabs?: never;
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
/* Freshly signed capabilities from openSheet's authorization, without workbook data. */
|
|
634
|
+
export interface SheetRealtimeCapabilityGQL {
|
|
635
|
+
access: SheetAccessInfoGQL;
|
|
636
|
+
status: SheetBootstrapStatus;
|
|
637
|
+
unavailableReason?: string | null;
|
|
638
|
+
realtimeToken?: string | null;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export interface SheetCellGQL {
|
|
642
|
+
id?: string | null;
|
|
643
|
+
organizationId?: string | null;
|
|
644
|
+
sheetId?: string | null;
|
|
645
|
+
sheetTabId?: string | null;
|
|
646
|
+
rowIndex?: number | null;
|
|
647
|
+
columnIndex?: number | null;
|
|
648
|
+
rawInput?: string | null;
|
|
649
|
+
literalType?: SheetCellLiteralType | null;
|
|
650
|
+
|
|
651
|
+
formulaText?: string | null;
|
|
652
|
+
compiledFormula?: SheetCompiledFormulaObj | null;
|
|
653
|
+
value?: string | null;
|
|
654
|
+
formulaValue?: SheetCellValue;
|
|
655
|
+
textValue?: string | null;
|
|
656
|
+
numberValue?: number | null;
|
|
657
|
+
booleanValue?: boolean | null;
|
|
658
|
+
dateValue?: string | null;
|
|
659
|
+
datetimeValue?: string | null;
|
|
660
|
+
errorCode?: string | null;
|
|
661
|
+
errorMessage?: string | null;
|
|
662
|
+
computedAt?: string | null;
|
|
663
|
+
/* BIGINT is serialized as a canonical base-10 string. */
|
|
664
|
+
revision?: SheetJournalSeq;
|
|
665
|
+
formula?: SheetFormulaObj | null;
|
|
666
|
+
style?: SheetCellStyleObj | null;
|
|
667
|
+
format?: string | null;
|
|
668
|
+
note?: string | null;
|
|
669
|
+
|
|
670
|
+
createdAt?: string | null;
|
|
671
|
+
updatedAt?: string | null;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/* Server-authored Sheet cell payload with mandatory tab ownership and revision. */
|
|
675
|
+
export type SheetAuthoritativeCellGQL = SheetCellGQL & {
|
|
676
|
+
id: string;
|
|
677
|
+
rowIndex: number;
|
|
678
|
+
columnIndex: number;
|
|
679
|
+
revision: SheetJournalSeq;
|
|
680
|
+
sheetTabId: string;
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
/* Derived write-back item (computed fields only) delivered by cellsComputedDelta. */
|
|
684
|
+
export type SheetComputedCellGQL = SheetComputedCellPayload;
|
|
685
|
+
|
|
686
|
+
export interface SheetGridRowGQL {
|
|
687
|
+
rowIndex: number;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export interface SheetViewStructureOpGQL {
|
|
691
|
+
at?: number | null;
|
|
692
|
+
|
|
693
|
+
index: number;
|
|
694
|
+
opId?: string | null;
|
|
695
|
+
operation: string;
|
|
696
|
+
structureSeq?: SheetJournalSeq | null;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/*
|
|
700
|
+
* Ordered revision-fenced row/column permutation. Consumers apply it only
|
|
701
|
+
* when both local base revisions match and otherwise use authoritative
|
|
702
|
+
* cells/design or snapshot recovery from the same patch.
|
|
703
|
+
*/
|
|
704
|
+
export interface SheetAxisMoveDeltaGQL extends SheetAxisMoveCommandInput {
|
|
705
|
+
baseDesignRevision: SheetJournalSeq;
|
|
706
|
+
baseRevision: SheetJournalSeq;
|
|
707
|
+
commandId: string;
|
|
708
|
+
resultDesignRevision: SheetJournalSeq;
|
|
709
|
+
resultRevision: SheetJournalSeq;
|
|
710
|
+
schemaVersion: 1;
|
|
711
|
+
sheetTabId: string;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
export interface SheetViewGQL {
|
|
715
|
+
id: string;
|
|
716
|
+
sheetId: string;
|
|
717
|
+
sheetTabId: string;
|
|
718
|
+
axisMoveOps?: SheetAxisMoveDeltaGQL[] | null;
|
|
719
|
+
/* Per-tab monotonic counter bumped on every cell-content change; carried
|
|
720
|
+
* on realtime cells payloads so clients can detect dropped messages */
|
|
721
|
+
cellsRevision: SheetJournalSeq;
|
|
722
|
+
/* Latest design CAS revision serialized under the same BigInt contract. */
|
|
723
|
+
designRevision: SheetJournalSeq;
|
|
724
|
+
/* One-shot journal range on realtime patches. */
|
|
725
|
+
fromSeq?: SheetJournalSeq | null;
|
|
726
|
+
toSeq?: SheetJournalSeq | null;
|
|
727
|
+
/* Chunk metadata: every chunk of one packet shares fromSeq/toSeq (v3). */
|
|
728
|
+
chunkIndex?: number | null;
|
|
729
|
+
chunkCount?: number | null;
|
|
730
|
+
originActorAccountId?: string | null;
|
|
731
|
+
/* The origin envelope's per-document clientId (v3); null for agents. */
|
|
732
|
+
originClientId?: string | null;
|
|
733
|
+
|
|
734
|
+
requiresSnapshot?: boolean | null;
|
|
735
|
+
/* One-shot authoritative settlement for a durable command envelope. */
|
|
736
|
+
commandBatchAck?: SheetCommandBatchAckGQL | null;
|
|
737
|
+
sheetTab?: SheetTabGQL | null;
|
|
738
|
+
cells?: SheetAuthoritativeCellGQL[];
|
|
739
|
+
cellsDelta?: SheetAuthoritativeCellGQL[] | null;
|
|
740
|
+
/* Derived cells converged by the server; apply after cellsDelta by coordinate + id. */
|
|
741
|
+
cellsComputedDelta?: SheetComputedCellGQL[] | null;
|
|
742
|
+
deletedCellCoords?: SheetDeletedCellCoordGQL[] | null;
|
|
743
|
+
|
|
744
|
+
structureOps?: SheetViewStructureOpGQL[] | null;
|
|
745
|
+
pageInfo?: SheetGridPageInfoGQL | null;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export interface SheetDeletedCellCoordGQL {
|
|
749
|
+
rowIndex: number;
|
|
750
|
+
columnIndex: number;
|
|
751
|
+
id: string | null;
|
|
752
|
+
revision: SheetJournalSeq | null;
|
|
753
|
+
sheetTabId: string;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/* Per-tab revisions allocated by one durable Sheet command. */
|
|
757
|
+
export interface SheetCommandTabRevisionGQL {
|
|
758
|
+
sheetTabId: string;
|
|
759
|
+
baseRevision: SheetJournalSeq;
|
|
760
|
+
resultRevision: SheetJournalSeq;
|
|
761
|
+
baseDesignRevision: SheetJournalSeq;
|
|
762
|
+
resultDesignRevision: SheetJournalSeq;
|
|
763
|
+
journalFromSeq: SheetJournalSeq | null;
|
|
764
|
+
journalToSeq: SheetJournalSeq | null;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/* Structured optimistic-concurrency conflict returned without losing local work. */
|
|
768
|
+
export interface SheetCommandConflictGQL {
|
|
769
|
+
code: string;
|
|
770
|
+
historyBoundary?: boolean | null;
|
|
771
|
+
invalidatesTargetCommandId?: string | null;
|
|
772
|
+
message?: string | null;
|
|
773
|
+
targetType?: string | null;
|
|
774
|
+
targetKey?: string | null;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/* Shared mutation result for edit, undo, and redo command operations. */
|
|
778
|
+
export interface SheetCommandResultGQL {
|
|
779
|
+
commandId: string;
|
|
780
|
+
commandStatus: SheetCommandStatusEnum;
|
|
781
|
+
replayed: boolean;
|
|
782
|
+
axisMoveOps?: SheetAxisMoveDeltaGQL[] | null;
|
|
783
|
+
tabRevisions: SheetCommandTabRevisionGQL[];
|
|
784
|
+
affectedCells?: SheetAuthoritativeCellGQL[] | null;
|
|
785
|
+
|
|
786
|
+
affectedTabs?: SheetTabGQL[] | null;
|
|
787
|
+
deletedCellCoords?: SheetDeletedCellCoordGQL[] | null;
|
|
788
|
+
conflict?: SheetCommandConflictGQL | null;
|
|
789
|
+
requiresSnapshot?: boolean | null;
|
|
790
|
+
/* Whether the server kept an undo record for this command (contract v4). */
|
|
791
|
+
undoRecorded?: boolean | null;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/* One authoritative item settlement returned by a Sheet command batch. */
|
|
795
|
+
export interface SheetCommandBatchSettlementGQL {
|
|
796
|
+
commandId: string;
|
|
797
|
+
errorCode: string | null;
|
|
798
|
+
result: SheetCommandResultGQL | null;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/*
|
|
802
|
+
* One command envelope's settlement carried by realtime and HTTP patches
|
|
803
|
+
* (wire contract v4). Peers retire outbox items and drafts whose ids appear
|
|
804
|
+
* in committedCommandIds or noWriteCommandIds.
|
|
805
|
+
*/
|
|
806
|
+
export interface SheetCommandBatchAckGQL {
|
|
807
|
+
actorAccountId: string;
|
|
808
|
+
envelopeId: string;
|
|
809
|
+
/* The envelope's per-document client id; null for agent and script envelopes */
|
|
810
|
+
clientId: string | null;
|
|
811
|
+
/* Items the envelope committed or replayed (never CONFLICTED) */
|
|
812
|
+
committedCommandIds: string[];
|
|
813
|
+
/* Committed items whose every tab revision wrote no journal row (no-op writes) */
|
|
814
|
+
noWriteCommandIds: string[];
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/*
|
|
818
|
+
* Ordered settlements and final authority returned by one Sheet command
|
|
819
|
+
* envelope (wire contract v4). `replayed` marks the stored receipt of an
|
|
820
|
+
* envelope that had already committed.
|
|
821
|
+
*/
|
|
822
|
+
export interface SheetCommandBatchResultGQL {
|
|
823
|
+
actorAccountId: string;
|
|
824
|
+
envelopeId: string;
|
|
825
|
+
clientId: string;
|
|
826
|
+
clientSeq: number;
|
|
827
|
+
replayed: boolean;
|
|
828
|
+
committedCommandIds: string[];
|
|
829
|
+
noWriteCommandIds: string[];
|
|
830
|
+
/* One settlement per command, in envelope order */
|
|
831
|
+
settlements: SheetCommandBatchSettlementGQL[];
|
|
832
|
+
authoritativePatches: SheetViewGQL[];
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
export interface SheetGridPageInfoGQL {
|
|
836
|
+
hasMoreRows?: boolean | null;
|
|
837
|
+
lastContentRowIndex?: number | null;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
export interface SheetGridGQL {
|
|
841
|
+
id?: string | null;
|
|
842
|
+
viewport?: SheetGridViewportObj | null;
|
|
843
|
+
rows?: SheetGridRowGQL[];
|
|
844
|
+
cells?: SheetCellGQL[];
|
|
845
|
+
|
|
846
|
+
pageInfo?: SheetGridPageInfoGQL | null;
|
|
847
|
+
}
|