@jsb188/mday 1.1.8 → 1.1.11
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 +105 -35
- package/src/constants/agentDoc.ts +12 -0
- package/src/constants/agentMemory.ts +154 -0
- package/src/constants/aiChat.ts +5 -0
- package/src/constants/campaign.ts +127 -0
- package/src/constants/dataTable.ts +48 -0
- package/src/constants/dataTableFieldTypes.generated.ts +63 -0
- package/src/constants/docAccess.ts +32 -0
- package/src/constants/email.ts +44 -0
- package/src/constants/fieldDoc.ts +34 -0
- package/src/constants/graphqlReactivity.ts +113 -0
- package/src/constants/inboundContact.ts +8 -0
- package/src/constants/integration.ts +13 -0
- package/src/constants/log.ts +7 -366
- package/src/constants/logActivityGroupColors.generated.ts +19 -0
- package/src/constants/logTaxonomy.generated.ts +1103 -0
- package/src/constants/noteDoc.ts +77 -0
- package/src/constants/organization.ts +18 -11
- package/src/constants/pageRoute.ts +23 -0
- package/src/constants/schedule.ts +220 -0
- package/src/constants/scheduleRuleTemplateSeed.ts +138 -0
- package/src/constants/scheduleRuleTemplates.generated.ts +145 -0
- package/src/constants/sheet.ts +168 -0
- package/src/constants/sheetRegionSources.generated.ts +578 -0
- package/src/constants/square.ts +16 -0
- package/src/constants/storage.ts +61 -0
- package/src/constants/usage.ts +79 -0
- package/src/schemas/editLogEntry.ts +1017 -738
- package/src/schemas/fieldDocsQuery.ts +12 -0
- package/src/schemas/inboundContact.ts +77 -0
- package/src/schemas/logsQuery.ts +57 -316
- package/src/schemas/organization.ts +53 -213
- package/src/types/account.d.ts +81 -0
- package/src/types/agentDoc.d.ts +64 -0
- package/src/types/agentMemory.d.ts +74 -0
- package/src/types/campaign.d.ts +683 -0
- package/src/types/dataTable.d.ts +366 -0
- package/src/types/docAccess.d.ts +96 -0
- package/src/types/email.d.ts +142 -0
- package/src/types/fieldDoc.d.ts +273 -0
- package/src/types/inboundContact.d.ts +57 -0
- package/src/types/integration.d.ts +42 -0
- package/src/types/log.d.ts +169 -190
- package/src/types/noteDoc.d.ts +86 -0
- package/src/types/organization.d.ts +175 -76
- package/src/types/pageRoute.d.ts +48 -0
- package/src/types/schedule.d.ts +391 -0
- package/src/types/sheet.d.ts +1130 -0
- package/src/types/storage.d.ts +242 -0
- package/src/types/usage.d.ts +106 -0
- package/src/types/workflow.d.ts +305 -0
- package/src/utils/agentDoc.ts +109 -0
- package/src/utils/aiChat.ts +26 -0
- package/src/utils/campaign.ts +741 -0
- package/src/utils/campaignFormEditor.ts +871 -0
- package/src/utils/dataTable.ts +849 -0
- package/src/utils/dataTableFieldTypeRegistry.ts +105 -0
- package/src/utils/dataTableRealtimeAuthority.ts +209 -0
- package/src/utils/dataTableRealtimeSelection.ts +134 -0
- package/src/utils/dataTableRowDocument.ts +508 -0
- package/src/utils/dataTableSource.ts +230 -0
- package/src/utils/docAccess.ts +383 -0
- package/src/utils/documentName.ts +53 -0
- package/src/utils/email.ts +172 -0
- package/src/utils/fieldDoc.ts +113 -0
- package/src/utils/log.ts +173 -778
- package/src/utils/logRegistryValue.ts +90 -0
- package/src/utils/logStoreRead.ts +266 -0
- package/src/utils/logTaxonomy.ts +76 -0
- package/src/utils/logTaxonomyDisplay.ts +439 -0
- package/src/utils/noteDoc.ts +827 -0
- package/src/utils/organization.ts +683 -81
- package/src/utils/pageRoute.ts +71 -0
- package/src/utils/schedule.ts +799 -0
- package/src/utils/scheduleEvaluation.ts +1994 -0
- package/src/utils/scheduleICS.ts +246 -0
- package/src/utils/scheduleRuleTemplates.ts +188 -0
- package/src/utils/sheet.ts +4973 -0
- package/src/utils/sheetAxisMove.ts +830 -0
- package/src/utils/sheetBootstrap.ts +1769 -0
- package/src/utils/sheetCommand.ts +423 -0
- package/src/utils/sheetExport.ts +238 -0
- package/src/utils/sheetFormulaEvaluation.ts +914 -0
- package/src/utils/sheetFormulaEvaluator.ts +852 -0
- package/src/utils/sheetJournal.ts +78 -0
- package/src/utils/sheetNumberFormat.ts +1211 -0
- package/src/utils/sheetRegion.ts +374 -0
- package/src/utils/sheetRegionFilter.ts +1259 -0
- package/src/utils/sheetRegionSourceRegistry.ts +594 -0
- package/src/utils/sheetSequence.ts +148 -0
- package/src/utils/sheetSnapshot.ts +992 -0
- package/src/utils/sheetStructureEdit.ts +1284 -0
- package/src/utils/square.ts +32 -0
- package/src/utils/storage.ts +152 -0
- package/src/utils/table-route.ts +262 -0
- package/src/utils/workflow.ts +380 -0
- package/tests/dataTableFieldTypeRegistry.test.ts +110 -0
- package/tests/docAccess.test.ts +525 -0
- package/tests/editLogEntry.test.ts +112 -0
- package/tests/noteDoc.test.ts +669 -0
- package/tests/schedule.test.ts +693 -0
- package/tests/scheduleEvaluation.test.ts +1970 -0
- package/tests/scheduleICS.test.ts +208 -0
- package/tests/scheduleRuleTemplates.test.ts +176 -0
- package/tests/scheduleSweepInvariants.test.ts +428 -0
- package/tests/sheetAxisMove.test.ts +343 -0
- package/tests/sheetFormulaEvaluator.test.ts +575 -0
- package/tests/sheetRegionFilter.test.ts +1135 -0
- package/tests/sheetSequence.test.ts +41 -0
- package/tests/sheetStructureEdit.test.ts +82 -0
- package/tsconfig.json +12 -0
- package/vitest.config.ts +8 -0
- package/src/constants/log-activityTexts.ts +0 -209
- package/src/constants/product.ts +0 -66
- package/src/constants/report.ts +0 -25
- package/src/schemas/childOrganizationsQuery.ts +0 -44
- package/src/schemas/productsQuery.ts +0 -145
- package/src/schemas/reportsQuery.ts +0 -107
- package/src/types/action.d.ts +0 -42
- package/src/types/product.d.ts +0 -173
- package/src/types/report.d.ts +0 -203
- package/src/utils/product-calEvent.ts +0 -508
- package/src/utils/route-helpers.ts +0 -583
|
@@ -0,0 +1,1130 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GRID_ITEM_SORT_ENUMS,
|
|
3
|
+
SHEET_CELL_NUMBER_FORMAT_TYPE_ENUMS,
|
|
4
|
+
SHEET_CELL_SOURCE_TYPE_ENUMS,
|
|
5
|
+
SHEET_CELL_TEXT_ALIGN_ENUMS,
|
|
6
|
+
SHEET_CELL_TEXT_WRAP_ENUMS,
|
|
7
|
+
SHEET_CELL_VALUE_TYPE_ENUMS,
|
|
8
|
+
SHEET_CELL_VERTICAL_ALIGN_ENUMS,
|
|
9
|
+
SHEET_CUSTOM_REGION_SOURCE_COLUMN_FORMULA_VALUE_SOURCE_ENUMS,
|
|
10
|
+
SHEET_EXPORT_FORMAT_ENUMS,
|
|
11
|
+
SHEET_REGION_CONFLICT_POLICY_ENUMS,
|
|
12
|
+
SHEET_REGION_PROJECTION_STATUS_ENUMS,
|
|
13
|
+
SHEET_REGION_SOURCE_FILTER_COMBINATOR_ENUMS,
|
|
14
|
+
SHEET_REGION_SOURCE_FILTER_OPERATOR_ENUMS,
|
|
15
|
+
SHEET_REGION_SOURCE_SORT_DIRECTION_ENUMS,
|
|
16
|
+
SHEET_REGION_SOURCE_TYPE_ENUMS,
|
|
17
|
+
SHEET_REGION_TYPE_ENUMS,
|
|
18
|
+
SHEET_STRUCTURE_OPERATION_ENUMS,
|
|
19
|
+
} from '../constants/sheet.ts';
|
|
20
|
+
import type { SheetFormulaASTNode } from '../utils/sheet.ts';
|
|
21
|
+
import type {
|
|
22
|
+
DataTableDesignGQL,
|
|
23
|
+
DataTableFieldTypeEnum,
|
|
24
|
+
} from './dataTable.d.ts';
|
|
25
|
+
import type { DocAccessBaseObj } from './docAccess.d.ts';
|
|
26
|
+
|
|
27
|
+
export type SheetCellSourceTypeEnum =
|
|
28
|
+
(typeof SHEET_CELL_SOURCE_TYPE_ENUMS)[number];
|
|
29
|
+
export type SheetCellTextAlignEnum =
|
|
30
|
+
(typeof SHEET_CELL_TEXT_ALIGN_ENUMS)[number];
|
|
31
|
+
export type SheetCellTextWrapEnum = (typeof SHEET_CELL_TEXT_WRAP_ENUMS)[number];
|
|
32
|
+
export type SheetCellVerticalAlignEnum =
|
|
33
|
+
(typeof SHEET_CELL_VERTICAL_ALIGN_ENUMS)[number];
|
|
34
|
+
export type SheetRegionTypeEnum = (typeof SHEET_REGION_TYPE_ENUMS)[number];
|
|
35
|
+
export type SheetRegionProjectionStatusEnum =
|
|
36
|
+
(typeof SHEET_REGION_PROJECTION_STATUS_ENUMS)[number];
|
|
37
|
+
export type SheetRegionSourceTypeEnum =
|
|
38
|
+
(typeof SHEET_REGION_SOURCE_TYPE_ENUMS)[number];
|
|
39
|
+
export type SheetRegionConflictPolicyEnum =
|
|
40
|
+
(typeof SHEET_REGION_CONFLICT_POLICY_ENUMS)[number];
|
|
41
|
+
export type SheetRegionSourceFilterCombinatorEnum =
|
|
42
|
+
(typeof SHEET_REGION_SOURCE_FILTER_COMBINATOR_ENUMS)[number];
|
|
43
|
+
export type SheetRegionSourceFilterOperatorEnum =
|
|
44
|
+
(typeof SHEET_REGION_SOURCE_FILTER_OPERATOR_ENUMS)[number];
|
|
45
|
+
export type SheetRegionSourceSortDirectionEnum =
|
|
46
|
+
(typeof SHEET_REGION_SOURCE_SORT_DIRECTION_ENUMS)[number];
|
|
47
|
+
export type SheetStructureOperationEnum =
|
|
48
|
+
(typeof SHEET_STRUCTURE_OPERATION_ENUMS)[number];
|
|
49
|
+
export type SheetCellValueTypeEnum =
|
|
50
|
+
(typeof SHEET_CELL_VALUE_TYPE_ENUMS)[number];
|
|
51
|
+
export type SheetCellNumberFormatTypeEnum =
|
|
52
|
+
(typeof SHEET_CELL_NUMBER_FORMAT_TYPE_ENUMS)[number];
|
|
53
|
+
export type GridItemSortEnum = (typeof GRID_ITEM_SORT_ENUMS)[number];
|
|
54
|
+
export type SheetExportFormatEnum = (typeof SHEET_EXPORT_FORMAT_ENUMS)[number];
|
|
55
|
+
export type SheetFormulaReferenceKind =
|
|
56
|
+
| 'SHEET_CELL'
|
|
57
|
+
| 'SHEET_RANGE'
|
|
58
|
+
| 'DATA_TABLE_CELL'
|
|
59
|
+
| 'DATA_TABLE_QUERY_CELL';
|
|
60
|
+
export type SheetFormulaReferenceStatusEnum =
|
|
61
|
+
| 'READY'
|
|
62
|
+
| 'LOADING'
|
|
63
|
+
| 'ERROR'
|
|
64
|
+
| 'NOT_FOUND';
|
|
65
|
+
export type SheetRegionColumnKind = 'DATA_TABLE_CELL' | 'FORMULA';
|
|
66
|
+
export type SheetCustomRegionSourceColumnFormulaValueSourceEnum =
|
|
67
|
+
(typeof SHEET_CUSTOM_REGION_SOURCE_COLUMN_FORMULA_VALUE_SOURCE_ENUMS)[number];
|
|
68
|
+
|
|
69
|
+
/* Durable Sheet command lifecycle returned by mutations and acknowledgements. */
|
|
70
|
+
export type SheetCommandStatusEnum = 'COMMITTED' | 'REPLAYED' | 'CONFLICTED';
|
|
71
|
+
|
|
72
|
+
/* Client-side lifecycle while a durable command is waiting for authority. */
|
|
73
|
+
export type SheetClientCommandStatusEnum =
|
|
74
|
+
| 'PENDING'
|
|
75
|
+
| 'IN_FLIGHT'
|
|
76
|
+
| SheetCommandStatusEnum
|
|
77
|
+
| 'FAILED';
|
|
78
|
+
|
|
79
|
+
/* Design entity addressed by one property-level design command intent. */
|
|
80
|
+
export type SheetDesignOperationTargetType =
|
|
81
|
+
| 'COLUMN'
|
|
82
|
+
| 'ROW'
|
|
83
|
+
| 'GRID'
|
|
84
|
+
| 'DEFAULT_CELL_STYLE'
|
|
85
|
+
| 'DEFAULT_CELL_FORMAT'
|
|
86
|
+
| 'NAMED_RANGE'
|
|
87
|
+
| 'MERGED_RANGE'
|
|
88
|
+
| 'METADATA';
|
|
89
|
+
|
|
90
|
+
/* Mutation requested for one canonical design target/property. */
|
|
91
|
+
export type SheetDesignOperationType =
|
|
92
|
+
| 'SET_PROPERTY'
|
|
93
|
+
| 'DELETE_PROPERTY'
|
|
94
|
+
| 'UPSERT_ENTITY'
|
|
95
|
+
| 'DELETE_ENTITY';
|
|
96
|
+
|
|
97
|
+
/* Client intent deliberately excludes `before`; the server captures authority. */
|
|
98
|
+
export interface SheetDesignCommandIntent {
|
|
99
|
+
operation: SheetDesignOperationType;
|
|
100
|
+
property?: string | null;
|
|
101
|
+
targetKey: string;
|
|
102
|
+
targetType: SheetDesignOperationTargetType;
|
|
103
|
+
value?: unknown;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Sparse UI design delta converted to keyed command intents before transport. */
|
|
107
|
+
export interface SheetDesignPatchInput {
|
|
108
|
+
columns?: string | null;
|
|
109
|
+
defaultCellFormat?: string | null;
|
|
110
|
+
defaultCellStyle?: SheetCellStyleObj | null;
|
|
111
|
+
grid?: SheetGridDesignGQL | null;
|
|
112
|
+
metadata?: string | null;
|
|
113
|
+
namedRanges?: SheetNamedRangeObj[] | null;
|
|
114
|
+
rows?: string | null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* One durable Sheet range mutation intent. */
|
|
118
|
+
export type SheetRangeCommandOperationEnum = 'UPSERT' | 'DELETE';
|
|
119
|
+
|
|
120
|
+
/* One durable Sheet region definition mutation intent. */
|
|
121
|
+
export type SheetRegionCommandOperationEnum = 'UPSERT' | 'DELETE';
|
|
122
|
+
|
|
123
|
+
/* Ordered mutation family accepted by one atomic compound Sheet command. */
|
|
124
|
+
export type SheetCompoundCommandFamily =
|
|
125
|
+
| 'CELLS'
|
|
126
|
+
| 'DESIGN'
|
|
127
|
+
| 'DATA_TABLE_CELLS'
|
|
128
|
+
| 'REGION';
|
|
129
|
+
|
|
130
|
+
/* Cell intent embedded in an atomic compound Sheet command. */
|
|
131
|
+
export interface SheetCompoundCellEditInput {
|
|
132
|
+
cell: {
|
|
133
|
+
columnIndex: number;
|
|
134
|
+
rowIndex: number;
|
|
135
|
+
format?: string | null;
|
|
136
|
+
note?: string | null;
|
|
137
|
+
rawInput?: string | null;
|
|
138
|
+
regionId?: string | number | bigint | null;
|
|
139
|
+
style?: SheetCellStyleObj | null;
|
|
140
|
+
value?: string | null;
|
|
141
|
+
};
|
|
142
|
+
clear?: boolean | null;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* DataTable source-cell intent embedded in an atomic compound command. */
|
|
146
|
+
export interface SheetCompoundDataTableCellInput {
|
|
147
|
+
cellKey: string;
|
|
148
|
+
dataTableRowId: string | number | bigint;
|
|
149
|
+
regionId: string | number | bigint;
|
|
150
|
+
value?: string | null;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Filter condition accepted by the SheetRegionSourceFilterConditionInput contract. */
|
|
154
|
+
export interface SheetRegionSourceFilterConditionInput {
|
|
155
|
+
booleanValue?: boolean | null;
|
|
156
|
+
cellKey: string;
|
|
157
|
+
dateValue?: string | null;
|
|
158
|
+
datetimeValue?: string | Date | null;
|
|
159
|
+
numberValue?: number | null;
|
|
160
|
+
operator: SheetRegionSourceFilterOperatorEnum;
|
|
161
|
+
textValue?: string | null;
|
|
162
|
+
textValues?: string[] | null;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Recursive filter group accepted by the SheetRegionSourceFilterInput contract. */
|
|
166
|
+
export interface SheetRegionSourceFilterInput {
|
|
167
|
+
combinator: SheetRegionSourceFilterCombinatorEnum;
|
|
168
|
+
conditions?: SheetRegionSourceFilterConditionInput[] | null;
|
|
169
|
+
groups?: SheetRegionSourceFilterInput[] | null;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Sort entry accepted by the SheetRegionSourceSortInput contract. */
|
|
173
|
+
export interface SheetRegionSourceSortInput {
|
|
174
|
+
cellKey: string;
|
|
175
|
+
direction: SheetRegionSourceSortDirectionEnum;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Source definition accepted by the SheetRegionSourceInput contract. */
|
|
179
|
+
export interface SheetRegionSourceInput {
|
|
180
|
+
dataTableId?: number | bigint | string | null;
|
|
181
|
+
filter?: SheetRegionSourceFilterInput | null;
|
|
182
|
+
includeRowIds?: Array<number | bigint | string> | null;
|
|
183
|
+
sort?: SheetRegionSourceSortInput[] | null;
|
|
184
|
+
type: SheetRegionSourceTypeEnum;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Column definition accepted by the SheetRegionColumnInput contract. */
|
|
188
|
+
export interface SheetRegionColumnInput {
|
|
189
|
+
formulaText?: string | null;
|
|
190
|
+
kind: SheetRegionColumnKind;
|
|
191
|
+
sourceCellKey?: string | null;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Region definition accepted by the SheetRegionInput contract. */
|
|
195
|
+
export interface SheetCompoundRegionInput {
|
|
196
|
+
active?: boolean | null;
|
|
197
|
+
columns: SheetRegionColumnInput[];
|
|
198
|
+
options?: SheetRegionOptionsObj | null;
|
|
199
|
+
source: SheetRegionSourceInput;
|
|
200
|
+
startColumnIndex: number;
|
|
201
|
+
startRowIndex: number;
|
|
202
|
+
type: SheetRegionTypeEnum;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/*
|
|
206
|
+
* One ordered compound component. Optional GraphQL fields are intentionally
|
|
207
|
+
* represented as a discriminated union in shared application code.
|
|
208
|
+
*/
|
|
209
|
+
export type SheetCompoundCommandOperationInput =
|
|
210
|
+
| {
|
|
211
|
+
family: 'CELLS';
|
|
212
|
+
cells: SheetCompoundCellEditInput[];
|
|
213
|
+
}
|
|
214
|
+
| {
|
|
215
|
+
family: 'DESIGN';
|
|
216
|
+
designOperations: SheetDesignCommandIntent[];
|
|
217
|
+
}
|
|
218
|
+
| {
|
|
219
|
+
family: 'DATA_TABLE_CELLS';
|
|
220
|
+
dataTableCells: SheetCompoundDataTableCellInput[];
|
|
221
|
+
dataTableId: string | number | bigint;
|
|
222
|
+
}
|
|
223
|
+
| {
|
|
224
|
+
family: 'REGION';
|
|
225
|
+
regionOperation: SheetRegionCommandOperationEnum;
|
|
226
|
+
region?: SheetCompoundRegionInput | null;
|
|
227
|
+
regionId?: string | number | bigint | null;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/* Durable command family accepted by one ordered Sheet command batch item. */
|
|
231
|
+
export type SheetCommandBatchItemTypeEnum =
|
|
232
|
+
| 'EDIT_CELLS'
|
|
233
|
+
| 'EDIT_DESIGN'
|
|
234
|
+
| 'EDIT_DATA_TABLE_CELLS'
|
|
235
|
+
| 'EDIT_COMPOUND'
|
|
236
|
+
| 'EDIT_RANGE'
|
|
237
|
+
| 'MOVE_AXIS'
|
|
238
|
+
| 'UNDO'
|
|
239
|
+
| 'REDO';
|
|
240
|
+
|
|
241
|
+
/* Compact semantic row/column permutation accepted by MOVE_AXIS commands. */
|
|
242
|
+
export interface SheetAxisMoveCommandInput {
|
|
243
|
+
axis: 'COLUMN' | 'ROW';
|
|
244
|
+
sourceEndIndex: number;
|
|
245
|
+
sourceStartIndex: number;
|
|
246
|
+
targetStartIndex: number;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/*
|
|
250
|
+
* Pragmatic shared shape of one GraphQL Sheet command batch item. The server
|
|
251
|
+
* validates which optional payload belongs to the selected command family.
|
|
252
|
+
*/
|
|
253
|
+
export interface SheetCommandBatchItemInput {
|
|
254
|
+
axisMove?: SheetAxisMoveCommandInput | null;
|
|
255
|
+
baseDesignRevision: SheetJournalSeqInput;
|
|
256
|
+
baseRevision: SheetJournalSeqInput;
|
|
257
|
+
cells?: SheetCompoundCellEditInput[] | null;
|
|
258
|
+
commandId: string;
|
|
259
|
+
commandType: SheetCommandBatchItemTypeEnum;
|
|
260
|
+
compoundOperations?: SheetCompoundCommandOperationInput[] | null;
|
|
261
|
+
dataTableCells?: SheetCompoundDataTableCellInput[] | null;
|
|
262
|
+
dataTableId?: string | number | bigint | null;
|
|
263
|
+
designOperations?: SheetDesignCommandIntent[] | null;
|
|
264
|
+
includeInOperationalHistory?: boolean | null;
|
|
265
|
+
operation?: SheetRangeCommandOperationEnum | null;
|
|
266
|
+
predecessorCommandIds?: string[] | null;
|
|
267
|
+
previewClientId?: string | null;
|
|
268
|
+
previewEnvelopeId?: string | null;
|
|
269
|
+
previewSeq?: number | null;
|
|
270
|
+
previewTargetKeys?: string[] | null;
|
|
271
|
+
range?: SheetRangeInput | null;
|
|
272
|
+
rangeId?: string | number | bigint | null;
|
|
273
|
+
sessionId: string;
|
|
274
|
+
sheetTabId: string | number | bigint;
|
|
275
|
+
targetCommandId?: string | null;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* Canonical input shared by Sheet range command operations. */
|
|
279
|
+
export interface SheetRangeInput {
|
|
280
|
+
endColumnIndex: number;
|
|
281
|
+
endRowIndex: number;
|
|
282
|
+
format?: string | null;
|
|
283
|
+
metadata?: string | null;
|
|
284
|
+
position?: number | null;
|
|
285
|
+
startColumnIndex: number;
|
|
286
|
+
startRowIndex: number;
|
|
287
|
+
style?: SheetCellStyleObj | null;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* Authoritative operation persisted after the server captures before/after state. */
|
|
291
|
+
export interface SheetStoredDesignOperation
|
|
292
|
+
extends Omit<SheetDesignCommandIntent, 'value'> {
|
|
293
|
+
after?: unknown;
|
|
294
|
+
before?: unknown;
|
|
295
|
+
commandId: string;
|
|
296
|
+
designRevision: SheetJournalSeq;
|
|
297
|
+
operationIndex: number;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface SheetCustomRegionSourceColumnObj {
|
|
301
|
+
key: string;
|
|
302
|
+
labelKey: string;
|
|
303
|
+
fieldType?: DataTableFieldTypeEnum | null;
|
|
304
|
+
formulaValueSource?: SheetCustomRegionSourceColumnFormulaValueSourceEnum | null;
|
|
305
|
+
relatedTable?: string | null;
|
|
306
|
+
width: number;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export type SheetCellValue =
|
|
310
|
+
| string
|
|
311
|
+
| number
|
|
312
|
+
| boolean
|
|
313
|
+
| null
|
|
314
|
+
| Record<string, any>
|
|
315
|
+
| any[];
|
|
316
|
+
|
|
317
|
+
export type SheetCellBorderStyleValue =
|
|
318
|
+
| 'solid'
|
|
319
|
+
| 'dashed'
|
|
320
|
+
| 'dotted'
|
|
321
|
+
| 'double';
|
|
322
|
+
|
|
323
|
+
export interface SheetCellStyleObj {
|
|
324
|
+
fontSize?: number | null;
|
|
325
|
+
textColor?: string | null;
|
|
326
|
+
fillColor?: string | null;
|
|
327
|
+
textWrap?: SheetCellTextWrapEnum | null;
|
|
328
|
+
textAlign?: SheetCellTextAlignEnum | null;
|
|
329
|
+
verticalAlign?: SheetCellVerticalAlignEnum | null;
|
|
330
|
+
disableMarkdown?: boolean | null;
|
|
331
|
+
bold?: boolean | null;
|
|
332
|
+
italic?: boolean | null;
|
|
333
|
+
underline?: boolean | null;
|
|
334
|
+
strikethrough?: boolean | null;
|
|
335
|
+
borderTopWidth?: number | null;
|
|
336
|
+
borderTopColor?: string | null;
|
|
337
|
+
borderTopStyle?: SheetCellBorderStyleValue | null;
|
|
338
|
+
borderRightWidth?: number | null;
|
|
339
|
+
borderRightColor?: string | null;
|
|
340
|
+
borderRightStyle?: SheetCellBorderStyleValue | null;
|
|
341
|
+
borderBottomWidth?: number | null;
|
|
342
|
+
borderBottomColor?: string | null;
|
|
343
|
+
borderBottomStyle?: SheetCellBorderStyleValue | null;
|
|
344
|
+
borderLeftWidth?: number | null;
|
|
345
|
+
borderLeftColor?: string | null;
|
|
346
|
+
borderLeftStyle?: SheetCellBorderStyleValue | null;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export interface SheetCellNumberFormatObj {
|
|
350
|
+
type: SheetCellNumberFormatTypeEnum;
|
|
351
|
+
/* Google-Sheets-style pattern; presets resolve from type, CUSTOM requires it */
|
|
352
|
+
pattern?: string | null;
|
|
353
|
+
/* ISO 4217 code used to resolve the currency symbol in currency-family presets */
|
|
354
|
+
currency?: string | null;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export interface SheetCellFormatObj {
|
|
358
|
+
numberFormat?: SheetCellNumberFormatObj | null;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export interface SheetGridDesignObj {
|
|
362
|
+
rowCount: number;
|
|
363
|
+
columnCount: number;
|
|
364
|
+
frozenRows?: number | null;
|
|
365
|
+
frozenColumns?: number | null;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export interface SheetAxisDesignObj {
|
|
369
|
+
width?: number | null;
|
|
370
|
+
height?: number | null;
|
|
371
|
+
hidden?: boolean | null;
|
|
372
|
+
style?: SheetCellStyleObj | null;
|
|
373
|
+
format?: SheetCellFormatObj | null;
|
|
374
|
+
metadata?: Record<string, any> | null;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface SheetNamedRangeObj {
|
|
378
|
+
name?: string | null;
|
|
379
|
+
startRowIndex: number;
|
|
380
|
+
startColumnIndex: number;
|
|
381
|
+
endRowIndex: number;
|
|
382
|
+
endColumnIndex: number;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface SheetMergedRangeObj {
|
|
386
|
+
startRowIndex: number;
|
|
387
|
+
startColumnIndex: number;
|
|
388
|
+
endRowIndex: number;
|
|
389
|
+
endColumnIndex: number;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export interface SheetDesignObj {
|
|
393
|
+
version: number;
|
|
394
|
+
grid: SheetGridDesignObj;
|
|
395
|
+
columns?: Record<string, SheetAxisDesignObj>;
|
|
396
|
+
rows?: Record<string, SheetAxisDesignObj>;
|
|
397
|
+
defaultCellStyle?: SheetCellStyleObj;
|
|
398
|
+
defaultCellFormat?: SheetCellFormatObj;
|
|
399
|
+
namedRanges?: SheetNamedRangeObj[];
|
|
400
|
+
metadata?: Record<string, any>;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
export type SheetEditorObj = Partial<{
|
|
404
|
+
textColors: string[];
|
|
405
|
+
fillColors: string[];
|
|
406
|
+
}>;
|
|
407
|
+
|
|
408
|
+
export interface SheetFormulaReferenceObj {
|
|
409
|
+
id?: string | null;
|
|
410
|
+
kind: SheetFormulaReferenceKind;
|
|
411
|
+
text: string;
|
|
412
|
+
status?: SheetFormulaReferenceStatusEnum | null;
|
|
413
|
+
sheetName?: string | null;
|
|
414
|
+
sheetTabId?: number | bigint | string | null;
|
|
415
|
+
rowIndex?: number | null;
|
|
416
|
+
columnIndex?: number | null;
|
|
417
|
+
columnLabel?: string | null;
|
|
418
|
+
startRowIndex?: number | null;
|
|
419
|
+
startColumnIndex?: number | null;
|
|
420
|
+
endRowIndex?: number | null;
|
|
421
|
+
endColumnIndex?: number | null;
|
|
422
|
+
dataTableName?: string | null;
|
|
423
|
+
rowIdentifier?: string | null;
|
|
424
|
+
cellKey?: string | null;
|
|
425
|
+
value?: SheetCellValue;
|
|
426
|
+
textValue?: string | null;
|
|
427
|
+
numberValue?: number | null;
|
|
428
|
+
booleanValue?: boolean | null;
|
|
429
|
+
dateValue?: Date | string | null;
|
|
430
|
+
datetimeValue?: Date | string | null;
|
|
431
|
+
error?: SheetFormulaErrorObj | null;
|
|
432
|
+
cells?: SheetCellData[] | SheetCellGQL[] | null;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export interface SheetFormulaErrorObj {
|
|
436
|
+
code: string;
|
|
437
|
+
message: string;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
export interface SheetFormulaObj {
|
|
441
|
+
version: number;
|
|
442
|
+
engine: string;
|
|
443
|
+
text: string;
|
|
444
|
+
references?: SheetFormulaReferenceObj[];
|
|
445
|
+
error?: SheetFormulaErrorObj | null;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export interface SheetCompiledFormulaDiagnosticObj {
|
|
449
|
+
code: string;
|
|
450
|
+
message: string;
|
|
451
|
+
sheetName?: string | null;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export interface SheetCompiledFormulaCellReferenceObj {
|
|
455
|
+
rowIndex: number;
|
|
456
|
+
columnIndex: number;
|
|
457
|
+
sheetName?: string | null;
|
|
458
|
+
sheetTabId?: number | bigint | string | null;
|
|
459
|
+
status: SheetFormulaReferenceStatusEnum;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export interface SheetCompiledFormulaRangeReferenceObj {
|
|
463
|
+
startRowIndex: number;
|
|
464
|
+
startColumnIndex: number;
|
|
465
|
+
endRowIndex: number;
|
|
466
|
+
endColumnIndex: number;
|
|
467
|
+
sheetName?: string | null;
|
|
468
|
+
sheetTabId?: number | bigint | string | null;
|
|
469
|
+
status: SheetFormulaReferenceStatusEnum;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export interface SheetCompiledFormulaObj {
|
|
473
|
+
version: number;
|
|
474
|
+
text: string;
|
|
475
|
+
volatile: boolean;
|
|
476
|
+
cells: SheetCompiledFormulaCellReferenceObj[];
|
|
477
|
+
ranges: SheetCompiledFormulaRangeReferenceObj[];
|
|
478
|
+
dataTableCells: Array<{
|
|
479
|
+
dataTableName: string;
|
|
480
|
+
cellKey: string;
|
|
481
|
+
rowIdentifier: string | null;
|
|
482
|
+
text: string;
|
|
483
|
+
}>;
|
|
484
|
+
dataTableQueries: Array<{
|
|
485
|
+
dataTableName: string;
|
|
486
|
+
cellKey: string;
|
|
487
|
+
conditions: Array<{
|
|
488
|
+
cellKey: string;
|
|
489
|
+
operator: string;
|
|
490
|
+
isStatic: boolean;
|
|
491
|
+
staticValue: string | number | boolean | null;
|
|
492
|
+
text: string;
|
|
493
|
+
}>;
|
|
494
|
+
text: string;
|
|
495
|
+
}>;
|
|
496
|
+
diagnostics: SheetCompiledFormulaDiagnosticObj[];
|
|
497
|
+
/* Stored parse tree for current compile-cache evaluation. It is null on a
|
|
498
|
+
* parse failure; consumers reparse canonical formula text on a cache miss. */
|
|
499
|
+
ast?: SheetFormulaASTNode | null;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface SheetData {
|
|
503
|
+
__table: 'sheets';
|
|
504
|
+
|
|
505
|
+
id: number | bigint;
|
|
506
|
+
organizationId: number | bigint;
|
|
507
|
+
name: string;
|
|
508
|
+
title: string;
|
|
509
|
+
description?: string | null;
|
|
510
|
+
position: number;
|
|
511
|
+
editor?: SheetEditorObj | null;
|
|
512
|
+
access?: DocAccessBaseObj | null;
|
|
513
|
+
deletedAt?: Date | string | null;
|
|
514
|
+
hiddenByJobId?: number | bigint | null;
|
|
515
|
+
accessEpoch?: number | bigint;
|
|
516
|
+
createdAt: Date;
|
|
517
|
+
updatedAt: Date;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export interface SheetTabData {
|
|
521
|
+
__table: 'sheet_tabs';
|
|
522
|
+
|
|
523
|
+
id: number | bigint;
|
|
524
|
+
organizationId: number | bigint;
|
|
525
|
+
sheetId: number | bigint;
|
|
526
|
+
name: string;
|
|
527
|
+
position: number;
|
|
528
|
+
design: SheetDesignObj;
|
|
529
|
+
cellsRevision: SheetJournalSeq | bigint;
|
|
530
|
+
designRevision: SheetJournalSeq | bigint;
|
|
531
|
+
hiddenByJobId?: number | bigint | null;
|
|
532
|
+
createdAt: Date;
|
|
533
|
+
updatedAt: Date;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export interface SheetCellSourceMetaObj {
|
|
537
|
+
relatedTable?: string | null;
|
|
538
|
+
relatedId?: string | null;
|
|
539
|
+
referenceStatus?: 'ACTIVE' | 'DELETED' | null;
|
|
540
|
+
iconName?: string | null;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface SheetCellData {
|
|
544
|
+
__table: 'sheet_cells';
|
|
545
|
+
|
|
546
|
+
id: number | bigint | string;
|
|
547
|
+
organizationId: number | bigint;
|
|
548
|
+
sheetId: number | bigint;
|
|
549
|
+
sheetTabId: number | bigint;
|
|
550
|
+
rowIndex: number;
|
|
551
|
+
columnIndex: number;
|
|
552
|
+
rawInput?: string | null;
|
|
553
|
+
formulaText?: string | null;
|
|
554
|
+
compiledFormula?: SheetCompiledFormulaObj | null;
|
|
555
|
+
value?: SheetCellValue;
|
|
556
|
+
formulaValue?: SheetCellValue;
|
|
557
|
+
textValue?: string | null;
|
|
558
|
+
numberValue?: number | null;
|
|
559
|
+
booleanValue?: boolean | null;
|
|
560
|
+
dateValue?: Date | string | null;
|
|
561
|
+
datetimeValue?: Date | string | null;
|
|
562
|
+
errorCode?: string | null;
|
|
563
|
+
errorMessage?: string | null;
|
|
564
|
+
computedAt?: Date | string | null;
|
|
565
|
+
revision: number | bigint;
|
|
566
|
+
volatile?: boolean;
|
|
567
|
+
formula?: SheetFormulaObj | null;
|
|
568
|
+
style?: SheetCellStyleObj | null;
|
|
569
|
+
format?: Record<string, any> | null;
|
|
570
|
+
note?: string | null;
|
|
571
|
+
sourceType: SheetCellSourceTypeEnum;
|
|
572
|
+
regionId?: number | bigint | null;
|
|
573
|
+
sourceDataTableRowId?: number | bigint | null;
|
|
574
|
+
sourceRowKey?: string | null;
|
|
575
|
+
sourceCellKey?: string | null;
|
|
576
|
+
/* Stable DATA_TABLE provenance; sourceCellKey remains the display-field key. */
|
|
577
|
+
sourceColumnId?: number | bigint | string | null;
|
|
578
|
+
sourceMeta?: SheetCellSourceMetaObj | null;
|
|
579
|
+
deletedAt?: Date | string | null;
|
|
580
|
+
deletionJobId?: number | bigint | null;
|
|
581
|
+
region?: SheetCellRegionSourceObj | null;
|
|
582
|
+
createdAt: Date;
|
|
583
|
+
updatedAt: Date;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export interface SheetRangeData {
|
|
587
|
+
__table: 'sheet_ranges';
|
|
588
|
+
|
|
589
|
+
id: number | bigint;
|
|
590
|
+
organizationId: number | bigint;
|
|
591
|
+
sheetId: number | bigint;
|
|
592
|
+
sheetTabId: number | bigint;
|
|
593
|
+
startRowIndex: number;
|
|
594
|
+
startColumnIndex: number;
|
|
595
|
+
endRowIndex: number;
|
|
596
|
+
endColumnIndex: number;
|
|
597
|
+
position: number;
|
|
598
|
+
style?: SheetCellStyleObj | null;
|
|
599
|
+
format?: Record<string, any> | null;
|
|
600
|
+
metadata?: Record<string, any> | null;
|
|
601
|
+
createdAt: Date;
|
|
602
|
+
updatedAt: Date;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export interface SheetRegionSourceObj {
|
|
606
|
+
type: SheetRegionSourceTypeEnum;
|
|
607
|
+
/* Stable-column JSON contract version. Present only for physical DATA_TABLE sources. */
|
|
608
|
+
identityVersion?: 1 | null;
|
|
609
|
+
dataTableId?: number | bigint | string | null;
|
|
610
|
+
filter?: SheetRegionSourceFilterGroupObj | null;
|
|
611
|
+
sort?: SheetRegionSourceSortObj[] | null;
|
|
612
|
+
/* Included source row ids for built-in (generated) sources; null/absent inserts every row */
|
|
613
|
+
includeRowIds?: Array<number | bigint | string> | null;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export interface SheetRegionSourceFilterGroupObj {
|
|
617
|
+
combinator: SheetRegionSourceFilterCombinatorEnum;
|
|
618
|
+
conditions?: SheetRegionSourceFilterConditionObj[] | null;
|
|
619
|
+
groups?: SheetRegionSourceFilterGroupObj[] | null;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export interface SheetRegionSourceFilterConditionObj {
|
|
623
|
+
cellKey: string;
|
|
624
|
+
/* Stable physical column identity paired with the authored/public cellKey. */
|
|
625
|
+
columnId?: number | bigint | string | null;
|
|
626
|
+
operator: SheetRegionSourceFilterOperatorEnum;
|
|
627
|
+
textValue?: string | null;
|
|
628
|
+
textValues?: string[] | null;
|
|
629
|
+
numberValue?: number | null;
|
|
630
|
+
booleanValue?: boolean | null;
|
|
631
|
+
dateValue?: string | null;
|
|
632
|
+
datetimeValue?: string | Date | null;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
export interface SheetRegionSourceSortObj {
|
|
636
|
+
cellKey: string;
|
|
637
|
+
/* Stable physical column identity paired with the authored/public cellKey. */
|
|
638
|
+
columnId?: number | bigint | string | null;
|
|
639
|
+
direction: SheetRegionSourceSortDirectionEnum;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
export interface SheetRegionColumnObj {
|
|
643
|
+
kind: SheetRegionColumnKind;
|
|
644
|
+
sourceCellKey?: string | null;
|
|
645
|
+
/* Stable identity for DATA_TABLE_CELL columns. */
|
|
646
|
+
sourceColumnId?: number | bigint | string | null;
|
|
647
|
+
/* Stable identities referenced by self(...) in a FORMULA column. */
|
|
648
|
+
sourceColumnIds?: Array<number | bigint | string> | null;
|
|
649
|
+
formulaText?: string | null;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
export interface SheetRegionOptionsObj {
|
|
653
|
+
conflictPolicy?: SheetRegionConflictPolicyEnum | null;
|
|
654
|
+
endRowIndex?: number | null;
|
|
655
|
+
includeHeaderRow?: boolean | null;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export interface SheetRegionData {
|
|
659
|
+
__table: 'sheet_regions';
|
|
660
|
+
|
|
661
|
+
id: number | bigint;
|
|
662
|
+
organizationId: number | bigint;
|
|
663
|
+
sheetId: number | bigint;
|
|
664
|
+
sheetTabId: number | bigint;
|
|
665
|
+
type: SheetRegionTypeEnum;
|
|
666
|
+
startRowIndex: number;
|
|
667
|
+
startColumnIndex: number;
|
|
668
|
+
sourceDataTableId?: number | bigint | null;
|
|
669
|
+
source: SheetRegionSourceObj;
|
|
670
|
+
columns: SheetRegionColumnObj[];
|
|
671
|
+
options: SheetRegionOptionsObj;
|
|
672
|
+
active: boolean;
|
|
673
|
+
definitionRevision: number | bigint;
|
|
674
|
+
lastSyncedAt?: Date | string | null;
|
|
675
|
+
projectionRevision?: number | bigint | null;
|
|
676
|
+
projectionStatus: SheetRegionProjectionStatusEnum;
|
|
677
|
+
syncRevision?: number | bigint;
|
|
678
|
+
createdAt: Date;
|
|
679
|
+
updatedAt: Date;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export interface SheetGridViewportObj {
|
|
683
|
+
startRowIndex: number;
|
|
684
|
+
startColumnIndex: number;
|
|
685
|
+
rowCount: number;
|
|
686
|
+
columnCount: number;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
export interface SheetCellRegionSourceObj {
|
|
690
|
+
regionId?: number | bigint | string | null;
|
|
691
|
+
sourceRowId?: number | bigint | string | null;
|
|
692
|
+
sourceCellKey?: string | null;
|
|
693
|
+
sourceColumnId?: number | bigint | string | null;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
export interface SheetGridRowObj {
|
|
697
|
+
rowIndex: number;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
export interface SheetGridPageInfoObj {
|
|
701
|
+
hasMoreRows: boolean;
|
|
702
|
+
lastContentRowIndex?: number | null;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface SheetGridObj {
|
|
706
|
+
id: number | bigint;
|
|
707
|
+
viewport: SheetGridViewportObj;
|
|
708
|
+
rows: SheetGridRowObj[];
|
|
709
|
+
cells: SheetCellData[];
|
|
710
|
+
ranges: SheetRangeData[];
|
|
711
|
+
regions: SheetRegionData[];
|
|
712
|
+
pageInfo: SheetGridPageInfoObj;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export interface SheetGridDesignGQL {
|
|
716
|
+
rowCount?: number | null;
|
|
717
|
+
columnCount?: number | null;
|
|
718
|
+
frozenRows?: number | null;
|
|
719
|
+
frozenColumns?: number | null;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/* Canonical on-wire representation for sheet_tabs.cellsRevision and journal seq. */
|
|
723
|
+
export type SheetJournalSeq = string;
|
|
724
|
+
|
|
725
|
+
/* Internal database callers may supply bigint; wire callers use decimal strings. */
|
|
726
|
+
export type SheetJournalSeqInput = SheetJournalSeq | bigint | null | undefined;
|
|
727
|
+
|
|
728
|
+
export interface SheetDesignGQL {
|
|
729
|
+
id?: string | null;
|
|
730
|
+
version?: number | null;
|
|
731
|
+
grid?: SheetGridDesignGQL | null;
|
|
732
|
+
columns?: string | null;
|
|
733
|
+
rows?: string | null;
|
|
734
|
+
defaultCellStyle?: SheetCellStyleObj | null;
|
|
735
|
+
defaultCellFormat?: string | null;
|
|
736
|
+
namedRanges?: SheetNamedRangeObj[];
|
|
737
|
+
metadata?: string | null;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export type SheetEditorGQL = Partial<{
|
|
741
|
+
textColors: string[];
|
|
742
|
+
fillColors: string[];
|
|
743
|
+
}>;
|
|
744
|
+
|
|
745
|
+
export interface SheetAccessInfoGQL {
|
|
746
|
+
sheetId?: string | null;
|
|
747
|
+
organizationId?: string | null;
|
|
748
|
+
canView?: boolean | null;
|
|
749
|
+
canEdit?: boolean | null;
|
|
750
|
+
signInRequired?: boolean | null;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
export type SheetBootstrapMode = 'SNAPSHOT' | 'DELTA';
|
|
754
|
+
export type SheetBootstrapStatus = 'DENIED' | 'READY' | 'RETRY' | 'UNAVAILABLE';
|
|
755
|
+
|
|
756
|
+
export interface SheetTabSummaryGQL {
|
|
757
|
+
id?: string | null;
|
|
758
|
+
name?: string | null;
|
|
759
|
+
position?: number | null;
|
|
760
|
+
currentSeq?: SheetJournalSeq | null;
|
|
761
|
+
referencedTabIds?: string[] | null;
|
|
762
|
+
updatedAt?: string | null;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export interface SheetBootstrapSnapshotGQL {
|
|
766
|
+
seq?: SheetJournalSeq | null;
|
|
767
|
+
encodingVersion?: number | null;
|
|
768
|
+
viewport?: SheetGridViewportObj | null;
|
|
769
|
+
payload?: string | null;
|
|
770
|
+
checksum?: string | null;
|
|
771
|
+
cellCount?: number | null;
|
|
772
|
+
payloadBytes?: string | null;
|
|
773
|
+
createdAt?: string | null;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
export interface SheetTabChangeGQL {
|
|
777
|
+
causationId?: string | null;
|
|
778
|
+
commandId?: string | null;
|
|
779
|
+
commandType?: string | null;
|
|
780
|
+
sheetTabId?: string | null;
|
|
781
|
+
seq?: SheetJournalSeq | null;
|
|
782
|
+
kind?: string | null;
|
|
783
|
+
payload?: string | null;
|
|
784
|
+
sessionId?: string | null;
|
|
785
|
+
createdAt?: string | null;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export interface SheetReferencedDataTableSchemaGQL {
|
|
789
|
+
id?: string | null;
|
|
790
|
+
realtimeToken?: string | null;
|
|
791
|
+
name?: string | null;
|
|
792
|
+
title?: string | null;
|
|
793
|
+
design?: DataTableDesignGQL | null;
|
|
794
|
+
updatedAt?: string | null;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export interface SheetGQL {
|
|
798
|
+
__deleted?: boolean;
|
|
799
|
+
|
|
800
|
+
id?: string | null;
|
|
801
|
+
cursor?: string | null;
|
|
802
|
+
organizationId?: string | null;
|
|
803
|
+
name?: string | null;
|
|
804
|
+
title?: string | null;
|
|
805
|
+
description?: string | null;
|
|
806
|
+
position?: number | null;
|
|
807
|
+
editor?: SheetEditorGQL | null;
|
|
808
|
+
access?: DocAccessBaseObj | null;
|
|
809
|
+
deletedAt?: string | null;
|
|
810
|
+
tabs?: SheetTabGQL[];
|
|
811
|
+
/* Mutation-only acknowledgement for an already-committed structure opId. */
|
|
812
|
+
structureCommandReplayed?: boolean | null;
|
|
813
|
+
createdAt?: string | null;
|
|
814
|
+
updatedAt?: string | null;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export interface SheetTabGQL {
|
|
818
|
+
__deleted?: boolean;
|
|
819
|
+
|
|
820
|
+
id?: string | null;
|
|
821
|
+
organizationId?: string | null;
|
|
822
|
+
sheetId?: string | null;
|
|
823
|
+
name?: string | null;
|
|
824
|
+
position?: number | null;
|
|
825
|
+
design?: SheetDesignGQL | null;
|
|
826
|
+
/* BigInt is serialized as a canonical base-10 string. */
|
|
827
|
+
cellsRevision?: SheetJournalSeq;
|
|
828
|
+
/* Monotonic revision for property-level design operations. */
|
|
829
|
+
designRevision?: SheetJournalSeq;
|
|
830
|
+
createdAt?: string | null;
|
|
831
|
+
updatedAt?: string | null;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
export interface SheetBootstrapGQL {
|
|
835
|
+
access: SheetAccessInfoGQL;
|
|
836
|
+
contractVersion: number;
|
|
837
|
+
realtimeToken?: string | null;
|
|
838
|
+
status: SheetBootstrapStatus;
|
|
839
|
+
unavailableReason?: string | null;
|
|
840
|
+
sheet?: SheetGQL | null;
|
|
841
|
+
tabs?: SheetTabSummaryGQL[] | null;
|
|
842
|
+
selectedTab?: SheetTabGQL | null;
|
|
843
|
+
mode?: SheetBootstrapMode | null;
|
|
844
|
+
currentSeq?: SheetJournalSeq | null;
|
|
845
|
+
servedViewport?: SheetGridViewportObj | null;
|
|
846
|
+
snapshot?: SheetBootstrapSnapshotGQL | null;
|
|
847
|
+
changes?: SheetTabChangeGQL[] | null;
|
|
848
|
+
referencedDataTables?: SheetReferencedDataTableSchemaGQL[] | null;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
export type SheetTabBootstrapGQL = Omit<SheetBootstrapGQL, 'sheet' | 'tabs'> & {
|
|
852
|
+
sheet?: never;
|
|
853
|
+
tabs?: never;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
export interface SheetCellGQL {
|
|
857
|
+
id?: string | null;
|
|
858
|
+
organizationId?: string | null;
|
|
859
|
+
sheetId?: string | null;
|
|
860
|
+
sheetTabId?: string | null;
|
|
861
|
+
rowIndex?: number | null;
|
|
862
|
+
columnIndex?: number | null;
|
|
863
|
+
rawInput?: string | null;
|
|
864
|
+
formulaText?: string | null;
|
|
865
|
+
compiledFormula?: SheetCompiledFormulaObj | null;
|
|
866
|
+
value?: string | null;
|
|
867
|
+
formulaValue?: SheetCellValue;
|
|
868
|
+
textValue?: string | null;
|
|
869
|
+
numberValue?: number | null;
|
|
870
|
+
booleanValue?: boolean | null;
|
|
871
|
+
dateValue?: string | null;
|
|
872
|
+
datetimeValue?: string | null;
|
|
873
|
+
errorCode?: string | null;
|
|
874
|
+
errorMessage?: string | null;
|
|
875
|
+
computedAt?: string | null;
|
|
876
|
+
/* BIGINT is serialized as a canonical base-10 string. */
|
|
877
|
+
revision?: SheetJournalSeq;
|
|
878
|
+
formula?: SheetFormulaObj | null;
|
|
879
|
+
style?: SheetCellStyleObj | null;
|
|
880
|
+
format?: string | null;
|
|
881
|
+
note?: string | null;
|
|
882
|
+
sourceType?: SheetCellSourceTypeEnum | null;
|
|
883
|
+
regionId?: string | null;
|
|
884
|
+
sourceDataTableRowId?: string | null;
|
|
885
|
+
sourceCellKey?: string | null;
|
|
886
|
+
sourceMeta?: SheetCellSourceMetaObj | null;
|
|
887
|
+
region?: SheetCellRegionSourceObj | null;
|
|
888
|
+
createdAt?: string | null;
|
|
889
|
+
updatedAt?: string | null;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
/* Server-authored Sheet cell payload with mandatory tab ownership and revision. */
|
|
893
|
+
export type SheetAuthoritativeCellGQL = SheetCellGQL & {
|
|
894
|
+
id: string;
|
|
895
|
+
rowIndex: number;
|
|
896
|
+
columnIndex: number;
|
|
897
|
+
revision: SheetJournalSeq;
|
|
898
|
+
sheetTabId: string;
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
export interface SheetGridRowGQL {
|
|
902
|
+
rowIndex: number;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
export interface SheetViewStructureOpGQL {
|
|
906
|
+
at?: number | null;
|
|
907
|
+
index: number;
|
|
908
|
+
opId?: string | null;
|
|
909
|
+
operation: string;
|
|
910
|
+
structureSeq?: SheetJournalSeq | null;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/*
|
|
914
|
+
* Ordered revision-fenced row/column permutation. Consumers apply it only
|
|
915
|
+
* when both local base revisions match and otherwise use authoritative
|
|
916
|
+
* cells/design or snapshot recovery from the same patch.
|
|
917
|
+
*/
|
|
918
|
+
export interface SheetAxisMoveDeltaGQL extends SheetAxisMoveCommandInput {
|
|
919
|
+
baseDesignRevision: SheetJournalSeq;
|
|
920
|
+
baseRevision: SheetJournalSeq;
|
|
921
|
+
commandId: string;
|
|
922
|
+
resultDesignRevision: SheetJournalSeq;
|
|
923
|
+
resultRevision: SheetJournalSeq;
|
|
924
|
+
schemaVersion: 1;
|
|
925
|
+
sheetTabId: string;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export interface SheetViewGQL {
|
|
929
|
+
id: string;
|
|
930
|
+
sheetId: string;
|
|
931
|
+
sheetTabId: string;
|
|
932
|
+
axisMoveOps?: SheetAxisMoveDeltaGQL[] | null;
|
|
933
|
+
/* Per-tab monotonic counter bumped on every cell-content change; carried
|
|
934
|
+
* on realtime cells payloads so clients can detect dropped messages */
|
|
935
|
+
cellsRevision: SheetJournalSeq;
|
|
936
|
+
/* Latest design CAS revision serialized under the same BigInt contract. */
|
|
937
|
+
designRevision: SheetJournalSeq;
|
|
938
|
+
/* One-shot journal range on realtime patches. */
|
|
939
|
+
fromSeq?: SheetJournalSeq | null;
|
|
940
|
+
toSeq?: SheetJournalSeq | null;
|
|
941
|
+
originActorAccountId?: string | null;
|
|
942
|
+
originClientId?: string | null;
|
|
943
|
+
purgedRegionIds?: string[] | null;
|
|
944
|
+
/* One-shot authoritative region membership patches delivered with command ACKs. */
|
|
945
|
+
regionUpserts?: SheetAuthoritativeRegionGQL[] | null;
|
|
946
|
+
requiresSnapshot?: boolean | null;
|
|
947
|
+
/* One-shot authoritative settlement for a durable Sheet command. */
|
|
948
|
+
commandAck?: SheetCommandAckGQL | null;
|
|
949
|
+
/* One-shot authoritative settlement for a durable command envelope. */
|
|
950
|
+
commandBatchAck?: SheetCommandBatchAckGQL | null;
|
|
951
|
+
sheetTab?: SheetTabGQL | null;
|
|
952
|
+
cells?: SheetAuthoritativeCellGQL[];
|
|
953
|
+
cellsDelta?: SheetAuthoritativeCellGQL[] | null;
|
|
954
|
+
deletedCellCoords?: SheetDeletedCellCoordGQL[] | null;
|
|
955
|
+
ranges?: SheetRangeGQL[];
|
|
956
|
+
regions?: SheetAuthoritativeRegionGQL[];
|
|
957
|
+
structureOps?: SheetViewStructureOpGQL[] | null;
|
|
958
|
+
pageInfo?: SheetGridPageInfoGQL | null;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
export interface SheetDeletedCellCoordGQL {
|
|
962
|
+
rowIndex: number;
|
|
963
|
+
columnIndex: number;
|
|
964
|
+
id: string | null;
|
|
965
|
+
revision: SheetJournalSeq | null;
|
|
966
|
+
sheetTabId: string;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/* Per-tab revisions allocated by one durable Sheet command. */
|
|
970
|
+
export interface SheetCommandTabRevisionGQL {
|
|
971
|
+
sheetTabId: string;
|
|
972
|
+
baseRevision: SheetJournalSeq;
|
|
973
|
+
resultRevision: SheetJournalSeq;
|
|
974
|
+
baseDesignRevision: SheetJournalSeq;
|
|
975
|
+
resultDesignRevision: SheetJournalSeq;
|
|
976
|
+
journalFromSeq: SheetJournalSeq | null;
|
|
977
|
+
journalToSeq: SheetJournalSeq | null;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
/* Structured optimistic-concurrency conflict returned without losing local work. */
|
|
981
|
+
export interface SheetCommandConflictGQL {
|
|
982
|
+
code: string;
|
|
983
|
+
historyBoundary?: boolean | null;
|
|
984
|
+
invalidatesTargetCommandId?: string | null;
|
|
985
|
+
message?: string | null;
|
|
986
|
+
targetType?: string | null;
|
|
987
|
+
targetKey?: string | null;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
/* Shared mutation result for edit, undo, and redo command operations. */
|
|
991
|
+
export interface SheetCommandResultGQL {
|
|
992
|
+
commandId: string;
|
|
993
|
+
commandStatus: SheetCommandStatusEnum;
|
|
994
|
+
replayed: boolean;
|
|
995
|
+
axisMoveOps?: SheetAxisMoveDeltaGQL[] | null;
|
|
996
|
+
tabRevisions: SheetCommandTabRevisionGQL[];
|
|
997
|
+
affectedCells?: SheetAuthoritativeCellGQL[] | null;
|
|
998
|
+
affectedRegions?: SheetAuthoritativeRegionGQL[] | null;
|
|
999
|
+
affectedTabs?: SheetTabGQL[] | null;
|
|
1000
|
+
deletedCellCoords?: SheetDeletedCellCoordGQL[] | null;
|
|
1001
|
+
conflict?: SheetCommandConflictGQL | null;
|
|
1002
|
+
requiresSnapshot?: boolean | null;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/* One authoritative item settlement returned by a Sheet command batch. */
|
|
1006
|
+
export interface SheetCommandBatchSettlementGQL {
|
|
1007
|
+
commandId: string;
|
|
1008
|
+
errorCode: string | null;
|
|
1009
|
+
result: SheetCommandResultGQL | null;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
/* Durable settlement for one command-owned realtime preview. */
|
|
1013
|
+
export interface SheetCommandPreviewAuthorityGQL {
|
|
1014
|
+
clientId: string;
|
|
1015
|
+
envelopeId: string;
|
|
1016
|
+
previewSeq: SheetJournalSeq;
|
|
1017
|
+
serverSeq: SheetJournalSeq;
|
|
1018
|
+
sheetTabId: string;
|
|
1019
|
+
targetKeys: string[];
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/* Preview watermark committed by one durable Sheet command envelope. */
|
|
1023
|
+
export interface SheetCommandBatchAckGQL {
|
|
1024
|
+
actorAccountId: string;
|
|
1025
|
+
envelopeId: string;
|
|
1026
|
+
previewAuthorities: SheetCommandPreviewAuthorityGQL[];
|
|
1027
|
+
sourceClientId: string;
|
|
1028
|
+
committedPreviewSeq: SheetJournalSeq;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/* Ordered settlements and final authority returned by one Sheet command batch. */
|
|
1032
|
+
export interface SheetCommandBatchResultGQL extends SheetCommandBatchAckGQL {
|
|
1033
|
+
settlements: SheetCommandBatchSettlementGQL[];
|
|
1034
|
+
authoritativePatches: SheetViewGQL[];
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/* Realtime settlement includes source session identity for exact reconciliation. */
|
|
1038
|
+
export interface SheetCommandAckGQL
|
|
1039
|
+
extends Omit<
|
|
1040
|
+
SheetCommandResultGQL,
|
|
1041
|
+
'affectedCells' | 'affectedRegions' | 'affectedTabs' | 'deletedCellCoords'
|
|
1042
|
+
> {
|
|
1043
|
+
actorAccountId: string;
|
|
1044
|
+
commandType: string;
|
|
1045
|
+
sessionId: string;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
export interface SheetOperationalHistoryCommandGQL {
|
|
1049
|
+
axisMove?: SheetAxisMoveCommandInput | null;
|
|
1050
|
+
commandId: string;
|
|
1051
|
+
commandType: string;
|
|
1052
|
+
committedAt: string;
|
|
1053
|
+
resultRevision: SheetJournalSeq;
|
|
1054
|
+
resultDesignRevision: SheetJournalSeq;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
export interface SheetOperationalHistoryGQL {
|
|
1058
|
+
incompleteBeforeBoundary: boolean;
|
|
1059
|
+
redo: SheetOperationalHistoryCommandGQL[];
|
|
1060
|
+
sessionId: string;
|
|
1061
|
+
sheetId: string;
|
|
1062
|
+
sheetTabId: string;
|
|
1063
|
+
truncated: boolean;
|
|
1064
|
+
undo: SheetOperationalHistoryCommandGQL[];
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export interface SheetGridPageInfoGQL {
|
|
1068
|
+
hasMoreRows?: boolean | null;
|
|
1069
|
+
lastContentRowIndex?: number | null;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
export interface SheetRangeGQL {
|
|
1073
|
+
id?: string | null;
|
|
1074
|
+
organizationId?: string | null;
|
|
1075
|
+
sheetId?: string | null;
|
|
1076
|
+
sheetTabId?: string | null;
|
|
1077
|
+
startRowIndex?: number | null;
|
|
1078
|
+
startColumnIndex?: number | null;
|
|
1079
|
+
endRowIndex?: number | null;
|
|
1080
|
+
endColumnIndex?: number | null;
|
|
1081
|
+
position?: number | null;
|
|
1082
|
+
style?: SheetCellStyleObj | null;
|
|
1083
|
+
format?: string | null;
|
|
1084
|
+
metadata?: string | null;
|
|
1085
|
+
createdAt?: string | null;
|
|
1086
|
+
updatedAt?: string | null;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
export interface SheetRegionBoundsGQL {
|
|
1090
|
+
startRowIndex?: number | null;
|
|
1091
|
+
startColumnIndex?: number | null;
|
|
1092
|
+
endRowIndex?: number | null;
|
|
1093
|
+
endColumnIndex?: number | null;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
export interface SheetRegionGQL {
|
|
1097
|
+
id?: string | null;
|
|
1098
|
+
organizationId?: string | null;
|
|
1099
|
+
sheetId?: string | null;
|
|
1100
|
+
sheetTabId?: string | null;
|
|
1101
|
+
type?: SheetRegionTypeEnum | null;
|
|
1102
|
+
startRowIndex?: number | null;
|
|
1103
|
+
startColumnIndex?: number | null;
|
|
1104
|
+
source?: SheetRegionSourceObj | null;
|
|
1105
|
+
columns?: SheetRegionColumnObj[];
|
|
1106
|
+
options?: SheetRegionOptionsObj | null;
|
|
1107
|
+
effectiveBounds?: SheetRegionBoundsGQL | null;
|
|
1108
|
+
active: boolean;
|
|
1109
|
+
definitionRevision: string;
|
|
1110
|
+
projectionRevision: string | null;
|
|
1111
|
+
projectionStatus: SheetRegionProjectionStatusEnum;
|
|
1112
|
+
syncRevision?: string | null;
|
|
1113
|
+
createdAt?: string | null;
|
|
1114
|
+
updatedAt?: string | null;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/* Server-authored Sheet region payload with mandatory tab ownership. */
|
|
1118
|
+
export type SheetAuthoritativeRegionGQL = SheetRegionGQL & {
|
|
1119
|
+
sheetTabId: string;
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
export interface SheetGridGQL {
|
|
1123
|
+
id?: string | null;
|
|
1124
|
+
viewport?: SheetGridViewportObj | null;
|
|
1125
|
+
rows?: SheetGridRowGQL[];
|
|
1126
|
+
cells?: SheetCellGQL[];
|
|
1127
|
+
ranges?: SheetRangeGQL[];
|
|
1128
|
+
regions?: SheetRegionGQL[];
|
|
1129
|
+
pageInfo?: SheetGridPageInfoGQL | null;
|
|
1130
|
+
}
|