react-semaphor 0.1.327 → 0.1.329

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +211 -72
  3. package/dist/brand-studio/index.cjs +5 -5
  4. package/dist/brand-studio/index.js +23 -24
  5. package/dist/chunks/_commonjsHelpers-BVfed4GL.js +28 -0
  6. package/dist/chunks/_commonjsHelpers-DwTZ_eVU.js +1 -0
  7. package/dist/chunks/{braces-BGWZEnQJ.js → braces-CG8viaD2.js} +1 -1
  8. package/dist/chunks/{braces-B6qRDu1H.js → braces-DSaa_4Oc.js} +1 -1
  9. package/dist/chunks/{calendar-preferences-dialog-fkLUMJyR.js → calendar-preferences-dialog-DD_qAthL.js} +1 -1
  10. package/dist/chunks/{calendar-preferences-dialog-CjwbE_82.js → calendar-preferences-dialog-JRmNJptJ.js} +3 -3
  11. package/dist/chunks/{chevrons-up-down-xG-bVFD9.js → chevrons-up-down-CBa0uh0X.js} +1 -1
  12. package/dist/chunks/{chevrons-up-down-BpsogQvv.js → chevrons-up-down-ChDNqVP7.js} +1 -1
  13. package/dist/chunks/dashboard-briefing-launcher-BKdJFwH5.js +106 -0
  14. package/dist/chunks/{dashboard-briefing-launcher-Cy1nWZRW.js → dashboard-briefing-launcher-BfyNkd8i.js} +1141 -1137
  15. package/dist/chunks/{dashboard-controls-BWnVEFJq.js → dashboard-controls-0pZDLvFL.js} +218 -218
  16. package/dist/chunks/{dashboard-controls-C7rOGZO-.js → dashboard-controls-C0xm1QMR.js} +10 -10
  17. package/dist/chunks/dashboard-json-BW5OVZ6m.js +1 -0
  18. package/dist/chunks/{dashboard-json-BpRNSsF3.js → dashboard-json-DsruhRPD.js} +14 -13
  19. package/dist/chunks/{edit-dashboard-visual-B2vkIKEa.js → edit-dashboard-visual-DQyJ7SSv.js} +1 -1
  20. package/dist/chunks/{edit-dashboard-visual-CYf26co_.js → edit-dashboard-visual-g5SZZahJ.js} +9 -8
  21. package/dist/chunks/index-1JWDPCun.js +1935 -0
  22. package/dist/chunks/index-BdjXTQt4.js +1444 -0
  23. package/dist/chunks/{index-DTlbYpxd.js → index-BmKr-K7J.js} +116971 -113296
  24. package/dist/chunks/index-C1l78BIx.js +3247 -0
  25. package/dist/chunks/lib-Ce3zosXY.js +38 -0
  26. package/dist/chunks/lib-DFvr9fM4.js +5500 -0
  27. package/dist/chunks/{palette-CSF7IVJn.js → palette-D0YmAqBS.js} +1 -1
  28. package/dist/chunks/{palette-CWgEPBoG.js → palette-DQgq3edH.js} +1 -1
  29. package/dist/chunks/{resource-management-panel-D6nbfJY3.js → resource-management-panel-CIfBh46E.js} +1 -1
  30. package/dist/chunks/{resource-management-panel-D893Onv8.js → resource-management-panel-Cj19pw9M.js} +145 -145
  31. package/dist/chunks/{switch-DJJJD_g1.js → switch-BvTzw2AW.js} +39 -34
  32. package/dist/chunks/{switch-DKf6vHfP.js → switch-De31SR3q.js} +878 -885
  33. package/dist/chunks/typescript-Cmizj1hi.js +446 -0
  34. package/dist/chunks/typescript-H1EwZsOb.js +159820 -0
  35. package/dist/chunks/use-create-flow-overlay-state-BTQiKRD1.js +26 -0
  36. package/dist/chunks/{use-create-flow-overlay-state-p21zs2p6.js → use-create-flow-overlay-state-IcHP0l39.js} +150 -151
  37. package/dist/chunks/{use-visual-utils-BKBua6o4.js → use-visual-utils-DQ5zGYD2.js} +13 -13
  38. package/dist/chunks/{use-visual-utils-BqWm0QeW.js → use-visual-utils-XF-AqV8o.js} +1 -1
  39. package/dist/dashboard/index.cjs +1 -1
  40. package/dist/dashboard/index.js +1 -1
  41. package/dist/data-app-builder/index.cjs +1 -0
  42. package/dist/data-app-builder/index.js +4 -0
  43. package/dist/data-app-builder-browser-runtime/index.cjs +1 -0
  44. package/dist/data-app-builder-browser-runtime/index.js +10 -0
  45. package/dist/data-app-sdk/index.cjs +1 -1
  46. package/dist/data-app-sdk/index.js +208 -196
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.js +14 -14
  49. package/dist/style.css +1 -1
  50. package/dist/surfboard/index.cjs +1 -1
  51. package/dist/surfboard/index.js +2 -2
  52. package/dist/types/analytics-protocol.d.ts +76 -1
  53. package/dist/types/dashboard-authoring.d.ts +2 -1
  54. package/dist/types/data-app-builder-browser-runtime.d.ts +185 -0
  55. package/dist/types/data-app-builder.d.ts +631 -0
  56. package/dist/types/data-app-sdk.d.ts +16 -2
  57. package/dist/types/main.d.ts +4 -1
  58. package/package.json +11 -1
  59. package/dist/chunks/dashboard-briefing-launcher-Co57xBfS.js +0 -106
  60. package/dist/chunks/dashboard-json-DBPMknGo.js +0 -1
  61. package/dist/chunks/index-BD90s-wf.js +0 -1309
  62. package/dist/chunks/save-CtQbSub2.js +0 -6
  63. package/dist/chunks/save-DRdFKF57.js +0 -21
  64. package/dist/chunks/use-create-flow-overlay-state-C4LgoK8q.js +0 -26
@@ -0,0 +1,631 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare type ApiStatus = {
4
+ ok: boolean;
5
+ appBuilder?: {
6
+ hasOpenAiKey: boolean;
7
+ environment: string;
8
+ deploymentUrl: string | null;
9
+ };
10
+ error?: string;
11
+ };
12
+
13
+ export declare type BridgeCommandResult = {
14
+ command: string;
15
+ durationMs: number;
16
+ exitCode: number;
17
+ ok: boolean;
18
+ stdout: string;
19
+ stderr: string;
20
+ };
21
+
22
+ export declare type BridgeReadFilesResult = {
23
+ ok: boolean;
24
+ projectRoot?: string;
25
+ files?: Array<{
26
+ path: string;
27
+ contents: string;
28
+ }>;
29
+ error?: string;
30
+ };
31
+
32
+ export declare type BridgeResult = {
33
+ ok: boolean;
34
+ projectRoot?: string;
35
+ provider?: string;
36
+ validation?: 'typecheck' | 'build' | 'write-policy-validation' | 'import-validation' | 'data-api-validation';
37
+ changedFiles?: string[];
38
+ summary?: string;
39
+ changes?: Array<{
40
+ kind: 'add' | 'edit' | 'remove';
41
+ label: string;
42
+ }>;
43
+ files?: Array<{
44
+ path: string;
45
+ size: number;
46
+ }>;
47
+ generationMeta?: {
48
+ model: string;
49
+ strategy: string;
50
+ reasoningEffort?: string;
51
+ durationMs: number;
52
+ outputChars?: number;
53
+ fallbackFrom?: {
54
+ strategy: string;
55
+ reason: string;
56
+ };
57
+ };
58
+ attempts?: Array<{
59
+ label: string;
60
+ ok: boolean;
61
+ command: BridgeCommandResult;
62
+ }>;
63
+ command?: BridgeCommandResult;
64
+ importValidation?: {
65
+ ok: boolean;
66
+ diagnostics: string[];
67
+ };
68
+ writePolicyValidation?: {
69
+ ok: boolean;
70
+ diagnostics: string[];
71
+ };
72
+ dataApiValidation?: {
73
+ ok: boolean;
74
+ diagnostics: string[];
75
+ };
76
+ telemetry?: {
77
+ contextFileCount?: number;
78
+ contextChars?: number;
79
+ generatedFileCount?: number;
80
+ generatedChars?: number;
81
+ repairAttempts?: number;
82
+ };
83
+ filePlan?: BrowserSandboxFilePlan;
84
+ error?: string;
85
+ };
86
+
87
+ export declare type BridgeWorkspaceContextResult = {
88
+ ok: boolean;
89
+ workspaceContext?: WorkspaceContext;
90
+ error?: string;
91
+ };
92
+
93
+ declare type BrowserSandboxFilePlan = {
94
+ intent: string;
95
+ files: Array<{
96
+ path: string;
97
+ purpose: string;
98
+ action: 'create' | 'edit';
99
+ }>;
100
+ };
101
+
102
+ declare type BrowserSandboxRuntimeManifest = {
103
+ id: string;
104
+ name: string;
105
+ execution: 'browser-sandbox';
106
+ moduleSystem: string;
107
+ cssPipeline: {
108
+ mode: string;
109
+ status: string;
110
+ };
111
+ packages: Array<{
112
+ name: string;
113
+ source: 'host' | 'runtime' | 'shim' | 'fallback';
114
+ status: 'supported' | 'partial';
115
+ }>;
116
+ components: Array<{
117
+ name: string;
118
+ importPath: string;
119
+ sourceFile: string;
120
+ implementation: 'source' | 'shim';
121
+ dependencies: string[];
122
+ }>;
123
+ limits: {
124
+ writeScope: string[];
125
+ editableGlobs: string[];
126
+ unsupported: string[];
127
+ };
128
+ };
129
+
130
+ declare type BuilderConversationContext = {
131
+ messages: BuilderConversationMessage[];
132
+ activeTarget?: string;
133
+ lastSuccessfulRun?: {
134
+ prompt: string;
135
+ changedFiles: string[];
136
+ summary?: string;
137
+ filePlan?: BrowserSandboxFilePlan;
138
+ };
139
+ lastOperation?: DataAppOperationPlan;
140
+ intentManifest?: DataAppIntentManifest;
141
+ };
142
+
143
+ declare type BuilderConversationMessage = {
144
+ role: 'user' | 'assistant' | 'system';
145
+ content: string;
146
+ };
147
+
148
+ export declare type BuilderTurn = {
149
+ mode: BuilderTurnMode;
150
+ message: string;
151
+ operation?: DataAppOperationPlan;
152
+ intentManifest?: DataAppIntentManifest;
153
+ toolEvents?: Array<{
154
+ tool: string;
155
+ status: string;
156
+ detail?: string;
157
+ }>;
158
+ requestedFiles?: string[];
159
+ revision?: GeneratedRevision;
160
+ artifacts?: DataAppBuilderArtifact[];
161
+ uiActions?: DataAppBuilderUiAction[];
162
+ };
163
+
164
+ export declare type BuilderTurnMode = 'answer' | 'clarify' | 'edit' | 'read_files';
165
+
166
+ export declare type BuilderTurnResult = {
167
+ ok: boolean;
168
+ turn?: BuilderTurn;
169
+ error?: string;
170
+ };
171
+
172
+ export declare function DataAppBuilder({ projectId, projectName, dataAppId, apiServiceUrl, adapters, }: DataAppBuilderProps): JSX.Element;
173
+
174
+ export declare type DataAppBuilderAdapters = {
175
+ readStatus?: (options: {
176
+ apiServiceUrl?: string;
177
+ accessToken?: string;
178
+ signal: AbortSignal;
179
+ }) => Promise<ApiStatus>;
180
+ runTurn?: (request: DataAppBuilderTurnRequest, options: {
181
+ apiServiceUrl?: string;
182
+ accessToken?: string;
183
+ signal: AbortSignal;
184
+ onProgress?: (progress: DataAppBuilderTurnProgress) => void;
185
+ }) => Promise<BuilderTurn>;
186
+ saveDraft?: (request: DataAppBuilderSaveDraftRequest, options: {
187
+ apiServiceUrl?: string;
188
+ accessToken?: string;
189
+ signal: AbortSignal;
190
+ }) => Promise<DataAppBuilderSaveDraftResult>;
191
+ publish?: (request: DataAppBuilderPublishRequest, options: {
192
+ apiServiceUrl?: string;
193
+ accessToken?: string;
194
+ signal: AbortSignal;
195
+ onProgress?: (progress: DataAppBuilderPublishProgress) => void;
196
+ }) => Promise<DataAppBuilderPublishResult>;
197
+ };
198
+
199
+ export declare type DataAppBuilderArtifact = DataAppBuilderDatasetInspectorArtifact;
200
+
201
+ declare type DataAppBuilderAttachment = {
202
+ id: string;
203
+ type: 'screenshot';
204
+ name: string;
205
+ imageUrl: string;
206
+ mediaType: string;
207
+ createdAt: number;
208
+ } | {
209
+ id: string;
210
+ type: 'dom-selection';
211
+ name: string;
212
+ text: string;
213
+ createdAt: number;
214
+ };
215
+
216
+ export declare type DataAppBuilderDatasetInspectorArtifact = {
217
+ id: string;
218
+ type: 'dataset_inspector';
219
+ title: string;
220
+ domain: {
221
+ id: string;
222
+ name: string;
223
+ label: string;
224
+ };
225
+ dataset: {
226
+ id?: string | null;
227
+ name: string;
228
+ label?: string | null;
229
+ analyticsRole?: string | null;
230
+ primaryDateField?: string | null;
231
+ };
232
+ counts: {
233
+ total: number;
234
+ dimensions: number;
235
+ measures: number;
236
+ dates: number;
237
+ identifiers: number;
238
+ calculated: number;
239
+ };
240
+ fields: Array<{
241
+ name: string;
242
+ label?: string;
243
+ role?: string;
244
+ dataType?: string;
245
+ source: 'physical' | 'calculated';
246
+ }>;
247
+ };
248
+
249
+ export declare type DataAppBuilderProps = {
250
+ projectId: string;
251
+ projectName: string;
252
+ dataAppId?: string | null;
253
+ apiServiceUrl?: string;
254
+ backHref?: string;
255
+ onBack?: () => void;
256
+ adapters?: DataAppBuilderAdapters;
257
+ };
258
+
259
+ declare type DataAppBuilderPublishAsset = {
260
+ path: string;
261
+ contentsBase64: string;
262
+ contentType?: string;
263
+ };
264
+
265
+ export declare type DataAppBuilderPublishProgress = {
266
+ phase: 'start' | 'upload' | 'complete';
267
+ label: string;
268
+ detail?: string;
269
+ assetIndex?: number;
270
+ assetCount?: number;
271
+ };
272
+
273
+ export declare type DataAppBuilderPublishRequest = {
274
+ projectId: string;
275
+ dataAppId: string;
276
+ title: string;
277
+ description?: string | null;
278
+ manifest: DataAppManifest;
279
+ sourceSnapshot: DataAppSourceSnapshot;
280
+ sourceRevision?: string | null;
281
+ validationStatus?: unknown;
282
+ bridgeWorkspaceHint?: string | null;
283
+ assets: DataAppBuilderPublishAsset[];
284
+ entryFile: string;
285
+ styleFiles?: string[];
286
+ };
287
+
288
+ export declare type DataAppBuilderPublishResult = {
289
+ dataAppId: string;
290
+ versionId: string;
291
+ version?: number;
292
+ publishedAt?: string;
293
+ };
294
+
295
+ export declare type DataAppBuilderSaveDraftRequest = {
296
+ projectId: string;
297
+ dataAppId?: string | null;
298
+ title: string;
299
+ description?: string | null;
300
+ manifest: DataAppManifest;
301
+ sourceSnapshot: DataAppSourceSnapshot;
302
+ sourceRevision?: string | null;
303
+ validationStatus?: unknown;
304
+ bridgeWorkspaceHint?: string | null;
305
+ };
306
+
307
+ export declare type DataAppBuilderSaveDraftResult = {
308
+ dataAppId: string;
309
+ draftId?: string;
310
+ savedAt?: string;
311
+ };
312
+
313
+ export declare type DataAppBuilderTurnProgress = {
314
+ phase: DataAppBuilderTurnProgressPhase;
315
+ label: string;
316
+ detail?: string;
317
+ };
318
+
319
+ declare type DataAppBuilderTurnProgressPhase = 'received' | 'authenticating' | 'routing' | 'inspecting_data' | 'reading_files' | 'planning_revision' | 'generating_code' | 'done';
320
+
321
+ export declare type DataAppBuilderTurnRequest = {
322
+ projectId: string;
323
+ message: string;
324
+ currentFiles: NonNullable<BridgeReadFilesResult['files']>;
325
+ workspaceContext: WorkspaceContext;
326
+ conversationContext?: BuilderConversationContext;
327
+ attachments?: DataAppBuilderAttachment[];
328
+ diagnostics?: string[];
329
+ repair?: boolean;
330
+ allowFileReads?: boolean;
331
+ generationModel: string;
332
+ generationReasoningEffort?: ReasoningEffort;
333
+ repairModel: string;
334
+ repairReasoningEffort?: ReasoningEffort;
335
+ stream?: boolean;
336
+ };
337
+
338
+ declare type DataAppBuilderUiAction = {
339
+ type: 'open_dataset_inspector';
340
+ artifactId: string;
341
+ };
342
+
343
+ export declare type DataAppIntentInput = {
344
+ id: string;
345
+ label: string;
346
+ kind: 'filter' | 'control';
347
+ field?: SemaphorFieldRef;
348
+ sourceId?: string;
349
+ operator?: SemaphorInputOperator;
350
+ multi?: boolean;
351
+ defaultValue?: unknown;
352
+ affects?: string[];
353
+ };
354
+
355
+ export declare type DataAppIntentInteraction = {
356
+ id: string;
357
+ kind: 'filter_affects_view' | 'drilldown' | 'navigation' | 'selection';
358
+ fromId: string;
359
+ toIds: string[];
360
+ };
361
+
362
+ export declare type DataAppIntentLayout = {
363
+ style?: 'dashboard' | 'workflow' | 'report' | 'custom';
364
+ sections?: Array<{
365
+ id: string;
366
+ title?: string;
367
+ viewIds: string[];
368
+ }>;
369
+ };
370
+
371
+ export declare type DataAppIntentManifest = {
372
+ schemaVersion: 'data-app-intent/v1';
373
+ app: {
374
+ title: string;
375
+ description?: string;
376
+ goal?: string;
377
+ };
378
+ sources: DataAppIntentSource[];
379
+ inputs: DataAppIntentInput[];
380
+ views: DataAppIntentView[];
381
+ interactions?: DataAppIntentInteraction[];
382
+ layout?: DataAppIntentLayout;
383
+ };
384
+
385
+ export declare type DataAppIntentSource = {
386
+ id: string;
387
+ label?: string;
388
+ ref: SemaphorSourceRef;
389
+ role?: 'primary' | 'lookup' | 'supporting';
390
+ };
391
+
392
+ export declare type DataAppIntentView = {
393
+ id: string;
394
+ title: string;
395
+ description?: string;
396
+ kind: DataAppIntentViewKind;
397
+ /**
398
+ * Canonical governed analytics question for this view. Generated React
399
+ * should render it through react-semaphor/data-app-sdk hooks.
400
+ */
401
+ analytics?: SemaphorAnalyticsIntent;
402
+ sourceIds?: string[];
403
+ inputIds?: string[];
404
+ };
405
+
406
+ export declare type DataAppIntentViewKind = 'kpi' | 'line_chart' | 'bar_chart' | 'area_chart' | 'pie_chart' | 'table' | 'text' | 'custom';
407
+
408
+ export declare type DataAppManifest = {
409
+ schemaVersion: 'data-app/v1';
410
+ app?: {
411
+ id?: string;
412
+ name?: string;
413
+ description?: string;
414
+ createdWith?: string;
415
+ };
416
+ runtime?: {
417
+ framework?: string;
418
+ bundler?: string;
419
+ entry?: string;
420
+ styles?: string[];
421
+ assetsBasePath?: string;
422
+ };
423
+ semaphor?: Record<string, unknown>;
424
+ build?: Record<string, unknown>;
425
+ };
426
+
427
+ export declare type DataAppOperationPlan = {
428
+ schemaVersion: 'data-app-operation/v1';
429
+ type: DataAppOperationType;
430
+ userGoal: string;
431
+ target?: DataAppOperationTarget;
432
+ /**
433
+ * Shared analytics protocol intent for data-bearing work. This is the same
434
+ * contract consumed by the Data App SDK/server executor, not a Data
435
+ * App-specific query shape.
436
+ */
437
+ analyticsIntent?: SemaphorAnalyticsIntent;
438
+ inputIds?: string[];
439
+ requiredInspections?: Array<'data' | 'files' | 'preview' | 'diagnostics'>;
440
+ confidence?: 'low' | 'medium' | 'high';
441
+ rationale?: string;
442
+ };
443
+
444
+ export declare type DataAppOperationTarget = {
445
+ id?: string;
446
+ label?: string;
447
+ kind?: string;
448
+ filePath?: string;
449
+ sourceId?: string;
450
+ viewId?: string;
451
+ inputId?: string;
452
+ previousReference?: string;
453
+ };
454
+
455
+ export declare type DataAppOperationType = 'answer_question' | 'inspect_data' | 'inspect_files' | 'create_app' | 'add_view' | 'modify_view' | 'remove_view' | 'add_input' | 'modify_input' | 'remove_input' | 'change_layout' | 'change_style' | 'fix_error' | 'save_draft' | 'publish';
456
+
457
+ export declare type DataAppSourceSnapshot = {
458
+ schemaVersion: 'data-app-source-snapshot/v1';
459
+ files: DataAppSourceSnapshotFile[];
460
+ metadata?: Record<string, unknown>;
461
+ };
462
+
463
+ declare type DataAppSourceSnapshotFile = {
464
+ path: string;
465
+ contents: string;
466
+ };
467
+
468
+ export declare type GeneratedRevision = {
469
+ provider?: string;
470
+ summary?: string;
471
+ changes?: BridgeResult['changes'];
472
+ files: Array<{
473
+ path: string;
474
+ contents: string;
475
+ }>;
476
+ plan?: BrowserSandboxFilePlan;
477
+ generationMeta?: BridgeResult['generationMeta'];
478
+ attemptLabel?: string;
479
+ };
480
+
481
+ export declare type ReasoningEffort = 'low' | 'medium' | 'high';
482
+
483
+ declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
484
+
485
+ declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
486
+
487
+ declare type SemaphorFieldRef = {
488
+ name: string;
489
+ label?: string;
490
+ role?: 'dimension' | 'measure' | 'date' | 'id' | 'unknown';
491
+ dataType?: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'unknown';
492
+ source?: SemaphorSourceRef;
493
+ };
494
+
495
+ declare type SemaphorInputBinding = {
496
+ inputId: string;
497
+ field?: SemaphorFieldRef;
498
+ };
499
+
500
+ declare type SemaphorInputOperator = '=' | '!=' | 'in' | 'not_in' | 'contains' | 'between' | '>' | '>=' | '<' | '<=';
501
+
502
+ declare type SemaphorInputOptionsIntent = {
503
+ kind: 'inputOptions';
504
+ version?: SemaphorProtocolVersion;
505
+ id?: string;
506
+ label?: string;
507
+ source: SemaphorSourceRef;
508
+ field: SemaphorFieldRef;
509
+ search?: string;
510
+ limit?: number;
511
+ };
512
+
513
+ declare type SemaphorMetricIntent = {
514
+ kind: 'metric';
515
+ version?: SemaphorProtocolVersion;
516
+ id?: string;
517
+ source: SemaphorSourceRef;
518
+ metric: string;
519
+ metrics?: string[];
520
+ label?: string;
521
+ dateField?: SemaphorFieldRef;
522
+ timeGrain?: SemaphorTimeGrain;
523
+ dimensions?: SemaphorFieldRef[];
524
+ comparison?: {
525
+ kind: 'previous_period' | 'previous_year' | 'target';
526
+ targetValue?: number;
527
+ };
528
+ inputs?: SemaphorInputBinding[];
529
+ limit?: number;
530
+ };
531
+
532
+ declare type SemaphorProtocolVersion = 1;
533
+
534
+ declare type SemaphorRecordsIntent = {
535
+ kind: 'records';
536
+ version?: SemaphorProtocolVersion;
537
+ source: SemaphorSourceRef;
538
+ id?: string;
539
+ label?: string;
540
+ fields: SemaphorFieldRef[];
541
+ measures?: string[];
542
+ dateField?: SemaphorFieldRef;
543
+ timeGrain?: SemaphorTimeGrain;
544
+ limit?: number;
545
+ orderBy?: {
546
+ field: string;
547
+ direction: 'asc' | 'desc';
548
+ };
549
+ inputs?: SemaphorInputBinding[];
550
+ };
551
+
552
+ declare type SemaphorSourceRef = {
553
+ kind: 'semantic';
554
+ domainId: string;
555
+ datasetName: string;
556
+ datasetId?: string;
557
+ label?: string;
558
+ connectionId?: string;
559
+ } | {
560
+ kind: 'physical';
561
+ connectionId: string;
562
+ connectionType?: string;
563
+ tableName: string;
564
+ databaseName?: string;
565
+ schemaName?: string;
566
+ label?: string;
567
+ dialect?: SemaphorDialect;
568
+ } | {
569
+ kind: 'sql';
570
+ connectionId: string;
571
+ sql: string;
572
+ dialect?: SemaphorDialect;
573
+ label?: string;
574
+ };
575
+
576
+ declare type SemaphorSqlIntent = {
577
+ kind: 'sql';
578
+ version?: SemaphorProtocolVersion;
579
+ id?: string;
580
+ label?: string;
581
+ source: Extract<SemaphorSourceRef, {
582
+ kind: 'sql' | 'physical';
583
+ }>;
584
+ sql?: string;
585
+ parameters?: Record<string, unknown>;
586
+ pythonCode?: string;
587
+ limit?: number;
588
+ rationale?: string;
589
+ fields?: SemaphorFieldRef[];
590
+ inputs?: SemaphorInputBinding[];
591
+ };
592
+
593
+ declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
594
+
595
+ export declare type WorkspaceContext = {
596
+ projectRoot?: string;
597
+ framework?: string;
598
+ packageManager?: string;
599
+ runtimeManifest?: BrowserSandboxRuntimeManifest;
600
+ packageJson?: {
601
+ dependencies?: Record<string, string>;
602
+ devDependencies?: Record<string, string>;
603
+ scripts?: Record<string, string>;
604
+ };
605
+ componentsJson?: unknown;
606
+ tsconfig?: {
607
+ baseUrl?: string | null;
608
+ paths?: Record<string, string[]>;
609
+ jsx?: string | null;
610
+ strict?: boolean | null;
611
+ noUnusedLocals?: boolean | null;
612
+ noUnusedParameters?: boolean | null;
613
+ };
614
+ files?: {
615
+ source?: string[];
616
+ root?: string[];
617
+ snapshot?: string[];
618
+ editable?: string[];
619
+ editableGlobs?: string[];
620
+ approvalRequiredGlobs?: string[];
621
+ styleEntries?: string[];
622
+ localModules?: string[];
623
+ };
624
+ validation?: {
625
+ typecheck?: string | null;
626
+ build?: string | null;
627
+ };
628
+ capabilities?: unknown;
629
+ };
630
+
631
+ export { }
@@ -1,3 +1,4 @@
1
+ import { Context } from 'react';
1
2
  import { JSX } from 'react/jsx-runtime';
2
3
  import { ReactNode } from 'react';
3
4
 
@@ -13,8 +14,12 @@ export declare function normalizeSemaphorInputOptions(options?: Array<{
13
14
  value: SemaphorDataAppOptionValue;
14
15
  }[];
15
16
 
17
+ export declare function readWindowRuntime(): SemaphorDataAppWindowRuntime | undefined;
18
+
16
19
  declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
17
20
 
21
+ export declare const SemaphorDataAppContext: Context<SemaphorDataAppRuntime>;
22
+
18
23
  export declare type SemaphorDataAppControlInputSpec<TValue extends SemaphorDataAppInputValue = SemaphorDataAppInputValue> = SemaphorDataAppInputBase<TValue> & {
19
24
  kind: 'control';
20
25
  role: SemaphorDataAppControlRole;
@@ -233,7 +238,15 @@ export declare type SemaphorDataAppSourceSpec = {
233
238
  sourceLabel?: string;
234
239
  };
235
240
 
236
- declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'snowflake' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
241
+ declare type SemaphorDataAppWindowRuntime = {
242
+ apiBaseUrl?: string;
243
+ dataApiBaseUrl?: string;
244
+ authToken?: null | {
245
+ accessToken?: string;
246
+ };
247
+ };
248
+
249
+ declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
237
250
 
238
251
  declare type SemaphorFieldRef = {
239
252
  name: string;
@@ -310,6 +323,7 @@ declare type SemaphorSourceRef = {
310
323
  } | {
311
324
  kind: 'physical';
312
325
  connectionId: string;
326
+ connectionType?: string;
313
327
  tableName: string;
314
328
  databaseName?: string;
315
329
  schemaName?: string;
@@ -368,7 +382,7 @@ export declare function toSemaphorRecordsIntent(spec: SemaphorDataAppRecordsSpec
368
382
 
369
383
  export declare function useSemaphorDataAppRuntime(): SemaphorDataAppRuntime;
370
384
 
371
- export declare function useSemaphorInput<TValue extends SemaphorDataAppInputValue = SemaphorDataAppInputValue>(spec: SemaphorDataAppInputSpec<TValue>): SemaphorDataAppInputHandle<TValue>;
385
+ export declare function useSemaphorInput<TValue extends SemaphorDataAppInputValue = SemaphorDataAppInputValue>(spec: SemaphorDataAppInputSpec<TValue>): SemaphorDataAppInputHandle;
372
386
 
373
387
  export declare function useSemaphorInputOptions(spec: SemaphorDataAppInputOptionsSpec): SemaphorDataAppInputOptionsResult;
374
388
 
@@ -4296,9 +4296,11 @@ export declare interface ResourceListItem {
4296
4296
  id: string;
4297
4297
  title: string;
4298
4298
  description: string;
4299
+ kind?: string | null;
4299
4300
  isPrivate: boolean;
4300
4301
  isPublic: boolean;
4301
4302
  version: string;
4303
+ currentDataAppVersionId?: string | null;
4302
4304
  createdBy: string | null;
4303
4305
  createdByTenantUser: string;
4304
4306
  tenantId: string;
@@ -4419,7 +4421,7 @@ export declare const SemaphorContextProvider: ({ children, dashboardProps, }: {
4419
4421
  dashboardProps: DashboardProps;
4420
4422
  }) => JSX.Element;
4421
4423
 
4422
- declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'snowflake' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
4424
+ declare type SemaphorDialect = 'semantic' | 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
4423
4425
 
4424
4426
  declare type SemaphorFieldRef = {
4425
4427
  name: string;
@@ -4500,6 +4502,7 @@ declare type SemaphorSourceRef = {
4500
4502
  } | {
4501
4503
  kind: 'physical';
4502
4504
  connectionId: string;
4505
+ connectionType?: string;
4503
4506
  tableName: string;
4504
4507
  databaseName?: string;
4505
4508
  schemaName?: string;