@wayai/cli 0.3.39 → 0.3.41
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/index.js +16893 -310
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
- package/dist/commands/admin.d.ts +0 -1
- package/dist/commands/admin.js +0 -800
- package/dist/commands/admin.js.map +0 -1
- package/dist/commands/analytics.d.ts +0 -34
- package/dist/commands/analytics.js +0 -605
- package/dist/commands/analytics.js.map +0 -1
- package/dist/commands/conversations.d.ts +0 -14
- package/dist/commands/conversations.js +0 -292
- package/dist/commands/conversations.js.map +0 -1
- package/dist/commands/create-credential.d.ts +0 -20
- package/dist/commands/create-credential.js +0 -146
- package/dist/commands/create-credential.js.map +0 -1
- package/dist/commands/delete-history.d.ts +0 -15
- package/dist/commands/delete-history.js +0 -56
- package/dist/commands/delete-history.js.map +0 -1
- package/dist/commands/eval-capture.d.ts +0 -1
- package/dist/commands/eval-capture.js +0 -135
- package/dist/commands/eval-capture.js.map +0 -1
- package/dist/commands/eval-results.d.ts +0 -10
- package/dist/commands/eval-results.js +0 -168
- package/dist/commands/eval-results.js.map +0 -1
- package/dist/commands/eval.d.ts +0 -1
- package/dist/commands/eval.js +0 -49
- package/dist/commands/eval.js.map +0 -1
- package/dist/commands/evals.d.ts +0 -21
- package/dist/commands/evals.js +0 -120
- package/dist/commands/evals.js.map +0 -1
- package/dist/commands/init.d.ts +0 -16
- package/dist/commands/init.js +0 -191
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts +0 -13
- package/dist/commands/list.js +0 -70
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/login.d.ts +0 -8
- package/dist/commands/login.js +0 -145
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/logout.d.ts +0 -1
- package/dist/commands/logout.js +0 -19
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/migrate.d.ts +0 -12
- package/dist/commands/migrate.js +0 -106
- package/dist/commands/migrate.js.map +0 -1
- package/dist/commands/observability.d.ts +0 -14
- package/dist/commands/observability.js +0 -124
- package/dist/commands/observability.js.map +0 -1
- package/dist/commands/org.d.ts +0 -19
- package/dist/commands/org.js +0 -186
- package/dist/commands/org.js.map +0 -1
- package/dist/commands/pull.d.ts +0 -31
- package/dist/commands/pull.js +0 -210
- package/dist/commands/pull.js.map +0 -1
- package/dist/commands/push.d.ts +0 -25
- package/dist/commands/push.js +0 -472
- package/dist/commands/push.js.map +0 -1
- package/dist/commands/report-create.d.ts +0 -18
- package/dist/commands/report-create.js +0 -143
- package/dist/commands/report-create.js.map +0 -1
- package/dist/commands/report.d.ts +0 -16
- package/dist/commands/report.js +0 -252
- package/dist/commands/report.js.map +0 -1
- package/dist/commands/run-eval.d.ts +0 -15
- package/dist/commands/run-eval.js +0 -187
- package/dist/commands/run-eval.js.map +0 -1
- package/dist/commands/send-message.d.ts +0 -11
- package/dist/commands/send-message.js +0 -63
- package/dist/commands/send-message.js.map +0 -1
- package/dist/commands/status.d.ts +0 -17
- package/dist/commands/status.js +0 -205
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/sync-mcp.d.ts +0 -16
- package/dist/commands/sync-mcp.js +0 -51
- package/dist/commands/sync-mcp.js.map +0 -1
- package/dist/commands/sync-skills.d.ts +0 -10
- package/dist/commands/sync-skills.js +0 -49
- package/dist/commands/sync-skills.js.map +0 -1
- package/dist/commands/unlock.d.ts +0 -1
- package/dist/commands/unlock.js +0 -13
- package/dist/commands/unlock.js.map +0 -1
- package/dist/commands/update-credential.d.ts +0 -29
- package/dist/commands/update-credential.js +0 -156
- package/dist/commands/update-credential.js.map +0 -1
- package/dist/commands/update.d.ts +0 -6
- package/dist/commands/update.js +0 -36
- package/dist/commands/update.js.map +0 -1
- package/dist/commands/use.d.ts +0 -1
- package/dist/commands/use.js +0 -56
- package/dist/commands/use.js.map +0 -1
- package/dist/commands/whoami.d.ts +0 -11
- package/dist/commands/whoami.js +0 -30
- package/dist/commands/whoami.js.map +0 -1
- package/dist/index.d.ts +0 -28
- package/dist/lib/analytics-constants.d.ts +0 -6
- package/dist/lib/analytics-constants.js +0 -14
- package/dist/lib/analytics-constants.js.map +0 -1
- package/dist/lib/api-client.d.ts +0 -561
- package/dist/lib/api-client.js +0 -421
- package/dist/lib/api-client.js.map +0 -1
- package/dist/lib/auth.d.ts +0 -50
- package/dist/lib/auth.js +0 -230
- package/dist/lib/auth.js.map +0 -1
- package/dist/lib/config.d.ts +0 -34
- package/dist/lib/config.js +0 -69
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/credential-utils.d.ts +0 -36
- package/dist/lib/credential-utils.js +0 -88
- package/dist/lib/credential-utils.js.map +0 -1
- package/dist/lib/diff-display.d.ts +0 -8
- package/dist/lib/diff-display.js +0 -37
- package/dist/lib/diff-display.js.map +0 -1
- package/dist/lib/eval-format.d.ts +0 -29
- package/dist/lib/eval-format.js +0 -44
- package/dist/lib/eval-format.js.map +0 -1
- package/dist/lib/hub-lock.d.ts +0 -7
- package/dist/lib/hub-lock.js +0 -116
- package/dist/lib/hub-lock.js.map +0 -1
- package/dist/lib/layout.d.ts +0 -79
- package/dist/lib/layout.js +0 -133
- package/dist/lib/layout.js.map +0 -1
- package/dist/lib/org-workspace.d.ts +0 -22
- package/dist/lib/org-workspace.js +0 -106
- package/dist/lib/org-workspace.js.map +0 -1
- package/dist/lib/parser.d.ts +0 -16
- package/dist/lib/parser.js +0 -306
- package/dist/lib/parser.js.map +0 -1
- package/dist/lib/repo-config.d.ts +0 -23
- package/dist/lib/repo-config.js +0 -91
- package/dist/lib/repo-config.js.map +0 -1
- package/dist/lib/report-edit-args.d.ts +0 -27
- package/dist/lib/report-edit-args.js +0 -56
- package/dist/lib/report-edit-args.js.map +0 -1
- package/dist/lib/report-inbox.d.ts +0 -19
- package/dist/lib/report-inbox.js +0 -73
- package/dist/lib/report-inbox.js.map +0 -1
- package/dist/lib/resource-files.d.ts +0 -29
- package/dist/lib/resource-files.js +0 -156
- package/dist/lib/resource-files.js.map +0 -1
- package/dist/lib/sentry.d.ts +0 -38
- package/dist/lib/sentry.js +0 -168
- package/dist/lib/sentry.js.map +0 -1
- package/dist/lib/skill-version.d.ts +0 -9
- package/dist/lib/skill-version.js +0 -53
- package/dist/lib/skill-version.js.map +0 -1
- package/dist/lib/sql-output.d.ts +0 -17
- package/dist/lib/sql-output.js +0 -48
- package/dist/lib/sql-output.js.map +0 -1
- package/dist/lib/token-store.d.ts +0 -37
- package/dist/lib/token-store.js +0 -354
- package/dist/lib/token-store.js.map +0 -1
- package/dist/lib/types.d.ts +0 -18
- package/dist/lib/types.js +0 -5
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -97
- package/dist/lib/utils.js +0 -288
- package/dist/lib/utils.js.map +0 -1
- package/dist/lib/version-cache.d.ts +0 -10
- package/dist/lib/version-cache.js +0 -34
- package/dist/lib/version-cache.js.map +0 -1
- package/dist/lib/workspace.d.ts +0 -112
- package/dist/lib/workspace.js +0 -387
- package/dist/lib/workspace.js.map +0 -1
- package/dist/lib/yaml-writer.d.ts +0 -18
- package/dist/lib/yaml-writer.js +0 -283
- package/dist/lib/yaml-writer.js.map +0 -1
package/dist/lib/api-client.d.ts
DELETED
|
@@ -1,561 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* API client — authenticated requests to the WayAI backend
|
|
3
|
-
*/
|
|
4
|
-
import type { HubAsCodePayload, CiDiffResponse, CiLookupResponse, CiSyncResponse, CiOrganizationsResponse, CiCreateOrganizationResponse, CiHubListResponse, CiSyncMcpResponse, SyncSkillsResponse, OrgResourcesPayload, CiOrgResourcesPushResponse } from './types.js';
|
|
5
|
-
import type { AnalyticsSqlBody, AnalyticsSqlResponse, AnalyticsSqlSchemaResponse, AnalyticsStructuredQueryResponse, AuthMeResponse, DataExplorerDebugDoType, DataExplorerDebugAnalyticsTable, DataExplorerDebugObservabilityResponse, DeleteUserConversationsResponse, ObservabilityListResponse, ObservabilityResponse, EvalsSqlBody, EvalsSqlResponse, EvalsSqlSchemaResponse, StructuredQueryBody, AdminReportListResponse, AdminReportDetail, TransitionReportResponse, GroupReportsResponse, UngroupReportResponse, HoldReportResponse, TransitionReportBody, EditReportBody, EditReportResponse, GetReportResponse, ReporterListResponse, ReporterTransitionResponse, ListOrgCredentialsResponse, CreateOrgCredentialResponse, CreateOrgCredentialInput, UpdateOrgCredentialResponse, UpdateOrgCredentialInput, ListOrgTagsResponse, ToolCallResponse } from '@wayai/shared/contracts';
|
|
6
|
-
export declare class ApiError extends Error {
|
|
7
|
-
readonly status: number;
|
|
8
|
-
readonly body: string;
|
|
9
|
-
constructor(method: string, path: string, status: number, body: string);
|
|
10
|
-
/** True when the status code is a 4xx client error (expected user-facing condition, not a bug). */
|
|
11
|
-
get isExpected(): boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface ApiClientOptions {
|
|
14
|
-
apiUrl: string;
|
|
15
|
-
accessToken: string;
|
|
16
|
-
/**
|
|
17
|
-
* Optional re-auth hook. When a request comes back 401, the client invokes
|
|
18
|
-
* this to obtain a fresh token, swaps it in, and retries the request exactly
|
|
19
|
-
* once (mirroring the frontend `fetchWithAuth` single-refresh-then-retry).
|
|
20
|
-
*
|
|
21
|
-
* Long-running commands whose lifetime can exceed a short-lived OAuth JWT —
|
|
22
|
-
* `run-eval`'s poll being the only one — pass `() => getAccessToken(config)`
|
|
23
|
-
* so a token that rotates/expires mid-command self-heals instead of aborting
|
|
24
|
-
* (gh #2605). Short-lived commands omit it and keep the throw-on-401 behavior.
|
|
25
|
-
*/
|
|
26
|
-
onUnauthorized?: () => Promise<string>;
|
|
27
|
-
}
|
|
28
|
-
export declare class ApiClient {
|
|
29
|
-
private apiUrl;
|
|
30
|
-
private accessToken;
|
|
31
|
-
private onUnauthorized?;
|
|
32
|
-
constructor(options: ApiClientOptions);
|
|
33
|
-
pull(hubId: string, organizationId?: string): Promise<HubAsCodePayload>;
|
|
34
|
-
diff(hubId: string, config: HubAsCodePayload, direction?: 'push' | 'pull', organizationId?: string): Promise<CiDiffResponse>;
|
|
35
|
-
push(hubId: string, config: HubAsCodePayload, organizationId?: string): Promise<CiSyncResponse>;
|
|
36
|
-
sync(hubId: string, branchName: string, config: HubAsCodePayload, commitSha?: string): Promise<CiSyncResponse>;
|
|
37
|
-
/**
|
|
38
|
-
* Re-discover an MCP connection's tool/resource catalog (refreshes stale
|
|
39
|
-
* input schemas that `push` leaves untouched). `connection` is the display
|
|
40
|
-
* name or the connection UUID.
|
|
41
|
-
*/
|
|
42
|
-
syncMcp(hubId: string, connection: string, organizationId?: string): Promise<CiSyncMcpResponse>;
|
|
43
|
-
lookup(path: string, opts?: {
|
|
44
|
-
organizationId?: string;
|
|
45
|
-
}): Promise<CiLookupResponse>;
|
|
46
|
-
organizations(): Promise<CiOrganizationsResponse>;
|
|
47
|
-
/** Create a new organization (the caller becomes its owner). */
|
|
48
|
-
createOrganization(name: string, region?: string): Promise<CiCreateOrganizationResponse>;
|
|
49
|
-
pullOrgResources(orgId: string): Promise<OrgResourcesPayload>;
|
|
50
|
-
diffOrgResources(orgId: string, config: OrgResourcesPayload, direction?: 'push' | 'pull'): Promise<CiDiffResponse>;
|
|
51
|
-
pushOrgResources(orgId: string, config: OrgResourcesPayload): Promise<CiOrgResourcesPushResponse>;
|
|
52
|
-
me(): Promise<AuthMeResponse>;
|
|
53
|
-
syncSkills(hubId: string, connectionId?: string): Promise<SyncSkillsResponse>;
|
|
54
|
-
listHubs(organizationId: string): Promise<CiHubListResponse>;
|
|
55
|
-
sendMessage(hubId: string, message: string, opts?: {
|
|
56
|
-
conversationId?: string;
|
|
57
|
-
}): Promise<{
|
|
58
|
-
conversation_id: string;
|
|
59
|
-
hub_type: string;
|
|
60
|
-
user_message_id: string;
|
|
61
|
-
agent_reply: {
|
|
62
|
-
message_id: string;
|
|
63
|
-
message_text: string;
|
|
64
|
-
} | null;
|
|
65
|
-
status: string;
|
|
66
|
-
status_reason?: string;
|
|
67
|
-
}>;
|
|
68
|
-
deleteHistory(hubId: string, opts: {
|
|
69
|
-
userId: string;
|
|
70
|
-
} & ({
|
|
71
|
-
mode: 'all';
|
|
72
|
-
} | {
|
|
73
|
-
mode: 'current';
|
|
74
|
-
conversationId: string;
|
|
75
|
-
})): Promise<DeleteUserConversationsResponse>;
|
|
76
|
-
getConversations(hubId: string, opts?: {
|
|
77
|
-
status?: string;
|
|
78
|
-
limit?: number;
|
|
79
|
-
offset?: number;
|
|
80
|
-
}): Promise<{
|
|
81
|
-
conversations: Array<{
|
|
82
|
-
conversation_id: string;
|
|
83
|
-
conversation_status: string;
|
|
84
|
-
current_responder_type: string | null;
|
|
85
|
-
kanban_status: string | null;
|
|
86
|
-
created_at: string;
|
|
87
|
-
updated_at: string | null;
|
|
88
|
-
user_name: string | null;
|
|
89
|
-
user_email: string | null;
|
|
90
|
-
}>;
|
|
91
|
-
total: number;
|
|
92
|
-
}>;
|
|
93
|
-
getEvals(hubId: string, opts?: {
|
|
94
|
-
enabled?: string;
|
|
95
|
-
}): Promise<{
|
|
96
|
-
success: true;
|
|
97
|
-
data: {
|
|
98
|
-
evals: Array<{
|
|
99
|
-
eval_id: string;
|
|
100
|
-
eval_name: string;
|
|
101
|
-
enabled: boolean;
|
|
102
|
-
number_of_runs: number;
|
|
103
|
-
responder_agent_id: string;
|
|
104
|
-
scenario_set_id: string;
|
|
105
|
-
hub_id: string;
|
|
106
|
-
agent?: {
|
|
107
|
-
agent_id: string;
|
|
108
|
-
agent_name: string;
|
|
109
|
-
agent_role: string;
|
|
110
|
-
} | null;
|
|
111
|
-
}>;
|
|
112
|
-
total_count: number;
|
|
113
|
-
};
|
|
114
|
-
}>;
|
|
115
|
-
getEvalSessions(hubId: string, opts?: {
|
|
116
|
-
status?: string;
|
|
117
|
-
}): Promise<{
|
|
118
|
-
success: true;
|
|
119
|
-
data: {
|
|
120
|
-
sessions: Array<{
|
|
121
|
-
eval_session_id: string;
|
|
122
|
-
session_name: string;
|
|
123
|
-
session_status: string;
|
|
124
|
-
hub_id: string;
|
|
125
|
-
total_evals: number;
|
|
126
|
-
total_runs: number;
|
|
127
|
-
successful_runs: number;
|
|
128
|
-
failed_runs: number;
|
|
129
|
-
started_at?: string;
|
|
130
|
-
completed_at?: string;
|
|
131
|
-
created_at: string;
|
|
132
|
-
}>;
|
|
133
|
-
total_count: number;
|
|
134
|
-
};
|
|
135
|
-
}>;
|
|
136
|
-
createEvalSession(hubId: string, sessionName: string, scenarioSetId?: string): Promise<{
|
|
137
|
-
success: true;
|
|
138
|
-
data: {
|
|
139
|
-
session: {
|
|
140
|
-
eval_session_id: string;
|
|
141
|
-
session_name: string;
|
|
142
|
-
session_status: string;
|
|
143
|
-
hub_id: string;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
message: string;
|
|
147
|
-
}>;
|
|
148
|
-
runEvalSession(hubId: string, sessionId: string): Promise<{
|
|
149
|
-
success: true;
|
|
150
|
-
data: {
|
|
151
|
-
session: {
|
|
152
|
-
eval_session_id: string;
|
|
153
|
-
session_status: string;
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
message: string;
|
|
157
|
-
}>;
|
|
158
|
-
getEvalSessionDetails(hubId: string, sessionId: string): Promise<{
|
|
159
|
-
success: true;
|
|
160
|
-
data: {
|
|
161
|
-
session: {
|
|
162
|
-
eval_session_id: string;
|
|
163
|
-
session_name: string;
|
|
164
|
-
session_status: string;
|
|
165
|
-
started_at?: string;
|
|
166
|
-
completed_at?: string;
|
|
167
|
-
};
|
|
168
|
-
results: Array<{
|
|
169
|
-
eval_session_result_id: string;
|
|
170
|
-
eval_id: string;
|
|
171
|
-
total_runs: number;
|
|
172
|
-
successful_runs: number;
|
|
173
|
-
failed_runs: number;
|
|
174
|
-
pending_runs: number;
|
|
175
|
-
running_runs: number;
|
|
176
|
-
success_rate: number;
|
|
177
|
-
avg_execution_time_ms?: number;
|
|
178
|
-
aggregated_scores?: Record<string, {
|
|
179
|
-
avg: number;
|
|
180
|
-
min: number;
|
|
181
|
-
max: number;
|
|
182
|
-
}>;
|
|
183
|
-
eval_status: string;
|
|
184
|
-
eval?: {
|
|
185
|
-
eval_id: string;
|
|
186
|
-
eval_name: string;
|
|
187
|
-
responder_agent_id: string;
|
|
188
|
-
} | null;
|
|
189
|
-
}>;
|
|
190
|
-
};
|
|
191
|
-
}>;
|
|
192
|
-
getEvalSessionRuns(hubId: string, sessionId: string, opts?: {
|
|
193
|
-
evalId?: string;
|
|
194
|
-
limit?: number;
|
|
195
|
-
}): Promise<{
|
|
196
|
-
success: true;
|
|
197
|
-
data: {
|
|
198
|
-
runs: Array<{
|
|
199
|
-
eval_session_run_id: string;
|
|
200
|
-
eval_id: string;
|
|
201
|
-
run_number: number;
|
|
202
|
-
eval_response: {
|
|
203
|
-
role: string;
|
|
204
|
-
content: string;
|
|
205
|
-
tool_calls?: ToolCallResponse[];
|
|
206
|
-
} | null;
|
|
207
|
-
response_match: boolean | null;
|
|
208
|
-
response_comment?: string;
|
|
209
|
-
execution_time_ms?: number;
|
|
210
|
-
run_status: string;
|
|
211
|
-
scores?: Record<string, number>;
|
|
212
|
-
eval?: {
|
|
213
|
-
eval_id: string;
|
|
214
|
-
eval_name: string;
|
|
215
|
-
responder_agent_id: string;
|
|
216
|
-
} | null;
|
|
217
|
-
}>;
|
|
218
|
-
total_count: number;
|
|
219
|
-
session_id: string;
|
|
220
|
-
};
|
|
221
|
-
}>;
|
|
222
|
-
listScenarioSets(hubId: string): Promise<{
|
|
223
|
-
success: true;
|
|
224
|
-
data: {
|
|
225
|
-
scenario_sets: Array<{
|
|
226
|
-
scenario_set_id: string;
|
|
227
|
-
set_name: string;
|
|
228
|
-
description?: string | null;
|
|
229
|
-
enabled: boolean;
|
|
230
|
-
}>;
|
|
231
|
-
total_count: number;
|
|
232
|
-
};
|
|
233
|
-
}>;
|
|
234
|
-
createScenarioSet(hubId: string, setName: string): Promise<{
|
|
235
|
-
success: true;
|
|
236
|
-
data: {
|
|
237
|
-
scenario_set: {
|
|
238
|
-
scenario_set_id: string;
|
|
239
|
-
set_name: string;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
}>;
|
|
243
|
-
runEvalsSql(body: EvalsSqlBody): Promise<EvalsSqlResponse>;
|
|
244
|
-
getEvalsSqlSchema(hubId: string): Promise<EvalsSqlSchemaResponse>;
|
|
245
|
-
createScenarioFromConversation(input: {
|
|
246
|
-
hub_id: string;
|
|
247
|
-
conversation_id: string;
|
|
248
|
-
scenario_set_id: string;
|
|
249
|
-
scenario_name: string;
|
|
250
|
-
evaluator_instructions?: string;
|
|
251
|
-
}): Promise<{
|
|
252
|
-
success: true;
|
|
253
|
-
data: {
|
|
254
|
-
eval: {
|
|
255
|
-
eval_id: string;
|
|
256
|
-
eval_name: string;
|
|
257
|
-
scenario_set_id: string;
|
|
258
|
-
responder_agent_id: string;
|
|
259
|
-
message_text: {
|
|
260
|
-
role: string;
|
|
261
|
-
content?: string | null;
|
|
262
|
-
tool_calls?: unknown;
|
|
263
|
-
};
|
|
264
|
-
message_expected_response: {
|
|
265
|
-
role: string;
|
|
266
|
-
content?: string | null;
|
|
267
|
-
tool_calls?: unknown;
|
|
268
|
-
};
|
|
269
|
-
message_history: Array<{
|
|
270
|
-
role: string;
|
|
271
|
-
content?: string | null;
|
|
272
|
-
tool_calls?: unknown;
|
|
273
|
-
}>;
|
|
274
|
-
evaluator_instructions?: string;
|
|
275
|
-
number_of_runs: number;
|
|
276
|
-
enabled: boolean;
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
message: string;
|
|
280
|
-
}>;
|
|
281
|
-
getAnalyticsVariables(hubId: string): Promise<{
|
|
282
|
-
success: true;
|
|
283
|
-
data: {
|
|
284
|
-
categories: Array<{
|
|
285
|
-
category: string;
|
|
286
|
-
label: string;
|
|
287
|
-
variableCount: number;
|
|
288
|
-
}>;
|
|
289
|
-
variablesByCategory: Record<string, Array<{
|
|
290
|
-
variable_id: string;
|
|
291
|
-
variable_name: string;
|
|
292
|
-
variable_description?: string;
|
|
293
|
-
variable_label?: string;
|
|
294
|
-
variable_type: 'numeric' | 'categorical' | 'text';
|
|
295
|
-
variable_origin: string;
|
|
296
|
-
variable_category: string;
|
|
297
|
-
variable_enum: unknown[];
|
|
298
|
-
pin: boolean;
|
|
299
|
-
}>>;
|
|
300
|
-
};
|
|
301
|
-
}>;
|
|
302
|
-
getAnalyticsData(body: {
|
|
303
|
-
hub_id: string;
|
|
304
|
-
selected_variables: string[];
|
|
305
|
-
time_interval: {
|
|
306
|
-
start: string;
|
|
307
|
-
end: string;
|
|
308
|
-
};
|
|
309
|
-
periodicity: string;
|
|
310
|
-
trend_analysis: boolean;
|
|
311
|
-
include_summary: boolean;
|
|
312
|
-
filters?: Array<{
|
|
313
|
-
variable_id: string;
|
|
314
|
-
filter_type: string;
|
|
315
|
-
filter_value: string | number;
|
|
316
|
-
}>;
|
|
317
|
-
}): Promise<{
|
|
318
|
-
analytics: Array<{
|
|
319
|
-
variable: string;
|
|
320
|
-
variable_id: string;
|
|
321
|
-
type: 'numeric' | 'categorical' | 'text';
|
|
322
|
-
data?: Array<{
|
|
323
|
-
period: string;
|
|
324
|
-
value: number | string | Record<string, number>;
|
|
325
|
-
}>;
|
|
326
|
-
metrics?: {
|
|
327
|
-
average: number;
|
|
328
|
-
sum: number;
|
|
329
|
-
minimum: number;
|
|
330
|
-
maximum: number;
|
|
331
|
-
count?: number;
|
|
332
|
-
median?: number;
|
|
333
|
-
};
|
|
334
|
-
distribution?: Record<string, number>;
|
|
335
|
-
}>;
|
|
336
|
-
summary?: {
|
|
337
|
-
total_conversations: number;
|
|
338
|
-
ai_only_rate: number;
|
|
339
|
-
avg_response_time: number;
|
|
340
|
-
assistant_response_time: number;
|
|
341
|
-
support_response_time: number;
|
|
342
|
-
user_response_time: number;
|
|
343
|
-
threshold1_minutes: number;
|
|
344
|
-
threshold2_minutes: number;
|
|
345
|
-
threshold3_minutes: number;
|
|
346
|
-
rate_under_threshold1: number;
|
|
347
|
-
rate_under_threshold2: number;
|
|
348
|
-
rate_under_threshold3: number;
|
|
349
|
-
};
|
|
350
|
-
}>;
|
|
351
|
-
runAnalyticsQuery(body: StructuredQueryBody): Promise<AnalyticsStructuredQueryResponse>;
|
|
352
|
-
runAnalyticsSql(body: AnalyticsSqlBody): Promise<AnalyticsSqlResponse>;
|
|
353
|
-
getAnalyticsSqlSchema(hubId: string): Promise<AnalyticsSqlSchemaResponse>;
|
|
354
|
-
getAnalyticsConversations(body: {
|
|
355
|
-
hub_id: string;
|
|
356
|
-
time_interval?: {
|
|
357
|
-
start: string;
|
|
358
|
-
end: string;
|
|
359
|
-
};
|
|
360
|
-
filters?: Array<{
|
|
361
|
-
variable_id: string;
|
|
362
|
-
filter_type: string;
|
|
363
|
-
filter_value: string | number;
|
|
364
|
-
}>;
|
|
365
|
-
limit: number;
|
|
366
|
-
offset: number;
|
|
367
|
-
}): Promise<{
|
|
368
|
-
success: true;
|
|
369
|
-
conversations: Array<{
|
|
370
|
-
conversation_id: string;
|
|
371
|
-
created_at?: string;
|
|
372
|
-
updated_at?: string;
|
|
373
|
-
message_count?: number;
|
|
374
|
-
participant_name?: string;
|
|
375
|
-
participant_phone?: string;
|
|
376
|
-
}>;
|
|
377
|
-
total: number;
|
|
378
|
-
offset: number;
|
|
379
|
-
limit: number;
|
|
380
|
-
cold?: boolean;
|
|
381
|
-
}>;
|
|
382
|
-
getConversation(hubId: string, conversationId: string, opts?: {
|
|
383
|
-
limit?: number;
|
|
384
|
-
offset?: number;
|
|
385
|
-
}): Promise<{
|
|
386
|
-
conversation: {
|
|
387
|
-
conversation_id: string;
|
|
388
|
-
conversation_status: string;
|
|
389
|
-
current_responder_type: string | null;
|
|
390
|
-
kanban_status: string | null;
|
|
391
|
-
created_at: string;
|
|
392
|
-
updated_at: string | null;
|
|
393
|
-
user_name: string | null;
|
|
394
|
-
user_email: string | null;
|
|
395
|
-
};
|
|
396
|
-
messages: Array<{
|
|
397
|
-
message_id: string;
|
|
398
|
-
message_text: string | null;
|
|
399
|
-
sender_type: string;
|
|
400
|
-
receiver_type: string | null;
|
|
401
|
-
created_at: string;
|
|
402
|
-
message_type?: string;
|
|
403
|
-
channel_type?: string | null;
|
|
404
|
-
keep_in_history?: boolean;
|
|
405
|
-
agent_id?: string | null;
|
|
406
|
-
sender_id?: string | null;
|
|
407
|
-
receiver_id?: string | null;
|
|
408
|
-
sender_description?: string;
|
|
409
|
-
receiver_description?: string;
|
|
410
|
-
metadata?: Record<string, unknown> | null;
|
|
411
|
-
message_status?: string | null;
|
|
412
|
-
}>;
|
|
413
|
-
total_messages: number;
|
|
414
|
-
}>;
|
|
415
|
-
createOrgCredential(body: {
|
|
416
|
-
organization_id: string;
|
|
417
|
-
credential_display_name: string;
|
|
418
|
-
authentication_type: 'api_key' | 'bearer' | 'basic_auth';
|
|
419
|
-
credential_description?: string;
|
|
420
|
-
api_key?: string;
|
|
421
|
-
access_token?: string;
|
|
422
|
-
username?: string;
|
|
423
|
-
password?: string;
|
|
424
|
-
tags?: string[];
|
|
425
|
-
environment?: CreateOrgCredentialInput['environment'];
|
|
426
|
-
}): Promise<CreateOrgCredentialResponse>;
|
|
427
|
-
listOrgCredentials(organizationId: string): Promise<ListOrgCredentialsResponse>;
|
|
428
|
-
updateOrgCredential(credentialId: string, organizationId: string, body: UpdateOrgCredentialInput): Promise<UpdateOrgCredentialResponse>;
|
|
429
|
-
listOrgTags(organizationId: string): Promise<ListOrgTagsResponse>;
|
|
430
|
-
createHub(organizationId: string, hubName: string, hubType?: string, hubDescription?: string): Promise<{
|
|
431
|
-
data: Array<{
|
|
432
|
-
hub_id: string;
|
|
433
|
-
hub_name: string;
|
|
434
|
-
hub_environment: string;
|
|
435
|
-
hub_type: string;
|
|
436
|
-
[key: string]: unknown;
|
|
437
|
-
}>;
|
|
438
|
-
}>;
|
|
439
|
-
submitReport(params: {
|
|
440
|
-
title: string;
|
|
441
|
-
description: string;
|
|
442
|
-
source?: string;
|
|
443
|
-
classification?: string;
|
|
444
|
-
dedup_key?: string;
|
|
445
|
-
organization_id?: string;
|
|
446
|
-
hub_id?: string;
|
|
447
|
-
conversation_id?: string;
|
|
448
|
-
agent_id?: string;
|
|
449
|
-
agent_name?: string;
|
|
450
|
-
error_message?: string;
|
|
451
|
-
steps_to_reproduce?: string;
|
|
452
|
-
additional_context?: string;
|
|
453
|
-
client_version?: string;
|
|
454
|
-
}): Promise<{
|
|
455
|
-
report_id: string;
|
|
456
|
-
status: string;
|
|
457
|
-
created: boolean;
|
|
458
|
-
}>;
|
|
459
|
-
/** Reporter content edit of an own `cli` report (PATCH /api/reports/:id). */
|
|
460
|
-
editReport(reportId: string, patch: EditReportBody): Promise<EditReportResponse>;
|
|
461
|
-
/** Reporter read-back — own reports, newest first (GET /api/reports[?status=]). */
|
|
462
|
-
listMyReports(status?: string): Promise<ReporterListResponse>;
|
|
463
|
-
/** Reporter read-back — one own report + its message thread (GET /api/reports/:id). */
|
|
464
|
-
getMyReport(reportId: string): Promise<GetReportResponse>;
|
|
465
|
-
/** Reporter accepts a shipped fix → addressed (POST /api/reports/:id/accept). */
|
|
466
|
-
acceptReport(reportId: string): Promise<ReporterTransitionResponse>;
|
|
467
|
-
/** Reporter contests a fix or dismissal → contested (POST /api/reports/:id/contest). */
|
|
468
|
-
contestReport(reportId: string, reason: string): Promise<ReporterTransitionResponse>;
|
|
469
|
-
listAdminReports(params?: {
|
|
470
|
-
status?: string;
|
|
471
|
-
source?: string;
|
|
472
|
-
limit?: number;
|
|
473
|
-
offset?: number;
|
|
474
|
-
since?: string;
|
|
475
|
-
}): Promise<AdminReportListResponse>;
|
|
476
|
-
getAdminReport(reportId: string): Promise<{
|
|
477
|
-
data: AdminReportDetail;
|
|
478
|
-
}>;
|
|
479
|
-
transitionAdminReport(reportId: string, body: TransitionReportBody): Promise<TransitionReportResponse>;
|
|
480
|
-
groupAdminReports(canonicalId: string, memberIds: string[]): Promise<GroupReportsResponse>;
|
|
481
|
-
ungroupAdminReport(memberId: string): Promise<UngroupReportResponse>;
|
|
482
|
-
/** Hold a pending report one triage cycle (POST /api/admin/reports/:id/hold). Silent; internal note. */
|
|
483
|
-
holdAdminReport(reportId: string, reason: string): Promise<HoldReportResponse>;
|
|
484
|
-
/** Admin content edit of any report (PATCH /api/admin/reports/:id). */
|
|
485
|
-
updateAdminReport(reportId: string, patch: EditReportBody): Promise<EditReportResponse>;
|
|
486
|
-
getPendingSchedules(hubId: string, conversationId: string): Promise<{
|
|
487
|
-
entries: Array<{
|
|
488
|
-
conversation_schedule_id: string;
|
|
489
|
-
schedule_type: string;
|
|
490
|
-
run_at: string;
|
|
491
|
-
message_text: string;
|
|
492
|
-
followup_order: number | null;
|
|
493
|
-
followup_source: string | null;
|
|
494
|
-
end_conversation: boolean;
|
|
495
|
-
}>;
|
|
496
|
-
total: number;
|
|
497
|
-
}>;
|
|
498
|
-
debugListTables(doType: DataExplorerDebugDoType, doId: string): Promise<{
|
|
499
|
-
data: {
|
|
500
|
-
do_type: string;
|
|
501
|
-
do_id: string;
|
|
502
|
-
tables: string[];
|
|
503
|
-
};
|
|
504
|
-
}>;
|
|
505
|
-
debugReadTable(doType: DataExplorerDebugDoType, doId: string, table: string, opts?: {
|
|
506
|
-
limit?: number;
|
|
507
|
-
id?: string;
|
|
508
|
-
}): Promise<{
|
|
509
|
-
data: {
|
|
510
|
-
do_type: string;
|
|
511
|
-
do_id: string;
|
|
512
|
-
table: string;
|
|
513
|
-
rows: Array<Record<string, unknown>>;
|
|
514
|
-
redacted_columns: string[];
|
|
515
|
-
truncated: boolean;
|
|
516
|
-
limit: number;
|
|
517
|
-
};
|
|
518
|
-
}>;
|
|
519
|
-
debugListAnalyticsTables(): Promise<{
|
|
520
|
-
data: {
|
|
521
|
-
tables: DataExplorerDebugAnalyticsTable[];
|
|
522
|
-
};
|
|
523
|
-
}>;
|
|
524
|
-
debugReadAnalyticsTable(table: DataExplorerDebugAnalyticsTable, opts?: {
|
|
525
|
-
conversationId?: string;
|
|
526
|
-
hubId?: string;
|
|
527
|
-
messageId?: string;
|
|
528
|
-
limit?: number;
|
|
529
|
-
}): Promise<{
|
|
530
|
-
data: {
|
|
531
|
-
table: DataExplorerDebugAnalyticsTable;
|
|
532
|
-
rows: Array<Record<string, unknown>>;
|
|
533
|
-
redacted_columns: string[];
|
|
534
|
-
truncated: boolean;
|
|
535
|
-
limit: number;
|
|
536
|
-
};
|
|
537
|
-
}>;
|
|
538
|
-
debugReadArchive(hubId: string, conversationId: string, opts?: {
|
|
539
|
-
messageId?: string;
|
|
540
|
-
}): Promise<{
|
|
541
|
-
data: {
|
|
542
|
-
hub_id: string;
|
|
543
|
-
conversation_id: string;
|
|
544
|
-
archive: Record<string, unknown>;
|
|
545
|
-
message_filtered: boolean;
|
|
546
|
-
};
|
|
547
|
-
}>;
|
|
548
|
-
/** List per-message observability metadata summaries for a conversation (hub-scoped auth). */
|
|
549
|
-
listConversationObservability(conversationId: string): Promise<ObservabilityListResponse>;
|
|
550
|
-
/** Fetch the full observability record for a single message (hub-scoped auth). */
|
|
551
|
-
getMessageObservability(conversationId: string, messageId: string): Promise<ObservabilityResponse>;
|
|
552
|
-
listArchivedConversationObservability(hubId: string, conversationId: string): Promise<ObservabilityListResponse>;
|
|
553
|
-
getArchivedMessageObservability(hubId: string, conversationId: string, messageId: string): Promise<ObservabilityResponse>;
|
|
554
|
-
/** Platform-admin debug read of LLM observability records (list or single via messageId). */
|
|
555
|
-
debugReadObservability(hubId: string, conversationId: string, opts?: {
|
|
556
|
-
messageId?: string;
|
|
557
|
-
}): Promise<DataExplorerDebugObservabilityResponse>;
|
|
558
|
-
private request;
|
|
559
|
-
/** Issue a single authenticated request with the client's current token. */
|
|
560
|
-
private send;
|
|
561
|
-
}
|