@burdenoff/bigconsole-cli 2026.802.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.
Files changed (53) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +235 -0
  3. package/dist/auth/device-code.d.ts +66 -0
  4. package/dist/auth/device-code.js +239 -0
  5. package/dist/auth/store.d.ts +46 -0
  6. package/dist/auth/store.js +90 -0
  7. package/dist/cli.d.ts +5 -0
  8. package/dist/cli.js +126 -0
  9. package/dist/commands/auth.d.ts +5 -0
  10. package/dist/commands/auth.js +352 -0
  11. package/dist/commands/base.d.ts +47 -0
  12. package/dist/commands/base.js +100 -0
  13. package/dist/commands/cli-config.d.ts +6 -0
  14. package/dist/commands/cli-config.js +79 -0
  15. package/dist/commands/dashboard.d.ts +5 -0
  16. package/dist/commands/dashboard.js +220 -0
  17. package/dist/commands/datasink.d.ts +5 -0
  18. package/dist/commands/datasink.js +175 -0
  19. package/dist/commands/drilldown.d.ts +9 -0
  20. package/dist/commands/drilldown.js +47 -0
  21. package/dist/commands/index.d.ts +13 -0
  22. package/dist/commands/index.js +13 -0
  23. package/dist/commands/parser.d.ts +5 -0
  24. package/dist/commands/parser.js +181 -0
  25. package/dist/commands/pipeline.d.ts +5 -0
  26. package/dist/commands/pipeline.js +142 -0
  27. package/dist/commands/prompt.d.ts +5 -0
  28. package/dist/commands/prompt.js +84 -0
  29. package/dist/commands/share.d.ts +8 -0
  30. package/dist/commands/share.js +50 -0
  31. package/dist/commands/template.d.ts +5 -0
  32. package/dist/commands/template.js +62 -0
  33. package/dist/commands/widget.d.ts +5 -0
  34. package/dist/commands/widget.js +164 -0
  35. package/dist/commands/workflow.d.ts +9 -0
  36. package/dist/commands/workflow.js +54 -0
  37. package/dist/commands/workspace.d.ts +9 -0
  38. package/dist/commands/workspace.js +95 -0
  39. package/dist/config/index.d.ts +72 -0
  40. package/dist/config/index.js +151 -0
  41. package/dist/graphql/client.d.ts +26 -0
  42. package/dist/graphql/client.js +274 -0
  43. package/dist/graphql/operations.d.ts +48 -0
  44. package/dist/graphql/operations.js +654 -0
  45. package/dist/index.d.ts +6 -0
  46. package/dist/index.js +6 -0
  47. package/dist/types/index.d.ts +30 -0
  48. package/dist/types/index.js +7 -0
  49. package/dist/utils/index.d.ts +1 -0
  50. package/dist/utils/index.js +1 -0
  51. package/dist/utils/output.d.ts +62 -0
  52. package/dist/utils/output.js +186 -0
  53. package/package.json +116 -0
@@ -0,0 +1,654 @@
1
+ /**
2
+ * GraphQL operations for bigconsole-cli.
3
+ * All queries/mutations match the real wspace-bigconsole-svc schema
4
+ * (see ~/products/wspace/bigconsole/wspace-bigconsole-svc/.hive-schema.graphql).
5
+ */
6
+ // ---------------------------------------------------------------------------
7
+ // Auth (global gateway)
8
+ // ---------------------------------------------------------------------------
9
+ export const SIGN_OUT = `
10
+ mutation SignOut {
11
+ signOut
12
+ }
13
+ `;
14
+ export const REFRESH_TOKEN = `
15
+ mutation RefreshToken($token: String!) {
16
+ refreshToken(token: $token) {
17
+ accessToken
18
+ refreshToken
19
+ expiresIn
20
+ }
21
+ }
22
+ `;
23
+ // ---------------------------------------------------------------------------
24
+ // Workspaces (global gateway) — mirrors fetchWorkspaces but exposed to callers
25
+ // ---------------------------------------------------------------------------
26
+ export const MY_WORKSPACES = `
27
+ query MyWorkspaces($limit: Int) {
28
+ myWorkspaces(limit: $limit) {
29
+ items { id name slug tenantId organizationId }
30
+ }
31
+ }
32
+ `;
33
+ // ---------------------------------------------------------------------------
34
+ // Dashboards (workspace gateway)
35
+ // ---------------------------------------------------------------------------
36
+ export const LIST_DASHBOARDS = `
37
+ query ListDashboards(
38
+ $first: Int
39
+ $after: String
40
+ $search: String
41
+ $visibility: DashboardVisibility
42
+ $category: DashboardCategory
43
+ $includeArchived: Boolean
44
+ $sortBy: DashboardSortField
45
+ $sortOrder: SortOrder
46
+ ) {
47
+ listDashboards(
48
+ first: $first
49
+ after: $after
50
+ search: $search
51
+ visibility: $visibility
52
+ category: $category
53
+ includeArchived: $includeArchived
54
+ sortBy: $sortBy
55
+ sortOrder: $sortOrder
56
+ ) {
57
+ edges {
58
+ node {
59
+ id
60
+ name
61
+ description
62
+ status
63
+ visibility
64
+ category
65
+ ownerId
66
+ createdAt
67
+ updatedAt
68
+ }
69
+ }
70
+ pageInfo { hasNextPage endCursor }
71
+ totalCount
72
+ }
73
+ }
74
+ `;
75
+ export const GET_DASHBOARD = `
76
+ query GetDashboard($id: ID!) {
77
+ getDashboard(id: $id) {
78
+ id
79
+ name
80
+ description
81
+ status
82
+ visibility
83
+ category
84
+ ownerId
85
+ definitionVersion
86
+ createdAt
87
+ updatedAt
88
+ }
89
+ }
90
+ `;
91
+ export const ARCHIVE_DASHBOARD = `
92
+ mutation ArchiveDashboard($id: ID!) {
93
+ archiveDashboard(id: $id) {
94
+ id
95
+ name
96
+ status
97
+ }
98
+ }
99
+ `;
100
+ export const DELETE_DASHBOARD = `
101
+ mutation DeleteDashboard($id: ID!) {
102
+ deleteBigConsoleDashboard(id: $id)
103
+ }
104
+ `;
105
+ // ---------------------------------------------------------------------------
106
+ // Widgets (workspace gateway)
107
+ // ---------------------------------------------------------------------------
108
+ export const LIST_WIDGETS = `
109
+ query ListWidgets($pageId: ID!, $first: Int, $after: String, $type: WidgetType) {
110
+ listWidgets(pageId: $pageId, first: $first, after: $after, type: $type) {
111
+ edges {
112
+ node {
113
+ id
114
+ pageId
115
+ dashboardId
116
+ type
117
+ title
118
+ dataSinkId
119
+ lastRefreshedAt
120
+ createdAt
121
+ updatedAt
122
+ }
123
+ }
124
+ pageInfo { hasNextPage endCursor }
125
+ totalCount
126
+ }
127
+ }
128
+ `;
129
+ export const GET_WIDGET = `
130
+ query GetWidget($id: ID!) {
131
+ getWidget(id: $id) {
132
+ id
133
+ pageId
134
+ dashboardId
135
+ type
136
+ title
137
+ config
138
+ dataSinkId
139
+ datasetId
140
+ lastRefreshedAt
141
+ cacheTTL
142
+ createdAt
143
+ updatedAt
144
+ }
145
+ }
146
+ `;
147
+ export const DELETE_WIDGET = `
148
+ mutation DeleteWidget($id: ID!) {
149
+ deleteBigConsoleWidget(id: $id)
150
+ }
151
+ `;
152
+ // ---------------------------------------------------------------------------
153
+ // DataSinks (workspace gateway)
154
+ // ---------------------------------------------------------------------------
155
+ export const LIST_DATASINKS = `
156
+ query ListDataSinks(
157
+ $first: Int
158
+ $after: String
159
+ $search: String
160
+ $status: DataSinkStatus
161
+ $setupState: DataSinkSetupState
162
+ $isActive: Boolean
163
+ ) {
164
+ listDataSinks(
165
+ first: $first
166
+ after: $after
167
+ search: $search
168
+ status: $status
169
+ setupState: $setupState
170
+ isActive: $isActive
171
+ ) {
172
+ edges {
173
+ node {
174
+ id
175
+ name
176
+ key
177
+ description
178
+ status
179
+ setupState
180
+ isActive
181
+ createdAt
182
+ updatedAt
183
+ }
184
+ }
185
+ pageInfo { hasNextPage endCursor }
186
+ totalCount
187
+ }
188
+ }
189
+ `;
190
+ export const GET_DATASINK = `
191
+ query GetDataSink($id: ID, $key: String) {
192
+ getDataSink(id: $id, key: $key) {
193
+ id
194
+ name
195
+ key
196
+ description
197
+ status
198
+ setupState
199
+ isActive
200
+ createdAt
201
+ updatedAt
202
+ }
203
+ }
204
+ `;
205
+ export const GET_DATASINK_DATA = `
206
+ query GetDataSinkData($id: ID, $key: String, $dataPath: String, $forceRefresh: Boolean) {
207
+ getDataSinkData(id: $id, key: $key, dataPath: $dataPath, forceRefresh: $forceRefresh)
208
+ }
209
+ `;
210
+ export const DELETE_DATASINK = `
211
+ mutation DeleteDataSink($id: ID!) {
212
+ deleteDataSink(id: $id)
213
+ }
214
+ `;
215
+ // ---------------------------------------------------------------------------
216
+ // Parsers (workspace gateway)
217
+ // ---------------------------------------------------------------------------
218
+ export const LIST_PARSERS = `
219
+ query ListParsers($first: Int, $after: String, $filter: ParserFilterInput) {
220
+ listParsers(first: $first, after: $after, filter: $filter) {
221
+ edges {
222
+ node {
223
+ id
224
+ name
225
+ description
226
+ type
227
+ status
228
+ inputSinkKey
229
+ outputKey
230
+ outputWidgetId
231
+ ttl
232
+ version
233
+ createdAt
234
+ updatedAt
235
+ }
236
+ }
237
+ pageInfo { hasNextPage endCursor }
238
+ totalCount
239
+ }
240
+ }
241
+ `;
242
+ export const GET_PARSER = `
243
+ query GetParser($id: ID!) {
244
+ parser(id: $id) {
245
+ id
246
+ name
247
+ description
248
+ type
249
+ status
250
+ expression
251
+ inputSinkKey
252
+ outputKey
253
+ outputWidgetId
254
+ ttl
255
+ version
256
+ createdAt
257
+ updatedAt
258
+ }
259
+ }
260
+ `;
261
+ export const DELETE_PARSER = `
262
+ mutation DeleteParser($id: ID!) {
263
+ deleteParser(id: $id)
264
+ }
265
+ `;
266
+ // ---------------------------------------------------------------------------
267
+ // Pipelines (workspace gateway)
268
+ // ---------------------------------------------------------------------------
269
+ export const LIST_PIPELINES = `
270
+ query ListPipelines($first: Int, $after: String, $filter: PipelineFilterInput) {
271
+ listPipelines(first: $first, after: $after, filter: $filter) {
272
+ edges {
273
+ node {
274
+ id
275
+ name
276
+ description
277
+ status
278
+ version
279
+ lastExecutedAt
280
+ createdAt
281
+ updatedAt
282
+ }
283
+ }
284
+ pageInfo { hasNextPage endCursor }
285
+ totalCount
286
+ }
287
+ }
288
+ `;
289
+ export const GET_PIPELINE = `
290
+ query GetPipeline($id: ID!) {
291
+ pipeline(id: $id) {
292
+ id
293
+ name
294
+ description
295
+ status
296
+ version
297
+ lastExecutedAt
298
+ stages {
299
+ id
300
+ position
301
+ inputKey
302
+ outputKey
303
+ enabled
304
+ parserName
305
+ parserType
306
+ }
307
+ createdAt
308
+ updatedAt
309
+ }
310
+ }
311
+ `;
312
+ export const DELETE_PIPELINE = `
313
+ mutation DeletePipeline($id: ID!) {
314
+ deletePipeline(id: $id)
315
+ }
316
+ `;
317
+ // ---------------------------------------------------------------------------
318
+ // Dashboard — create / update / import / export
319
+ // ---------------------------------------------------------------------------
320
+ export const CREATE_DASHBOARD = `
321
+ mutation CreateDashboard($input: BigConsoleCreateDashboardInput!) {
322
+ createBigConsoleDashboard(input: $input) {
323
+ id
324
+ name
325
+ status
326
+ visibility
327
+ category
328
+ createdAt
329
+ }
330
+ }
331
+ `;
332
+ export const UPDATE_DASHBOARD = `
333
+ mutation UpdateDashboard($input: BigConsoleUpdateDashboardInput!) {
334
+ updateBigConsoleDashboard(input: $input) {
335
+ id
336
+ name
337
+ status
338
+ visibility
339
+ category
340
+ updatedAt
341
+ }
342
+ }
343
+ `;
344
+ export const IMPORT_DASHBOARD = `
345
+ mutation ImportDashboard($input: ImportDashboardInput!) {
346
+ importDashboard(input: $input) {
347
+ id
348
+ name
349
+ status
350
+ visibility
351
+ category
352
+ createdAt
353
+ }
354
+ }
355
+ `;
356
+ export const EXPORT_DASHBOARD = `
357
+ query ExportDashboard($id: ID!, $includeComments: Boolean, $options: ExportDashboardOptions) {
358
+ exportDashboard(id: $id, includeComments: $includeComments, options: $options)
359
+ }
360
+ `;
361
+ // ---------------------------------------------------------------------------
362
+ // Widget — create / update
363
+ // ---------------------------------------------------------------------------
364
+ export const CREATE_WIDGET = `
365
+ mutation CreateWidget($input: BigConsoleCreateWidgetInput!) {
366
+ createBigConsoleWidget(input: $input) {
367
+ id
368
+ pageId
369
+ type
370
+ title
371
+ createdAt
372
+ }
373
+ }
374
+ `;
375
+ export const UPDATE_WIDGET = `
376
+ mutation UpdateWidget($input: BigConsoleUpdateWidgetInput!) {
377
+ updateBigConsoleWidget(input: $input) {
378
+ id
379
+ pageId
380
+ type
381
+ title
382
+ updatedAt
383
+ }
384
+ }
385
+ `;
386
+ // ---------------------------------------------------------------------------
387
+ // DataSink — create / update
388
+ // ---------------------------------------------------------------------------
389
+ export const CREATE_DATASINK = `
390
+ mutation CreateDataSink($input: CreateDataSinkInput!) {
391
+ createDataSink(input: $input) {
392
+ id
393
+ name
394
+ key
395
+ status
396
+ setupState
397
+ isActive
398
+ createdAt
399
+ }
400
+ }
401
+ `;
402
+ export const UPDATE_DATASINK = `
403
+ mutation UpdateDataSink($input: UpdateDataSinkInput!) {
404
+ updateDataSink(input: $input) {
405
+ id
406
+ name
407
+ key
408
+ status
409
+ isActive
410
+ updatedAt
411
+ }
412
+ }
413
+ `;
414
+ // ---------------------------------------------------------------------------
415
+ // Parser — create / update
416
+ // ---------------------------------------------------------------------------
417
+ export const CREATE_PARSER = `
418
+ mutation CreateParser($input: CreateParserInput!) {
419
+ createParser(input: $input) {
420
+ id
421
+ name
422
+ type
423
+ status
424
+ inputSinkKey
425
+ outputKey
426
+ version
427
+ createdAt
428
+ }
429
+ }
430
+ `;
431
+ export const UPDATE_PARSER = `
432
+ mutation UpdateParser($id: ID!, $version: Int!, $input: UpdateParserInput!) {
433
+ updateParser(id: $id, version: $version, input: $input) {
434
+ id
435
+ name
436
+ type
437
+ status
438
+ version
439
+ updatedAt
440
+ }
441
+ }
442
+ `;
443
+ // ---------------------------------------------------------------------------
444
+ // Pipeline — create / update
445
+ // ---------------------------------------------------------------------------
446
+ export const CREATE_PIPELINE = `
447
+ mutation CreatePipeline($input: CreatePipelineInput!) {
448
+ createPipeline(input: $input) {
449
+ id
450
+ name
451
+ status
452
+ version
453
+ createdAt
454
+ }
455
+ }
456
+ `;
457
+ export const UPDATE_PIPELINE = `
458
+ mutation UpdatePipeline($id: ID!, $version: Int!, $input: UpdatePipelineInput!) {
459
+ updatePipeline(id: $id, version: $version, input: $input) {
460
+ id
461
+ name
462
+ status
463
+ version
464
+ updatedAt
465
+ }
466
+ }
467
+ `;
468
+ // ---------------------------------------------------------------------------
469
+ // Drilldown — list, get, delete
470
+ // ---------------------------------------------------------------------------
471
+ export const GET_WIDGET_ACTIONS = `
472
+ query GetWidgetActions($widgetId: ID!) {
473
+ getWidgetActions(widgetId: $widgetId) {
474
+ id
475
+ widgetId
476
+ type
477
+ label
478
+ config
479
+ createdAt
480
+ }
481
+ }
482
+ `;
483
+ export const DELETE_WIDGET_DRILLDOWN = `
484
+ mutation DeleteWidgetDrilldown($widgetId: ID!) {
485
+ deleteWidgetDrilldown(widgetId: $widgetId)
486
+ }
487
+ `;
488
+ // ---------------------------------------------------------------------------
489
+ // Share — list, create, delete
490
+ // ---------------------------------------------------------------------------
491
+ export const LIST_DASHBOARD_SHARES = `
492
+ query ListDashboardShares(
493
+ $dashboardId: ID!
494
+ $first: Int
495
+ $after: String
496
+ $isActive: Boolean
497
+ $permission: SharePermission
498
+ $recipientType: ShareRecipientType
499
+ ) {
500
+ listDashboardShares(
501
+ dashboardId: $dashboardId
502
+ first: $first
503
+ after: $after
504
+ isActive: $isActive
505
+ permission: $permission
506
+ recipientType: $recipientType
507
+ ) {
508
+ edges {
509
+ node {
510
+ id
511
+ dashboardId
512
+ permission
513
+ isActive
514
+ expiresAt
515
+ createdAt
516
+ }
517
+ }
518
+ pageInfo { hasNextPage endCursor }
519
+ totalCount
520
+ }
521
+ }
522
+ `;
523
+ // ---------------------------------------------------------------------------
524
+ // Template — list, get, featured
525
+ // ---------------------------------------------------------------------------
526
+ export const LIST_TEMPLATES = `
527
+ query ListTemplates(
528
+ $first: Int
529
+ $after: String
530
+ $category: DashboardCategory
531
+ $search: String
532
+ $isFeatured: Boolean
533
+ ) {
534
+ listTemplates(
535
+ first: $first
536
+ after: $after
537
+ category: $category
538
+ search: $search
539
+ isFeatured: $isFeatured
540
+ ) {
541
+ edges {
542
+ node {
543
+ id
544
+ name
545
+ description
546
+ category
547
+ isFeatured
548
+ status
549
+ createdAt
550
+ }
551
+ }
552
+ pageInfo { hasNextPage endCursor }
553
+ totalCount
554
+ }
555
+ }
556
+ `;
557
+ export const GET_TEMPLATE = `
558
+ query GetTemplate($id: ID!) {
559
+ getTemplate(id: $id) {
560
+ id
561
+ name
562
+ description
563
+ category
564
+ isFeatured
565
+ status
566
+ createdAt
567
+ }
568
+ }
569
+ `;
570
+ // ---------------------------------------------------------------------------
571
+ // Prompt (AI) — generate, list, get, cancel
572
+ // ---------------------------------------------------------------------------
573
+ export const GENERATE_DASHBOARD_FROM_PROMPT = `
574
+ mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
575
+ generateDashboardFromPrompt(input: $input) {
576
+ id
577
+ status
578
+ prompt
579
+ createdAt
580
+ }
581
+ }
582
+ `;
583
+ export const LIST_PROMPT_GENERATIONS = `
584
+ query ListPromptGenerations($first: Int, $after: String, $status: PromptGenerationStatus) {
585
+ listPromptGenerations(first: $first, after: $after, status: $status) {
586
+ edges {
587
+ node {
588
+ id
589
+ status
590
+ prompt
591
+ createdAt
592
+ }
593
+ }
594
+ pageInfo { hasNextPage endCursor }
595
+ totalCount
596
+ }
597
+ }
598
+ `;
599
+ export const GET_PROMPT_GENERATION = `
600
+ query GetPromptGeneration($id: ID!) {
601
+ getPromptGeneration(id: $id) {
602
+ id
603
+ status
604
+ prompt
605
+ createdAt
606
+ }
607
+ }
608
+ `;
609
+ export const CANCEL_PROMPT_GENERATION = `
610
+ mutation CancelPromptGeneration($id: ID!) {
611
+ cancelPromptGeneration(id: $id) {
612
+ id
613
+ status
614
+ }
615
+ }
616
+ `;
617
+ // ---------------------------------------------------------------------------
618
+ // Workflows (workspace gateway — FluidGrids-backed)
619
+ // ---------------------------------------------------------------------------
620
+ export const LIST_WORKFLOWS = `
621
+ query ListWorkflows($filter: FluidGridsWorkflowFilterInput) {
622
+ workflows(filter: $filter) {
623
+ id
624
+ name
625
+ key
626
+ description
627
+ status
628
+ executionCount
629
+ linkedDataSinkCount
630
+ lastExecutedAt
631
+ createdAt
632
+ updatedAt
633
+ }
634
+ }
635
+ `;
636
+ export const GET_WORKFLOW = `
637
+ query GetWorkflow($id: ID!) {
638
+ workflow(id: $id) {
639
+ id
640
+ name
641
+ key
642
+ description
643
+ status
644
+ executionCount
645
+ linkedDataSinkCount
646
+ externalWorkflowId
647
+ lastExecutionId
648
+ lastExecutedAt
649
+ webhookUrl
650
+ createdAt
651
+ updatedAt
652
+ }
653
+ }
654
+ `;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @burdenoff/bigconsole-cli — public API exports.
3
+ */
4
+ export * from './config/index.js';
5
+ export { workspaceRequest, globalRequest, resetClients } from './graphql/client.js';
6
+ export * from './commands/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @burdenoff/bigconsole-cli — public API exports.
3
+ */
4
+ export * from './config/index.js';
5
+ export { workspaceRequest, globalRequest, resetClients } from './graphql/client.js';
6
+ export * from './commands/index.js';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Shared type definitions for the BigConsole CLI.
3
+ *
4
+ * Domain types (Dashboard, Widget, DataSink, Parser, etc.) will land here
5
+ * alongside the corresponding command groups in Phase 1B.
6
+ */
7
+ export interface CommandOptions {
8
+ format?: 'json' | 'table' | 'yaml';
9
+ verbose?: boolean;
10
+ }
11
+ export interface GraphQLResponse<T> {
12
+ data?: T;
13
+ errors?: Array<{
14
+ message: string;
15
+ extensions?: Record<string, unknown>;
16
+ }>;
17
+ }
18
+ export interface PageInfo {
19
+ hasNextPage: boolean;
20
+ endCursor: string | null;
21
+ }
22
+ export interface Edge<T> {
23
+ node: T;
24
+ cursor: string;
25
+ }
26
+ export interface Connection<T> {
27
+ edges: Edge<T>[];
28
+ pageInfo: PageInfo;
29
+ totalCount: number;
30
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared type definitions for the BigConsole CLI.
3
+ *
4
+ * Domain types (Dashboard, Widget, DataSink, Parser, etc.) will land here
5
+ * alongside the corresponding command groups in Phase 1B.
6
+ */
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from './output.js';
@@ -0,0 +1 @@
1
+ export * from './output.js';