serverside_pivot 0.0.0-stage → 0.0.91

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 (185) hide show
  1. package/README.md +182 -3
  2. package/dist/react/chunks/ContextMenu-Bt5_3bmD.mjs +192 -0
  3. package/dist/react/chunks/DetailDrawer-Eb4EpVHG.mjs +37 -0
  4. package/dist/react/chunks/DetailSidePanel-BTcHOiKr.mjs +36 -0
  5. package/dist/react/chunks/DetailSurfaceContent-B3ZNKh7q.mjs +200 -0
  6. package/dist/react/chunks/ECharts2dRenderer-C3Qv0uAa.mjs +3299 -0
  7. package/dist/react/chunks/ECharts3dRenderer-BB_7-fOt.mjs +21573 -0
  8. package/dist/react/chunks/EditSidePanel-C2cAvxlK.mjs +298 -0
  9. package/dist/react/chunks/InlineDetailPanel-BXLAw1o3.mjs +41 -0
  10. package/dist/react/chunks/PivotCharts-Bw6Swoa3.mjs +4252 -0
  11. package/dist/react/chunks/ReportEditor-D4V0ry2B.mjs +1726 -0
  12. package/dist/react/chunks/SidebarPanel-xO59p_2o.mjs +3339 -0
  13. package/dist/react/chunks/SparklineDetailGraph-Bu85X7OJ.mjs +200 -0
  14. package/dist/react/chunks/installCanvasRenderer-B7sfDGoL.mjs +21281 -0
  15. package/dist/react/chunks/react-CPZZxtSo.mjs +26999 -0
  16. package/dist/react/chunks/xlsx.mini.min-vfxHk3Ry.mjs +7996 -0
  17. package/dist/react/components/Charts/ChartRenderers.d.ts +73 -0
  18. package/dist/react/components/Charts/ChartWorkspace.d.ts +38 -0
  19. package/dist/react/components/Charts/ECharts2dRenderer.d.ts +5 -0
  20. package/dist/react/components/Charts/ECharts3dRenderer.d.ts +6 -0
  21. package/dist/react/components/Charts/PivotCharts.d.ts +9 -0
  22. package/dist/react/components/Charts/chartEnhancements.d.ts +66 -0
  23. package/dist/react/components/Charts/chartExportPresentation.d.ts +19 -0
  24. package/dist/react/components/Charts/chartMath.d.ts +4 -0
  25. package/dist/react/components/Charts/useChartExportMenu.d.ts +12 -0
  26. package/dist/react/components/DashTanstackPivot.react.d.ts +372 -0
  27. package/dist/react/components/Filters/ColumnFilter.d.ts +13 -0
  28. package/dist/react/components/Filters/DateRangeFilter.d.ts +8 -0
  29. package/dist/react/components/Filters/FilterPopover.d.ts +14 -0
  30. package/dist/react/components/Filters/MultiSelectFilter.d.ts +12 -0
  31. package/dist/react/components/Filters/NumericRangeFilter.d.ts +8 -0
  32. package/dist/react/components/Notification.d.ts +7 -0
  33. package/dist/react/components/PivotAppBar.d.ts +2 -0
  34. package/dist/react/components/PivotErrorBoundary.d.ts +15 -0
  35. package/dist/react/components/PivotSmallComponents.d.ts +6 -0
  36. package/dist/react/components/PivotWorkspace.d.ts +19 -0
  37. package/dist/react/components/PivotWorkspaceCanvas.d.ts +5 -0
  38. package/dist/react/components/PivotWorkspaceControls.d.ts +12 -0
  39. package/dist/react/components/PivotWorkspaceShell.d.ts +12 -0
  40. package/dist/react/components/RuntimeDataError.d.ts +7 -0
  41. package/dist/react/components/Sidebar/ColumnTreeItem.d.ts +14 -0
  42. package/dist/react/components/Sidebar/ReportEditor.d.ts +21 -0
  43. package/dist/react/components/Sidebar/SidebarFilterItem.d.ts +14 -0
  44. package/dist/react/components/Sidebar/SidebarPanel.d.ts +2 -0
  45. package/dist/react/components/Sidebar/ToolPanelSection.d.ts +14 -0
  46. package/dist/react/components/Sidebar/customCategoryUtils.d.ts +62 -0
  47. package/dist/react/components/Sidebar/formulaUtils.d.ts +22 -0
  48. package/dist/react/components/SkeletonRow.d.ts +6 -0
  49. package/dist/react/components/Table/ContextMenu.d.ts +9 -0
  50. package/dist/react/components/Table/DetailDrawer.d.ts +12 -0
  51. package/dist/react/components/Table/DetailSidePanel.d.ts +12 -0
  52. package/dist/react/components/Table/DetailSurfaceContent.d.ts +12 -0
  53. package/dist/react/components/Table/EditSidePanel.d.ts +21 -0
  54. package/dist/react/components/Table/EditableCell.d.ts +29 -0
  55. package/dist/react/components/Table/InlineDetailPanel.d.ts +14 -0
  56. package/dist/react/components/Table/PivotTableBody.d.ts +9 -0
  57. package/dist/react/components/Table/SparklineCell.d.ts +17 -0
  58. package/dist/react/components/Table/SparklineDetailGraph.d.ts +5 -0
  59. package/dist/react/components/Table/StatusBar.d.ts +8 -0
  60. package/dist/react/contexts/PivotConfigContext.d.ts +34 -0
  61. package/dist/react/contexts/PivotThemeContext.d.ts +7 -0
  62. package/dist/react/contexts/PivotValueDisplayContext.d.ts +10 -0
  63. package/dist/react/hooks/useCellInteraction.d.ts +31 -0
  64. package/dist/react/hooks/useChartState.d.ts +76 -0
  65. package/dist/react/hooks/useColumnDefs.d.ts +82 -0
  66. package/dist/react/hooks/useColumnVirtualizer.d.ts +30 -0
  67. package/dist/react/hooks/useDetailDrillThrough.d.ts +38 -0
  68. package/dist/react/hooks/useFilteredData.d.ts +2 -0
  69. package/dist/react/hooks/useFormatState.d.ts +44 -0
  70. package/dist/react/hooks/usePersistence.d.ts +5 -0
  71. package/dist/react/hooks/usePivotFieldInteractions.d.ts +28 -0
  72. package/dist/react/hooks/usePivotNormalization.d.ts +483 -0
  73. package/dist/react/hooks/usePivotRenderCounter.d.ts +1 -0
  74. package/dist/react/hooks/usePivotTransactions.d.ts +29 -0
  75. package/dist/react/hooks/useRenderHelpers.d.ts +85 -0
  76. package/dist/react/hooks/useReportMode.d.ts +32 -0
  77. package/dist/react/hooks/useRowCache.d.ts +19 -0
  78. package/dist/react/hooks/useRuntimeDataCommit.d.ts +26 -0
  79. package/dist/react/hooks/useRuntimeProfiling.d.ts +19 -0
  80. package/dist/react/hooks/useRuntimeTransport.d.ts +24 -0
  81. package/dist/react/hooks/useServerSideRowModel.d.ts +50 -0
  82. package/dist/react/hooks/useServerSideViewportController.d.ts +64 -0
  83. package/dist/react/hooks/useSidebarUI.d.ts +37 -0
  84. package/dist/react/hooks/useStickyStyles.d.ts +24 -0
  85. package/dist/react/index.mjs +16 -0
  86. package/dist/react/presentation/headerFormatting.d.ts +13 -0
  87. package/dist/react/presentation/safeCellContent.d.ts +16 -0
  88. package/dist/react/react.d.ts +8 -0
  89. package/dist/react/runtime/PivotRuntimeRoot.d.ts +7 -0
  90. package/dist/react/runtime/cellSelectionAnchor.d.ts +45 -0
  91. package/dist/react/runtime/client/clientPivotTransport.d.ts +28 -0
  92. package/dist/react/runtime/client/clientResponsePostProcessor.d.ts +20 -0
  93. package/dist/react/runtime/client/clientSqlPlanner.d.ts +5 -0
  94. package/dist/react/runtime/client/duckdbWasmExecutor.d.ts +36 -0
  95. package/dist/react/runtime/client/index.d.ts +6 -0
  96. package/dist/react/runtime/client/modeResolver.d.ts +16 -0
  97. package/dist/react/runtime/client/types.d.ts +202 -0
  98. package/dist/react/runtime/createRuntimeCellPresentation.d.ts +7 -0
  99. package/dist/react/runtime/createRuntimeExportCommands.d.ts +77 -0
  100. package/dist/react/runtime/createRuntimeRowPinCommand.d.ts +9 -0
  101. package/dist/react/runtime/createWorkspacePresentation.d.ts +7 -0
  102. package/dist/react/runtime/displayColumnOrder.d.ts +4 -0
  103. package/dist/react/runtime/httpTransport.d.ts +65 -0
  104. package/dist/react/runtime/runtime-contract.generated.d.ts +48 -0
  105. package/dist/react/runtime/runtime-response-contract.generated.d.ts +34 -0
  106. package/dist/react/runtime/runtimeContract.d.ts +115 -0
  107. package/dist/react/runtime/runtimeDomains.d.ts +642 -0
  108. package/dist/react/runtime/runtimeDomains.type-test.d.ts +1 -0
  109. package/dist/react/runtime/runtimeResponseDedup.d.ts +36 -0
  110. package/dist/react/runtime/useChartWorkspacePresentation.d.ts +50 -0
  111. package/dist/react/runtime/useCommandRuntime.d.ts +3 -0
  112. package/dist/react/runtime/useCommandRuntimeStage.d.ts +1 -0
  113. package/dist/react/runtime/useCoreRuntime.d.ts +3 -0
  114. package/dist/react/runtime/useCoreRuntimeStage.d.ts +3 -0
  115. package/dist/react/runtime/useRuntimeCellSelection.d.ts +44 -0
  116. package/dist/react/runtime/useRuntimeChartCanvasCommands.d.ts +36 -0
  117. package/dist/react/runtime/useRuntimeChartCanvasResize.d.ts +13 -0
  118. package/dist/react/runtime/useRuntimeChartCanvasVerticalResize.d.ts +9 -0
  119. package/dist/react/runtime/useRuntimeChartDefinitionCommands.d.ts +14 -0
  120. package/dist/react/runtime/useRuntimeChartFloatingInteractions.d.ts +28 -0
  121. package/dist/react/runtime/useRuntimeChartModels.d.ts +69 -0
  122. package/dist/react/runtime/useRuntimeChartPanelSizing.d.ts +12 -0
  123. package/dist/react/runtime/useRuntimeChartRequestDispatch.d.ts +7 -0
  124. package/dist/react/runtime/useRuntimeClipboardExportPresentation.d.ts +159 -0
  125. package/dist/react/runtime/useRuntimeClipboardPaste.d.ts +7 -0
  126. package/dist/react/runtime/useRuntimeColorScalePresentation.d.ts +55 -0
  127. package/dist/react/runtime/useRuntimeColumnAutoSizing.d.ts +26 -0
  128. package/dist/react/runtime/useRuntimeColumnCommands.d.ts +22 -0
  129. package/dist/react/runtime/useRuntimeColumnMeasurement.d.ts +16 -0
  130. package/dist/react/runtime/useRuntimeDataRetry.d.ts +12 -0
  131. package/dist/react/runtime/useRuntimeDisplayNavigation.d.ts +17 -0
  132. package/dist/react/runtime/useRuntimeEditCellIdentity.d.ts +22 -0
  133. package/dist/react/runtime/useRuntimeEditChangeTracking.d.ts +28 -0
  134. package/dist/react/runtime/useRuntimeEditComparisonState.d.ts +35 -0
  135. package/dist/react/runtime/useRuntimeEditDispatch.d.ts +47 -0
  136. package/dist/react/runtime/useRuntimeEditOwnership.d.ts +32 -0
  137. package/dist/react/runtime/useRuntimeEditPresentation.d.ts +32 -0
  138. package/dist/react/runtime/useRuntimeEditStatePersistence.d.ts +28 -0
  139. package/dist/react/runtime/useRuntimeExportState.d.ts +20 -0
  140. package/dist/react/runtime/useRuntimeFilterPopover.d.ts +23 -0
  141. package/dist/react/runtime/useRuntimeLayoutHistory.d.ts +44 -0
  142. package/dist/react/runtime/useRuntimeOptimisticCellState.d.ts +27 -0
  143. package/dist/react/runtime/useRuntimeRequestSession.d.ts +79 -0
  144. package/dist/react/runtime/useRuntimeResponseLifecycle.d.ts +47 -0
  145. package/dist/react/runtime/useRuntimeResponsePostCommit.d.ts +15 -0
  146. package/dist/react/runtime/useRuntimeRowEditSessions.d.ts +28 -0
  147. package/dist/react/runtime/useRuntimeRowEditing.d.ts +18 -0
  148. package/dist/react/runtime/useRuntimeRowSelection.d.ts +14 -0
  149. package/dist/react/runtime/useRuntimeSelectionFormatting.d.ts +36 -0
  150. package/dist/react/runtime/useRuntimeStructuralSync.d.ts +65 -0
  151. package/dist/react/runtime/useRuntimeViewRestoreScroll.d.ts +9 -0
  152. package/dist/react/runtime/useRuntimeViewSnapshot.d.ts +203 -0
  153. package/dist/react/runtime/useRuntimeViewportTableData.d.ts +23 -0
  154. package/dist/react/runtime/useTransportRuntime.d.ts +12 -0
  155. package/dist/react/runtime/useViewportRuntime.d.ts +3 -0
  156. package/dist/react/runtime/useViewportRuntimeStage.d.ts +1 -0
  157. package/dist/react/runtime/useWorkspaceRuntime.d.ts +3 -0
  158. package/dist/react/runtime/useWorkspaceRuntimeStage.d.ts +1 -0
  159. package/dist/react/runtime/useWorkspaceStatusPresentation.d.ts +115 -0
  160. package/dist/react/runtime/workspaceViewModel.d.ts +7 -0
  161. package/dist/react/utils/Icons.d.ts +46 -0
  162. package/dist/react/utils/chartModelBuilders.d.ts +236 -0
  163. package/dist/react/utils/columnOrder.d.ts +12 -0
  164. package/dist/react/utils/dataBars.d.ts +7 -0
  165. package/dist/react/utils/domEvents.d.ts +1 -0
  166. package/dist/react/utils/editing.d.ts +47 -0
  167. package/dist/react/utils/exportUtils.d.ts +121 -0
  168. package/dist/react/utils/fieldPanelLayout.d.ts +61 -0
  169. package/dist/react/utils/filterOptions.d.ts +4 -0
  170. package/dist/react/utils/formatting.d.ts +1 -0
  171. package/dist/react/utils/helpers.d.ts +20 -0
  172. package/dist/react/utils/horizontalViewport.d.ts +12 -0
  173. package/dist/react/utils/layoutRows.d.ts +3 -0
  174. package/dist/react/utils/measureAxis.d.ts +22 -0
  175. package/dist/react/utils/pivotLayoutUtils.d.ts +2 -0
  176. package/dist/react/utils/pivotProfiler.d.ts +4 -0
  177. package/dist/react/utils/rawTableTsv.d.ts +21 -0
  178. package/dist/react/utils/reportEditorSelection.d.ts +23 -0
  179. package/dist/react/utils/rowSpanning.d.ts +6 -0
  180. package/dist/react/utils/savedReports.d.ts +7 -0
  181. package/dist/react/utils/sorting.d.ts +14 -0
  182. package/dist/react/utils/sparklineDetail.d.ts +8 -0
  183. package/dist/react/utils/sparklines.d.ts +78 -0
  184. package/dist/react/utils/styles.d.ts +957 -0
  185. package/package.json +114 -6
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Creates the export request and download commands for the workspace.
3
+ *
4
+ * Payload construction lives in useRuntimeClipboardExportPresentation. This
5
+ * module owns only command flow: request IDs, cancellation, part scheduling,
6
+ * and the client-side XLSX/CSV fallback.
7
+ */
8
+ export function createRuntimeExportCommands({ abortGenerationRef, activeExportRequestIdRef, buildExportStyleProfile, cancelledExportRequestIdsRef, clientInstanceRef, COPY_ROW_LIMIT, dispatchServerSideRuntimeSetProps, EXPORT_ROW_LIMIT, exportRequestSequenceRef, exportJobControllerRef, getDisplayHeaderTextForColumn, getDisplayHeaderTextStackForColumn, getDisplayRows, getExportCellDisplayValue, getExportColumns, getExportHeaderLabel, getExportRawCellValue, getServerExportColumnTarget, layoutMode, mergedHeaderSeparator, partModal, pendingCopyIntentRef, rowCount, serverSide, setExportProgress, setIsCopying, setIsExporting, setPartModal, table, tableName, theme, }: {
9
+ abortGenerationRef: any;
10
+ activeExportRequestIdRef: any;
11
+ buildExportStyleProfile: any;
12
+ cancelledExportRequestIdsRef: any;
13
+ clientInstanceRef: any;
14
+ COPY_ROW_LIMIT: any;
15
+ dispatchServerSideRuntimeSetProps: any;
16
+ EXPORT_ROW_LIMIT: any;
17
+ exportRequestSequenceRef: any;
18
+ exportJobControllerRef?: {
19
+ current: null;
20
+ } | undefined;
21
+ getDisplayHeaderTextForColumn: any;
22
+ getDisplayHeaderTextStackForColumn: any;
23
+ getDisplayRows: any;
24
+ getExportCellDisplayValue: any;
25
+ getExportColumns: any;
26
+ getExportHeaderLabel: any;
27
+ getExportRawCellValue: any;
28
+ getServerExportColumnTarget: any;
29
+ layoutMode: any;
30
+ mergedHeaderSeparator: any;
31
+ partModal: any;
32
+ pendingCopyIntentRef: any;
33
+ rowCount: any;
34
+ serverSide: any;
35
+ setExportProgress: any;
36
+ setIsCopying: any;
37
+ setIsExporting: any;
38
+ setPartModal: any;
39
+ table: any;
40
+ tableName: any;
41
+ theme: any;
42
+ }): {
43
+ buildServerExportPayload: ({ format, includeHeaders, rowStart, rowEnd, columnTarget, styleOptions, partId, partLabel, colStart, colEnd, allRows, }: {
44
+ format: any;
45
+ includeHeaders: any;
46
+ rowStart: any;
47
+ rowEnd: any;
48
+ columnTarget: any;
49
+ styleOptions: any;
50
+ partId: any;
51
+ partLabel: any;
52
+ colStart?: null | undefined;
53
+ colEnd?: null | undefined;
54
+ allRows?: boolean | undefined;
55
+ }) => {
56
+ format: any;
57
+ includeHeaders: any;
58
+ table: any;
59
+ layout_mode: any;
60
+ rowStart: any;
61
+ rowEnd: any;
62
+ allRows: boolean;
63
+ style: any;
64
+ };
65
+ cancelActiveExportRequest: () => void;
66
+ copyAllRecordsToClipboard: (withHeaders?: boolean, mergedHeaders?: boolean) => void;
67
+ copyCurrentTableToClipboard: (withHeaders?: boolean, mergedHeaders?: boolean) => void;
68
+ dispatchExportPart: (rowBatch: any, colBatch: any) => void;
69
+ dispatchServerExportRequest: (payload: any, runtimeFields?: {}, replayRequestId?: null) => string;
70
+ exportPivot: (format?: string) => void;
71
+ getServerExportStyleIds: (columnTarget: any) => any;
72
+ startExportJob: (format?: string, scope?: {}) => any;
73
+ pollExportJob: any;
74
+ cancelExportJob: any;
75
+ retryExportJob: any;
76
+ dismissExportJob: any;
77
+ };
@@ -0,0 +1,9 @@
1
+ /** Creates the single UI command that updates row pinning and emits Dash state. */
2
+ export function createRuntimeRowPinCommand({ requestLayoutHistoryCapture, setGrandTotalPinOverride, setProps, setRowPinningWithHistory, }: {
3
+ requestLayoutHistoryCapture: any;
4
+ setGrandTotalPinOverride: any;
5
+ setProps: any;
6
+ setRowPinningWithHistory: any;
7
+ }): {
8
+ handlePinRow: (rowId: any, pinState: any) => void;
9
+ };
@@ -0,0 +1,7 @@
1
+ import type { WorkspacePresentation } from './runtimeDomains';
2
+ /**
3
+ * Copy only the renderer contract from the workspace coordinator. This is an
4
+ * explicit, immutable boundary: state bags and future coordinator fields
5
+ * cannot become renderer inputs without being deliberately added here.
6
+ */
7
+ export declare function createWorkspacePresentation(source: WorkspacePresentation): WorkspacePresentation;
@@ -0,0 +1,4 @@
1
+ /** Rendered positional axis, including non-data gutters: left, center, right. */
2
+ export function getDisplayOrderedLeafColumns(table: any): any;
3
+ /** A gutter occupies display space but cannot become a selected data cell. */
4
+ export function isSelectableDisplayColumn(column: any): boolean;
@@ -0,0 +1,65 @@
1
+ import { type JsonObject, type RuntimeRequestV1, type RuntimeResponseV1 } from './runtimeContract';
2
+ export interface PayloadReference {
3
+ readonly id: string;
4
+ readonly url: string;
5
+ readonly bytes?: number;
6
+ readonly contentType?: string;
7
+ readonly expiresAt?: number;
8
+ }
9
+ export interface RuntimeTransportRequestOptions {
10
+ readonly signal?: AbortSignal;
11
+ }
12
+ /** The framework-neutral runtime transport implemented by every host. */
13
+ export interface PivotTransport {
14
+ request(request: RuntimeRequestV1, options?: RuntimeTransportRequestOptions): Promise<RuntimeResponseV1>;
15
+ fetchPayload(reference: PayloadReference, options?: RuntimeTransportRequestOptions): Promise<JsonObject>;
16
+ /** Binary completed-export delivery, retaining the transport's auth context. */
17
+ fetchExportPayload?(reference: PayloadReference, options?: RuntimeTransportRequestOptions): Promise<Blob>;
18
+ }
19
+ export type RuntimePayloadTransport = Pick<PivotTransport, 'fetchPayload' | 'fetchExportPayload'>;
20
+ export interface HttpPivotTransportOptions {
21
+ readonly endpoint?: string;
22
+ readonly fetchImpl?: typeof fetch;
23
+ readonly headers?: Readonly<Record<string, string>>;
24
+ }
25
+ /**
26
+ * Direct HTTP transport for React, Streamlit, and any non-Dash host.
27
+ *
28
+ * It transfers compact V1 envelopes only. Oversized row blocks are fetched
29
+ * through `fetchPayload`, where the browser can cache and abort independently.
30
+ */
31
+ export declare class HttpPivotTransport implements PivotTransport {
32
+ private readonly endpoint;
33
+ private readonly fetchImpl;
34
+ private readonly headers;
35
+ constructor(options?: HttpPivotTransportOptions);
36
+ /**
37
+ * Runtime gateways intentionally return path-relative payload references
38
+ * so same-origin deployments remain portable. Resolve them against the
39
+ * configured runtime endpoint here: an embedded Streamlit host may live
40
+ * on a different origin and must never turn ``/v1/runtime/payload/...``
41
+ * into a request to the Streamlit server.
42
+ */
43
+ private resolvePayloadUrl;
44
+ private resolvePayloadReference;
45
+ private bindRequestIdentity;
46
+ request(request: RuntimeRequestV1, options?: RuntimeTransportRequestOptions): Promise<RuntimeResponseV1>;
47
+ fetchPayload(reference: PayloadReference, options?: RuntimeTransportRequestOptions): Promise<JsonObject>;
48
+ fetchExportPayload(reference: PayloadReference, options?: RuntimeTransportRequestOptions): Promise<Blob>;
49
+ }
50
+ /**
51
+ * Coalesces a burst of viewport events into the latest request and aborts the
52
+ * in-flight request as soon as a newer window supersedes it. Structural,
53
+ * export, chart, and detail requests bypass this scheduler.
54
+ */
55
+ export declare class LatestViewportScheduler implements PivotTransport {
56
+ private readonly transport;
57
+ private active;
58
+ private queued;
59
+ private flushScheduled;
60
+ constructor(transport: PivotTransport);
61
+ request(request: RuntimeRequestV1, options?: RuntimeTransportRequestOptions): Promise<RuntimeResponseV1>;
62
+ fetchPayload(reference: PayloadReference, options?: RuntimeTransportRequestOptions): Promise<JsonObject>;
63
+ fetchExportPayload(reference: PayloadReference, options?: RuntimeTransportRequestOptions): Promise<Blob>;
64
+ private flush;
65
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file was automatically generated by json-schema-to-typescript.
3
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
+ * and run json-schema-to-typescript to regenerate this file.
5
+ */
6
+ export type PivotRuntimeProtocolRequestV1 = unknown & {
7
+ schemaVersion: 1;
8
+ kind: "data" | "filter_options" | "chart" | "detail" | "drill" | "update" | "transaction" | "export";
9
+ requestId: string;
10
+ table?: string;
11
+ sessionId?: string;
12
+ clientInstance?: string;
13
+ stateEpoch?: number;
14
+ windowSeq?: number;
15
+ abortGeneration?: number;
16
+ cacheKey?: string;
17
+ state?: ViewState;
18
+ payload: ExportPayload | JsonObject;
19
+ };
20
+ export type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject;
21
+ export type ExportPayload = JsonObject & unknown & {
22
+ action?: "start" | "status" | "cancel";
23
+ jobId?: string;
24
+ [k: string]: unknown;
25
+ };
26
+ export interface ViewState {
27
+ rowFields?: string[];
28
+ colFields?: string[];
29
+ valConfigs?: JsonObject[];
30
+ filters?: JsonObject;
31
+ customDimensions?: JsonObject[];
32
+ measureAxis?: JsonObject;
33
+ sorting?: JsonObject[];
34
+ sortOptions?: JsonObject;
35
+ expanded?: boolean | JsonObject;
36
+ immersiveMode?: boolean;
37
+ showRowTotals?: boolean;
38
+ showColTotals?: boolean;
39
+ showSubtotals?: boolean;
40
+ viewMode?: string;
41
+ detailMode?: string;
42
+ treeConfig?: JsonObject | null;
43
+ detailConfig?: JsonObject | null;
44
+ reportDef?: JsonObject | null;
45
+ }
46
+ export interface JsonObject {
47
+ [k: string]: JsonValue;
48
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This file was automatically generated by json-schema-to-typescript.
3
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
+ * and run json-schema-to-typescript to regenerate this file.
5
+ */
6
+ export type PivotRuntimeProtocolResponseV1 = unknown & {
7
+ schemaVersion: 1;
8
+ kind: "data" | "filter_options" | "chart" | "detail" | "drill" | "update" | "transaction" | "export";
9
+ status: string;
10
+ requestId?: string;
11
+ table?: string;
12
+ sessionId?: string;
13
+ clientInstance?: string;
14
+ stateEpoch?: number;
15
+ windowSeq?: number;
16
+ message?: string;
17
+ payload: ExportJobPayload | JsonObject1;
18
+ profile?: JsonObject1;
19
+ };
20
+ export type ExportJobPayload = unknown & {
21
+ jobId: string;
22
+ phase: "queued" | "running" | "cancelling" | "cancelled" | "completed" | "failed" | "interrupted";
23
+ rowsWritten: number;
24
+ bytesWritten: number;
25
+ totalRows: number | null;
26
+ payloadRef?: JsonObject;
27
+ };
28
+ export type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject1;
29
+ export interface JsonObject {
30
+ [k: string]: JsonValue;
31
+ }
32
+ export interface JsonObject1 {
33
+ [k: string]: JsonValue;
34
+ }
@@ -0,0 +1,115 @@
1
+ /**
2
+ * The one host-neutral wire contract for the pivot runtime.
3
+ *
4
+ * The JSON schema beside this module is the cross-language source of truth.
5
+ * These types keep frontend producers and consumers explicit while the Python
6
+ * codec validates the same V1 envelope at the Dash boundary.
7
+ */
8
+ import type { PivotRuntimeProtocolRequestV1 } from './runtime-contract.generated';
9
+ import type { PivotRuntimeProtocolResponseV1 } from './runtime-response-contract.generated';
10
+ export declare const RUNTIME_SCHEMA_VERSION: 1;
11
+ export declare const RUNTIME_COMMAND_KINDS: readonly ["data", "filter_options", "chart", "detail", "drill", "update", "transaction", "export"];
12
+ export type RuntimeCommandKind = typeof RUNTIME_COMMAND_KINDS[number];
13
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
14
+ [key: string]: JsonValue;
15
+ };
16
+ export type JsonObject = {
17
+ [key: string]: JsonValue | undefined;
18
+ };
19
+ export interface PivotViewStateSnapshot {
20
+ rowFields?: string[];
21
+ colFields?: string[];
22
+ valConfigs?: JsonObject[];
23
+ filters?: JsonObject;
24
+ customDimensions?: JsonObject[];
25
+ measureAxis?: JsonObject;
26
+ sorting?: JsonObject[];
27
+ sortOptions?: JsonObject;
28
+ expanded?: boolean | JsonObject;
29
+ immersiveMode?: boolean;
30
+ showRowTotals?: boolean;
31
+ showColTotals?: boolean;
32
+ showSubtotals?: boolean;
33
+ viewMode?: string;
34
+ detailMode?: string;
35
+ treeConfig?: JsonObject | null;
36
+ detailConfig?: JsonObject | null;
37
+ reportDef?: JsonObject | null;
38
+ }
39
+ interface RuntimeRequestEnvelopeV1 {
40
+ schemaVersion: typeof RUNTIME_SCHEMA_VERSION;
41
+ requestId: string;
42
+ table?: string;
43
+ sessionId?: string;
44
+ clientInstance?: string;
45
+ stateEpoch?: number;
46
+ windowSeq?: number;
47
+ abortGeneration?: number;
48
+ cacheKey?: string;
49
+ state?: PivotViewStateSnapshot;
50
+ }
51
+ export type ExportRequestPayload = (JsonObject & {
52
+ action?: undefined;
53
+ jobId?: never;
54
+ }) | (JsonObject & {
55
+ action: 'start';
56
+ jobId?: never;
57
+ }) | (JsonObject & {
58
+ action: 'status' | 'cancel';
59
+ jobId: string;
60
+ });
61
+ export type RuntimeRequestV1 = RuntimeRequestEnvelopeV1 & ({
62
+ kind: 'export';
63
+ payload: ExportRequestPayload;
64
+ } | {
65
+ kind: Exclude<RuntimeCommandKind, 'export'>;
66
+ payload: JsonObject;
67
+ });
68
+ export type ExportJobPhase = 'queued' | 'running' | 'cancelling' | 'cancelled' | 'completed' | 'failed' | 'interrupted';
69
+ export type ExportJobPayload = JsonObject & {
70
+ jobId: string;
71
+ rowsWritten: number;
72
+ bytesWritten: number;
73
+ totalRows: number | null;
74
+ } & ({
75
+ phase: 'completed';
76
+ payloadRef: JsonObject;
77
+ } | {
78
+ phase: Exclude<ExportJobPhase, 'completed'>;
79
+ payloadRef?: never;
80
+ });
81
+ /** Generated directly from the canonical JSON Schema for boundary consumers. */
82
+ export type RuntimeRequestSchemaV1 = PivotRuntimeProtocolRequestV1;
83
+ export interface RuntimeResponseV1 {
84
+ schemaVersion: typeof RUNTIME_SCHEMA_VERSION;
85
+ kind: RuntimeCommandKind;
86
+ status: string;
87
+ requestId?: string;
88
+ table?: string;
89
+ sessionId?: string;
90
+ clientInstance?: string;
91
+ stateEpoch?: number;
92
+ windowSeq?: number;
93
+ message?: string;
94
+ payload: JsonObject;
95
+ profile?: JsonObject;
96
+ }
97
+ /** Generated directly from the response schema used by all host transports. */
98
+ export type RuntimeResponseSchemaV1 = PivotRuntimeProtocolResponseV1;
99
+ type RuntimeRequestInput = Record<string, unknown>;
100
+ export interface RuntimeRequestDefaults {
101
+ tableName?: string | null;
102
+ sessionId?: string | null;
103
+ clientInstance?: string | null;
104
+ viewMode?: string | null;
105
+ detailMode?: string | null;
106
+ treeConfig?: JsonObject | null;
107
+ detailConfig?: JsonObject | null;
108
+ profile?: boolean;
109
+ }
110
+ /** Normalize all existing client call-sites into the only emitted wire shape. */
111
+ export declare function createRuntimeRequest(input: RuntimeRequestInput, defaults?: RuntimeRequestDefaults): RuntimeRequestV1;
112
+ export declare function isRuntimeRequestV1(value: unknown): value is RuntimeRequestV1;
113
+ /** Runtime responses are always V1; hosts do not need version fallbacks. */
114
+ export declare function isRuntimeResponseV1(value: unknown): value is RuntimeResponseV1;
115
+ export {};