@burdenoff/microfe-bigconsole 2026.1119.5 → 2026.1119.7

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.
@@ -15,7 +15,8 @@ var t = "bigconsole:quota-exhausted", n = "QUOTA_NOT_PROVISIONED", r = {
15
15
  "refinegenerateddashboard",
16
16
  "regeneratedashboard",
17
17
  "conversationaldashboardedit",
18
- "previewpromptanalysis"
18
+ "previewpromptanalysis",
19
+ "bigconsoleask"
19
20
  ]), s = /* @__PURE__ */ new Set(["bigconsole.projects.count"]), c = /* @__PURE__ */ new Set(["bigconsole.sessions.count"]), l = /* @__PURE__ */ new Set(["bigconsole.commands.count"]);
20
21
  function u(e) {
21
22
  return typeof e == "object" && !!e;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Pure helpers for the Settings "Widget catalog" section (BOFF-10151).
3
+ *
4
+ * The backend `widgetTypeCatalog` query returns every store/custom widget type
5
+ * the workspace may see with its installation state. These helpers decide what
6
+ * an owner can do with each row, so the section component stays declarative and
7
+ * the rules stay unit-testable.
8
+ */
9
+ /** One catalog row, as returned by `widgetTypeCatalog`. */
10
+ export interface WidgetCatalogRow {
11
+ widgetType: string;
12
+ widgetVersion: string;
13
+ name: string;
14
+ description?: string | null;
15
+ author?: string | null;
16
+ category?: string | null;
17
+ publishType: string;
18
+ status: string;
19
+ isLatest: boolean;
20
+ installedInWorkspace: boolean;
21
+ selfInstallable: boolean;
22
+ }
23
+ /**
24
+ * What the row's action cell offers:
25
+ * - `install` — an AVAILABLE type the caller may self-install (CUSTOM types);
26
+ * - `uninstall` — an installed CUSTOM type (any status, so a DEPRECATED or
27
+ * DISABLED type can still be removed cleanly);
28
+ * - `store` — a STORE type, installed or not: it is installed, billed and
29
+ * removed through the Store, so the row links there;
30
+ * - `none` — not installed and not installable (e.g. a DEPRECATED type).
31
+ */
32
+ export type WidgetCatalogAction = 'install' | 'uninstall' | 'store' | 'none';
33
+ export declare function widgetCatalogAction(row: WidgetCatalogRow): WidgetCatalogAction;
34
+ /** DEPRECATED and DISABLED rows are shown greyed out. */
35
+ export declare function isWidgetCatalogRowMuted(row: Pick<WidgetCatalogRow, 'status'>): boolean;
36
+ /** Stable identity for a row (type + version is the registry's natural key). */
37
+ export declare function widgetCatalogRowKey(row: Pick<WidgetCatalogRow, 'widgetType' | 'widgetVersion'>): string;
38
+ /**
39
+ * Display order: installed rows first, then AVAILABLE before DEPRECATED before
40
+ * DISABLED, then by name and newest version first.
41
+ */
42
+ export declare function sortWidgetCatalogRows<T extends WidgetCatalogRow>(rows: readonly T[]): T[];
@@ -0,0 +1,15 @@
1
+ // src/bigconsole/utils/widgetCatalog.ts
2
+ function e(e) {
3
+ return e.publishType === "STORE" ? "store" : e.installedInWorkspace ? "uninstall" : e.selfInstallable ? "install" : "none";
4
+ }
5
+ function t(e) {
6
+ return e.status !== "AVAILABLE";
7
+ }
8
+ function n(e) {
9
+ return `${e.widgetType}@${e.widgetVersion}`;
10
+ }
11
+ function r(e) {
12
+ let t = (e) => e === "AVAILABLE" ? 0 : e === "DEPRECATED" ? 1 : 2;
13
+ return [...e].sort((e, n) => Number(n.installedInWorkspace) - Number(e.installedInWorkspace) || t(e.status) - t(n.status) || e.name.localeCompare(n.name) || n.widgetVersion.localeCompare(e.widgetVersion, void 0, { numeric: !0 }));
14
+ }
15
+ export { t as isWidgetCatalogRowMuted, r as sortWidgetCatalogRows, e as widgetCatalogAction, n as widgetCatalogRowKey };
@@ -31,7 +31,7 @@
31
31
  * - bigconsole-pipeline: read, create, update, delete, execute, test
32
32
  * - bigconsole-prompt: read, create, update, delete
33
33
  * - bigconsole-workflow: read, create, update, delete, execute
34
- * - bigconsole-widget: read, create, update, delete
34
+ * - bigconsole-widget: read, create, update, delete, manage_widget_types
35
35
  * - bigconsole-widget-action: read, create, update, delete, execute
36
36
  * - bigconsole-event-log: read, execute
37
37
  * - bigconsole-webhook: read, create, update, delete, test
@@ -101,6 +101,7 @@ export declare const BIGCONSOLE_PERMISSIONS: {
101
101
  readonly WIDGET_CREATE: "bigconsole-widget:create";
102
102
  readonly WIDGET_UPDATE: "bigconsole-widget:update";
103
103
  readonly WIDGET_DELETE: "bigconsole-widget:delete";
104
+ readonly WIDGET_MANAGE_TYPES: "bigconsole-widget:manage_widget_types";
104
105
  readonly WIDGET_ACTION_READ: "bigconsole-widget-action:read";
105
106
  readonly WIDGET_ACTION_CREATE: "bigconsole-widget-action:create";
106
107
  readonly WIDGET_ACTION_UPDATE: "bigconsole-widget-action:update";
@@ -64,6 +64,7 @@ var e = {
64
64
  WIDGET_CREATE: "bigconsole-widget:create",
65
65
  WIDGET_UPDATE: "bigconsole-widget:update",
66
66
  WIDGET_DELETE: "bigconsole-widget:delete",
67
+ WIDGET_MANAGE_TYPES: "bigconsole-widget:manage_widget_types",
67
68
  WIDGET_ACTION_READ: "bigconsole-widget-action:read",
68
69
  WIDGET_ACTION_CREATE: "bigconsole-widget-action:create",
69
70
  WIDGET_ACTION_UPDATE: "bigconsole-widget-action:update",
@@ -49,6 +49,7 @@ export type BigConsoleAsOfUnavailableReason =
49
49
  | 'PAYLOAD_TOO_LARGE'
50
50
  /** The history could not be read. */
51
51
  | 'READ_FAILED';
52
+ export type BigConsoleAskStatus = 'CLARIFICATION_NEEDED' | 'INSUFFICIENT_DATA' | 'NO_MATCHING_DATA' | 'REFUSED' | 'UNAVAILABLE' | 'UNSUPPORTED' | 'VERIFIED';
52
53
  /** What kind of source item a report row describes. */
53
54
  export type BigConsoleBoardMigrationItemKind = 'FILTER' | 'WIDGET';
54
55
  /** What kind of query a source card ran. */
@@ -575,6 +576,13 @@ export type BigConsoleImportDashboardInput = {
575
576
  /** Override visibility */
576
577
  visibility?: BigConsoleDashboardVisibility | null | undefined;
577
578
  };
579
+ /** Input to install (enable) a registered widget type for a workspace. */
580
+ export type BigConsoleInstallWidgetTypeInput = {
581
+ publishType: string;
582
+ widgetType: string;
583
+ widgetVersion: string;
584
+ workspaceId: string | number;
585
+ };
578
586
  /** Input for instantiating a template */
579
587
  export type BigConsoleInstantiateDashboardTemplateInput = {
580
588
  /** Dashboard description */
@@ -745,6 +753,12 @@ export type BigConsoleShareDashboardInput = {
745
753
  /** Type of recipient (user or group) */
746
754
  recipientType: BigConsoleDashboardShareRecipientType;
747
755
  };
756
+ /** Input to uninstall (disable) a widget type for a workspace. */
757
+ export type BigConsoleUninstallWidgetTypeInput = {
758
+ widgetType: string;
759
+ widgetVersion: string;
760
+ workspaceId: string | number;
761
+ };
748
762
  export type BigConsoleUpdateDashboardEmbedPolicyInput = {
749
763
  allowedParentOrigins?: Array<string> | null | undefined;
750
764
  expiresAt?: string | null | undefined;
@@ -1790,6 +1804,61 @@ export type UpdateWorkflowInput = {
1790
1804
  name?: string | null | undefined;
1791
1805
  status?: FluidGridsWorkflowStatus | null | undefined;
1792
1806
  };
1807
+ export type BigConsoleAskQueryVariables = Exact<{
1808
+ question: string;
1809
+ }>;
1810
+ export type BigConsoleAskQuery = {
1811
+ bigconsoleAsk: {
1812
+ status: Types.BigConsoleAskStatus;
1813
+ headline: string | null;
1814
+ message: string | null;
1815
+ columns: Array<string>;
1816
+ rows: Record<string, unknown>;
1817
+ truncated: boolean;
1818
+ spec: Record<string, unknown> | null;
1819
+ chart: {
1820
+ type: string;
1821
+ categoryColumn: string;
1822
+ valueColumn: string;
1823
+ } | null;
1824
+ provenance: {
1825
+ sourceId: string;
1826
+ sourceName: string;
1827
+ sourceRevision: string;
1828
+ parser: string;
1829
+ grouping: Array<string>;
1830
+ aggregations: Array<string>;
1831
+ filters: Array<string>;
1832
+ timeRange: string | null;
1833
+ metricDefinition: string;
1834
+ query: string;
1835
+ limitations: Array<string>;
1836
+ fieldsUsed: Array<{
1837
+ id: string;
1838
+ name: string;
1839
+ type: string;
1840
+ }>;
1841
+ } | null;
1842
+ clarificationOptions: Array<{
1843
+ id: string;
1844
+ name: string;
1845
+ }>;
1846
+ usage: {
1847
+ model: string;
1848
+ tokensIn: number | null;
1849
+ tokensOut: number | null;
1850
+ credits: number | null;
1851
+ } | null;
1852
+ };
1853
+ };
1854
+ export type BigConsoleAskAddToDashboardMutationVariables = Exact<{
1855
+ spec: Record<string, unknown>;
1856
+ pageId: string | number;
1857
+ title?: string | null | undefined;
1858
+ }>;
1859
+ export type BigConsoleAskAddToDashboardMutation = {
1860
+ bigconsoleAskAddToDashboard: string;
1861
+ };
1793
1862
  export type BigConsoleDetectAnomaliesQueryVariables = Exact<{
1794
1863
  input: Types.BigConsoleDetectAnomaliesInput;
1795
1864
  }>;
@@ -7203,6 +7272,18 @@ export type EmitWidgetEventMutation = {
7203
7272
  completedAt: string | null;
7204
7273
  };
7205
7274
  };
7275
+ export type InstallWidgetTypeMutationVariables = Exact<{
7276
+ input: Types.BigConsoleInstallWidgetTypeInput;
7277
+ }>;
7278
+ export type InstallWidgetTypeMutation = {
7279
+ installWidgetType: {
7280
+ widgetType: string;
7281
+ widgetVersion: string;
7282
+ publishType: string;
7283
+ status: string;
7284
+ installedInWorkspace: boolean | null;
7285
+ };
7286
+ };
7206
7287
  export type MoveWidgetToPageMutationVariables = Exact<{
7207
7288
  widgetId: string | number;
7208
7289
  targetPageId: string | number;
@@ -7373,6 +7454,12 @@ export type ToggleEventWebhookMappingMutation = {
7373
7454
  } | null;
7374
7455
  };
7375
7456
  };
7457
+ export type UninstallWidgetTypeMutationVariables = Exact<{
7458
+ input: Types.BigConsoleUninstallWidgetTypeInput;
7459
+ }>;
7460
+ export type UninstallWidgetTypeMutation = {
7461
+ uninstallWidgetType: boolean;
7462
+ };
7376
7463
  export type UpdateEventWebhookMappingMutationVariables = Exact<{
7377
7464
  id: string | number;
7378
7465
  input: Types.BigConsoleUpdateWidgetEventWebhookMappingInput;
@@ -8175,6 +8262,27 @@ export type ListWidgetsForPageQuery = {
8175
8262
  }>;
8176
8263
  };
8177
8264
  };
8265
+ export type WidgetTypeCatalogQueryVariables = Exact<{
8266
+ [key: string]: never;
8267
+ }>;
8268
+ export type WidgetTypeCatalogQuery = {
8269
+ widgetTypeCatalog: Array<{
8270
+ widgetType: string;
8271
+ widgetVersion: string;
8272
+ name: string;
8273
+ description: string | null;
8274
+ author: string | null;
8275
+ category: string | null;
8276
+ icon: string | null;
8277
+ publishType: string;
8278
+ status: string;
8279
+ renderer: string;
8280
+ isLatest: boolean;
8281
+ installedInWorkspace: boolean;
8282
+ selfInstallable: boolean;
8283
+ updatedAt: string;
8284
+ }>;
8285
+ };
8178
8286
  export type DataSinkWorkflowLinkFieldsFragment = {
8179
8287
  id: string;
8180
8288
  dataSinkId: string;
@@ -8662,6 +8770,8 @@ export declare const LinkedDataSinkFieldsFragmentDoc: DocumentNode<LinkedDataSin
8662
8770
  export declare const DataSinkWorkflowLinkFieldsFragmentDoc: DocumentNode<DataSinkWorkflowLinkFieldsFragment, unknown>;
8663
8771
  export declare const WorkflowFullFieldsFragmentDoc: DocumentNode<WorkflowFullFieldsFragment, unknown>;
8664
8772
  export declare const WorkflowListItemFragmentDoc: DocumentNode<WorkflowListItemFragment, unknown>;
8773
+ export declare const BigConsoleAskDocument: DocumentNode<BigConsoleAskQuery, BigConsoleAskQueryVariables>;
8774
+ export declare const BigConsoleAskAddToDashboardDocument: DocumentNode<BigConsoleAskAddToDashboardMutation, BigConsoleAskAddToDashboardMutationVariables>;
8665
8775
  export declare const BigConsoleDetectAnomaliesDocument: DocumentNode<BigConsoleDetectAnomaliesQuery, BigConsoleDetectAnomaliesQueryVariables>;
8666
8776
  export declare const BigConsoleValidateConsoleDefinitionDocument: DocumentNode<BigConsoleValidateConsoleDefinitionQuery, BigConsoleValidateConsoleDefinitionQueryVariables>;
8667
8777
  export declare const BigConsoleShareMembersDocument: DocumentNode<BigConsoleShareMembersQuery, BigConsoleShareMembersQueryVariables>;
@@ -8820,12 +8930,14 @@ export declare const DeleteWidgetActionDocument: DocumentNode<DeleteWidgetAction
8820
8930
  export declare const DeleteWidgetDrilldownDocument: DocumentNode<DeleteWidgetDrilldownMutation, DeleteWidgetDrilldownMutationVariables>;
8821
8931
  export declare const DuplicateWidgetDocument: DocumentNode<DuplicateWidgetMutation, DuplicateWidgetMutationVariables>;
8822
8932
  export declare const EmitWidgetEventDocument: DocumentNode<EmitWidgetEventMutation, EmitWidgetEventMutationVariables>;
8933
+ export declare const InstallWidgetTypeDocument: DocumentNode<InstallWidgetTypeMutation, InstallWidgetTypeMutationVariables>;
8823
8934
  export declare const MoveWidgetToPageDocument: DocumentNode<MoveWidgetToPageMutation, MoveWidgetToPageMutationVariables>;
8824
8935
  export declare const RefreshWidgetDataDocument: DocumentNode<RefreshWidgetDataMutation, RefreshWidgetDataMutationVariables>;
8825
8936
  export declare const ReorderWidgetActionsDocument: DocumentNode<ReorderWidgetActionsMutation, ReorderWidgetActionsMutationVariables>;
8826
8937
  export declare const RetryEventDeliveryDocument: DocumentNode<RetryEventDeliveryMutation, RetryEventDeliveryMutationVariables>;
8827
8938
  export declare const TestWebhookMappingDocument: DocumentNode<TestWebhookMappingMutation, TestWebhookMappingMutationVariables>;
8828
8939
  export declare const ToggleEventWebhookMappingDocument: DocumentNode<ToggleEventWebhookMappingMutation, ToggleEventWebhookMappingMutationVariables>;
8940
+ export declare const UninstallWidgetTypeDocument: DocumentNode<UninstallWidgetTypeMutation, UninstallWidgetTypeMutationVariables>;
8829
8941
  export declare const UpdateEventWebhookMappingDocument: DocumentNode<UpdateEventWebhookMappingMutation, UpdateEventWebhookMappingMutationVariables>;
8830
8942
  export declare const UpdateWidgetDocument: DocumentNode<UpdateWidgetMutation, UpdateWidgetMutationVariables>;
8831
8943
  export declare const UpdateWidgetActionDocument: DocumentNode<UpdateWidgetActionMutation, UpdateWidgetActionMutationVariables>;
@@ -8845,6 +8957,7 @@ export declare const ListEventWebhookMappingsDocument: DocumentNode<ListEventWeb
8845
8957
  export declare const ListWidgetsDocument: DocumentNode<ListWidgetsQuery, ListWidgetsQueryVariables>;
8846
8958
  export declare const ListWidgetsByDashboardDocument: DocumentNode<ListWidgetsByDashboardQuery, ListWidgetsByDashboardQueryVariables>;
8847
8959
  export declare const ListWidgetsForPageDocument: DocumentNode<ListWidgetsForPageQuery, ListWidgetsForPageQueryVariables>;
8960
+ export declare const WidgetTypeCatalogDocument: DocumentNode<WidgetTypeCatalogQuery, WidgetTypeCatalogQueryVariables>;
8848
8961
  export declare const CreateWorkflowDocument: DocumentNode<CreateWorkflowMutation, CreateWorkflowMutationVariables>;
8849
8962
  export declare const DeleteWorkflowDocument: DocumentNode<DeleteWorkflowMutation, DeleteWorkflowMutationVariables>;
8850
8963
  export declare const ExecuteWorkflowDocument: DocumentNode<ExecuteWorkflowMutation, ExecuteWorkflowMutationVariables>;