@burdenoff/bigconsole-cli 2026.802.1 → 2026.1110.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/README.md +96 -184
- package/dist/auth/store.d.ts +0 -4
- package/dist/cli.js +2959 -100
- package/dist/commands/base.d.ts +11 -4
- package/dist/graphql/client.d.ts +12 -0
- package/dist/graphql/operations.d.ts +14 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2895 -6
- package/dist/utils/output.d.ts +29 -7
- package/dist/utils/parse.d.ts +5 -0
- package/dist/utils/sanitize.d.ts +79 -0
- package/package.json +59 -51
- package/dist/auth/device-code.js +0 -239
- package/dist/auth/store.js +0 -90
- package/dist/commands/auth.js +0 -352
- package/dist/commands/base.js +0 -100
- package/dist/commands/cli-config.js +0 -79
- package/dist/commands/dashboard.js +0 -220
- package/dist/commands/datasink.js +0 -175
- package/dist/commands/drilldown.js +0 -47
- package/dist/commands/index.js +0 -13
- package/dist/commands/parser.js +0 -181
- package/dist/commands/pipeline.js +0 -142
- package/dist/commands/prompt.js +0 -84
- package/dist/commands/share.js +0 -50
- package/dist/commands/template.js +0 -62
- package/dist/commands/widget.js +0 -164
- package/dist/commands/workflow.js +0 -54
- package/dist/commands/workspace.js +0 -95
- package/dist/config/index.js +0 -151
- package/dist/graphql/client.js +0 -274
- package/dist/graphql/operations.js +0 -654
- package/dist/types/index.d.ts +0 -30
- package/dist/types/index.js +0 -7
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/output.js +0 -186
package/dist/commands/base.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Shared command utilities.
|
|
3
3
|
* Provides auth wrappers, format helpers, and error handling for all commands.
|
|
4
4
|
*/
|
|
5
|
+
import type { Command } from 'commander';
|
|
5
6
|
import type { RequestDocument, Variables } from 'graphql-request';
|
|
6
7
|
/**
|
|
7
8
|
* Load a JSON-valued command input from either --file or --json, mutually
|
|
@@ -27,14 +28,20 @@ export declare function requireAuth(): void;
|
|
|
27
28
|
* Execute a workspace GraphQL request with error handling.
|
|
28
29
|
*/
|
|
29
30
|
export declare function execWorkspace<T>(document: RequestDocument, variables?: Variables): Promise<T>;
|
|
30
|
-
/**
|
|
31
|
-
* Execute a global GraphQL request with error handling.
|
|
32
|
-
*/
|
|
33
|
-
export declare function execGlobal<T>(document: RequestDocument, variables?: Variables): Promise<T>;
|
|
34
31
|
/**
|
|
35
32
|
* Handle command errors consistently, printing user-friendly messages.
|
|
33
|
+
* The message is reduced to a single safe line (see `toSafeErrorMessage`):
|
|
34
|
+
* request variables, headers and raw response bodies are never printed.
|
|
36
35
|
*/
|
|
37
36
|
export declare function handleCommandError(error: unknown): never;
|
|
37
|
+
/**
|
|
38
|
+
* Commander recognises program-level options anywhere on the command line, so
|
|
39
|
+
* `-f/--format` written after a subcommand is stored on the program rather
|
|
40
|
+
* than on the subcommand. Copy it to the command about to run when that
|
|
41
|
+
* command declares its own format option and did not receive a value.
|
|
42
|
+
* Registered as a `preAction` hook in the CLI entry point.
|
|
43
|
+
*/
|
|
44
|
+
export declare function inheritGlobalFormat(actionCommand: Command): void;
|
|
38
45
|
/**
|
|
39
46
|
* Get format and output data for a command.
|
|
40
47
|
* Standard pattern used by all list/get commands.
|
package/dist/graphql/client.d.ts
CHANGED
|
@@ -4,6 +4,18 @@
|
|
|
4
4
|
* Auto-injects auth headers, auto-refreshes both platform and workspace tokens.
|
|
5
5
|
*/
|
|
6
6
|
import { type RequestDocument, type Variables } from 'graphql-request';
|
|
7
|
+
import { type SafeErrorDescription } from '../utils/sanitize.js';
|
|
8
|
+
/**
|
|
9
|
+
* Error thrown for a failed GraphQL request. Its message is built only from
|
|
10
|
+
* the HTTP status, the server's first GraphQL error and its error code, so it
|
|
11
|
+
* is safe to print. The underlying client error is deliberately not attached
|
|
12
|
+
* (no `cause`): it carries the request variables and the raw response body.
|
|
13
|
+
*/
|
|
14
|
+
export declare class BigConsoleRequestError extends Error {
|
|
15
|
+
readonly status: number | undefined;
|
|
16
|
+
readonly code: string | undefined;
|
|
17
|
+
constructor(description: SafeErrorDescription);
|
|
18
|
+
}
|
|
7
19
|
export declare function ensureFreshTokens(): Promise<void>;
|
|
8
20
|
/**
|
|
9
21
|
* Execute a GraphQL request against the workspace gateway.
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
export declare const SIGN_OUT = "\n mutation SignOut {\n signOut\n }\n";
|
|
7
7
|
export declare const REFRESH_TOKEN = "\n mutation RefreshToken($token: String!) {\n refreshToken(token: $token) {\n accessToken\n refreshToken\n expiresIn\n }\n }\n";
|
|
8
8
|
export declare const MY_WORKSPACES = "\n query MyWorkspaces($limit: Int) {\n myWorkspaces(limit: $limit) {\n items { id name slug tenantId organizationId }\n }\n }\n";
|
|
9
|
-
export declare const LIST_DASHBOARDS = "\n query ListDashboards(\n $first: Int\n $after: String\n $search: String\n $visibility:
|
|
9
|
+
export declare const LIST_DASHBOARDS = "\n query ListDashboards(\n $first: Int\n $after: String\n $search: String\n $visibility: BigConsoleDashboardVisibility\n $category: BigConsoleDashboardCategory\n $includeArchived: Boolean\n $sortBy: BigConsoleDashboardSortField\n $sortOrder: SortOrder\n ) {\n listDashboards(\n first: $first\n after: $after\n search: $search\n visibility: $visibility\n category: $category\n includeArchived: $includeArchived\n sortBy: $sortBy\n sortOrder: $sortOrder\n ) {\n edges {\n node {\n id\n name\n description\n status\n visibility\n category\n ownerId\n createdAt\n updatedAt\n }\n }\n pageInfo { hasNextPage endCursor }\n totalCount\n }\n }\n";
|
|
10
10
|
export declare const GET_DASHBOARD = "\n query GetDashboard($id: ID!) {\n getDashboard(id: $id) {\n id\n name\n description\n status\n visibility\n category\n ownerId\n definitionVersion\n createdAt\n updatedAt\n }\n }\n";
|
|
11
11
|
export declare const ARCHIVE_DASHBOARD = "\n mutation ArchiveDashboard($id: ID!) {\n archiveDashboard(id: $id) {\n id\n name\n status\n }\n }\n";
|
|
12
12
|
export declare const DELETE_DASHBOARD = "\n mutation DeleteDashboard($id: ID!) {\n deleteBigConsoleDashboard(id: $id)\n }\n";
|
|
13
|
-
export declare const LIST_WIDGETS = "\n query ListWidgets($pageId: ID!, $first: Int, $after: String, $type:
|
|
13
|
+
export declare const LIST_WIDGETS = "\n query ListWidgets($pageId: ID!, $first: Int, $after: String, $type: BigConsoleWidgetType) {\n listWidgets(pageId: $pageId, first: $first, after: $after, type: $type) {\n edges {\n node {\n id\n pageId\n dashboardId\n type\n title\n dataSinkId\n lastRefreshedAt\n createdAt\n updatedAt\n }\n }\n pageInfo { hasNextPage endCursor }\n totalCount\n }\n }\n";
|
|
14
14
|
export declare const GET_WIDGET = "\n query GetWidget($id: ID!) {\n getWidget(id: $id) {\n id\n pageId\n dashboardId\n type\n title\n config\n dataSinkId\n datasetId\n lastRefreshedAt\n cacheTTL\n createdAt\n updatedAt\n }\n }\n";
|
|
15
15
|
export declare const DELETE_WIDGET = "\n mutation DeleteWidget($id: ID!) {\n deleteBigConsoleWidget(id: $id)\n }\n";
|
|
16
16
|
export declare const LIST_DATASINKS = "\n query ListDataSinks(\n $first: Int\n $after: String\n $search: String\n $status: DataSinkStatus\n $setupState: DataSinkSetupState\n $isActive: Boolean\n ) {\n listDataSinks(\n first: $first\n after: $after\n search: $search\n status: $status\n setupState: $setupState\n isActive: $isActive\n ) {\n edges {\n node {\n id\n name\n key\n description\n status\n setupState\n isActive\n createdAt\n updatedAt\n }\n }\n pageInfo { hasNextPage endCursor }\n totalCount\n }\n }\n";
|
|
17
|
-
export declare const GET_DATASINK = "\n query GetDataSink($id: ID, $key: String) {\n getDataSink(id: $id, key: $key) {\n id\n name\n key\n description\n status\n setupState\n isActive\n createdAt\n updatedAt\n }\n }\n";
|
|
18
|
-
export declare const GET_DATASINK_DATA = "\n query GetDataSinkData($id: ID, $key: String, $dataPath: String, $forceRefresh: Boolean) {\n getDataSinkData(id: $id, key: $key, dataPath: $dataPath, forceRefresh: $forceRefresh)\n }\n";
|
|
19
|
-
export declare const DELETE_DATASINK = "\n mutation DeleteDataSink($id: ID!) {\n deleteDataSink(id: $id)\n }\n";
|
|
17
|
+
export declare const GET_DATASINK = "\n query GetDataSink($id: ID, $key: String) {\n getDataSink(id: $id, key: $key) {\n id\n name\n key\n description\n status\n setupState\n isActive\n version\n createdAt\n updatedAt\n }\n }\n";
|
|
18
|
+
export declare const GET_DATASINK_DATA = "\n query GetDataSinkData($id: ID, $key: String, $dataPath: String, $forceRefresh: Boolean) {\n getDataSinkData(id: $id, key: $key, dataPath: $dataPath, forceRefresh: $forceRefresh) {\n raw\n extracted\n cached\n fetchedAt\n version\n totalCount\n hasMore\n limit\n offset\n }\n }\n";
|
|
19
|
+
export declare const DELETE_DATASINK = "\n mutation DeleteDataSink($id: ID!) {\n deleteDataSink(id: $id) {\n id\n name\n }\n }\n";
|
|
20
20
|
export declare const LIST_PARSERS = "\n query ListParsers($first: Int, $after: String, $filter: ParserFilterInput) {\n listParsers(first: $first, after: $after, filter: $filter) {\n edges {\n node {\n id\n name\n description\n type\n status\n inputSinkKey\n outputKey\n outputWidgetId\n ttl\n version\n createdAt\n updatedAt\n }\n }\n pageInfo { hasNextPage endCursor }\n totalCount\n }\n }\n";
|
|
21
21
|
export declare const GET_PARSER = "\n query GetParser($id: ID!) {\n parser(id: $id) {\n id\n name\n description\n type\n status\n expression\n inputSinkKey\n outputKey\n outputWidgetId\n ttl\n version\n createdAt\n updatedAt\n }\n }\n";
|
|
22
22
|
export declare const DELETE_PARSER = "\n mutation DeleteParser($id: ID!) {\n deleteParser(id: $id)\n }\n";
|
|
@@ -25,8 +25,8 @@ export declare const GET_PIPELINE = "\n query GetPipeline($id: ID!) {\n pipe
|
|
|
25
25
|
export declare const DELETE_PIPELINE = "\n mutation DeletePipeline($id: ID!) {\n deletePipeline(id: $id)\n }\n";
|
|
26
26
|
export declare const CREATE_DASHBOARD = "\n mutation CreateDashboard($input: BigConsoleCreateDashboardInput!) {\n createBigConsoleDashboard(input: $input) {\n id\n name\n status\n visibility\n category\n createdAt\n }\n }\n";
|
|
27
27
|
export declare const UPDATE_DASHBOARD = "\n mutation UpdateDashboard($input: BigConsoleUpdateDashboardInput!) {\n updateBigConsoleDashboard(input: $input) {\n id\n name\n status\n visibility\n category\n updatedAt\n }\n }\n";
|
|
28
|
-
export declare const IMPORT_DASHBOARD = "\n mutation ImportDashboard($input:
|
|
29
|
-
export declare const EXPORT_DASHBOARD = "\n query ExportDashboard($id: ID!, $
|
|
28
|
+
export declare const IMPORT_DASHBOARD = "\n mutation ImportDashboard($input: BigConsoleImportDashboardInput!) {\n importDashboard(input: $input) {\n id\n name\n status\n visibility\n category\n createdAt\n }\n }\n";
|
|
29
|
+
export declare const EXPORT_DASHBOARD = "\n query ExportDashboard($id: ID!, $options: BigConsoleExportDashboardOptions) {\n exportDashboard(id: $id, options: $options)\n }\n";
|
|
30
30
|
export declare const CREATE_WIDGET = "\n mutation CreateWidget($input: BigConsoleCreateWidgetInput!) {\n createBigConsoleWidget(input: $input) {\n id\n pageId\n type\n title\n createdAt\n }\n }\n";
|
|
31
31
|
export declare const UPDATE_WIDGET = "\n mutation UpdateWidget($input: BigConsoleUpdateWidgetInput!) {\n updateBigConsoleWidget(input: $input) {\n id\n pageId\n type\n title\n updatedAt\n }\n }\n";
|
|
32
32
|
export declare const CREATE_DATASINK = "\n mutation CreateDataSink($input: CreateDataSinkInput!) {\n createDataSink(input: $input) {\n id\n name\n key\n status\n setupState\n isActive\n createdAt\n }\n }\n";
|
|
@@ -35,14 +35,15 @@ export declare const CREATE_PARSER = "\n mutation CreateParser($input: CreatePa
|
|
|
35
35
|
export declare const UPDATE_PARSER = "\n mutation UpdateParser($id: ID!, $version: Int!, $input: UpdateParserInput!) {\n updateParser(id: $id, version: $version, input: $input) {\n id\n name\n type\n status\n version\n updatedAt\n }\n }\n";
|
|
36
36
|
export declare const CREATE_PIPELINE = "\n mutation CreatePipeline($input: CreatePipelineInput!) {\n createPipeline(input: $input) {\n id\n name\n status\n version\n createdAt\n }\n }\n";
|
|
37
37
|
export declare const UPDATE_PIPELINE = "\n mutation UpdatePipeline($id: ID!, $version: Int!, $input: UpdatePipelineInput!) {\n updatePipeline(id: $id, version: $version, input: $input) {\n id\n name\n status\n version\n updatedAt\n }\n }\n";
|
|
38
|
-
export declare const GET_WIDGET_ACTIONS = "\n query GetWidgetActions($widgetId: ID!) {\n getWidgetActions(widgetId: $widgetId) {\n id\n widgetId\n type\n label\n
|
|
39
|
-
export declare const DELETE_WIDGET_DRILLDOWN = "\n mutation DeleteWidgetDrilldown($
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
38
|
+
export declare const GET_WIDGET_ACTIONS = "\n query GetWidgetActions($widgetId: ID!) {\n getWidgetActions(widgetId: $widgetId) {\n id\n widgetId\n type\n name\n label\n order\n disabled\n hidden\n createdAt\n }\n }\n";
|
|
39
|
+
export declare const DELETE_WIDGET_DRILLDOWN = "\n mutation DeleteWidgetDrilldown($id: ID!) {\n deleteWidgetDrilldown(id: $id)\n }\n";
|
|
40
|
+
export declare const GET_WIDGET_DRILLDOWN = "\n query GetWidgetDrilldown($id: ID!) {\n getWidget(id: $id) {\n id\n drilldown {\n id\n }\n }\n }\n";
|
|
41
|
+
export declare const LIST_DASHBOARD_SHARES = "\n query ListDashboardShares(\n $dashboardId: ID!\n $first: Int\n $after: String\n $isActive: Boolean\n $permission: BigConsoleDashboardSharePermission\n $recipientType: BigConsoleDashboardShareRecipientType\n ) {\n listDashboardShares(\n dashboardId: $dashboardId\n first: $first\n after: $after\n isActive: $isActive\n permission: $permission\n recipientType: $recipientType\n ) {\n edges {\n node {\n id\n dashboardId\n permission\n isActive\n expiresAt\n createdAt\n }\n }\n pageInfo { hasNextPage endCursor }\n totalCount\n }\n }\n";
|
|
42
|
+
export declare const LIST_TEMPLATES = "\n query ListTemplates(\n $first: Int\n $after: String\n $category: BigConsoleDashboardCategory\n $search: String\n $isFeatured: Boolean\n ) {\n listTemplates(\n first: $first\n after: $after\n category: $category\n search: $search\n isFeatured: $isFeatured\n ) {\n edges {\n node {\n id\n name\n description\n category\n isFeatured\n status\n createdAt\n }\n }\n pageInfo { hasNextPage endCursor }\n totalCount\n }\n }\n";
|
|
42
43
|
export declare const GET_TEMPLATE = "\n query GetTemplate($id: ID!) {\n getTemplate(id: $id) {\n id\n name\n description\n category\n isFeatured\n status\n createdAt\n }\n }\n";
|
|
43
|
-
export declare const GENERATE_DASHBOARD_FROM_PROMPT = "\n mutation GenerateDashboardFromPrompt($input:
|
|
44
|
+
export declare const GENERATE_DASHBOARD_FROM_PROMPT = "\n mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {\n generateDashboardFromPrompt(input: $input) {\n id\n status\n prompt\n createdAt\n }\n }\n";
|
|
44
45
|
export declare const LIST_PROMPT_GENERATIONS = "\n query ListPromptGenerations($first: Int, $after: String, $status: PromptGenerationStatus) {\n listPromptGenerations(first: $first, after: $after, status: $status) {\n edges {\n node {\n id\n status\n prompt\n createdAt\n }\n }\n pageInfo { hasNextPage endCursor }\n totalCount\n }\n }\n";
|
|
45
46
|
export declare const GET_PROMPT_GENERATION = "\n query GetPromptGeneration($id: ID!) {\n getPromptGeneration(id: $id) {\n id\n status\n prompt\n createdAt\n }\n }\n";
|
|
46
|
-
export declare const CANCEL_PROMPT_GENERATION = "\n mutation CancelPromptGeneration($
|
|
47
|
+
export declare const CANCEL_PROMPT_GENERATION = "\n mutation CancelPromptGeneration($generationId: ID!) {\n cancelPromptGeneration(generationId: $generationId) {\n id\n status\n }\n }\n";
|
|
47
48
|
export declare const LIST_WORKFLOWS = "\n query ListWorkflows($filter: FluidGridsWorkflowFilterInput) {\n workflows(filter: $filter) {\n id\n name\n key\n description\n status\n executionCount\n linkedDataSinkCount\n lastExecutedAt\n createdAt\n updatedAt\n }\n }\n";
|
|
48
49
|
export declare const GET_WORKFLOW = "\n query GetWorkflow($id: ID!) {\n workflow(id: $id) {\n id\n name\n key\n description\n status\n executionCount\n linkedDataSinkCount\n externalWorkflowId\n lastExecutionId\n lastExecutedAt\n webhookUrl\n createdAt\n updatedAt\n }\n }\n";
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* @burdenoff/bigconsole-cli — public API exports.
|
|
3
3
|
*/
|
|
4
4
|
export * from './config/index.js';
|
|
5
|
-
export { workspaceRequest, globalRequest, resetClients } from './graphql/client.js';
|
|
5
|
+
export { workspaceRequest, globalRequest, resetClients, BigConsoleRequestError, } from './graphql/client.js';
|
|
6
6
|
export * from './commands/index.js';
|