@burdenoff/cli-sdk 2026.1107.3 → 2026.1107.5
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/dist/{chunk-AQ5I53SK.js → chunk-2OISIPE6.js} +6 -4
- package/dist/chunk-N5KCAJXG.js +307 -0
- package/dist/{chunk-AQE5ZDEN.js → chunk-VL67DTWH.js} +1 -1
- package/dist/core/index.cjs +7 -5
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +7 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-DOIiVaXQ.d.cts → module-BwJmqefL.d.cts} +1 -0
- package/dist/{module-DOIiVaXQ.d.ts → module-BwJmqefL.d.ts} +1 -0
- package/dist/modules/adaptercloud/index.cjs +2 -2
- package/dist/modules/adaptercloud/index.d.cts +1 -1
- package/dist/modules/adaptercloud/index.d.ts +1 -1
- package/dist/modules/adaptercloud/index.js +1 -1
- package/dist/modules/artistrybase/index.d.cts +1 -1
- package/dist/modules/artistrybase/index.d.ts +1 -1
- package/dist/modules/artistrybase/index.js +1 -1
- package/dist/modules/assethandler/index.cjs +3 -3
- package/dist/modules/assethandler/index.d.cts +1 -1
- package/dist/modules/assethandler/index.d.ts +1 -1
- package/dist/modules/assethandler/index.js +1 -1
- package/dist/modules/atheletebridge/index.d.cts +1 -1
- package/dist/modules/atheletebridge/index.d.ts +1 -1
- package/dist/modules/atheletebridge/index.js +1 -1
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/auth/index.js +1 -1
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/brainyrich/index.d.cts +1 -1
- package/dist/modules/brainyrich/index.d.ts +1 -1
- package/dist/modules/brainyrich/index.js +1 -1
- package/dist/modules/buildmyiq/index.d.cts +1 -1
- package/dist/modules/buildmyiq/index.d.ts +1 -1
- package/dist/modules/buildmyiq/index.js +1 -1
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/collabkin/index.d.cts +1 -1
- package/dist/modules/collabkin/index.d.ts +1 -1
- package/dist/modules/collabkin/index.js +1 -1
- package/dist/modules/comradecircle/index.cjs +3 -3
- package/dist/modules/comradecircle/index.d.cts +1 -1
- package/dist/modules/comradecircle/index.d.ts +1 -1
- package/dist/modules/comradecircle/index.js +1 -1
- package/dist/modules/conversations/index.cjs +3 -3
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +1 -1
- package/dist/modules/coolandlovely/index.cjs +3 -3
- package/dist/modules/coolandlovely/index.d.cts +1 -1
- package/dist/modules/coolandlovely/index.d.ts +1 -1
- package/dist/modules/coolandlovely/index.js +1 -1
- package/dist/modules/cosmicintersection/index.cjs +2 -2
- package/dist/modules/cosmicintersection/index.d.cts +1 -1
- package/dist/modules/cosmicintersection/index.d.ts +1 -1
- package/dist/modules/cosmicintersection/index.js +1 -1
- package/dist/modules/crewfoundry/index.cjs +10 -10
- package/dist/modules/crewfoundry/index.d.cts +1 -1
- package/dist/modules/crewfoundry/index.d.ts +1 -1
- package/dist/modules/crewfoundry/index.js +1 -1
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/ecoimpacthub/index.cjs +3 -3
- package/dist/modules/ecoimpacthub/index.d.cts +1 -1
- package/dist/modules/ecoimpacthub/index.d.ts +1 -1
- package/dist/modules/ecoimpacthub/index.js +1 -1
- package/dist/modules/eventfullymanaged/index.d.cts +1 -1
- package/dist/modules/eventfullymanaged/index.d.ts +1 -1
- package/dist/modules/eventfullymanaged/index.js +1 -1
- package/dist/modules/export/index.cjs +3 -3
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/files/index.cjs +2 -2
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/fluidgrids/index.d.cts +1 -1
- package/dist/modules/fluidgrids/index.d.ts +1 -1
- package/dist/modules/fluidgrids/index.js +1 -1
- package/dist/modules/ggnomad/index.cjs +1 -1
- package/dist/modules/ggnomad/index.d.cts +1 -1
- package/dist/modules/ggnomad/index.d.ts +1 -1
- package/dist/modules/ggnomad/index.js +1 -1
- package/dist/modules/govcitizenhub/index.cjs +3 -3
- package/dist/modules/govcitizenhub/index.d.cts +1 -1
- package/dist/modules/govcitizenhub/index.d.ts +1 -1
- package/dist/modules/govcitizenhub/index.js +1 -1
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/headshotmarketing/index.cjs +232 -144
- package/dist/modules/headshotmarketing/index.d.cts +1 -1
- package/dist/modules/headshotmarketing/index.d.ts +1 -1
- package/dist/modules/headshotmarketing/index.js +229 -141
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.d.cts +1 -1
- package/dist/modules/hookmovies/index.d.ts +1 -1
- package/dist/modules/hookmovies/index.js +1 -1
- package/dist/modules/housingvista/index.d.cts +1 -1
- package/dist/modules/housingvista/index.d.ts +1 -1
- package/dist/modules/housingvista/index.js +1 -1
- package/dist/modules/integrations/index.cjs +2 -2
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +1 -1
- package/dist/modules/intelwatchtower/index.cjs +5 -5
- package/dist/modules/intelwatchtower/index.d.cts +1 -1
- package/dist/modules/intelwatchtower/index.d.ts +1 -1
- package/dist/modules/intelwatchtower/index.js +1 -1
- package/dist/modules/kadaikodi/index.d.cts +1 -1
- package/dist/modules/kadaikodi/index.d.ts +1 -1
- package/dist/modules/kadaikodi/index.js +1 -1
- package/dist/modules/labsofscience/index.d.cts +1 -1
- package/dist/modules/labsofscience/index.d.ts +1 -1
- package/dist/modules/labsofscience/index.js +1 -1
- package/dist/modules/manufacturedops/index.d.cts +1 -1
- package/dist/modules/manufacturedops/index.d.ts +1 -1
- package/dist/modules/manufacturedops/index.js +1 -1
- package/dist/modules/movethewheels/index.cjs +122 -66
- package/dist/modules/movethewheels/index.d.cts +1 -1
- package/dist/modules/movethewheels/index.d.ts +1 -1
- package/dist/modules/movethewheels/index.js +123 -67
- package/dist/modules/mybodyshield/index.d.cts +1 -1
- package/dist/modules/mybodyshield/index.d.ts +1 -1
- package/dist/modules/mybodyshield/index.js +1 -1
- package/dist/modules/notifications/index.cjs +1 -1
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +3 -3
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/planmagnet/index.d.cts +1 -1
- package/dist/modules/planmagnet/index.d.ts +1 -1
- package/dist/modules/planmagnet/index.js +1 -1
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/proserviceworld/index.d.cts +1 -1
- package/dist/modules/proserviceworld/index.d.ts +1 -1
- package/dist/modules/proserviceworld/index.js +1 -1
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +2 -2
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +1 -1
- package/dist/modules/security/index.cjs +1 -1
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/semanticfed/index.cjs +61 -41
- package/dist/modules/semanticfed/index.d.cts +1 -1
- package/dist/modules/semanticfed/index.d.ts +1 -1
- package/dist/modules/semanticfed/index.js +1 -287
- package/dist/modules/semanticfed-sql/index.cjs +21 -0
- package/dist/modules/semanticfed-sql/index.d.cts +7 -0
- package/dist/modules/semanticfed-sql/index.d.ts +7 -0
- package/dist/modules/semanticfed-sql/index.js +1 -0
- package/dist/modules/store/index.cjs +2 -2
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/subscriberbot/index.d.cts +1 -1
- package/dist/modules/subscriberbot/index.d.ts +1 -1
- package/dist/modules/subscriberbot/index.js +1 -1
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/tags/index.cjs +2 -2
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/technospam/index.cjs +2 -2
- package/dist/modules/technospam/index.d.cts +1 -1
- package/dist/modules/technospam/index.d.ts +1 -1
- package/dist/modules/technospam/index.js +1 -1
- package/dist/modules/theculturepost/index.d.cts +1 -1
- package/dist/modules/theculturepost/index.d.ts +1 -1
- package/dist/modules/theculturepost/index.js +1 -1
- package/dist/modules/theglobalfuel/index.d.cts +1 -1
- package/dist/modules/theglobalfuel/index.d.ts +1 -1
- package/dist/modules/theglobalfuel/index.js +1 -1
- package/dist/modules/timecampus/index.d.cts +1 -1
- package/dist/modules/timecampus/index.d.ts +1 -1
- package/dist/modules/timecampus/index.js +1 -1
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +1 -1
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,287 +1 @@
|
|
|
1
|
-
import {a,b as b$1,i,r,h as h$1,k as k$1,d}from'../../chunk-AQE5ZDEN.js';import {o}from'../../chunk-AQ5I53SK.js';var h=`
|
|
2
|
-
query SemConnector($id: ID!) {
|
|
3
|
-
semConnector(id: $id) {
|
|
4
|
-
id name kind description isActive capabilities
|
|
5
|
-
dataSources { id name status }
|
|
6
|
-
createdAt updatedAt workspaceId
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
`,A=`
|
|
10
|
-
query SemListConnectors($kind: SemConnectorKind, $pagination: PaginationInput) {
|
|
11
|
-
semListConnectors(kind: $kind, pagination: $pagination) {
|
|
12
|
-
items {
|
|
13
|
-
id name kind description isActive capabilities createdAt updatedAt workspaceId
|
|
14
|
-
}
|
|
15
|
-
pageInfo { cursor hasMore }
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`,D=`
|
|
19
|
-
mutation SemCreateConnector($input: SemCreateConnectorInput!) {
|
|
20
|
-
semCreateConnector(input: $input) {
|
|
21
|
-
id name kind description isActive capabilities createdAt updatedAt workspaceId
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
`,w=`
|
|
25
|
-
mutation SemUpdateConnector($id: ID!, $input: SemUpdateConnectorInput!) {
|
|
26
|
-
semUpdateConnector(id: $id, input: $input) {
|
|
27
|
-
id name kind description isActive capabilities updatedAt workspaceId
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
`,R=`
|
|
31
|
-
mutation SemArchiveConnector($id: ID!) {
|
|
32
|
-
semArchiveConnector(id: $id)
|
|
33
|
-
}
|
|
34
|
-
`,M=`
|
|
35
|
-
query SemDataSource($id: ID!) {
|
|
36
|
-
semDataSource(id: $id) {
|
|
37
|
-
id connectorId name description endpoint pushdownEnabled secretRef
|
|
38
|
-
status tags lastIntrospectedAt
|
|
39
|
-
connector { id name kind }
|
|
40
|
-
createdAt updatedAt workspaceId
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
`,O=`
|
|
44
|
-
query SemListDataSources(
|
|
45
|
-
$connectorId: ID
|
|
46
|
-
$status: SemDataSourceStatus
|
|
47
|
-
$pagination: PaginationInput
|
|
48
|
-
) {
|
|
49
|
-
semListDataSources(connectorId: $connectorId, status: $status, pagination: $pagination) {
|
|
50
|
-
items {
|
|
51
|
-
id connectorId name description pushdownEnabled secretRef status tags
|
|
52
|
-
lastIntrospectedAt createdAt updatedAt workspaceId
|
|
53
|
-
}
|
|
54
|
-
pageInfo { cursor hasMore }
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
`,T=`
|
|
58
|
-
mutation SemCreateDataSource($input: SemCreateDataSourceInput!) {
|
|
59
|
-
semCreateDataSource(input: $input) {
|
|
60
|
-
id connectorId name description endpoint pushdownEnabled secretRef
|
|
61
|
-
status tags createdAt updatedAt workspaceId
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
`,_=`
|
|
65
|
-
mutation SemUpdateDataSource($id: ID!, $input: SemUpdateDataSourceInput!) {
|
|
66
|
-
semUpdateDataSource(id: $id, input: $input) {
|
|
67
|
-
id connectorId name description endpoint pushdownEnabled secretRef
|
|
68
|
-
status tags updatedAt workspaceId
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
`,b=`
|
|
72
|
-
mutation SemArchiveDataSource($id: ID!) {
|
|
73
|
-
semArchiveDataSource(id: $id)
|
|
74
|
-
}
|
|
75
|
-
`,k=`
|
|
76
|
-
mutation SemTransitionDataSource($id: ID!, $status: SemDataSourceStatus!) {
|
|
77
|
-
semTransitionDataSource(id: $id, status: $status) {
|
|
78
|
-
id name status updatedAt workspaceId
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
`,$=`
|
|
82
|
-
query SemListConnections($dataSourceId: ID!) {
|
|
83
|
-
semListConnections(dataSourceId: $dataSourceId) {
|
|
84
|
-
id dataSourceId health latencyMs message probedAt createdAt updatedAt workspaceId
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
`,N=`
|
|
88
|
-
mutation SemRecordConnection($input: SemRecordConnectionInput!) {
|
|
89
|
-
semRecordConnection(input: $input) {
|
|
90
|
-
id dataSourceId health latencyMs message probedAt createdAt updatedAt workspaceId
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
`,L=`
|
|
94
|
-
query SemModel($id: ID!) {
|
|
95
|
-
semModel(id: $id) {
|
|
96
|
-
id name description status version tags publishedAt
|
|
97
|
-
entities { id name kind }
|
|
98
|
-
relationships { id name kind }
|
|
99
|
-
createdAt updatedAt workspaceId
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
`,v=`
|
|
103
|
-
query SemListModels($status: SemModelStatus, $pagination: PaginationInput) {
|
|
104
|
-
semListModels(status: $status, pagination: $pagination) {
|
|
105
|
-
items {
|
|
106
|
-
id name description status version tags publishedAt createdAt updatedAt workspaceId
|
|
107
|
-
}
|
|
108
|
-
pageInfo { cursor hasMore }
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
`,U=`
|
|
112
|
-
mutation SemCreateModel($input: SemCreateModelInput!) {
|
|
113
|
-
semCreateModel(input: $input) {
|
|
114
|
-
id name description status version tags createdAt updatedAt workspaceId
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
`,q=`
|
|
118
|
-
mutation SemUpdateModel($id: ID!, $input: SemUpdateModelInput!) {
|
|
119
|
-
semUpdateModel(id: $id, input: $input) {
|
|
120
|
-
id name description status version tags updatedAt workspaceId
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
`,P=`
|
|
124
|
-
mutation SemArchiveModel($id: ID!) {
|
|
125
|
-
semArchiveModel(id: $id)
|
|
126
|
-
}
|
|
127
|
-
`,Q=`
|
|
128
|
-
mutation SemPublishModel($id: ID!) {
|
|
129
|
-
semPublishModel(id: $id) {
|
|
130
|
-
id name status version publishedAt updatedAt workspaceId
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
`,x=`
|
|
134
|
-
query SemEntity($id: ID!) {
|
|
135
|
-
semEntity(id: $id) {
|
|
136
|
-
id modelId dataSourceId name kind physicalName primaryKey sqlDefinition description
|
|
137
|
-
dimensions { id name dataType isPrimary }
|
|
138
|
-
metrics { id name aggregation }
|
|
139
|
-
createdAt updatedAt workspaceId
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
`,F=`
|
|
143
|
-
query SemListEntities($modelId: ID!) {
|
|
144
|
-
semListEntities(modelId: $modelId) {
|
|
145
|
-
id modelId dataSourceId name kind physicalName primaryKey sqlDefinition
|
|
146
|
-
description createdAt updatedAt workspaceId
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
`,H=`
|
|
150
|
-
mutation SemCreateEntity($input: SemCreateEntityInput!) {
|
|
151
|
-
semCreateEntity(input: $input) {
|
|
152
|
-
id modelId dataSourceId name kind physicalName primaryKey sqlDefinition
|
|
153
|
-
description createdAt updatedAt workspaceId
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
`,Y=`
|
|
157
|
-
mutation SemUpdateEntity($id: ID!, $input: SemUpdateEntityInput!) {
|
|
158
|
-
semUpdateEntity(id: $id, input: $input) {
|
|
159
|
-
id modelId dataSourceId name kind physicalName primaryKey sqlDefinition
|
|
160
|
-
description updatedAt workspaceId
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
`,B=`
|
|
164
|
-
mutation SemDeleteEntity($id: ID!) {
|
|
165
|
-
semDeleteEntity(id: $id)
|
|
166
|
-
}
|
|
167
|
-
`,K=`
|
|
168
|
-
mutation SemCreateDimension($input: SemCreateDimensionInput!) {
|
|
169
|
-
semCreateDimension(input: $input) {
|
|
170
|
-
id entityId name dataType expression isPrimary description
|
|
171
|
-
createdAt updatedAt workspaceId
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
`,W=`
|
|
175
|
-
mutation SemCreateMetric($input: SemCreateMetricInput!) {
|
|
176
|
-
semCreateMetric(input: $input) {
|
|
177
|
-
id entityId name aggregation expression format description
|
|
178
|
-
createdAt updatedAt workspaceId
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
`,G=`
|
|
182
|
-
query SemListRelationships($modelId: ID!) {
|
|
183
|
-
semListRelationships(modelId: $modelId) {
|
|
184
|
-
id modelId name kind fromEntityId fromField toEntityId toField description
|
|
185
|
-
createdAt updatedAt workspaceId
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
`,V=`
|
|
189
|
-
mutation SemCreateRelationship($input: SemCreateRelationshipInput!) {
|
|
190
|
-
semCreateRelationship(input: $input) {
|
|
191
|
-
id modelId name kind fromEntityId fromField toEntityId toField description
|
|
192
|
-
createdAt updatedAt workspaceId
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
`,j=`
|
|
196
|
-
query SemQuery($id: ID!) {
|
|
197
|
-
semQuery(id: $id) {
|
|
198
|
-
id modelId name description queryText parameters cacheable cacheTtlSeconds
|
|
199
|
-
status tags
|
|
200
|
-
runs { id status startedAt finishedAt rowCount }
|
|
201
|
-
createdAt updatedAt workspaceId
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
`,J=`
|
|
205
|
-
query SemListQueries(
|
|
206
|
-
$modelId: ID
|
|
207
|
-
$status: SemQueryStatus
|
|
208
|
-
$pagination: PaginationInput
|
|
209
|
-
) {
|
|
210
|
-
semListQueries(modelId: $modelId, status: $status, pagination: $pagination) {
|
|
211
|
-
items {
|
|
212
|
-
id modelId name description queryText cacheable cacheTtlSeconds status tags
|
|
213
|
-
createdAt updatedAt workspaceId
|
|
214
|
-
}
|
|
215
|
-
pageInfo { cursor hasMore }
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
`,z=`
|
|
219
|
-
mutation SemCreateQuery($input: SemCreateQueryInput!) {
|
|
220
|
-
semCreateQuery(input: $input) {
|
|
221
|
-
id modelId name description queryText parameters cacheable cacheTtlSeconds
|
|
222
|
-
status tags createdAt updatedAt workspaceId
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
`,X=`
|
|
226
|
-
mutation SemUpdateQuery($id: ID!, $input: SemUpdateQueryInput!) {
|
|
227
|
-
semUpdateQuery(id: $id, input: $input) {
|
|
228
|
-
id modelId name description queryText parameters cacheable cacheTtlSeconds
|
|
229
|
-
status tags updatedAt workspaceId
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
`,Z=`
|
|
233
|
-
mutation SemArchiveQuery($id: ID!) {
|
|
234
|
-
semArchiveQuery(id: $id)
|
|
235
|
-
}
|
|
236
|
-
`,tt=`
|
|
237
|
-
mutation SemPublishQuery($id: ID!) {
|
|
238
|
-
semPublishQuery(id: $id) {
|
|
239
|
-
id name status updatedAt workspaceId
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
`,et=`
|
|
243
|
-
mutation SemRunQuery($id: ID!) {
|
|
244
|
-
semRunQuery(id: $id) {
|
|
245
|
-
id queryId status startedAt finishedAt durationMs rowCount sourcesTouched
|
|
246
|
-
fromCache errorMessage createdAt updatedAt workspaceId
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
`,nt=`
|
|
250
|
-
query SemListQueryRuns(
|
|
251
|
-
$queryId: ID!
|
|
252
|
-
$status: SemQueryRunStatus
|
|
253
|
-
$pagination: PaginationInput
|
|
254
|
-
) {
|
|
255
|
-
semListQueryRuns(queryId: $queryId, status: $status, pagination: $pagination) {
|
|
256
|
-
items {
|
|
257
|
-
id queryId status startedAt finishedAt durationMs rowCount sourcesTouched
|
|
258
|
-
fromCache errorMessage runById createdAt updatedAt workspaceId
|
|
259
|
-
}
|
|
260
|
-
pageInfo { cursor hasMore }
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
`,it=`
|
|
264
|
-
query SemListAccessPolicies($entityId: ID, $modelId: ID) {
|
|
265
|
-
semListAccessPolicies(entityId: $entityId, modelId: $modelId) {
|
|
266
|
-
id name description principal effect scope entityId modelId rule isActive
|
|
267
|
-
createdAt updatedAt workspaceId
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
`,ot=`
|
|
271
|
-
mutation SemCreateAccessPolicy($input: SemCreateAccessPolicyInput!) {
|
|
272
|
-
semCreateAccessPolicy(input: $input) {
|
|
273
|
-
id name description principal effect scope entityId modelId rule isActive
|
|
274
|
-
createdAt updatedAt workspaceId
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
`,rt=`
|
|
278
|
-
mutation SemSetAccessPolicyActive($id: ID!, $isActive: Boolean!) {
|
|
279
|
-
semSetAccessPolicyActive(id: $id, isActive: $isActive) {
|
|
280
|
-
id name isActive updatedAt workspaceId
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
`,at=`
|
|
284
|
-
query SemHealth {
|
|
285
|
-
semHealth
|
|
286
|
-
}
|
|
287
|
-
`;function g(d,i){try{return JSON.parse(i)}catch{throw new o(`--${d} must be valid JSON`)}}function u(d){let i=Number.parseInt(d,10);if(Number.isNaN(i))throw new o(`Expected an integer but got "${d}"`);return i}function E(d){return d.split(",").map(i=>i.trim()).filter(i=>i.length>0)}function S(d){let i={};return d.limit!==void 0&&(i.limit=d.limit),d.offset!==void 0&&(i.offset=d.offset),d.cursor&&(i.cursor=d.cursor),Object.keys(i).length?i:void 0}function st(d){let i$1=d.command("connectors").description("SemanticFed connectors (database/warehouse/API drivers)");i$1.command("list").description("List connectors").option("--kind <k>","Filter by connector kind (e.g. POSTGRES, BIGQUERY)").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b$1(A,{kind:t.kind?t.kind.toUpperCase():void 0,pagination:S(t)})).semListConnectors.items;i(t,n,{headers:["ID","Name","Kind","Active","Description"],rows:n.map(a=>[r(a.id,12),a.name,a.kind,a.isActive?"yes":"no",r(a.description??"",32)])});}catch(e){h$1(e);}}),i$1.command("get").description("Get a connector by id").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(h,{id:t});if(!n.semConnector)throw new o(`Connector ${t} not found`);i(e,n.semConnector);}catch(n){h$1(n);}}),i$1.command("create").description("Create a connector").requiredOption("--name <name>","Connector name").option("--kind <k>","Connector kind (e.g. POSTGRES, BIGQUERY)","POSTGRES").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,kind:(t.kind??"POSTGRES").toUpperCase()};t.description&&(e.description=t.description),t.capabilities&&(e.capabilities=g("capabilities",t.capabilities));let n=await b$1(D,{input:e});k$1(`Connector created: ${n.semCreateConnector.name}`),i(t,n.semCreateConnector);}catch(e){h$1(e);}}),i$1.command("update").description("Update a connector").argument("<id>","Connector ID").option("--name <name>","Connector name").option("--kind <k>","Connector kind").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("--active <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.kind&&(n.kind=e.kind.toUpperCase()),e.description!==void 0&&(n.description=e.description),e.capabilities&&(n.capabilities=g("capabilities",e.capabilities)),e.active!==void 0&&(n.isActive=e.active),!Object.keys(n).length)throw new o("No updates specified");let a=await b$1(w,{id:t,input:n});k$1("Connector updated"),i(e,a.semUpdateConnector);}catch(n){h$1(n);}}),i$1.command("archive").description("Archive a connector").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(R,{id:t});if(!n.semArchiveConnector)throw new o(`Connector ${t} could not be archived`);k$1(`Connector ${t} archived`),i(e,{archived:n.semArchiveConnector});}catch(n){h$1(n);}});}function ct(d){let i$1=d.command("data-sources").description("SemanticFed data sources (federated query targets)");i$1.command("list").description("List data sources").option("--connector <id>","Filter by connector ID").option("--status <s>","Filter by data source status").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b$1(O,{connectorId:t.connector,status:t.status?t.status.toUpperCase():void 0,pagination:S(t)})).semListDataSources.items;i(t,n,{headers:["ID","Name","Connector","Status","Pushdown"],rows:n.map(a=>[r(a.id,12),a.name,r(a.connectorId,12),a.status,a.pushdownEnabled?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("get").description("Get a data source by id").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(M,{id:t});if(!n.semDataSource)throw new o(`Data source ${t} not found`);i(e,n.semDataSource);}catch(n){h$1(n);}}),i$1.command("create").description("Create a data source").requiredOption("--connector <id>","Connector ID").requiredOption("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON (host/db/url/\u2026)").option("--secret-ref <ref>","Secret reference (Key Vault key)").option("--pushdown <bool>","Enable predicate pushdown true|false",t=>t==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={connectorId:t.connector,name:t.name};t.description&&(e.description=t.description),t.endpoint&&(e.endpoint=g("endpoint",t.endpoint)),t.secretRef&&(e.secretRef=t.secretRef),t.pushdown!==void 0&&(e.pushdownEnabled=t.pushdown),t.tags&&(e.tags=E(t.tags));let n=await b$1(T,{input:e});k$1(`Data source created: ${n.semCreateDataSource.name}`),i(t,n.semCreateDataSource);}catch(e){h$1(e);}}),i$1.command("update").description("Update a data source").argument("<id>","Data source ID").option("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON").option("--secret-ref <ref>","Secret reference").option("--pushdown <bool>","Enable predicate pushdown true|false",t=>t==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.endpoint&&(n.endpoint=g("endpoint",e.endpoint)),e.secretRef&&(n.secretRef=e.secretRef),e.pushdown!==void 0&&(n.pushdownEnabled=e.pushdown),e.tags&&(n.tags=E(e.tags)),!Object.keys(n).length)throw new o("No updates specified");let a=await b$1(_,{id:t,input:n});k$1("Data source updated"),i(e,a.semUpdateDataSource);}catch(n){h$1(n);}}),i$1.command("archive").description("Archive a data source").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(b,{id:t});if(!n.semArchiveDataSource)throw new o(`Data source ${t} could not be archived`);k$1(`Data source ${t} archived`),i(e,{archived:n.semArchiveDataSource});}catch(n){h$1(n);}}),i$1.command("transition").description("Move a data source through its connectivity lifecycle").argument("<id>","Data source ID").requiredOption("--status <s>","DRAFT|CONNECTED|DEGRADED|DISCONNECTED|DISABLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(k,{id:t,status:e.status.toUpperCase()});k$1(`Data source status set to ${n.semTransitionDataSource.status}`),i(e,n.semTransitionDataSource);}catch(n){h$1(n);}}),i$1.command("connections").description("List connection health probes for a data source").argument("<dataSourceId>","Data source ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1($,{dataSourceId:t});i(e,n.semListConnections,{headers:["ID","Health","Latency (ms)","Probed At","Message"],rows:n.semListConnections.map(a=>[r(a.id,12),a.health,a.latencyMs!=null?String(a.latencyMs):"-",a.probedAt,r(a.message??"",32)])});}catch(n){h$1(n);}}),i$1.command("record-connection").description("Record a connection health probe for a data source").requiredOption("--data-source <id>","Data source ID").requiredOption("--health <h>","HEALTHY|DEGRADED|UNREACHABLE|UNKNOWN").option("--latency-ms <n>","Latency in milliseconds",u).option("--message <s>","Probe message").option("-f, --format <format>","Output format").action(async t=>{try{let e={dataSourceId:t.dataSource,health:t.health.toUpperCase()};t.latencyMs!==void 0&&(e.latencyMs=t.latencyMs),t.message&&(e.message=t.message);let n=await b$1(N,{input:e});k$1(`Connection recorded: ${n.semRecordConnection.health}`),i(t,n.semRecordConnection);}catch(e){h$1(e);}});}function dt(d){let i$1=d.command("models").description("SemanticFed semantic models (versioned entity/metric graphs)");i$1.command("list").description("List semantic models").option("--status <s>","Filter by model status (DRAFT|PUBLISHED|DEPRECATED|ARCHIVED)").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b$1(v,{status:t.status?t.status.toUpperCase():void 0,pagination:S(t)})).semListModels.items;i(t,n,{headers:["ID","Name","Status","Version","Description"],rows:n.map(a=>[r(a.id,12),a.name,a.status,String(a.version),r(a.description??"",32)])});}catch(e){h$1(e);}}),i$1.command("get").description("Get a semantic model by id").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(L,{id:t});if(!n.semModel)throw new o(`Model ${t} not found`);i(e,n.semModel);}catch(n){h$1(n);}}),i$1.command("create").description("Create a semantic model").requiredOption("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.description&&(e.description=t.description),t.tags&&(e.tags=E(t.tags));let n=await b$1(U,{input:e});k$1(`Model created: ${n.semCreateModel.name}`),i(t,n.semCreateModel);}catch(e){h$1(e);}}),i$1.command("update").description("Update a semantic model").argument("<id>","Model ID").option("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.tags&&(n.tags=E(e.tags)),!Object.keys(n).length)throw new o("No updates specified");let a=await b$1(q,{id:t,input:n});k$1("Model updated"),i(e,a.semUpdateModel);}catch(n){h$1(n);}}),i$1.command("archive").description("Archive a semantic model").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(P,{id:t});if(!n.semArchiveModel)throw new o(`Model ${t} could not be archived`);k$1(`Model ${t} archived`),i(e,{archived:n.semArchiveModel});}catch(n){h$1(n);}}),i$1.command("publish").description("Publish a draft model (bumps version, flips status to PUBLISHED)").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(Q,{id:t});k$1(`Model published (v${n.semPublishModel.version})`),i(e,n.semPublishModel);}catch(n){h$1(n);}});}function mt(d){let i$1=d.command("entities").description("SemanticFed entities (tables/views/derived datasets in a model)");i$1.command("list").description("List entities in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(F,{modelId:t.model});i(t,e.semListEntities,{headers:["ID","Name","Kind","Physical Name","Primary Key"],rows:e.semListEntities.map(n=>[r(n.id,12),n.name,n.kind,n.physicalName??"-",n.primaryKey??"-"])});}catch(e){h$1(e);}}),i$1.command("get").description("Get an entity by id").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(x,{id:t});if(!n.semEntity)throw new o(`Entity ${t} not found`);i(e,n.semEntity);}catch(n){h$1(n);}}),i$1.command("create").description("Create an entity").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL","TABLE").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition (for derived entities)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={modelId:t.model,name:t.name,kind:(t.kind??"TABLE").toUpperCase()};t.dataSource&&(e.dataSourceId=t.dataSource),t.physicalName&&(e.physicalName=t.physicalName),t.primaryKey&&(e.primaryKey=t.primaryKey),t.sqlDefinition&&(e.sqlDefinition=t.sqlDefinition),t.description&&(e.description=t.description);let n=await b$1(H,{input:e});k$1(`Entity created: ${n.semCreateEntity.name}`),i(t,n.semCreateEntity);}catch(e){h$1(e);}}),i$1.command("update").description("Update an entity").argument("<id>","Entity ID").option("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.kind&&(n.kind=e.kind.toUpperCase()),e.dataSource&&(n.dataSourceId=e.dataSource),e.physicalName&&(n.physicalName=e.physicalName),e.primaryKey&&(n.primaryKey=e.primaryKey),e.sqlDefinition&&(n.sqlDefinition=e.sqlDefinition),e.description!==void 0&&(n.description=e.description),!Object.keys(n).length)throw new o("No updates specified");let a=await b$1(Y,{id:t,input:n});k$1("Entity updated"),i(e,a.semUpdateEntity);}catch(n){h$1(n);}}),i$1.command("delete").description("Delete an entity").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(B,{id:t});if(!n.semDeleteEntity)throw new o(`Entity ${t} could not be deleted`);k$1(`Entity ${t} deleted`),i(e,{deleted:n.semDeleteEntity});}catch(n){h$1(n);}});}function pt(d){d.command("dimensions").description("SemanticFed dimensions (queryable attributes on an entity)").command("create").description("Create a dimension").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Dimension name").option("--data-type <t>","STRING|INTEGER|DECIMAL|BOOLEAN|DATE|TIMESTAMP|JSON|GEO","STRING").option("--expression <e>","SQL expression").option("--primary","Mark as primary dimension").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={entityId:t.entity,name:t.name,dataType:(t.dataType??"STRING").toUpperCase()};t.expression&&(e.expression=t.expression),t.primary&&(e.isPrimary=!0),t.description&&(e.description=t.description);let n=await b$1(K,{input:e});k$1(`Dimension created: ${n.semCreateDimension.name}`),i(t,n.semCreateDimension);}catch(e){h$1(e);}});}function ut(d){d.command("metrics").description("SemanticFed metrics (aggregated measures on an entity)").command("create").description("Create a metric").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Metric name").option("--aggregation <a>","SUM|AVG|MIN|MAX|COUNT|COUNT_DISTINCT|MEDIAN|CUSTOM","SUM").option("--expression <e>","SQL expression").option("--format-spec <f>","Display format (e.g. currency, percent)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={entityId:t.entity,name:t.name,aggregation:(t.aggregation??"SUM").toUpperCase()};t.expression&&(e.expression=t.expression),t.formatSpec&&(e.format=t.formatSpec),t.description&&(e.description=t.description);let n=await b$1(W,{input:e});k$1(`Metric created: ${n.semCreateMetric.name}`),i(t,n.semCreateMetric);}catch(e){h$1(e);}});}function lt(d){let i$1=d.command("relationships").description("SemanticFed relationships (joins between entities in a model)");i$1.command("list").description("List relationships in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(G,{modelId:t.model});i(t,e.semListRelationships,{headers:["ID","Name","Kind","From","To"],rows:e.semListRelationships.map(n=>[r(n.id,12),n.name,n.kind,`${r(n.fromEntityId,8)}.${n.fromField}`,`${r(n.toEntityId,8)}.${n.toField}`])});}catch(e){h$1(e);}}),i$1.command("create").description("Create a relationship").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Relationship name").requiredOption("--from-entity <id>","From entity ID").requiredOption("--from-field <f>","From field").requiredOption("--to-entity <id>","To entity ID").requiredOption("--to-field <f>","To field").option("--kind <k>","ONE_TO_ONE|ONE_TO_MANY|MANY_TO_ONE|MANY_TO_MANY","MANY_TO_ONE").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={modelId:t.model,name:t.name,fromEntityId:t.fromEntity,fromField:t.fromField,toEntityId:t.toEntity,toField:t.toField,kind:(t.kind??"MANY_TO_ONE").toUpperCase()};t.description&&(e.description=t.description);let n=await b$1(V,{input:e});k$1(`Relationship created: ${n.semCreateRelationship.name}`),i(t,n.semCreateRelationship);}catch(e){h$1(e);}});}function ft(d){let i$1=d.command("queries").description("SemanticFed saved federated queries & run history");i$1.command("list").description("List saved queries").option("--model <id>","Filter by model ID").option("--status <s>","Filter by query status (DRAFT|PUBLISHED|ARCHIVED)").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b$1(J,{modelId:t.model,status:t.status?t.status.toUpperCase():void 0,pagination:S(t)})).semListQueries.items;i(t,n,{headers:["ID","Name","Status","Model","Cacheable"],rows:n.map(a=>[r(a.id,12),a.name,a.status,a.modelId?r(a.modelId,12):"-",a.cacheable?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("get").description("Get a saved query by id").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(j,{id:t});if(!n.semQuery)throw new o(`Query ${t} not found`);i(e,n.semQuery);}catch(n){h$1(n);}}),i$1.command("create").description("Create a saved query").requiredOption("--name <name>","Query name").requiredOption("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",t=>t==="true").option("--cache-ttl <n>","Cache TTL seconds",u).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,queryText:t.queryText};t.model&&(e.modelId=t.model),t.description&&(e.description=t.description),t.cacheable!==void 0&&(e.cacheable=t.cacheable),t.cacheTtl!==void 0&&(e.cacheTtlSeconds=t.cacheTtl),t.parameters&&(e.parameters=g("parameters",t.parameters)),t.tags&&(e.tags=E(t.tags));let n=await b$1(z,{input:e});k$1(`Query created: ${n.semCreateQuery.name}`),i(t,n.semCreateQuery);}catch(e){h$1(e);}}),i$1.command("update").description("Update a saved query").argument("<id>","Query ID").option("--name <name>","Query name").option("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",t=>t==="true").option("--cache-ttl <n>","Cache TTL seconds",u).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.queryText&&(n.queryText=e.queryText),e.model&&(n.modelId=e.model),e.description!==void 0&&(n.description=e.description),e.cacheable!==void 0&&(n.cacheable=e.cacheable),e.cacheTtl!==void 0&&(n.cacheTtlSeconds=e.cacheTtl),e.parameters&&(n.parameters=g("parameters",e.parameters)),e.tags&&(n.tags=E(e.tags)),!Object.keys(n).length)throw new o("No updates specified");let a=await b$1(X,{id:t,input:n});k$1("Query updated"),i(e,a.semUpdateQuery);}catch(n){h$1(n);}}),i$1.command("archive").description("Archive a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(Z,{id:t});if(!n.semArchiveQuery)throw new o(`Query ${t} could not be archived`);k$1(`Query ${t} archived`),i(e,{archived:n.semArchiveQuery});}catch(n){h$1(n);}}),i$1.command("publish").description("Publish a draft query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(tt,{id:t});k$1(`Query published: ${n.semPublishQuery.name}`),i(e,n.semPublishQuery);}catch(n){h$1(n);}}),i$1.command("run").description("Enqueue a federated execution of a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(et,{id:t});k$1(`Query run enqueued: ${n.semRunQuery.id} (${n.semRunQuery.status})`),i(e,n.semRunQuery);}catch(n){h$1(n);}}),i$1.command("runs").description("List run history for a saved query").requiredOption("--query <id>","Query ID").option("--status <s>","Filter by run status").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b$1(nt,{queryId:t.query,status:t.status?t.status.toUpperCase():void 0,pagination:S(t)})).semListQueryRuns.items;i(t,n,{headers:["ID","Status","Rows","Duration (ms)","Cached"],rows:n.map(a=>[r(a.id,12),a.status,a.rowCount!=null?String(a.rowCount):"-",a.durationMs!=null?String(a.durationMs):"-",a.fromCache?"yes":"no"])});}catch(e){h$1(e);}});}function gt(d){let i$1=d.command("access-policies").description("SemanticFed access policies (row/column/entity governance)");i$1.command("list").description("List access policies").option("--entity <id>","Filter by entity ID").option("--model <id>","Filter by model ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(it,{entityId:t.entity,modelId:t.model});i(t,e.semListAccessPolicies,{headers:["ID","Name","Principal","Effect","Scope","Active"],rows:e.semListAccessPolicies.map(n=>[r(n.id,12),n.name,n.principal,n.effect,n.scope,n.isActive?"yes":"no"])});}catch(e){h$1(e);}}),i$1.command("create").description("Create an access policy").requiredOption("--name <name>","Policy name").requiredOption("--principal <p>","Principal (user/role/group expression)").option("--effect <e>","ALLOW|DENY","ALLOW").option("--scope <s>","ROW|COLUMN|ENTITY","ROW").option("--entity <id>","Scoped entity ID").option("--model <id>","Scoped model ID").option("--rule <json>","Rule JSON (predicate / column list)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,principal:t.principal,effect:(t.effect??"ALLOW").toUpperCase(),scope:(t.scope??"ROW").toUpperCase()};t.entity&&(e.entityId=t.entity),t.model&&(e.modelId=t.model),t.rule&&(e.rule=g("rule",t.rule)),t.description&&(e.description=t.description);let n=await b$1(ot,{input:e});k$1(`Access policy created: ${n.semCreateAccessPolicy.name}`),i(t,n.semCreateAccessPolicy);}catch(e){h$1(e);}}),i$1.command("set-active").description("Activate or deactivate an access policy").argument("<id>","Policy ID").requiredOption("--active <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(rt,{id:t,isActive:e.active});k$1(`Access policy ${t} ${n.semSetAccessPolicyActive.isActive?"activated":"deactivated"}`),i(e,n.semSetAccessPolicyActive);}catch(n){h$1(n);}});}function yt(d$1){d$1.command("health").description("SemanticFed subgraph liveness/identity probe (public)").option("-f, --format <format>","Output format").action(async i$1=>{try{let t=await d(at);k$1(t.semHealth),i(i$1,{health:t.semHealth});}catch(t){h$1(t);}});}var Et={id:"semanticfed",version:"1.0.0",displayName:"SemanticFed",dependsOn:["auth","workspaces"],register(d,i){a(i);let t=d.command("semanticfed").description("SemanticFed data-federation & governed semantic layer");st(t),ct(t),dt(t),mt(t),pt(t),ut(t),lt(t),ft(t),gt(t),yt(t);}},pe=Et;export{pe as default};
|
|
1
|
+
import {S,P,b as b$1,R,a as a$1,O,c,d,e,g,f,Q,h as h$1,i as i$1,j,k as k$1,l,m,o as o$1,n,p,q,r as r$1,s,u,t,v,w,x,y,z,A,B,D,C,E,F,G,H,I,J,K,L,M,N}from'../../chunk-N5KCAJXG.js';import {a,b,i,r,h,k,d as d$1}from'../../chunk-VL67DTWH.js';import {o}from'../../chunk-2OISIPE6.js';function ct(d$1){let r$1=d$1.command("connectors").description("SemanticFed connectors (database/warehouse/API drivers)");r$1.command("list").description("List connectors").option("--kind <k>","Filter by connector kind (e.g. POSTGRES, BIGQUERY)").option("--limit <n>","Page size",P,50).option("--offset <n>","Offset",P,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b(b$1,{kind:t.kind?t.kind.toUpperCase():void 0,pagination:R(t)})).semListConnectors.items;i(t,n,{headers:["ID","Name","Kind","Active","Description"],rows:n.map(a=>[r(a.id,12),a.name,a.kind,a.isActive?"yes":"no",r(a.description??"",32)])});}catch(e){h(e);}}),r$1.command("get").description("Get a connector by id").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(a$1,{id:t});if(!n.semConnector)throw new o(`Connector ${t} not found`);i(e,n.semConnector);}catch(n){h(n);}}),r$1.command("create").description("Create a connector").requiredOption("--name <name>","Connector name").option("--kind <k>","Connector kind (e.g. POSTGRES, BIGQUERY)","POSTGRES").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,kind:(t.kind??"POSTGRES").toUpperCase()};t.description&&(e.description=t.description),t.capabilities&&(e.capabilities=O("capabilities",t.capabilities));let n=await b(c,{input:e});k(`Connector created: ${n.semCreateConnector.name}`),i(t,n.semCreateConnector);}catch(e){h(e);}}),r$1.command("update").description("Update a connector").argument("<id>","Connector ID").option("--name <name>","Connector name").option("--kind <k>","Connector kind").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("--active <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.kind&&(n.kind=e.kind.toUpperCase()),e.description!==void 0&&(n.description=e.description),e.capabilities&&(n.capabilities=O("capabilities",e.capabilities)),e.active!==void 0&&(n.isActive=e.active),!Object.keys(n).length)throw new o("No updates specified");let a=await b(d,{id:t,input:n});k("Connector updated"),i(e,a.semUpdateConnector);}catch(n){h(n);}}),r$1.command("archive").description("Archive a connector").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(t,e$1)=>{try{let n=await b(e,{id:t});if(!n.semArchiveConnector)throw new o(`Connector ${t} could not be archived`);k(`Connector ${t} archived`),i(e$1,{archived:n.semArchiveConnector});}catch(n){h(n);}});}function mt(d){let r$1=d.command("data-sources").description("SemanticFed data sources (federated query targets)");r$1.command("list").description("List data sources").option("--connector <id>","Filter by connector ID").option("--status <s>","Filter by data source status").option("--limit <n>","Page size",P,50).option("--offset <n>","Offset",P,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b(g,{connectorId:t.connector,status:t.status?t.status.toUpperCase():void 0,pagination:R(t)})).semListDataSources.items;i(t,n,{headers:["ID","Name","Connector","Status","Pushdown"],rows:n.map(a=>[r(a.id,12),a.name,r(a.connectorId,12),a.status,a.pushdownEnabled?"yes":"no"])});}catch(e){h(e);}}),r$1.command("get").description("Get a data source by id").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(f,{id:t});if(!n.semDataSource)throw new o(`Data source ${t} not found`);i(e,n.semDataSource);}catch(n){h(n);}}),r$1.command("create").description("Create a data source").requiredOption("--connector <id>","Connector ID").requiredOption("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON (host/db/url/\u2026)").option("--secret-ref <ref>","Secret reference (Key Vault key)").option("--pushdown <bool>","Enable predicate pushdown true|false",t=>t==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={connectorId:t.connector,name:t.name};t.description&&(e.description=t.description),t.endpoint&&(e.endpoint=O("endpoint",t.endpoint)),t.secretRef&&(e.secretRef=t.secretRef),t.pushdown!==void 0&&(e.pushdownEnabled=t.pushdown),t.tags&&(e.tags=Q(t.tags));let n=await b(h$1,{input:e});k(`Data source created: ${n.semCreateDataSource.name}`),i(t,n.semCreateDataSource);}catch(e){h(e);}}),r$1.command("update").description("Update a data source").argument("<id>","Data source ID").option("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON").option("--secret-ref <ref>","Secret reference").option("--pushdown <bool>","Enable predicate pushdown true|false",t=>t==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.endpoint&&(n.endpoint=O("endpoint",e.endpoint)),e.secretRef&&(n.secretRef=e.secretRef),e.pushdown!==void 0&&(n.pushdownEnabled=e.pushdown),e.tags&&(n.tags=Q(e.tags)),!Object.keys(n).length)throw new o("No updates specified");let a=await b(i$1,{id:t,input:n});k("Data source updated"),i(e,a.semUpdateDataSource);}catch(n){h(n);}}),r$1.command("archive").description("Archive a data source").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(j,{id:t});if(!n.semArchiveDataSource)throw new o(`Data source ${t} could not be archived`);k(`Data source ${t} archived`),i(e,{archived:n.semArchiveDataSource});}catch(n){h(n);}}),r$1.command("transition").description("Move a data source through its connectivity lifecycle").argument("<id>","Data source ID").requiredOption("--status <s>","DRAFT|CONNECTED|DEGRADED|DISCONNECTED|DISABLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(k$1,{id:t,status:e.status.toUpperCase()});k(`Data source status set to ${n.semTransitionDataSource.status}`),i(e,n.semTransitionDataSource);}catch(n){h(n);}}),r$1.command("connections").description("List connection health probes for a data source").argument("<dataSourceId>","Data source ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(l,{dataSourceId:t});i(e,n.semListConnections,{headers:["ID","Health","Latency (ms)","Probed At","Message"],rows:n.semListConnections.map(a=>[r(a.id,12),a.health,a.latencyMs!=null?String(a.latencyMs):"-",a.probedAt,r(a.message??"",32)])});}catch(n){h(n);}}),r$1.command("record-connection").description("Record a connection health probe for a data source").requiredOption("--data-source <id>","Data source ID").requiredOption("--health <h>","HEALTHY|DEGRADED|UNREACHABLE|UNKNOWN").option("--latency-ms <n>","Latency in milliseconds",P).option("--message <s>","Probe message").option("-f, --format <format>","Output format").action(async t=>{try{let e={dataSourceId:t.dataSource,health:t.health.toUpperCase()};t.latencyMs!==void 0&&(e.latencyMs=t.latencyMs),t.message&&(e.message=t.message);let n=await b(m,{input:e});k(`Connection recorded: ${n.semRecordConnection.health}`),i(t,n.semRecordConnection);}catch(e){h(e);}});}function dt(d){let r$2=d.command("models").description("SemanticFed semantic models (versioned entity/metric graphs)");r$2.command("list").description("List semantic models").option("--status <s>","Filter by model status (DRAFT|PUBLISHED|DEPRECATED|ARCHIVED)").option("--limit <n>","Page size",P,50).option("--offset <n>","Offset",P,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b(o$1,{status:t.status?t.status.toUpperCase():void 0,pagination:R(t)})).semListModels.items;i(t,n,{headers:["ID","Name","Status","Version","Description"],rows:n.map(a=>[r(a.id,12),a.name,a.status,String(a.version),r(a.description??"",32)])});}catch(e){h(e);}}),r$2.command("get").description("Get a semantic model by id").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n$1=await b(n,{id:t});if(!n$1.semModel)throw new o(`Model ${t} not found`);i(e,n$1.semModel);}catch(n){h(n);}}),r$2.command("create").description("Create a semantic model").requiredOption("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.description&&(e.description=t.description),t.tags&&(e.tags=Q(t.tags));let n=await b(p,{input:e});k(`Model created: ${n.semCreateModel.name}`),i(t,n.semCreateModel);}catch(e){h(e);}}),r$2.command("update").description("Update a semantic model").argument("<id>","Model ID").option("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.tags&&(n.tags=Q(e.tags)),!Object.keys(n).length)throw new o("No updates specified");let a=await b(q,{id:t,input:n});k("Model updated"),i(e,a.semUpdateModel);}catch(n){h(n);}}),r$2.command("archive").description("Archive a semantic model").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(r$1,{id:t});if(!n.semArchiveModel)throw new o(`Model ${t} could not be archived`);k(`Model ${t} archived`),i(e,{archived:n.semArchiveModel});}catch(n){h(n);}}),r$2.command("publish").description("Publish a draft model (bumps version, flips status to PUBLISHED)").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(s,{id:t});k(`Model published (v${n.semPublishModel.version})`),i(e,n.semPublishModel);}catch(n){h(n);}});}function pt(d){let r$1=d.command("entities").description("SemanticFed entities (tables/views/derived datasets in a model)");r$1.command("list").description("List entities in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(u,{modelId:t.model});i(t,e.semListEntities,{headers:["ID","Name","Kind","Physical Name","Primary Key"],rows:e.semListEntities.map(n=>[r(n.id,12),n.name,n.kind,n.physicalName??"-",n.primaryKey??"-"])});}catch(e){h(e);}}),r$1.command("get").description("Get an entity by id").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(t$1,e)=>{try{let n=await b(t,{id:t$1});if(!n.semEntity)throw new o(`Entity ${t$1} not found`);i(e,n.semEntity);}catch(n){h(n);}}),r$1.command("create").description("Create an entity").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL","TABLE").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition (for derived entities)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={modelId:t.model,name:t.name,kind:(t.kind??"TABLE").toUpperCase()};t.dataSource&&(e.dataSourceId=t.dataSource),t.physicalName&&(e.physicalName=t.physicalName),t.primaryKey&&(e.primaryKey=t.primaryKey),t.sqlDefinition&&(e.sqlDefinition=t.sqlDefinition),t.description&&(e.description=t.description);let n=await b(v,{input:e});k(`Entity created: ${n.semCreateEntity.name}`),i(t,n.semCreateEntity);}catch(e){h(e);}}),r$1.command("update").description("Update an entity").argument("<id>","Entity ID").option("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.kind&&(n.kind=e.kind.toUpperCase()),e.dataSource&&(n.dataSourceId=e.dataSource),e.physicalName&&(n.physicalName=e.physicalName),e.primaryKey&&(n.primaryKey=e.primaryKey),e.sqlDefinition&&(n.sqlDefinition=e.sqlDefinition),e.description!==void 0&&(n.description=e.description),!Object.keys(n).length)throw new o("No updates specified");let a=await b(w,{id:t,input:n});k("Entity updated"),i(e,a.semUpdateEntity);}catch(n){h(n);}}),r$1.command("delete").description("Delete an entity").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(x,{id:t});if(!n.semDeleteEntity)throw new o(`Entity ${t} could not be deleted`);k(`Entity ${t} deleted`),i(e,{deleted:n.semDeleteEntity});}catch(n){h(n);}});}function ut(d){d.command("dimensions").description("SemanticFed dimensions (queryable attributes on an entity)").command("create").description("Create a dimension").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Dimension name").option("--data-type <t>","STRING|INTEGER|DECIMAL|BOOLEAN|DATE|TIMESTAMP|JSON|GEO","STRING").option("--expression <e>","SQL expression").option("--primary","Mark as primary dimension").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={entityId:t.entity,name:t.name,dataType:(t.dataType??"STRING").toUpperCase()};t.expression&&(e.expression=t.expression),t.primary&&(e.isPrimary=!0),t.description&&(e.description=t.description);let n=await b(y,{input:e});k(`Dimension created: ${n.semCreateDimension.name}`),i(t,n.semCreateDimension);}catch(e){h(e);}});}function ft(d){d.command("metrics").description("SemanticFed metrics (aggregated measures on an entity)").command("create").description("Create a metric").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Metric name").option("--aggregation <a>","SUM|AVG|MIN|MAX|COUNT|COUNT_DISTINCT|MEDIAN|CUSTOM","SUM").option("--expression <e>","SQL expression").option("--format-spec <f>","Display format (e.g. currency, percent)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={entityId:t.entity,name:t.name,aggregation:(t.aggregation??"SUM").toUpperCase()};t.expression&&(e.expression=t.expression),t.formatSpec&&(e.format=t.formatSpec),t.description&&(e.description=t.description);let n=await b(z,{input:e});k(`Metric created: ${n.semCreateMetric.name}`),i(t,n.semCreateMetric);}catch(e){h(e);}});}function lt(d){let r$1=d.command("relationships").description("SemanticFed relationships (joins between entities in a model)");r$1.command("list").description("List relationships in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(A,{modelId:t.model});i(t,e.semListRelationships,{headers:["ID","Name","Kind","From","To"],rows:e.semListRelationships.map(n=>[r(n.id,12),n.name,n.kind,`${r(n.fromEntityId,8)}.${n.fromField}`,`${r(n.toEntityId,8)}.${n.toField}`])});}catch(e){h(e);}}),r$1.command("create").description("Create a relationship").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Relationship name").requiredOption("--from-entity <id>","From entity ID").requiredOption("--from-field <f>","From field").requiredOption("--to-entity <id>","To entity ID").requiredOption("--to-field <f>","To field").option("--kind <k>","ONE_TO_ONE|ONE_TO_MANY|MANY_TO_ONE|MANY_TO_MANY","MANY_TO_ONE").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={modelId:t.model,name:t.name,fromEntityId:t.fromEntity,fromField:t.fromField,toEntityId:t.toEntity,toField:t.toField,kind:(t.kind??"MANY_TO_ONE").toUpperCase()};t.description&&(e.description=t.description);let n=await b(B,{input:e});k(`Relationship created: ${n.semCreateRelationship.name}`),i(t,n.semCreateRelationship);}catch(e){h(e);}});}function gt(d){let r$1=d.command("queries").description("SemanticFed saved federated queries & run history");r$1.command("list").description("List saved queries").option("--model <id>","Filter by model ID").option("--status <s>","Filter by query status (DRAFT|PUBLISHED|ARCHIVED)").option("--limit <n>","Page size",P,50).option("--offset <n>","Offset",P,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b(D,{modelId:t.model,status:t.status?t.status.toUpperCase():void 0,pagination:R(t)})).semListQueries.items;i(t,n,{headers:["ID","Name","Status","Model","Cacheable"],rows:n.map(a=>[r(a.id,12),a.name,a.status,a.modelId?r(a.modelId,12):"-",a.cacheable?"yes":"no"])});}catch(e){h(e);}}),r$1.command("get").description("Get a saved query by id").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(C,{id:t});if(!n.semQuery)throw new o(`Query ${t} not found`);i(e,n.semQuery);}catch(n){h(n);}}),r$1.command("create").description("Create a saved query").requiredOption("--name <name>","Query name").requiredOption("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",t=>t==="true").option("--cache-ttl <n>","Cache TTL seconds",P).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,queryText:t.queryText};t.model&&(e.modelId=t.model),t.description&&(e.description=t.description),t.cacheable!==void 0&&(e.cacheable=t.cacheable),t.cacheTtl!==void 0&&(e.cacheTtlSeconds=t.cacheTtl),t.parameters&&(e.parameters=O("parameters",t.parameters)),t.tags&&(e.tags=Q(t.tags));let n=await b(E,{input:e});k(`Query created: ${n.semCreateQuery.name}`),i(t,n.semCreateQuery);}catch(e){h(e);}}),r$1.command("update").description("Update a saved query").argument("<id>","Query ID").option("--name <name>","Query name").option("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",t=>t==="true").option("--cache-ttl <n>","Cache TTL seconds",P).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.queryText&&(n.queryText=e.queryText),e.model&&(n.modelId=e.model),e.description!==void 0&&(n.description=e.description),e.cacheable!==void 0&&(n.cacheable=e.cacheable),e.cacheTtl!==void 0&&(n.cacheTtlSeconds=e.cacheTtl),e.parameters&&(n.parameters=O("parameters",e.parameters)),e.tags&&(n.tags=Q(e.tags)),!Object.keys(n).length)throw new o("No updates specified");let a=await b(F,{id:t,input:n});k("Query updated"),i(e,a.semUpdateQuery);}catch(n){h(n);}}),r$1.command("archive").description("Archive a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(G,{id:t});if(!n.semArchiveQuery)throw new o(`Query ${t} could not be archived`);k(`Query ${t} archived`),i(e,{archived:n.semArchiveQuery});}catch(n){h(n);}}),r$1.command("publish").description("Publish a draft query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(H,{id:t});k(`Query published: ${n.semPublishQuery.name}`),i(e,n.semPublishQuery);}catch(n){h(n);}}),r$1.command("run").description("Enqueue a federated execution of a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(I,{id:t});k(`Query run enqueued: ${n.semRunQuery.id} (${n.semRunQuery.status})`),i(e,n.semRunQuery);}catch(n){h(n);}}),r$1.command("runs").description("List run history for a saved query").requiredOption("--query <id>","Query ID").option("--status <s>","Filter by run status").option("--limit <n>","Page size",P,50).option("--offset <n>","Offset",P,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async t=>{try{let n=(await b(J,{queryId:t.query,status:t.status?t.status.toUpperCase():void 0,pagination:R(t)})).semListQueryRuns.items;i(t,n,{headers:["ID","Status","Rows","Duration (ms)","Cached"],rows:n.map(a=>[r(a.id,12),a.status,a.rowCount!=null?String(a.rowCount):"-",a.durationMs!=null?String(a.durationMs):"-",a.fromCache?"yes":"no"])});}catch(e){h(e);}});}function yt(d){let r$1=d.command("access-policies").description("SemanticFed access policies (row/column/entity governance)");r$1.command("list").description("List access policies").option("--entity <id>","Filter by entity ID").option("--model <id>","Filter by model ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(K,{entityId:t.entity,modelId:t.model});i(t,e.semListAccessPolicies,{headers:["ID","Name","Principal","Effect","Scope","Active"],rows:e.semListAccessPolicies.map(n=>[r(n.id,12),n.name,n.principal,n.effect,n.scope,n.isActive?"yes":"no"])});}catch(e){h(e);}}),r$1.command("create").description("Create an access policy").requiredOption("--name <name>","Policy name").requiredOption("--principal <p>","Principal (user/role/group expression)").option("--effect <e>","ALLOW|DENY","ALLOW").option("--scope <s>","ROW|COLUMN|ENTITY","ROW").option("--entity <id>","Scoped entity ID").option("--model <id>","Scoped model ID").option("--rule <json>","Rule JSON (predicate / column list)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,principal:t.principal,effect:(t.effect??"ALLOW").toUpperCase(),scope:(t.scope??"ROW").toUpperCase()};t.entity&&(e.entityId=t.entity),t.model&&(e.modelId=t.model),t.rule&&(e.rule=O("rule",t.rule)),t.description&&(e.description=t.description);let n=await b(L,{input:e});k(`Access policy created: ${n.semCreateAccessPolicy.name}`),i(t,n.semCreateAccessPolicy);}catch(e){h(e);}}),r$1.command("set-active").description("Activate or deactivate an access policy").argument("<id>","Policy ID").requiredOption("--active <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b(M,{id:t,isActive:e.active});k(`Access policy ${t} ${n.semSetAccessPolicyActive.isActive?"activated":"deactivated"}`),i(e,n.semSetAccessPolicyActive);}catch(n){h(n);}});}function Ct(d){d.command("health").description("SemanticFed subgraph liveness/identity probe (public)").option("-f, --format <format>","Output format").action(async r=>{try{let t=await d$1(N);k(t.semHealth),i(r,{health:t.semHealth});}catch(t){h(t);}});}var ht={id:"semanticfed",version:"1.0.0",displayName:"SemanticFed",dependsOn:["auth","workspaces"],register(d,r){a(r);let t=d.command("semanticfed").description("SemanticFed data-federation & governed semantic layer");ct(t),mt(t),dt(t),pt(t),ut(t),ft(t),lt(t),gt(t),yt(t),Ct(t),S(t);}},se=ht;export{se as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var r=class extends Error{exitCode;hint;constructor(t,n){super(t),this.name="CliUserError",this.exitCode=n?.exitCode??1,this.hint=n?.hint;}},d=class extends r{constructor(t,n){super(t,{exitCode:2,hint:n?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},c=class extends Error{cause;constructor(t,n){super(t),this.name="CliInternalError",this.cause=n;}};var C=null;function y(e){C=e;}function I(){if(!C)throw new c("vibecontrols module helpers used before setHelpersContext was called");return C}function F(){let e=I();if(!e.auth.isAuthenticated())throw new d("Authentication required.",{hint:`Run \`${e.productName} auth login\` to authenticate.`})}async function m(e,t){return F(),I().gql.workspace.request(e,t)}function g(e){let t=e instanceof Error?e.message:String(e);throw new r(t)}function f(){return I().output}var k=`
|
|
2
|
+
mutation SemExecuteSql($input: SemExecuteSqlInput!) {
|
|
3
|
+
semExecuteSql(input: $input) {
|
|
4
|
+
modelId
|
|
5
|
+
columns { name entity field aggregation dataType masked mask }
|
|
6
|
+
rows rowCount truncated durationMs sourcesTouched planSummary
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
`,E=`
|
|
10
|
+
query SemSqlCatalog($modelId: ID) {
|
|
11
|
+
semSqlCatalog(modelId: $modelId) {
|
|
12
|
+
modelId modelName
|
|
13
|
+
tables {
|
|
14
|
+
name kind primaryKey description
|
|
15
|
+
columns { name kind dataType isPrimary aggregation description }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`;function S(e){let t=Number.parseInt(e,10);if(Number.isNaN(t))throw new r(`Expected an integer but got "${e}"`);return t}var A=["table","json","csv","yaml"];function T(e){if(e===void 0)return;let t=e.toLowerCase();if(A.includes(t))return t;throw new r(`--format must be one of ${A.join(", ")} (got "${e}")`)}function W(e){return e==null?"NULL":typeof e=="object"?JSON.stringify(e):String(e)}function b(e){if(e==null)return "";let t=typeof e=="object"?JSON.stringify(e):String(e);return /[",\r\n]/.test(t)?`"${t.replace(/"/g,'""')}"`:t}function Q(e){let t=e.columns.map(s=>s.name),n=[t.map(b).join(",")];for(let s of e.rows)n.push(t.map(i=>b(s[i])).join(","));return `${n.join(`\r
|
|
20
|
+
`)}\r
|
|
21
|
+
`}function G(e,t){if(!e||e.trim()==="")throw new r('A SQL statement is required, e.g. semanticfed sql "SELECT * FROM customers LIMIT 10"');let n={sql:e};if(t.model&&(n.modelId=t.model),t.maxRows!==void 0){if(t.maxRows<1)throw new r("--max-rows must be a positive integer");n.maxRows=t.maxRows;}if(t.timeout!==void 0){if(t.timeout<1)throw new r("--timeout must be a positive integer");n.timeoutMs=t.timeout;}return n}function H(e,t){let n=f(),s=e??n.getFormat({});if(s==="csv"){if(!n.printRaw)throw new r("This output adapter cannot print CSV; use --format json or table");n.printRaw(Q(t));}else if(s==="table"){let i=t.columns.map(a=>a.name);n.printTable(i,t.rows.map(a=>i.map(l=>W(a[l]))));let u=t.columns.filter(a=>a.masked).map(a=>a.name);n.printInfo(`${t.rowCount} row${t.rowCount===1?"":"s"} in ${Math.round(t.durationMs)} ms`+(u.length?` (masked: ${u.join(", ")})`:""));}else n.formatAndOutput({format:s},t);t.truncated&&n.printWarning("Result truncated: more rows matched than were returned (raise --max-rows, max 10000, or add LIMIT/WHERE).");}function $(e){e.command("sql").description("Run a read-only SQL SELECT against a semantic model (sql catalog: list tables)").argument("[statement]","One SELECT statement; tables are entities, columns their fields").option("--model <id>","Semantic model ID (optional when the workspace has one model)").option("--max-rows <n>","Maximum rows returned (server default 1000, max 10000)",S).option("--timeout <ms>","Execution time limit in ms (default 30000, 1000-60000)",S).option("-f, --format <format>","Output format: table|json|csv|yaml").action(async(n,s)=>{try{let i=T(s.format),u=G(n,s),a=await m(k,{input:u});H(i,a.semExecuteSql);}catch(i){g(i);}}).command("catalog").description("List the tables and columns a semantic model exposes to SQL").option("--model <id>","Semantic model ID (optional when the workspace has one model)").option("-f, --format <format>","Output format: table|json|yaml").action(async(n,s)=>{try{let i=s.optsWithGlobals(),u=T(i.format);if(u==="csv")throw new r("sql catalog supports --format table, json or yaml");let l=(await m(E,{modelId:i.model||void 0})).semSqlCatalog;f().formatAndOutput({format:u},l,{headers:["Table","Column","Kind","Type","Primary","Aggregation"],rows:l.tables.flatMap(w=>w.columns.map(p=>[w.name,p.name,p.kind,p.dataType,p.isPrimary?"yes":"",p.aggregation??""]))});}catch(i){g(i);}});}var V={id:"semanticfed-sql",version:"1.0.0",displayName:"SemanticFed SQL",dependsOn:["auth","workspaces"],register(e,t){y(t),$(e);}},pt=V;module.exports=pt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {S}from'../../chunk-N5KCAJXG.js';import {a}from'../../chunk-VL67DTWH.js';import'../../chunk-2OISIPE6.js';var r={id:"semanticfed-sql",version:"1.0.0",displayName:"SemanticFed SQL",dependsOn:["auth","workspaces"],register(t,m){a(m),S(t);}},p=r;export{p as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}};var l=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}};var l=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var h=null;function R(r){h=r;}function g(){if(!h)throw new l("vibecontrols module helpers used before setHelpersContext was called");return h}async function a(r,o){return g().gql.global.request(r,o)}function c(r){let o=r instanceof Error?r.message:String(r);throw new u(o)}function d(r,o,s){g().output.formatAndOutput(r,o,s);}function w(r){g().output.printSuccess(r);}function C(r){return g().output.formatStatus(r)}function k(r){return g().output.formatDate(r)}function f(r,o){return g().output.truncate(r,o)}var y=`
|
|
2
2
|
id name slug description price currency type status downloads
|
|
3
3
|
publisher { id name isVerified }
|
|
4
4
|
`,x=`
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
id entitlementId assigneeUserId assigneeEmail role assignedAt revokedAt revocationReason
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
`;function T(r){if(r&&r.length>0)throw new u(r.map(o=>o.message).join("; "))}function W(r){let o=r.command("store").description("Store: marketplace, cart, orders, installed apps");o.command("search").description("Search the store").argument("<query>").option("--type <t>").option("--category <c>").option("--limit <n>","Page size",t=>parseInt(t,10),20).option("-f, --format <format>").action(async(t,e)=>{try{let n={search:t};e.type&&(n.type=e.type.toUpperCase()),e.category&&(n.categories=[e.category]);let p={filter:n,pagination:{limit:e.limit,offset:0},sortBy:"RELEVANCE"},v=await a($,{input:p});d(e,v.browseStore.products,{headers:["ID","Name","Type","Price"],rows:v.browseStore.products.map(m=>[f(m.id,12),m.name,m.type??"-",`${m.price??"-"} ${m.currency??""}`.trim()])});}catch(n){c(n);}});let s=o.command("cart").description("Shopping cart");s.command("list").description("Show current cart").option("-f, --format <format>").action(async t=>{try{let e=await a(D);d(t,e.myCart);}catch(e){c(e);}}),s.command("add").description("Add a product to the cart").requiredOption("--product <id>").option("--quantity <n>","",t=>parseInt(t,10),1).option("--variant <id>").option("--workspace <id>","Workspace the product is bought for").option("-f, --format <format>").action(async t=>{try{let e={productId:t.product,quantity:t.quantity,variantId:t.variant,workspaceId:t.workspace},n=await a(q,{input:e});T(n.addToCart.errors),w("Added to cart"),d(t,n.addToCart.cart);}catch(e){c(e);}}),s.command("remove").description("Remove an item from the cart").requiredOption("--item <id>","Cart item id (from `store cart list`)").action(async t=>{try{let e=await a(P,{cartItemId:t.item});T(e.removeFromCart.errors),w("Item removed from cart");}catch(e){c(e);}}),s.command("checkout").description("Check out your cart").option("--account <id>","Billing account to charge").option("--payment-method <id>").option("--workspace <id>").option("--notes <s>").option("-f, --format <format>").action(async t=>{try{let e={billingAccountId:t.account,paymentMethodId:t.paymentMethod,workspaceId:t.workspace,notes:t.notes},n=await a(L,{input:e});T(n.checkout.errors),n.checkout.success&&w("Checkout complete"),d(t,n.checkout);}catch(e){c(e);}});let b=o.command("orders").description("Orders");b.command("list").description("List orders").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=await a(_,{limit:t.limit,offset:0});d(t,e.myOrders,{headers:["ID","Status","Total","Currency","Created"],rows:e.myOrders.map(n=>[f(n.id,12),
|
|
69
|
+
`;function T(r){if(r&&r.length>0)throw new u(r.map(o=>o.message).join("; "))}function W(r){let o=r.command("store").description("Store: marketplace, cart, orders, installed apps");o.command("search").description("Search the store").argument("<query>").option("--type <t>").option("--category <c>").option("--limit <n>","Page size",t=>parseInt(t,10),20).option("-f, --format <format>").action(async(t,e)=>{try{let n={search:t};e.type&&(n.type=e.type.toUpperCase()),e.category&&(n.categories=[e.category]);let p={filter:n,pagination:{limit:e.limit,offset:0},sortBy:"RELEVANCE"},v=await a($,{input:p});d(e,v.browseStore.products,{headers:["ID","Name","Type","Price"],rows:v.browseStore.products.map(m=>[f(m.id,12),m.name,m.type??"-",`${m.price??"-"} ${m.currency??""}`.trim()])});}catch(n){c(n);}});let s=o.command("cart").description("Shopping cart");s.command("list").description("Show current cart").option("-f, --format <format>").action(async t=>{try{let e=await a(D);d(t,e.myCart);}catch(e){c(e);}}),s.command("add").description("Add a product to the cart").requiredOption("--product <id>").option("--quantity <n>","",t=>parseInt(t,10),1).option("--variant <id>").option("--workspace <id>","Workspace the product is bought for").option("-f, --format <format>").action(async t=>{try{let e={productId:t.product,quantity:t.quantity,variantId:t.variant,workspaceId:t.workspace},n=await a(q,{input:e});T(n.addToCart.errors),w("Added to cart"),d(t,n.addToCart.cart);}catch(e){c(e);}}),s.command("remove").description("Remove an item from the cart").requiredOption("--item <id>","Cart item id (from `store cart list`)").action(async t=>{try{let e=await a(P,{cartItemId:t.item});T(e.removeFromCart.errors),w("Item removed from cart");}catch(e){c(e);}}),s.command("checkout").description("Check out your cart").option("--account <id>","Billing account to charge").option("--payment-method <id>").option("--workspace <id>").option("--notes <s>").option("-f, --format <format>").action(async t=>{try{let e={billingAccountId:t.account,paymentMethodId:t.paymentMethod,workspaceId:t.workspace,notes:t.notes},n=await a(L,{input:e});T(n.checkout.errors),n.checkout.success&&w("Checkout complete"),d(t,n.checkout);}catch(e){c(e);}});let b=o.command("orders").description("Orders");b.command("list").description("List orders").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=await a(_,{limit:t.limit,offset:0});d(t,e.myOrders,{headers:["ID","Status","Total","Currency","Created"],rows:e.myOrders.map(n=>[f(n.id,12),C(n.status),String(n.total??"-"),n.currency??"-",k(n.createdAt)])});}catch(e){c(e);}}),b.command("get").description("Get an order").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let n=await a(N,{id:t});if(!n.getStoreOrder)throw new u(`Order ${t} not found`);d(e,n.getStoreOrder);}catch(n){c(n);}});let E=o.command("installed").description("Installed products");E.command("list").description("List the current user's installed store apps").option("-f, --format <format>").action(async t=>{try{let n=(await a(F)).myStoreAppInstallations.items;d(t,n,{headers:["InstallationID","ProductID","Workspace","Status","Version","Installed"],rows:n.map(p=>[f(p.id,12),f(p.productId,12),f(p.workspaceId,12),C(p.status),p.version??"-",k(p.installedAt)])});}catch(e){c(e);}}),E.command("uninstall").description("Record that a store product was uninstalled from a workspace").requiredOption("--product <id>").requiredOption("--workspace <id>").action(async t=>{try{await a(G,{productId:t.product,workspaceId:t.workspace}),w("Product uninstalled");}catch(e){c(e);}}),o.command("licenses").description("Licenses").command("list").description("List the license seats of an entitlement").requiredOption("--entitlement <id>").option("-f, --format <format>").action(async t=>{try{let e=await a(M,{entitlementId:t.entitlement});d(t,e.entitlementSeats);}catch(e){c(e);}});}var ee={id:"store",version:"1.0.0",displayName:"Store",dependsOn:["auth"],register(r,o){R(o),W(r);}},gt=ee;module.exports=gt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,i,r,h,k as k$1,p,q as q$1}from'../../chunk-
|
|
1
|
+
import {a,c,i,r,h,k as k$1,p,q as q$1}from'../../chunk-VL67DTWH.js';import {o}from'../../chunk-2OISIPE6.js';var f=`
|
|
2
2
|
id name slug description price currency type status downloads
|
|
3
3
|
publisher { id name isVerified }
|
|
4
4
|
`,C=`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,i,r,h,k as k$1,q as q$1,d}from'../../chunk-
|
|
1
|
+
import {a,b as b$1,i,r,h,k as k$1,q as q$1,d}from'../../chunk-VL67DTWH.js';import {o}from'../../chunk-2OISIPE6.js';var C=`
|
|
2
2
|
query SubGetProvider($id: ID!) {
|
|
3
3
|
subProvider(id: $id) {
|
|
4
4
|
id name slug description category status industry language region
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,i,r,p,q,h,k as k$1}from'../../chunk-
|
|
1
|
+
import {a,c,i,r,p,q,h,k as k$1}from'../../chunk-VL67DTWH.js';import {o}from'../../chunk-2OISIPE6.js';var k=`
|
|
2
2
|
query ListSupportTickets($filter: SupportTicketFilterInput, $limit: Int, $offset: Int) {
|
|
3
3
|
supportTickets(filter: $filter, limit: $limit, offset: $offset) {
|
|
4
4
|
nodes { id ticketNumber subject status priority category createdAt }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var a=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},g=class extends a{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var a=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},g=class extends a{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},l=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var h=null;function y(r){h=r;}function f(){if(!h)throw new l("vibecontrols module helpers used before setHelpersContext was called");return h}function V(){let r=f();if(!r.auth.isAuthenticated())throw new g("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function c(r,o){return V(),f().gql.workspace.request(r,o)}function u(r){let o=r instanceof Error?r.message:String(r);throw new a(o)}function p(r,o,s){f().output.formatAndOutput(r,o,s);}function m(r){f().output.printSuccess(r);}function C(r,o){return f().output.truncate(r,o)}function x(){return f()}var b=`
|
|
2
2
|
query TagsList($filter: TagFilterInput, $pagination: TagsPaginationInput) {
|
|
3
3
|
getTags(filter: $filter, pagination: $pagination) {
|
|
4
4
|
items { id key label description scope displayOrder }
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
mutation DeleteTagRelation($id: ID!) {
|
|
52
52
|
deleteTagRelation(id: $id)
|
|
53
53
|
}
|
|
54
|
-
`;function
|
|
54
|
+
`;function w(){let r=x().auth.read();if(!r?.workspaceId)throw new a("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:r.workspaceId}}function $(r){let o=r.command("tags").description("Tag management");o.command("list").description("List tags in current workspace").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={workspaceId:w().workspaceId};e.scope&&(t.scope=e.scope.toUpperCase()),e.search&&(t.search=e.search);let n=await c(b,{filter:t,pagination:{limit:e.limit,offset:0}});p(e,n.getTags.items,{headers:["ID","Key","Label","Scope","Order"],rows:n.getTags.items.map(d=>[C(d.id,12),d.key,d.label,d.scope??"-",String(d.displayOrder??"-")])});}catch(t){u(t);}}),o.command("get").description("Get a tag by id").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await c(I,{id:e});if(!n.getTag)throw new a(`Tag ${e} not found`);p(t,n.getTag);}catch(n){u(n);}}),o.command("create").description("Create a tag in the current workspace").requiredOption("--key <key>").requiredOption("--label <label>").requiredOption("--vocabulary <id>","Vocabulary id (required by schema)").option("--description <s>").option("--color <hex>").option("--icon <s>").option("--scope <s>","WORKSPACE|GLOBAL|VIBE","WORKSPACE").option("--parent <id>").option("-f, --format <format>").action(async e=>{try{let t={context:w(),key:e.key,label:e.label,vocabularyId:e.vocabulary,description:e.description,color:e.color,icon:e.icon,scope:(e.scope??"WORKSPACE").toUpperCase(),parentId:e.parent},n=await c(E,{input:t});m(`Tag created: ${n.createTag.label}`),p(e,n.createTag);}catch(t){u(t);}}),o.command("update").description("Update a tag").argument("<id>").option("--label <s>").option("--description <s>").option("--color <hex>").option("--icon <s>").option("--parent <id>").option("--display-order <n>","",e=>parseInt(e,10)).option("-f, --format <format>").action(async(e,t)=>{try{let n={context:w()};if(t.label&&(n.label=t.label),t.description!==void 0&&(n.description=t.description),t.color&&(n.color=t.color),t.icon&&(n.icon=t.icon),t.parent&&(n.parentId=t.parent),t.displayOrder!==void 0&&(n.displayOrder=t.displayOrder),Object.keys(n).length===1)throw new a("No updates specified");let d=await c(A,{id:e,input:n});m("Tag updated"),p(t,d.updateTag);}catch(n){u(n);}}),o.command("delete").description("Delete a tag").argument("<id>").action(async e=>{try{await c(v,{id:e}),m("Tag deleted");}catch(t){u(t);}}),o.command("analytics").description("Tag usage analytics").argument("<tagId>").requiredOption("--from <iso>","Start date").requiredOption("--to <iso>","End date").option("-f, --format <format>").action(async(e,t)=>{try{let n=await c(O,{tagId:e,startDate:t.from,endDate:t.to});p(t,n.getTagAnalytics);}catch(n){u(n);}});let s=o.command("permissions").description("Tag relations / permissions");s.command("list").description("List related tags").argument("<tagId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await c(S,{tagId:e});p(t,n.getRelatedTags);}catch(n){u(n);}}),s.command("grant").description("Create a tag relation").requiredOption("--from <tagId>").requiredOption("--to <tagId>").requiredOption("--type <relation>","SYNONYM|ANTONYM|BROADER|NARROWER|RELATED|IMPLIES|EXCLUDES").option("--bidirectional","Mirror in both directions",false).option("-f, --format <format>").action(async e=>{try{let t={context:w(),fromTagId:e.from,toTagId:e.to,relationType:e.type.toUpperCase(),bidirectional:!!e.bidirectional},n=await c(R,{input:t});m("Tag relation created"),p(e,n.createTagRelation);}catch(t){u(t);}}),s.command("revoke").description("Delete a tag relation").argument("<relationId>").action(async e=>{try{await c(D,{id:e}),m("Tag relation deleted");}catch(t){u(t);}});}var z={id:"tags",version:"1.0.0",displayName:"Tags",dependsOn:["auth","workspaces"],register(r,o){y(o),$(r);}},nt=z;module.exports=nt;
|