digital-tools 2.0.2 → 2.1.1
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/CHANGELOG.md +17 -0
- package/package.json +3 -4
- package/src/define.js +267 -0
- package/src/entities/advertising.js +999 -0
- package/src/entities/ai.js +756 -0
- package/src/entities/analytics.js +1588 -0
- package/src/entities/automation.js +601 -0
- package/src/entities/communication.js +1150 -0
- package/src/entities/crm.js +1386 -0
- package/src/entities/design.js +546 -0
- package/src/entities/development.js +2212 -0
- package/src/entities/document.js +874 -0
- package/src/entities/ecommerce.js +1429 -0
- package/src/entities/experiment.js +1039 -0
- package/src/entities/finance.js +3478 -0
- package/src/entities/forms.js +1892 -0
- package/src/entities/hr.js +661 -0
- package/src/entities/identity.js +997 -0
- package/src/entities/index.js +282 -0
- package/src/entities/infrastructure.js +1153 -0
- package/src/entities/knowledge.js +1438 -0
- package/src/entities/marketing.js +1610 -0
- package/src/entities/media.js +1634 -0
- package/src/entities/notification.js +1199 -0
- package/src/entities/presentation.js +1274 -0
- package/src/entities/productivity.js +1317 -0
- package/src/entities/project-management.js +1136 -0
- package/src/entities/recruiting.js +736 -0
- package/src/entities/shipping.js +509 -0
- package/src/entities/signature.js +1102 -0
- package/src/entities/site.js +222 -0
- package/src/entities/spreadsheet.js +1341 -0
- package/src/entities/storage.js +1198 -0
- package/src/entities/support.js +1166 -0
- package/src/entities/video-conferencing.js +1750 -0
- package/src/entities/video.js +950 -0
- package/src/entities.js +1663 -0
- package/src/index.js +74 -0
- package/src/providers/analytics/index.js +17 -0
- package/src/providers/analytics/mixpanel.js +255 -0
- package/src/providers/calendar/cal-com.js +303 -0
- package/src/providers/calendar/google-calendar.js +335 -0
- package/src/providers/calendar/index.js +20 -0
- package/src/providers/crm/hubspot.js +566 -0
- package/src/providers/crm/index.js +17 -0
- package/src/providers/development/github.js +472 -0
- package/src/providers/development/index.js +17 -0
- package/src/providers/ecommerce/index.js +17 -0
- package/src/providers/ecommerce/shopify.js +378 -0
- package/src/providers/email/index.js +20 -0
- package/src/providers/email/resend.js +258 -0
- package/src/providers/email/sendgrid.js +161 -0
- package/src/providers/finance/index.js +17 -0
- package/src/providers/finance/stripe.js +549 -0
- package/src/providers/forms/index.js +17 -0
- package/src/providers/forms/typeform.js +500 -0
- package/src/providers/index.js +123 -0
- package/src/providers/knowledge/index.js +17 -0
- package/src/providers/knowledge/notion.js +389 -0
- package/src/providers/marketing/index.js +17 -0
- package/src/providers/marketing/mailchimp.js +443 -0
- package/src/providers/media/cloudinary.js +318 -0
- package/src/providers/media/index.js +17 -0
- package/src/providers/messaging/index.js +20 -0
- package/src/providers/messaging/slack.js +393 -0
- package/src/providers/messaging/twilio-sms.js +249 -0
- package/src/providers/project-management/index.js +17 -0
- package/src/providers/project-management/linear.js +575 -0
- package/src/providers/registry.js +86 -0
- package/src/providers/spreadsheet/google-sheets.js +375 -0
- package/src/providers/spreadsheet/index.js +20 -0
- package/src/providers/spreadsheet/xlsx.js +423 -0
- package/src/providers/storage/index.js +24 -0
- package/src/providers/storage/s3.js +419 -0
- package/src/providers/support/index.js +17 -0
- package/src/providers/support/zendesk.js +373 -0
- package/src/providers/tasks/index.js +17 -0
- package/src/providers/tasks/todoist.js +286 -0
- package/src/providers/types.js +9 -0
- package/src/providers/video-conferencing/google-meet.js +286 -0
- package/src/providers/video-conferencing/index.js +31 -0
- package/src/providers/video-conferencing/jitsi.js +254 -0
- package/src/providers/video-conferencing/teams.js +270 -0
- package/src/providers/video-conferencing/zoom.js +332 -0
- package/src/registry.js +128 -0
- package/src/tools/communication.js +184 -0
- package/src/tools/data.js +205 -0
- package/src/tools/index.js +11 -0
- package/src/tools/web.js +137 -0
- package/src/types.js +10 -0
- package/test/define.test.js +306 -0
- package/test/registry.test.js +357 -0
- package/test/tools.test.js +363 -0
|
@@ -0,0 +1,1341 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spreadsheet Entity Types (Nouns)
|
|
3
|
+
*
|
|
4
|
+
* Semantic type definitions for spreadsheets that support
|
|
5
|
+
* Google Sheets, Microsoft Excel/XLSX, and CSV formats.
|
|
6
|
+
* Each entity defines:
|
|
7
|
+
* - Properties: The data fields
|
|
8
|
+
* - Actions: Operations that can be performed (Verbs)
|
|
9
|
+
* - Events: State changes that occur
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// Spreadsheet
|
|
15
|
+
// =============================================================================
|
|
16
|
+
/**
|
|
17
|
+
* Spreadsheet entity
|
|
18
|
+
*
|
|
19
|
+
* Represents a spreadsheet workbook containing one or more sheets.
|
|
20
|
+
* Supports Google Sheets, Microsoft Excel/XLSX, and CSV formats.
|
|
21
|
+
*/
|
|
22
|
+
export const Spreadsheet = {
|
|
23
|
+
singular: 'spreadsheet',
|
|
24
|
+
plural: 'spreadsheets',
|
|
25
|
+
description: 'A spreadsheet workbook for organizing and analyzing data',
|
|
26
|
+
properties: {
|
|
27
|
+
// Identity
|
|
28
|
+
title: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Spreadsheet title',
|
|
31
|
+
},
|
|
32
|
+
slug: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
optional: true,
|
|
35
|
+
description: 'URL-friendly identifier',
|
|
36
|
+
},
|
|
37
|
+
description: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
optional: true,
|
|
40
|
+
description: 'Spreadsheet description',
|
|
41
|
+
},
|
|
42
|
+
// Format
|
|
43
|
+
format: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Spreadsheet format: xlsx, gsheet, csv, tsv, ods',
|
|
46
|
+
examples: ['xlsx', 'gsheet', 'csv', 'tsv', 'ods'],
|
|
47
|
+
},
|
|
48
|
+
fileSize: {
|
|
49
|
+
type: 'number',
|
|
50
|
+
optional: true,
|
|
51
|
+
description: 'File size in bytes',
|
|
52
|
+
},
|
|
53
|
+
// Status
|
|
54
|
+
status: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'Spreadsheet status: draft, active, archived',
|
|
57
|
+
examples: ['draft', 'active', 'archived'],
|
|
58
|
+
},
|
|
59
|
+
visibility: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Visibility: private, internal, public',
|
|
62
|
+
examples: ['private', 'internal', 'public'],
|
|
63
|
+
},
|
|
64
|
+
// Structure
|
|
65
|
+
sheetCount: {
|
|
66
|
+
type: 'number',
|
|
67
|
+
optional: true,
|
|
68
|
+
description: 'Number of sheets in the workbook',
|
|
69
|
+
},
|
|
70
|
+
totalRows: {
|
|
71
|
+
type: 'number',
|
|
72
|
+
optional: true,
|
|
73
|
+
description: 'Total rows across all sheets',
|
|
74
|
+
},
|
|
75
|
+
totalColumns: {
|
|
76
|
+
type: 'number',
|
|
77
|
+
optional: true,
|
|
78
|
+
description: 'Total columns across all sheets',
|
|
79
|
+
},
|
|
80
|
+
totalCells: {
|
|
81
|
+
type: 'number',
|
|
82
|
+
optional: true,
|
|
83
|
+
description: 'Total cells across all sheets',
|
|
84
|
+
},
|
|
85
|
+
// Settings
|
|
86
|
+
locale: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
optional: true,
|
|
89
|
+
description: 'Locale for number and date formatting',
|
|
90
|
+
},
|
|
91
|
+
timezone: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
optional: true,
|
|
94
|
+
description: 'Timezone for date/time values',
|
|
95
|
+
},
|
|
96
|
+
defaultDateFormat: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
optional: true,
|
|
99
|
+
description: 'Default date format string',
|
|
100
|
+
},
|
|
101
|
+
defaultNumberFormat: {
|
|
102
|
+
type: 'string',
|
|
103
|
+
optional: true,
|
|
104
|
+
description: 'Default number format string',
|
|
105
|
+
},
|
|
106
|
+
currency: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
optional: true,
|
|
109
|
+
description: 'Default currency code',
|
|
110
|
+
},
|
|
111
|
+
// Recalculation
|
|
112
|
+
autoRecalculate: {
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
optional: true,
|
|
115
|
+
description: 'Whether formulas auto-recalculate',
|
|
116
|
+
},
|
|
117
|
+
iterativeCalculation: {
|
|
118
|
+
type: 'boolean',
|
|
119
|
+
optional: true,
|
|
120
|
+
description: 'Whether iterative calculation is enabled',
|
|
121
|
+
},
|
|
122
|
+
maxIterations: {
|
|
123
|
+
type: 'number',
|
|
124
|
+
optional: true,
|
|
125
|
+
description: 'Maximum calculation iterations',
|
|
126
|
+
},
|
|
127
|
+
// Collaboration
|
|
128
|
+
allowComments: {
|
|
129
|
+
type: 'boolean',
|
|
130
|
+
optional: true,
|
|
131
|
+
description: 'Whether comments are enabled',
|
|
132
|
+
},
|
|
133
|
+
shareMode: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
optional: true,
|
|
136
|
+
description: 'Sharing mode: view, comment, edit',
|
|
137
|
+
examples: ['view', 'comment', 'edit'],
|
|
138
|
+
},
|
|
139
|
+
allowDownload: {
|
|
140
|
+
type: 'boolean',
|
|
141
|
+
optional: true,
|
|
142
|
+
description: 'Whether download is allowed',
|
|
143
|
+
},
|
|
144
|
+
allowCopy: {
|
|
145
|
+
type: 'boolean',
|
|
146
|
+
optional: true,
|
|
147
|
+
description: 'Whether copying is allowed',
|
|
148
|
+
},
|
|
149
|
+
allowPrint: {
|
|
150
|
+
type: 'boolean',
|
|
151
|
+
optional: true,
|
|
152
|
+
description: 'Whether printing is allowed',
|
|
153
|
+
},
|
|
154
|
+
// Protection
|
|
155
|
+
protected: {
|
|
156
|
+
type: 'boolean',
|
|
157
|
+
optional: true,
|
|
158
|
+
description: 'Whether spreadsheet is protected',
|
|
159
|
+
},
|
|
160
|
+
password: {
|
|
161
|
+
type: 'string',
|
|
162
|
+
optional: true,
|
|
163
|
+
description: 'Protection password',
|
|
164
|
+
},
|
|
165
|
+
// Templates
|
|
166
|
+
isTemplate: {
|
|
167
|
+
type: 'boolean',
|
|
168
|
+
optional: true,
|
|
169
|
+
description: 'Whether this is a template',
|
|
170
|
+
},
|
|
171
|
+
templateId: {
|
|
172
|
+
type: 'string',
|
|
173
|
+
optional: true,
|
|
174
|
+
description: 'ID of template this was created from',
|
|
175
|
+
},
|
|
176
|
+
templateCategory: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
optional: true,
|
|
179
|
+
description: 'Template category',
|
|
180
|
+
examples: ['budget', 'schedule', 'tracker', 'analysis', 'report'],
|
|
181
|
+
},
|
|
182
|
+
// Integration
|
|
183
|
+
externalId: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
optional: true,
|
|
186
|
+
description: 'External system ID (Google Sheets ID, OneDrive ID, etc.)',
|
|
187
|
+
},
|
|
188
|
+
externalUrl: {
|
|
189
|
+
type: 'url',
|
|
190
|
+
optional: true,
|
|
191
|
+
description: 'URL in external system',
|
|
192
|
+
},
|
|
193
|
+
syncEnabled: {
|
|
194
|
+
type: 'boolean',
|
|
195
|
+
optional: true,
|
|
196
|
+
description: 'Whether sync is enabled',
|
|
197
|
+
},
|
|
198
|
+
lastSyncedAt: {
|
|
199
|
+
type: 'datetime',
|
|
200
|
+
optional: true,
|
|
201
|
+
description: 'Last sync timestamp',
|
|
202
|
+
},
|
|
203
|
+
dataSource: {
|
|
204
|
+
type: 'json',
|
|
205
|
+
optional: true,
|
|
206
|
+
description: 'External data source configuration',
|
|
207
|
+
},
|
|
208
|
+
// Metadata
|
|
209
|
+
tags: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
array: true,
|
|
212
|
+
optional: true,
|
|
213
|
+
description: 'Tags for categorization',
|
|
214
|
+
},
|
|
215
|
+
category: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
optional: true,
|
|
218
|
+
description: 'Spreadsheet category',
|
|
219
|
+
},
|
|
220
|
+
folder: {
|
|
221
|
+
type: 'string',
|
|
222
|
+
optional: true,
|
|
223
|
+
description: 'Folder or workspace path',
|
|
224
|
+
},
|
|
225
|
+
customMetadata: {
|
|
226
|
+
type: 'json',
|
|
227
|
+
optional: true,
|
|
228
|
+
description: 'Custom metadata fields',
|
|
229
|
+
},
|
|
230
|
+
// Analytics
|
|
231
|
+
viewCount: {
|
|
232
|
+
type: 'number',
|
|
233
|
+
optional: true,
|
|
234
|
+
description: 'Number of views',
|
|
235
|
+
},
|
|
236
|
+
editCount: {
|
|
237
|
+
type: 'number',
|
|
238
|
+
optional: true,
|
|
239
|
+
description: 'Number of edits',
|
|
240
|
+
},
|
|
241
|
+
downloadCount: {
|
|
242
|
+
type: 'number',
|
|
243
|
+
optional: true,
|
|
244
|
+
description: 'Number of downloads',
|
|
245
|
+
},
|
|
246
|
+
lastViewedAt: {
|
|
247
|
+
type: 'datetime',
|
|
248
|
+
optional: true,
|
|
249
|
+
description: 'Last view timestamp',
|
|
250
|
+
},
|
|
251
|
+
lastEditedAt: {
|
|
252
|
+
type: 'datetime',
|
|
253
|
+
optional: true,
|
|
254
|
+
description: 'Last edit timestamp',
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
relationships: {
|
|
258
|
+
owner: {
|
|
259
|
+
type: 'Contact',
|
|
260
|
+
description: 'Spreadsheet owner',
|
|
261
|
+
},
|
|
262
|
+
creator: {
|
|
263
|
+
type: 'Contact',
|
|
264
|
+
description: 'User who created the spreadsheet',
|
|
265
|
+
},
|
|
266
|
+
lastEditor: {
|
|
267
|
+
type: 'Contact',
|
|
268
|
+
required: false,
|
|
269
|
+
description: 'User who last edited',
|
|
270
|
+
},
|
|
271
|
+
sheets: {
|
|
272
|
+
type: 'Sheet[]',
|
|
273
|
+
backref: 'spreadsheet',
|
|
274
|
+
description: 'Sheets in this workbook',
|
|
275
|
+
},
|
|
276
|
+
charts: {
|
|
277
|
+
type: 'Chart[]',
|
|
278
|
+
backref: 'spreadsheet',
|
|
279
|
+
description: 'Charts in the spreadsheet',
|
|
280
|
+
},
|
|
281
|
+
pivotTables: {
|
|
282
|
+
type: 'PivotTable[]',
|
|
283
|
+
backref: 'spreadsheet',
|
|
284
|
+
description: 'Pivot tables in the spreadsheet',
|
|
285
|
+
},
|
|
286
|
+
collaborators: {
|
|
287
|
+
type: 'Contact[]',
|
|
288
|
+
description: 'Users with access',
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
actions: [
|
|
292
|
+
'create',
|
|
293
|
+
'open',
|
|
294
|
+
'edit',
|
|
295
|
+
'save',
|
|
296
|
+
'saveAs',
|
|
297
|
+
'duplicate',
|
|
298
|
+
'rename',
|
|
299
|
+
'delete',
|
|
300
|
+
'restore',
|
|
301
|
+
'export',
|
|
302
|
+
'download',
|
|
303
|
+
'print',
|
|
304
|
+
'share',
|
|
305
|
+
'unshare',
|
|
306
|
+
'archive',
|
|
307
|
+
'unarchive',
|
|
308
|
+
'move',
|
|
309
|
+
'copy',
|
|
310
|
+
'protect',
|
|
311
|
+
'unprotect',
|
|
312
|
+
'addSheet',
|
|
313
|
+
'removeSheet',
|
|
314
|
+
'reorderSheets',
|
|
315
|
+
'makeTemplate',
|
|
316
|
+
'createFromTemplate',
|
|
317
|
+
'importData',
|
|
318
|
+
'exportData',
|
|
319
|
+
'refreshData',
|
|
320
|
+
'calculate',
|
|
321
|
+
'sort',
|
|
322
|
+
'filter',
|
|
323
|
+
'search',
|
|
324
|
+
'findAndReplace',
|
|
325
|
+
'insertChart',
|
|
326
|
+
'insertPivotTable',
|
|
327
|
+
'merge',
|
|
328
|
+
'split',
|
|
329
|
+
'freeze',
|
|
330
|
+
'unfreeze',
|
|
331
|
+
'hideSheet',
|
|
332
|
+
'unhideSheet',
|
|
333
|
+
],
|
|
334
|
+
events: [
|
|
335
|
+
'created',
|
|
336
|
+
'opened',
|
|
337
|
+
'edited',
|
|
338
|
+
'saved',
|
|
339
|
+
'renamed',
|
|
340
|
+
'deleted',
|
|
341
|
+
'restored',
|
|
342
|
+
'exported',
|
|
343
|
+
'downloaded',
|
|
344
|
+
'printed',
|
|
345
|
+
'shared',
|
|
346
|
+
'unshared',
|
|
347
|
+
'archived',
|
|
348
|
+
'unarchived',
|
|
349
|
+
'moved',
|
|
350
|
+
'copied',
|
|
351
|
+
'protected',
|
|
352
|
+
'unprotected',
|
|
353
|
+
'sheetAdded',
|
|
354
|
+
'sheetRemoved',
|
|
355
|
+
'sheetReordered',
|
|
356
|
+
'dataImported',
|
|
357
|
+
'dataExported',
|
|
358
|
+
'dataRefreshed',
|
|
359
|
+
'calculated',
|
|
360
|
+
'chartInserted',
|
|
361
|
+
'pivotTableInserted',
|
|
362
|
+
'collaboratorAdded',
|
|
363
|
+
'collaboratorRemoved',
|
|
364
|
+
'permissionChanged',
|
|
365
|
+
'synced',
|
|
366
|
+
'viewed',
|
|
367
|
+
],
|
|
368
|
+
};
|
|
369
|
+
// =============================================================================
|
|
370
|
+
// Sheet
|
|
371
|
+
// =============================================================================
|
|
372
|
+
/**
|
|
373
|
+
* Sheet entity
|
|
374
|
+
*
|
|
375
|
+
* Represents a single worksheet within a spreadsheet workbook.
|
|
376
|
+
*/
|
|
377
|
+
export const Sheet = {
|
|
378
|
+
singular: 'sheet',
|
|
379
|
+
plural: 'sheets',
|
|
380
|
+
description: 'A worksheet within a spreadsheet workbook',
|
|
381
|
+
properties: {
|
|
382
|
+
// Identity
|
|
383
|
+
name: {
|
|
384
|
+
type: 'string',
|
|
385
|
+
description: 'Sheet name',
|
|
386
|
+
},
|
|
387
|
+
index: {
|
|
388
|
+
type: 'number',
|
|
389
|
+
description: 'Sheet position in workbook (0-based)',
|
|
390
|
+
},
|
|
391
|
+
sheetId: {
|
|
392
|
+
type: 'string',
|
|
393
|
+
optional: true,
|
|
394
|
+
description: 'Internal sheet identifier',
|
|
395
|
+
},
|
|
396
|
+
// Dimensions
|
|
397
|
+
rowCount: {
|
|
398
|
+
type: 'number',
|
|
399
|
+
description: 'Number of rows',
|
|
400
|
+
},
|
|
401
|
+
columnCount: {
|
|
402
|
+
type: 'number',
|
|
403
|
+
description: 'Number of columns',
|
|
404
|
+
},
|
|
405
|
+
frozenRows: {
|
|
406
|
+
type: 'number',
|
|
407
|
+
optional: true,
|
|
408
|
+
description: 'Number of frozen rows',
|
|
409
|
+
},
|
|
410
|
+
frozenColumns: {
|
|
411
|
+
type: 'number',
|
|
412
|
+
optional: true,
|
|
413
|
+
description: 'Number of frozen columns',
|
|
414
|
+
},
|
|
415
|
+
// Visibility
|
|
416
|
+
hidden: {
|
|
417
|
+
type: 'boolean',
|
|
418
|
+
optional: true,
|
|
419
|
+
description: 'Whether sheet is hidden',
|
|
420
|
+
},
|
|
421
|
+
veryHidden: {
|
|
422
|
+
type: 'boolean',
|
|
423
|
+
optional: true,
|
|
424
|
+
description: 'Whether sheet is very hidden (Excel)',
|
|
425
|
+
},
|
|
426
|
+
// Color and styling
|
|
427
|
+
tabColor: {
|
|
428
|
+
type: 'string',
|
|
429
|
+
optional: true,
|
|
430
|
+
description: 'Sheet tab color (hex)',
|
|
431
|
+
},
|
|
432
|
+
gridLinesVisible: {
|
|
433
|
+
type: 'boolean',
|
|
434
|
+
optional: true,
|
|
435
|
+
description: 'Whether grid lines are visible',
|
|
436
|
+
},
|
|
437
|
+
gridLinesColor: {
|
|
438
|
+
type: 'string',
|
|
439
|
+
optional: true,
|
|
440
|
+
description: 'Grid line color',
|
|
441
|
+
},
|
|
442
|
+
// Protection
|
|
443
|
+
protected: {
|
|
444
|
+
type: 'boolean',
|
|
445
|
+
optional: true,
|
|
446
|
+
description: 'Whether sheet is protected',
|
|
447
|
+
},
|
|
448
|
+
protectedRanges: {
|
|
449
|
+
type: 'json',
|
|
450
|
+
optional: true,
|
|
451
|
+
description: 'Protected cell ranges',
|
|
452
|
+
},
|
|
453
|
+
// Data
|
|
454
|
+
data: {
|
|
455
|
+
type: 'json',
|
|
456
|
+
optional: true,
|
|
457
|
+
description: 'Sheet data as 2D array or object',
|
|
458
|
+
},
|
|
459
|
+
hasHeaders: {
|
|
460
|
+
type: 'boolean',
|
|
461
|
+
optional: true,
|
|
462
|
+
description: 'Whether first row contains headers',
|
|
463
|
+
},
|
|
464
|
+
dataRange: {
|
|
465
|
+
type: 'string',
|
|
466
|
+
optional: true,
|
|
467
|
+
description: 'Range containing data (e.g., A1:Z100)',
|
|
468
|
+
},
|
|
469
|
+
// Filters and sorts
|
|
470
|
+
hasFilters: {
|
|
471
|
+
type: 'boolean',
|
|
472
|
+
optional: true,
|
|
473
|
+
description: 'Whether filters are applied',
|
|
474
|
+
},
|
|
475
|
+
filterRange: {
|
|
476
|
+
type: 'string',
|
|
477
|
+
optional: true,
|
|
478
|
+
description: 'Range with filters applied',
|
|
479
|
+
},
|
|
480
|
+
sortSpecs: {
|
|
481
|
+
type: 'json',
|
|
482
|
+
optional: true,
|
|
483
|
+
description: 'Active sort specifications',
|
|
484
|
+
},
|
|
485
|
+
// Named ranges
|
|
486
|
+
namedRanges: {
|
|
487
|
+
type: 'json',
|
|
488
|
+
optional: true,
|
|
489
|
+
description: 'Named ranges in this sheet',
|
|
490
|
+
},
|
|
491
|
+
// Conditional formatting
|
|
492
|
+
conditionalFormats: {
|
|
493
|
+
type: 'json',
|
|
494
|
+
optional: true,
|
|
495
|
+
description: 'Conditional formatting rules',
|
|
496
|
+
},
|
|
497
|
+
// Data validation
|
|
498
|
+
dataValidations: {
|
|
499
|
+
type: 'json',
|
|
500
|
+
optional: true,
|
|
501
|
+
description: 'Data validation rules by range',
|
|
502
|
+
},
|
|
503
|
+
// Metadata
|
|
504
|
+
notes: {
|
|
505
|
+
type: 'string',
|
|
506
|
+
optional: true,
|
|
507
|
+
description: 'Sheet notes or description',
|
|
508
|
+
},
|
|
509
|
+
metadata: {
|
|
510
|
+
type: 'json',
|
|
511
|
+
optional: true,
|
|
512
|
+
description: 'Custom metadata',
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
relationships: {
|
|
516
|
+
spreadsheet: {
|
|
517
|
+
type: 'Spreadsheet',
|
|
518
|
+
backref: 'sheets',
|
|
519
|
+
description: 'Parent spreadsheet',
|
|
520
|
+
},
|
|
521
|
+
charts: {
|
|
522
|
+
type: 'Chart[]',
|
|
523
|
+
backref: 'sheet',
|
|
524
|
+
description: 'Charts in this sheet',
|
|
525
|
+
},
|
|
526
|
+
pivotTables: {
|
|
527
|
+
type: 'PivotTable[]',
|
|
528
|
+
backref: 'sheet',
|
|
529
|
+
description: 'Pivot tables in this sheet',
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
actions: [
|
|
533
|
+
'create',
|
|
534
|
+
'rename',
|
|
535
|
+
'delete',
|
|
536
|
+
'duplicate',
|
|
537
|
+
'move',
|
|
538
|
+
'hide',
|
|
539
|
+
'unhide',
|
|
540
|
+
'protect',
|
|
541
|
+
'unprotect',
|
|
542
|
+
'clear',
|
|
543
|
+
'clearFormats',
|
|
544
|
+
'clearData',
|
|
545
|
+
'insertRow',
|
|
546
|
+
'insertRows',
|
|
547
|
+
'deleteRow',
|
|
548
|
+
'deleteRows',
|
|
549
|
+
'insertColumn',
|
|
550
|
+
'insertColumns',
|
|
551
|
+
'deleteColumn',
|
|
552
|
+
'deleteColumns',
|
|
553
|
+
'freeze',
|
|
554
|
+
'unfreeze',
|
|
555
|
+
'sort',
|
|
556
|
+
'filter',
|
|
557
|
+
'clearFilter',
|
|
558
|
+
'autoResize',
|
|
559
|
+
'setTabColor',
|
|
560
|
+
'addChart',
|
|
561
|
+
'addPivotTable',
|
|
562
|
+
'addConditionalFormat',
|
|
563
|
+
'addDataValidation',
|
|
564
|
+
'addNamedRange',
|
|
565
|
+
'merge',
|
|
566
|
+
'unmerge',
|
|
567
|
+
'format',
|
|
568
|
+
'copyFormat',
|
|
569
|
+
'pasteFormat',
|
|
570
|
+
],
|
|
571
|
+
events: [
|
|
572
|
+
'created',
|
|
573
|
+
'renamed',
|
|
574
|
+
'deleted',
|
|
575
|
+
'duplicated',
|
|
576
|
+
'moved',
|
|
577
|
+
'hidden',
|
|
578
|
+
'unhidden',
|
|
579
|
+
'protected',
|
|
580
|
+
'unprotected',
|
|
581
|
+
'cleared',
|
|
582
|
+
'rowInserted',
|
|
583
|
+
'rowDeleted',
|
|
584
|
+
'columnInserted',
|
|
585
|
+
'columnDeleted',
|
|
586
|
+
'frozen',
|
|
587
|
+
'unfrozen',
|
|
588
|
+
'sorted',
|
|
589
|
+
'filtered',
|
|
590
|
+
'filterCleared',
|
|
591
|
+
'chartAdded',
|
|
592
|
+
'pivotTableAdded',
|
|
593
|
+
'conditionalFormatAdded',
|
|
594
|
+
'dataValidationAdded',
|
|
595
|
+
'namedRangeAdded',
|
|
596
|
+
'cellsMerged',
|
|
597
|
+
'cellsUnmerged',
|
|
598
|
+
'formatted',
|
|
599
|
+
],
|
|
600
|
+
};
|
|
601
|
+
// =============================================================================
|
|
602
|
+
// Cell
|
|
603
|
+
// =============================================================================
|
|
604
|
+
/**
|
|
605
|
+
* Cell entity
|
|
606
|
+
*
|
|
607
|
+
* Represents a single cell in a spreadsheet.
|
|
608
|
+
*/
|
|
609
|
+
export const Cell = {
|
|
610
|
+
singular: 'cell',
|
|
611
|
+
plural: 'cells',
|
|
612
|
+
description: 'A single cell in a spreadsheet',
|
|
613
|
+
properties: {
|
|
614
|
+
// Location
|
|
615
|
+
row: {
|
|
616
|
+
type: 'number',
|
|
617
|
+
description: 'Row index (0-based)',
|
|
618
|
+
},
|
|
619
|
+
column: {
|
|
620
|
+
type: 'number',
|
|
621
|
+
description: 'Column index (0-based)',
|
|
622
|
+
},
|
|
623
|
+
address: {
|
|
624
|
+
type: 'string',
|
|
625
|
+
optional: true,
|
|
626
|
+
description: 'Cell address (e.g., A1, B2)',
|
|
627
|
+
},
|
|
628
|
+
// Value
|
|
629
|
+
value: {
|
|
630
|
+
type: 'string',
|
|
631
|
+
optional: true,
|
|
632
|
+
description: 'Display value',
|
|
633
|
+
},
|
|
634
|
+
rawValue: {
|
|
635
|
+
type: 'string',
|
|
636
|
+
optional: true,
|
|
637
|
+
description: 'Raw value before formatting',
|
|
638
|
+
},
|
|
639
|
+
dataType: {
|
|
640
|
+
type: 'string',
|
|
641
|
+
optional: true,
|
|
642
|
+
description: 'Data type: string, number, boolean, date, formula, error',
|
|
643
|
+
examples: ['string', 'number', 'boolean', 'date', 'formula', 'error', 'null'],
|
|
644
|
+
},
|
|
645
|
+
// Formula
|
|
646
|
+
formula: {
|
|
647
|
+
type: 'string',
|
|
648
|
+
optional: true,
|
|
649
|
+
description: 'Cell formula',
|
|
650
|
+
},
|
|
651
|
+
hasFormula: {
|
|
652
|
+
type: 'boolean',
|
|
653
|
+
optional: true,
|
|
654
|
+
description: 'Whether cell contains a formula',
|
|
655
|
+
},
|
|
656
|
+
// Formatting
|
|
657
|
+
format: {
|
|
658
|
+
type: 'json',
|
|
659
|
+
optional: true,
|
|
660
|
+
description: 'Cell format configuration',
|
|
661
|
+
},
|
|
662
|
+
numberFormat: {
|
|
663
|
+
type: 'string',
|
|
664
|
+
optional: true,
|
|
665
|
+
description: 'Number format string',
|
|
666
|
+
},
|
|
667
|
+
fontFamily: {
|
|
668
|
+
type: 'string',
|
|
669
|
+
optional: true,
|
|
670
|
+
description: 'Font family',
|
|
671
|
+
},
|
|
672
|
+
fontSize: {
|
|
673
|
+
type: 'number',
|
|
674
|
+
optional: true,
|
|
675
|
+
description: 'Font size in points',
|
|
676
|
+
},
|
|
677
|
+
fontWeight: {
|
|
678
|
+
type: 'string',
|
|
679
|
+
optional: true,
|
|
680
|
+
description: 'Font weight: normal, bold',
|
|
681
|
+
examples: ['normal', 'bold'],
|
|
682
|
+
},
|
|
683
|
+
fontStyle: {
|
|
684
|
+
type: 'string',
|
|
685
|
+
optional: true,
|
|
686
|
+
description: 'Font style: normal, italic',
|
|
687
|
+
examples: ['normal', 'italic'],
|
|
688
|
+
},
|
|
689
|
+
textColor: {
|
|
690
|
+
type: 'string',
|
|
691
|
+
optional: true,
|
|
692
|
+
description: 'Text color (hex)',
|
|
693
|
+
},
|
|
694
|
+
backgroundColor: {
|
|
695
|
+
type: 'string',
|
|
696
|
+
optional: true,
|
|
697
|
+
description: 'Background color (hex)',
|
|
698
|
+
},
|
|
699
|
+
horizontalAlignment: {
|
|
700
|
+
type: 'string',
|
|
701
|
+
optional: true,
|
|
702
|
+
description: 'Horizontal alignment: left, center, right',
|
|
703
|
+
examples: ['left', 'center', 'right'],
|
|
704
|
+
},
|
|
705
|
+
verticalAlignment: {
|
|
706
|
+
type: 'string',
|
|
707
|
+
optional: true,
|
|
708
|
+
description: 'Vertical alignment: top, middle, bottom',
|
|
709
|
+
examples: ['top', 'middle', 'bottom'],
|
|
710
|
+
},
|
|
711
|
+
wrapText: {
|
|
712
|
+
type: 'boolean',
|
|
713
|
+
optional: true,
|
|
714
|
+
description: 'Whether text wraps',
|
|
715
|
+
},
|
|
716
|
+
// Borders
|
|
717
|
+
borders: {
|
|
718
|
+
type: 'json',
|
|
719
|
+
optional: true,
|
|
720
|
+
description: 'Border configuration',
|
|
721
|
+
},
|
|
722
|
+
// Validation
|
|
723
|
+
dataValidation: {
|
|
724
|
+
type: 'json',
|
|
725
|
+
optional: true,
|
|
726
|
+
description: 'Data validation rules',
|
|
727
|
+
},
|
|
728
|
+
isValid: {
|
|
729
|
+
type: 'boolean',
|
|
730
|
+
optional: true,
|
|
731
|
+
description: 'Whether value passes validation',
|
|
732
|
+
},
|
|
733
|
+
// Merge
|
|
734
|
+
isMerged: {
|
|
735
|
+
type: 'boolean',
|
|
736
|
+
optional: true,
|
|
737
|
+
description: 'Whether cell is part of merged range',
|
|
738
|
+
},
|
|
739
|
+
mergeRange: {
|
|
740
|
+
type: 'string',
|
|
741
|
+
optional: true,
|
|
742
|
+
description: 'Merged cell range',
|
|
743
|
+
},
|
|
744
|
+
// Notes and comments
|
|
745
|
+
note: {
|
|
746
|
+
type: 'string',
|
|
747
|
+
optional: true,
|
|
748
|
+
description: 'Cell note',
|
|
749
|
+
},
|
|
750
|
+
hasComment: {
|
|
751
|
+
type: 'boolean',
|
|
752
|
+
optional: true,
|
|
753
|
+
description: 'Whether cell has a comment',
|
|
754
|
+
},
|
|
755
|
+
// Links
|
|
756
|
+
hyperlink: {
|
|
757
|
+
type: 'url',
|
|
758
|
+
optional: true,
|
|
759
|
+
description: 'Hyperlink URL',
|
|
760
|
+
},
|
|
761
|
+
// Protection
|
|
762
|
+
locked: {
|
|
763
|
+
type: 'boolean',
|
|
764
|
+
optional: true,
|
|
765
|
+
description: 'Whether cell is locked',
|
|
766
|
+
},
|
|
767
|
+
},
|
|
768
|
+
relationships: {
|
|
769
|
+
sheet: {
|
|
770
|
+
type: 'Sheet',
|
|
771
|
+
description: 'Parent sheet',
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
actions: [
|
|
775
|
+
'setValue',
|
|
776
|
+
'setFormula',
|
|
777
|
+
'clear',
|
|
778
|
+
'clearFormat',
|
|
779
|
+
'format',
|
|
780
|
+
'merge',
|
|
781
|
+
'unmerge',
|
|
782
|
+
'lock',
|
|
783
|
+
'unlock',
|
|
784
|
+
'addNote',
|
|
785
|
+
'removeNote',
|
|
786
|
+
'addComment',
|
|
787
|
+
'addHyperlink',
|
|
788
|
+
'removeHyperlink',
|
|
789
|
+
'copy',
|
|
790
|
+
'cut',
|
|
791
|
+
'paste',
|
|
792
|
+
'validate',
|
|
793
|
+
],
|
|
794
|
+
events: [
|
|
795
|
+
'valueChanged',
|
|
796
|
+
'formulaSet',
|
|
797
|
+
'cleared',
|
|
798
|
+
'formatted',
|
|
799
|
+
'merged',
|
|
800
|
+
'unmerged',
|
|
801
|
+
'locked',
|
|
802
|
+
'unlocked',
|
|
803
|
+
'noteAdded',
|
|
804
|
+
'noteRemoved',
|
|
805
|
+
'commentAdded',
|
|
806
|
+
'hyperlinkAdded',
|
|
807
|
+
'hyperlinkRemoved',
|
|
808
|
+
'copied',
|
|
809
|
+
'pasted',
|
|
810
|
+
],
|
|
811
|
+
};
|
|
812
|
+
// =============================================================================
|
|
813
|
+
// Range
|
|
814
|
+
// =============================================================================
|
|
815
|
+
/**
|
|
816
|
+
* Range entity
|
|
817
|
+
*
|
|
818
|
+
* Represents a range of cells in a spreadsheet.
|
|
819
|
+
*/
|
|
820
|
+
export const Range = {
|
|
821
|
+
singular: 'range',
|
|
822
|
+
plural: 'ranges',
|
|
823
|
+
description: 'A range of cells in a spreadsheet',
|
|
824
|
+
properties: {
|
|
825
|
+
// Location
|
|
826
|
+
startRow: {
|
|
827
|
+
type: 'number',
|
|
828
|
+
description: 'Starting row index (0-based)',
|
|
829
|
+
},
|
|
830
|
+
startColumn: {
|
|
831
|
+
type: 'number',
|
|
832
|
+
description: 'Starting column index (0-based)',
|
|
833
|
+
},
|
|
834
|
+
endRow: {
|
|
835
|
+
type: 'number',
|
|
836
|
+
description: 'Ending row index (0-based)',
|
|
837
|
+
},
|
|
838
|
+
endColumn: {
|
|
839
|
+
type: 'number',
|
|
840
|
+
description: 'Ending column index (0-based)',
|
|
841
|
+
},
|
|
842
|
+
address: {
|
|
843
|
+
type: 'string',
|
|
844
|
+
optional: true,
|
|
845
|
+
description: 'Range address (e.g., A1:B10)',
|
|
846
|
+
},
|
|
847
|
+
// Dimensions
|
|
848
|
+
rowCount: {
|
|
849
|
+
type: 'number',
|
|
850
|
+
optional: true,
|
|
851
|
+
description: 'Number of rows in range',
|
|
852
|
+
},
|
|
853
|
+
columnCount: {
|
|
854
|
+
type: 'number',
|
|
855
|
+
optional: true,
|
|
856
|
+
description: 'Number of columns in range',
|
|
857
|
+
},
|
|
858
|
+
cellCount: {
|
|
859
|
+
type: 'number',
|
|
860
|
+
optional: true,
|
|
861
|
+
description: 'Total number of cells',
|
|
862
|
+
},
|
|
863
|
+
// Data
|
|
864
|
+
values: {
|
|
865
|
+
type: 'json',
|
|
866
|
+
optional: true,
|
|
867
|
+
description: 'Cell values as 2D array',
|
|
868
|
+
},
|
|
869
|
+
formulas: {
|
|
870
|
+
type: 'json',
|
|
871
|
+
optional: true,
|
|
872
|
+
description: 'Cell formulas as 2D array',
|
|
873
|
+
},
|
|
874
|
+
// Named range
|
|
875
|
+
name: {
|
|
876
|
+
type: 'string',
|
|
877
|
+
optional: true,
|
|
878
|
+
description: 'Named range identifier',
|
|
879
|
+
},
|
|
880
|
+
isNamed: {
|
|
881
|
+
type: 'boolean',
|
|
882
|
+
optional: true,
|
|
883
|
+
description: 'Whether this is a named range',
|
|
884
|
+
},
|
|
885
|
+
// Format
|
|
886
|
+
format: {
|
|
887
|
+
type: 'json',
|
|
888
|
+
optional: true,
|
|
889
|
+
description: 'Range format configuration',
|
|
890
|
+
},
|
|
891
|
+
// Protection
|
|
892
|
+
protected: {
|
|
893
|
+
type: 'boolean',
|
|
894
|
+
optional: true,
|
|
895
|
+
description: 'Whether range is protected',
|
|
896
|
+
},
|
|
897
|
+
},
|
|
898
|
+
relationships: {
|
|
899
|
+
sheet: {
|
|
900
|
+
type: 'Sheet',
|
|
901
|
+
description: 'Parent sheet',
|
|
902
|
+
},
|
|
903
|
+
},
|
|
904
|
+
actions: [
|
|
905
|
+
'select',
|
|
906
|
+
'setValue',
|
|
907
|
+
'setValues',
|
|
908
|
+
'setFormula',
|
|
909
|
+
'setFormulas',
|
|
910
|
+
'clear',
|
|
911
|
+
'clearFormat',
|
|
912
|
+
'clearData',
|
|
913
|
+
'format',
|
|
914
|
+
'copy',
|
|
915
|
+
'cut',
|
|
916
|
+
'paste',
|
|
917
|
+
'merge',
|
|
918
|
+
'unmerge',
|
|
919
|
+
'sort',
|
|
920
|
+
'filter',
|
|
921
|
+
'protect',
|
|
922
|
+
'unprotect',
|
|
923
|
+
'autoFill',
|
|
924
|
+
'insertRows',
|
|
925
|
+
'insertColumns',
|
|
926
|
+
'deleteRows',
|
|
927
|
+
'deleteColumns',
|
|
928
|
+
'name',
|
|
929
|
+
'unname',
|
|
930
|
+
],
|
|
931
|
+
events: [
|
|
932
|
+
'selected',
|
|
933
|
+
'valuesChanged',
|
|
934
|
+
'formulasSet',
|
|
935
|
+
'cleared',
|
|
936
|
+
'formatted',
|
|
937
|
+
'copied',
|
|
938
|
+
'pasted',
|
|
939
|
+
'merged',
|
|
940
|
+
'unmerged',
|
|
941
|
+
'sorted',
|
|
942
|
+
'filtered',
|
|
943
|
+
'protected',
|
|
944
|
+
'unprotected',
|
|
945
|
+
'autoFilled',
|
|
946
|
+
'rowsInserted',
|
|
947
|
+
'columnsInserted',
|
|
948
|
+
'rowsDeleted',
|
|
949
|
+
'columnsDeleted',
|
|
950
|
+
'named',
|
|
951
|
+
'unnamed',
|
|
952
|
+
],
|
|
953
|
+
};
|
|
954
|
+
// =============================================================================
|
|
955
|
+
// Chart
|
|
956
|
+
// =============================================================================
|
|
957
|
+
/**
|
|
958
|
+
* Chart entity
|
|
959
|
+
*
|
|
960
|
+
* Represents a chart or graph in a spreadsheet.
|
|
961
|
+
*/
|
|
962
|
+
export const Chart = {
|
|
963
|
+
singular: 'chart',
|
|
964
|
+
plural: 'charts',
|
|
965
|
+
description: 'A chart or graph visualizing spreadsheet data',
|
|
966
|
+
properties: {
|
|
967
|
+
// Identity
|
|
968
|
+
title: {
|
|
969
|
+
type: 'string',
|
|
970
|
+
description: 'Chart title',
|
|
971
|
+
},
|
|
972
|
+
subtitle: {
|
|
973
|
+
type: 'string',
|
|
974
|
+
optional: true,
|
|
975
|
+
description: 'Chart subtitle',
|
|
976
|
+
},
|
|
977
|
+
// Type
|
|
978
|
+
type: {
|
|
979
|
+
type: 'string',
|
|
980
|
+
description: 'Chart type',
|
|
981
|
+
examples: [
|
|
982
|
+
'line',
|
|
983
|
+
'bar',
|
|
984
|
+
'column',
|
|
985
|
+
'pie',
|
|
986
|
+
'scatter',
|
|
987
|
+
'area',
|
|
988
|
+
'combo',
|
|
989
|
+
'histogram',
|
|
990
|
+
'waterfall',
|
|
991
|
+
'candlestick',
|
|
992
|
+
'treemap',
|
|
993
|
+
'gauge',
|
|
994
|
+
'radar',
|
|
995
|
+
],
|
|
996
|
+
},
|
|
997
|
+
subtype: {
|
|
998
|
+
type: 'string',
|
|
999
|
+
optional: true,
|
|
1000
|
+
description: 'Chart subtype variant',
|
|
1001
|
+
},
|
|
1002
|
+
// Data source
|
|
1003
|
+
dataRange: {
|
|
1004
|
+
type: 'string',
|
|
1005
|
+
description: 'Source data range',
|
|
1006
|
+
},
|
|
1007
|
+
hasHeaders: {
|
|
1008
|
+
type: 'boolean',
|
|
1009
|
+
optional: true,
|
|
1010
|
+
description: 'Whether data includes headers',
|
|
1011
|
+
},
|
|
1012
|
+
series: {
|
|
1013
|
+
type: 'json',
|
|
1014
|
+
optional: true,
|
|
1015
|
+
description: 'Data series configuration',
|
|
1016
|
+
},
|
|
1017
|
+
// Position and size
|
|
1018
|
+
position: {
|
|
1019
|
+
type: 'json',
|
|
1020
|
+
optional: true,
|
|
1021
|
+
description: 'Chart position on sheet',
|
|
1022
|
+
},
|
|
1023
|
+
width: {
|
|
1024
|
+
type: 'number',
|
|
1025
|
+
optional: true,
|
|
1026
|
+
description: 'Chart width in pixels',
|
|
1027
|
+
},
|
|
1028
|
+
height: {
|
|
1029
|
+
type: 'number',
|
|
1030
|
+
optional: true,
|
|
1031
|
+
description: 'Chart height in pixels',
|
|
1032
|
+
},
|
|
1033
|
+
// Axes
|
|
1034
|
+
xAxis: {
|
|
1035
|
+
type: 'json',
|
|
1036
|
+
optional: true,
|
|
1037
|
+
description: 'X-axis configuration',
|
|
1038
|
+
},
|
|
1039
|
+
yAxis: {
|
|
1040
|
+
type: 'json',
|
|
1041
|
+
optional: true,
|
|
1042
|
+
description: 'Y-axis configuration',
|
|
1043
|
+
},
|
|
1044
|
+
secondaryAxis: {
|
|
1045
|
+
type: 'json',
|
|
1046
|
+
optional: true,
|
|
1047
|
+
description: 'Secondary axis configuration',
|
|
1048
|
+
},
|
|
1049
|
+
// Legend
|
|
1050
|
+
showLegend: {
|
|
1051
|
+
type: 'boolean',
|
|
1052
|
+
optional: true,
|
|
1053
|
+
description: 'Whether to show legend',
|
|
1054
|
+
},
|
|
1055
|
+
legendPosition: {
|
|
1056
|
+
type: 'string',
|
|
1057
|
+
optional: true,
|
|
1058
|
+
description: 'Legend position: top, bottom, left, right',
|
|
1059
|
+
examples: ['top', 'bottom', 'left', 'right'],
|
|
1060
|
+
},
|
|
1061
|
+
// Styling
|
|
1062
|
+
theme: {
|
|
1063
|
+
type: 'string',
|
|
1064
|
+
optional: true,
|
|
1065
|
+
description: 'Chart theme',
|
|
1066
|
+
},
|
|
1067
|
+
colors: {
|
|
1068
|
+
type: 'string',
|
|
1069
|
+
array: true,
|
|
1070
|
+
optional: true,
|
|
1071
|
+
description: 'Custom colors for series',
|
|
1072
|
+
},
|
|
1073
|
+
backgroundColor: {
|
|
1074
|
+
type: 'string',
|
|
1075
|
+
optional: true,
|
|
1076
|
+
description: 'Background color',
|
|
1077
|
+
},
|
|
1078
|
+
// Options
|
|
1079
|
+
showDataLabels: {
|
|
1080
|
+
type: 'boolean',
|
|
1081
|
+
optional: true,
|
|
1082
|
+
description: 'Whether to show data labels',
|
|
1083
|
+
},
|
|
1084
|
+
showGridLines: {
|
|
1085
|
+
type: 'boolean',
|
|
1086
|
+
optional: true,
|
|
1087
|
+
description: 'Whether to show grid lines',
|
|
1088
|
+
},
|
|
1089
|
+
stacked: {
|
|
1090
|
+
type: 'boolean',
|
|
1091
|
+
optional: true,
|
|
1092
|
+
description: 'Whether chart is stacked',
|
|
1093
|
+
},
|
|
1094
|
+
smooth: {
|
|
1095
|
+
type: 'boolean',
|
|
1096
|
+
optional: true,
|
|
1097
|
+
description: 'Whether to smooth line charts',
|
|
1098
|
+
},
|
|
1099
|
+
// Interaction
|
|
1100
|
+
interactive: {
|
|
1101
|
+
type: 'boolean',
|
|
1102
|
+
optional: true,
|
|
1103
|
+
description: 'Whether chart is interactive',
|
|
1104
|
+
},
|
|
1105
|
+
allowFiltering: {
|
|
1106
|
+
type: 'boolean',
|
|
1107
|
+
optional: true,
|
|
1108
|
+
description: 'Whether filtering is allowed',
|
|
1109
|
+
},
|
|
1110
|
+
// Metadata
|
|
1111
|
+
description: {
|
|
1112
|
+
type: 'string',
|
|
1113
|
+
optional: true,
|
|
1114
|
+
description: 'Chart description',
|
|
1115
|
+
},
|
|
1116
|
+
},
|
|
1117
|
+
relationships: {
|
|
1118
|
+
spreadsheet: {
|
|
1119
|
+
type: 'Spreadsheet',
|
|
1120
|
+
backref: 'charts',
|
|
1121
|
+
description: 'Parent spreadsheet',
|
|
1122
|
+
},
|
|
1123
|
+
sheet: {
|
|
1124
|
+
type: 'Sheet',
|
|
1125
|
+
backref: 'charts',
|
|
1126
|
+
description: 'Sheet containing the chart',
|
|
1127
|
+
},
|
|
1128
|
+
},
|
|
1129
|
+
actions: [
|
|
1130
|
+
'create',
|
|
1131
|
+
'edit',
|
|
1132
|
+
'delete',
|
|
1133
|
+
'duplicate',
|
|
1134
|
+
'move',
|
|
1135
|
+
'resize',
|
|
1136
|
+
'refresh',
|
|
1137
|
+
'changeType',
|
|
1138
|
+
'updateData',
|
|
1139
|
+
'export',
|
|
1140
|
+
'copyImage',
|
|
1141
|
+
'setTitle',
|
|
1142
|
+
'setTheme',
|
|
1143
|
+
'showLegend',
|
|
1144
|
+
'hideLegend',
|
|
1145
|
+
'addSeries',
|
|
1146
|
+
'removeSeries',
|
|
1147
|
+
],
|
|
1148
|
+
events: [
|
|
1149
|
+
'created',
|
|
1150
|
+
'edited',
|
|
1151
|
+
'deleted',
|
|
1152
|
+
'duplicated',
|
|
1153
|
+
'moved',
|
|
1154
|
+
'resized',
|
|
1155
|
+
'refreshed',
|
|
1156
|
+
'typeChanged',
|
|
1157
|
+
'dataUpdated',
|
|
1158
|
+
'exported',
|
|
1159
|
+
'titleSet',
|
|
1160
|
+
'themeSet',
|
|
1161
|
+
'seriesAdded',
|
|
1162
|
+
'seriesRemoved',
|
|
1163
|
+
],
|
|
1164
|
+
};
|
|
1165
|
+
// =============================================================================
|
|
1166
|
+
// PivotTable
|
|
1167
|
+
// =============================================================================
|
|
1168
|
+
/**
|
|
1169
|
+
* PivotTable entity
|
|
1170
|
+
*
|
|
1171
|
+
* Represents a pivot table for data analysis and summarization.
|
|
1172
|
+
*/
|
|
1173
|
+
export const PivotTable = {
|
|
1174
|
+
singular: 'pivot table',
|
|
1175
|
+
plural: 'pivot tables',
|
|
1176
|
+
description: 'A pivot table for analyzing and summarizing data',
|
|
1177
|
+
properties: {
|
|
1178
|
+
// Identity
|
|
1179
|
+
name: {
|
|
1180
|
+
type: 'string',
|
|
1181
|
+
description: 'Pivot table name',
|
|
1182
|
+
},
|
|
1183
|
+
// Source
|
|
1184
|
+
sourceRange: {
|
|
1185
|
+
type: 'string',
|
|
1186
|
+
description: 'Source data range',
|
|
1187
|
+
},
|
|
1188
|
+
targetRange: {
|
|
1189
|
+
type: 'string',
|
|
1190
|
+
optional: true,
|
|
1191
|
+
description: 'Target range for pivot table output',
|
|
1192
|
+
},
|
|
1193
|
+
// Configuration
|
|
1194
|
+
rows: {
|
|
1195
|
+
type: 'json',
|
|
1196
|
+
description: 'Row field configuration',
|
|
1197
|
+
},
|
|
1198
|
+
columns: {
|
|
1199
|
+
type: 'json',
|
|
1200
|
+
optional: true,
|
|
1201
|
+
description: 'Column field configuration',
|
|
1202
|
+
},
|
|
1203
|
+
values: {
|
|
1204
|
+
type: 'json',
|
|
1205
|
+
description: 'Value field configuration with aggregations',
|
|
1206
|
+
},
|
|
1207
|
+
filters: {
|
|
1208
|
+
type: 'json',
|
|
1209
|
+
optional: true,
|
|
1210
|
+
description: 'Filter field configuration',
|
|
1211
|
+
},
|
|
1212
|
+
// Aggregation
|
|
1213
|
+
aggregationFunctions: {
|
|
1214
|
+
type: 'json',
|
|
1215
|
+
optional: true,
|
|
1216
|
+
description: 'Aggregation functions by field',
|
|
1217
|
+
},
|
|
1218
|
+
// Sorting
|
|
1219
|
+
sortBy: {
|
|
1220
|
+
type: 'string',
|
|
1221
|
+
optional: true,
|
|
1222
|
+
description: 'Field to sort by',
|
|
1223
|
+
},
|
|
1224
|
+
sortOrder: {
|
|
1225
|
+
type: 'string',
|
|
1226
|
+
optional: true,
|
|
1227
|
+
description: 'Sort order: asc, desc',
|
|
1228
|
+
examples: ['asc', 'desc'],
|
|
1229
|
+
},
|
|
1230
|
+
// Filtering
|
|
1231
|
+
activeFilters: {
|
|
1232
|
+
type: 'json',
|
|
1233
|
+
optional: true,
|
|
1234
|
+
description: 'Active filter values',
|
|
1235
|
+
},
|
|
1236
|
+
// Display
|
|
1237
|
+
showGrandTotals: {
|
|
1238
|
+
type: 'boolean',
|
|
1239
|
+
optional: true,
|
|
1240
|
+
description: 'Whether to show grand totals',
|
|
1241
|
+
},
|
|
1242
|
+
showSubtotals: {
|
|
1243
|
+
type: 'boolean',
|
|
1244
|
+
optional: true,
|
|
1245
|
+
description: 'Whether to show subtotals',
|
|
1246
|
+
},
|
|
1247
|
+
compactLayout: {
|
|
1248
|
+
type: 'boolean',
|
|
1249
|
+
optional: true,
|
|
1250
|
+
description: 'Whether to use compact layout',
|
|
1251
|
+
},
|
|
1252
|
+
// Refresh
|
|
1253
|
+
autoRefresh: {
|
|
1254
|
+
type: 'boolean',
|
|
1255
|
+
optional: true,
|
|
1256
|
+
description: 'Whether to auto-refresh on data change',
|
|
1257
|
+
},
|
|
1258
|
+
lastRefreshedAt: {
|
|
1259
|
+
type: 'datetime',
|
|
1260
|
+
optional: true,
|
|
1261
|
+
description: 'Last refresh timestamp',
|
|
1262
|
+
},
|
|
1263
|
+
// Calculated fields
|
|
1264
|
+
calculatedFields: {
|
|
1265
|
+
type: 'json',
|
|
1266
|
+
optional: true,
|
|
1267
|
+
description: 'Custom calculated field definitions',
|
|
1268
|
+
},
|
|
1269
|
+
},
|
|
1270
|
+
relationships: {
|
|
1271
|
+
spreadsheet: {
|
|
1272
|
+
type: 'Spreadsheet',
|
|
1273
|
+
backref: 'pivotTables',
|
|
1274
|
+
description: 'Parent spreadsheet',
|
|
1275
|
+
},
|
|
1276
|
+
sheet: {
|
|
1277
|
+
type: 'Sheet',
|
|
1278
|
+
backref: 'pivotTables',
|
|
1279
|
+
description: 'Sheet containing the pivot table',
|
|
1280
|
+
},
|
|
1281
|
+
},
|
|
1282
|
+
actions: [
|
|
1283
|
+
'create',
|
|
1284
|
+
'edit',
|
|
1285
|
+
'delete',
|
|
1286
|
+
'refresh',
|
|
1287
|
+
'addField',
|
|
1288
|
+
'removeField',
|
|
1289
|
+
'moveField',
|
|
1290
|
+
'setAggregation',
|
|
1291
|
+
'filter',
|
|
1292
|
+
'clearFilter',
|
|
1293
|
+
'sort',
|
|
1294
|
+
'expand',
|
|
1295
|
+
'collapse',
|
|
1296
|
+
'expandAll',
|
|
1297
|
+
'collapseAll',
|
|
1298
|
+
'addCalculatedField',
|
|
1299
|
+
'removeCalculatedField',
|
|
1300
|
+
'showFieldList',
|
|
1301
|
+
'export',
|
|
1302
|
+
],
|
|
1303
|
+
events: [
|
|
1304
|
+
'created',
|
|
1305
|
+
'edited',
|
|
1306
|
+
'deleted',
|
|
1307
|
+
'refreshed',
|
|
1308
|
+
'fieldAdded',
|
|
1309
|
+
'fieldRemoved',
|
|
1310
|
+
'fieldMoved',
|
|
1311
|
+
'aggregationSet',
|
|
1312
|
+
'filtered',
|
|
1313
|
+
'filterCleared',
|
|
1314
|
+
'sorted',
|
|
1315
|
+
'expanded',
|
|
1316
|
+
'collapsed',
|
|
1317
|
+
'calculatedFieldAdded',
|
|
1318
|
+
'calculatedFieldRemoved',
|
|
1319
|
+
'exported',
|
|
1320
|
+
],
|
|
1321
|
+
};
|
|
1322
|
+
// =============================================================================
|
|
1323
|
+
// Export all entities as a schema
|
|
1324
|
+
// =============================================================================
|
|
1325
|
+
/**
|
|
1326
|
+
* All spreadsheet entity types
|
|
1327
|
+
*/
|
|
1328
|
+
export const SpreadsheetEntities = {
|
|
1329
|
+
Spreadsheet,
|
|
1330
|
+
Sheet,
|
|
1331
|
+
Cell,
|
|
1332
|
+
Range,
|
|
1333
|
+
Chart,
|
|
1334
|
+
PivotTable,
|
|
1335
|
+
};
|
|
1336
|
+
/**
|
|
1337
|
+
* Entity categories for organization
|
|
1338
|
+
*/
|
|
1339
|
+
export const SpreadsheetCategories = {
|
|
1340
|
+
spreadsheets: ['Spreadsheet', 'Sheet', 'Cell', 'Range', 'Chart', 'PivotTable'],
|
|
1341
|
+
};
|