@amigo-ai/platform-sdk 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -0
- package/api.md +166 -0
- package/dist/index.cjs +1063 -0
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +68 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1063 -0
- package/dist/index.mjs.map +4 -4
- package/dist/resources/analytics.js +20 -0
- package/dist/resources/analytics.js.map +1 -1
- package/dist/resources/briefs.js +34 -0
- package/dist/resources/briefs.js.map +1 -0
- package/dist/resources/calls.js +22 -0
- package/dist/resources/calls.js.map +1 -1
- package/dist/resources/command-center.js +17 -0
- package/dist/resources/command-center.js.map +1 -0
- package/dist/resources/crm.js +52 -0
- package/dist/resources/crm.js.map +1 -0
- package/dist/resources/data-query.js +22 -0
- package/dist/resources/data-query.js.map +1 -0
- package/dist/resources/desktop-sessions.js +43 -0
- package/dist/resources/desktop-sessions.js.map +1 -0
- package/dist/resources/fhir.js +130 -0
- package/dist/resources/fhir.js.map +1 -0
- package/dist/resources/insights.js +53 -0
- package/dist/resources/insights.js.map +1 -0
- package/dist/resources/intake.js +42 -0
- package/dist/resources/intake.js.map +1 -0
- package/dist/resources/monitor-concepts.js +47 -0
- package/dist/resources/monitor-concepts.js.map +1 -0
- package/dist/resources/network.js +17 -0
- package/dist/resources/network.js.map +1 -0
- package/dist/resources/pipeline.js +69 -0
- package/dist/resources/pipeline.js.map +1 -0
- package/dist/resources/sensorium.js +25 -0
- package/dist/resources/sensorium.js.map +1 -0
- package/dist/resources/sessions.js +29 -0
- package/dist/resources/sessions.js.map +1 -0
- package/dist/resources/settings.js +17 -0
- package/dist/resources/settings.js.map +1 -1
- package/dist/resources/simulations.js +75 -0
- package/dist/resources/simulations.js.map +1 -1
- package/dist/resources/surfaces.js +85 -0
- package/dist/resources/surfaces.js.map +1 -0
- package/dist/resources/tasks.js +23 -0
- package/dist/resources/tasks.js.map +1 -0
- package/dist/resources/tools.js +24 -0
- package/dist/resources/tools.js.map +1 -0
- package/dist/resources/unification-rules.js +46 -0
- package/dist/resources/unification-rules.js.map +1 -0
- package/dist/resources/workspaces.js +25 -0
- package/dist/resources/workspaces.js.map +1 -1
- package/dist/types/index.d.cts +51 -0
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +51 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/analytics.d.ts +26 -0
- package/dist/types/resources/analytics.d.ts.map +1 -1
- package/dist/types/resources/briefs.d.ts +79 -0
- package/dist/types/resources/briefs.d.ts.map +1 -0
- package/dist/types/resources/calls.d.ts +77 -0
- package/dist/types/resources/calls.d.ts.map +1 -1
- package/dist/types/resources/command-center.d.ts +55 -0
- package/dist/types/resources/command-center.d.ts.map +1 -0
- package/dist/types/resources/crm.d.ts +207 -0
- package/dist/types/resources/crm.d.ts.map +1 -0
- package/dist/types/resources/data-query.d.ts +23 -0
- package/dist/types/resources/data-query.d.ts.map +1 -0
- package/dist/types/resources/desktop-sessions.d.ts +38 -0
- package/dist/types/resources/desktop-sessions.d.ts.map +1 -0
- package/dist/types/resources/fhir.d.ts +350 -0
- package/dist/types/resources/fhir.d.ts.map +1 -0
- package/dist/types/resources/insights.d.ts +56 -0
- package/dist/types/resources/insights.d.ts.map +1 -0
- package/dist/types/resources/intake.d.ts +59 -0
- package/dist/types/resources/intake.d.ts.map +1 -0
- package/dist/types/resources/monitor-concepts.d.ts +115 -0
- package/dist/types/resources/monitor-concepts.d.ts.map +1 -0
- package/dist/types/resources/network.d.ts +17 -0
- package/dist/types/resources/network.d.ts.map +1 -0
- package/dist/types/resources/pipeline.d.ts +183 -0
- package/dist/types/resources/pipeline.d.ts.map +1 -0
- package/dist/types/resources/sensorium.d.ts +40 -0
- package/dist/types/resources/sensorium.d.ts.map +1 -0
- package/dist/types/resources/sessions.d.ts +33 -0
- package/dist/types/resources/sessions.d.ts.map +1 -0
- package/dist/types/resources/settings.d.ts +16 -0
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/simulations.d.ts +186 -3
- package/dist/types/resources/simulations.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts +240 -0
- package/dist/types/resources/surfaces.d.ts.map +1 -0
- package/dist/types/resources/tasks.d.ts +55 -0
- package/dist/types/resources/tasks.d.ts.map +1 -0
- package/dist/types/resources/tools.d.ts +53 -0
- package/dist/types/resources/tools.d.ts.map +1 -0
- package/dist/types/resources/unification-rules.d.ts +129 -0
- package/dist/types/resources/unification-rules.d.ts.map +1 -0
- package/dist/types/resources/workspaces.d.ts +24 -0
- package/dist/types/resources/workspaces.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { components } from '../generated/api.js';
|
|
2
|
-
import type { SimulationSessionId } from '../core/branded-types.js';
|
|
1
|
+
import type { components, paths } from '../generated/api.js';
|
|
2
|
+
import type { ServiceId, SimulationRunId, SimulationSessionId } from '../core/branded-types.js';
|
|
3
3
|
import { WorkspaceScopedResource } from './base.js';
|
|
4
|
+
type CreateSimulationSessionRequest = components['schemas']['src__routes__simulations__CreateSessionRequest'];
|
|
5
|
+
export type ListSimulationRunsParams = NonNullable<paths['/v1/{workspace_id}/simulations/runs']['get']['parameters']['query']>;
|
|
4
6
|
/**
|
|
5
7
|
* Simulations — interactive agent testing via the Playground.
|
|
6
8
|
*
|
|
@@ -10,7 +12,7 @@ import { WorkspaceScopedResource } from './base.js';
|
|
|
10
12
|
*/
|
|
11
13
|
export declare class SimulationsResource extends WorkspaceScopedResource {
|
|
12
14
|
/** Start a simulation session — returns the agent's greeting and initial snapshot */
|
|
13
|
-
createSession(body:
|
|
15
|
+
createSession(body: CreateSimulationSessionRequest): Promise<{
|
|
14
16
|
greeting: string;
|
|
15
17
|
is_terminal: boolean;
|
|
16
18
|
session_id: string;
|
|
@@ -192,5 +194,186 @@ export declare class SimulationsResource extends WorkspaceScopedResource {
|
|
|
192
194
|
};
|
|
193
195
|
session_id: string;
|
|
194
196
|
} & import("../index.js").ResponseMetadata>;
|
|
197
|
+
/**
|
|
198
|
+
* Multi-session simulation runs — orchestrate a batch of scenarios against
|
|
199
|
+
* a service to compute coverage and surface regressions. Use this when you
|
|
200
|
+
* want to compare branch behavior or measure drift between versions.
|
|
201
|
+
*
|
|
202
|
+
* @beta New in this release; surface may evolve.
|
|
203
|
+
*/
|
|
204
|
+
readonly runs: {
|
|
205
|
+
/** List simulation runs in the workspace */
|
|
206
|
+
list: (params?: ListSimulationRunsParams) => Promise<{
|
|
207
|
+
[x: string]: unknown;
|
|
208
|
+
} & import("../index.js").ResponseMetadata>;
|
|
209
|
+
/** Create a new simulation run */
|
|
210
|
+
create: (body: components["schemas"]["CreateRunRequest"]) => Promise<{
|
|
211
|
+
[x: string]: unknown;
|
|
212
|
+
} & import("../index.js").ResponseMetadata>;
|
|
213
|
+
/** Get a simulation run with its scenarios + status */
|
|
214
|
+
get: (runId: SimulationRunId | string) => Promise<{
|
|
215
|
+
branch_name?: string | null | undefined;
|
|
216
|
+
bridge_request?: {
|
|
217
|
+
[x: string]: unknown;
|
|
218
|
+
} | null | undefined;
|
|
219
|
+
completed_at?: string | null | undefined;
|
|
220
|
+
created_at?: string | null | undefined;
|
|
221
|
+
id: string;
|
|
222
|
+
objective?: string | null | undefined;
|
|
223
|
+
scenarios?: {
|
|
224
|
+
[x: string]: unknown;
|
|
225
|
+
}[] | null | undefined;
|
|
226
|
+
service_id: string;
|
|
227
|
+
status: "running" | "completed" | "failed";
|
|
228
|
+
tags?: string[] | undefined;
|
|
229
|
+
total_scenarios_requested?: number | null | undefined;
|
|
230
|
+
total_sessions?: number | undefined;
|
|
231
|
+
total_turns?: number | undefined;
|
|
232
|
+
} & import("../index.js").ResponseMetadata>;
|
|
233
|
+
/** Mark a run as complete (used by the harness once all sessions finish) */
|
|
234
|
+
complete: (runId: SimulationRunId | string) => Promise<{
|
|
235
|
+
[x: string]: string;
|
|
236
|
+
} & import("../index.js").ResponseMetadata>;
|
|
237
|
+
/** Spin up a session under a run (single scenario inside the run's batch) */
|
|
238
|
+
createSession: (runId: SimulationRunId | string, body: CreateSimulationSessionRequest) => Promise<{
|
|
239
|
+
greeting: string;
|
|
240
|
+
is_terminal: boolean;
|
|
241
|
+
session_id: string;
|
|
242
|
+
snapshot: {
|
|
243
|
+
[x: string]: unknown;
|
|
244
|
+
context_graph_topology?: {
|
|
245
|
+
[x: string]: string;
|
|
246
|
+
}[] | undefined;
|
|
247
|
+
conversation_history?: {
|
|
248
|
+
[x: string]: unknown;
|
|
249
|
+
}[] | undefined;
|
|
250
|
+
current_state: {
|
|
251
|
+
[x: string]: unknown;
|
|
252
|
+
action_guidelines?: string[] | undefined;
|
|
253
|
+
actions?: {
|
|
254
|
+
[x: string]: unknown;
|
|
255
|
+
}[] | undefined;
|
|
256
|
+
boundary_constraints?: string[] | undefined;
|
|
257
|
+
exit_conditions?: {
|
|
258
|
+
[x: string]: unknown;
|
|
259
|
+
}[] | undefined;
|
|
260
|
+
guardrails?: {
|
|
261
|
+
[x: string]: unknown;
|
|
262
|
+
}[] | undefined;
|
|
263
|
+
name: string;
|
|
264
|
+
objective?: string | undefined;
|
|
265
|
+
tools?: string[] | undefined;
|
|
266
|
+
type: string;
|
|
267
|
+
};
|
|
268
|
+
reachable_states?: {
|
|
269
|
+
[x: string]: unknown;
|
|
270
|
+
}[] | undefined;
|
|
271
|
+
state_transitions?: string[][] | undefined;
|
|
272
|
+
states_visited?: string[] | undefined;
|
|
273
|
+
terminal_reached?: boolean | undefined;
|
|
274
|
+
terminal_state?: string | null | undefined;
|
|
275
|
+
tools_called?: string[] | undefined;
|
|
276
|
+
total_turns?: number | undefined;
|
|
277
|
+
turn_policy?: {
|
|
278
|
+
barge_in_enabled?: boolean | undefined;
|
|
279
|
+
block_forward_call?: boolean | undefined;
|
|
280
|
+
block_forward_call_after_turns?: number | undefined;
|
|
281
|
+
context_strategy?: string | undefined;
|
|
282
|
+
greeting_shield_s?: number | undefined;
|
|
283
|
+
safety_response?: string | undefined;
|
|
284
|
+
} | undefined;
|
|
285
|
+
};
|
|
286
|
+
} & import("../index.js").ResponseMetadata>;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Bridge — convert recorded production calls into simulation scenarios so
|
|
290
|
+
* they can be replayed against a candidate version. ``plan`` returns a
|
|
291
|
+
* preview of which calls would be selected; ``run`` executes the plan.
|
|
292
|
+
*/
|
|
293
|
+
readonly bridge: {
|
|
294
|
+
/** Plan a bridge run — returns the candidate scenarios without executing */
|
|
295
|
+
plan: (body: components["schemas"]["BridgePlanRequest"]) => Promise<{
|
|
296
|
+
available_states?: string[] | undefined;
|
|
297
|
+
available_tools?: string[] | undefined;
|
|
298
|
+
rationale: string;
|
|
299
|
+
target_spec: {
|
|
300
|
+
completion_criteria?: {
|
|
301
|
+
state_based?: string[] | undefined;
|
|
302
|
+
tool_based?: string[] | undefined;
|
|
303
|
+
} | undefined;
|
|
304
|
+
desired_states?: string[] | undefined;
|
|
305
|
+
non_desired_states?: {
|
|
306
|
+
mode?: "hard" | "soft" | undefined;
|
|
307
|
+
state: string;
|
|
308
|
+
}[] | undefined;
|
|
309
|
+
ordered_pathways?: {
|
|
310
|
+
id: string;
|
|
311
|
+
sequence: string[];
|
|
312
|
+
}[] | undefined;
|
|
313
|
+
};
|
|
314
|
+
} & import("../index.js").ResponseMetadata>;
|
|
315
|
+
/** Execute a bridge run and return the resulting run handle */
|
|
316
|
+
run: (body: components["schemas"]["BridgeRequest"]) => Promise<{
|
|
317
|
+
inferred_target_spec?: {
|
|
318
|
+
completion_criteria?: {
|
|
319
|
+
state_based?: string[] | undefined;
|
|
320
|
+
tool_based?: string[] | undefined;
|
|
321
|
+
} | undefined;
|
|
322
|
+
desired_states?: string[] | undefined;
|
|
323
|
+
non_desired_states?: {
|
|
324
|
+
mode?: "hard" | "soft" | undefined;
|
|
325
|
+
state: string;
|
|
326
|
+
}[] | undefined;
|
|
327
|
+
ordered_pathways?: {
|
|
328
|
+
id: string;
|
|
329
|
+
sequence: string[];
|
|
330
|
+
}[] | undefined;
|
|
331
|
+
} | null | undefined;
|
|
332
|
+
inferred_target_spec_rationale?: string | null | undefined;
|
|
333
|
+
run_id: string;
|
|
334
|
+
scenarios: {
|
|
335
|
+
description: string;
|
|
336
|
+
initial_message: string;
|
|
337
|
+
persona?: {
|
|
338
|
+
background?: string | undefined;
|
|
339
|
+
communication_style?: string | undefined;
|
|
340
|
+
default_language?: string | undefined;
|
|
341
|
+
name?: string | undefined;
|
|
342
|
+
role?: string | undefined;
|
|
343
|
+
} | undefined;
|
|
344
|
+
scenario_instructions: string;
|
|
345
|
+
temperament?: string | undefined;
|
|
346
|
+
}[];
|
|
347
|
+
status: "running" | "completed" | "failed";
|
|
348
|
+
} & import("../index.js").ResponseMetadata>;
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Per-service simulation views — graph of explored conversation paths,
|
|
352
|
+
* recorded sessions, and per-turn telemetry. Used by the developer console's
|
|
353
|
+
* coverage tab to visualize what scenarios have been exercised.
|
|
354
|
+
*/
|
|
355
|
+
readonly services: {
|
|
356
|
+
/** Get the conversation graph (nodes/edges) for a service */
|
|
357
|
+
getGraph: (serviceId: ServiceId | string) => Promise<{
|
|
358
|
+
[x: string]: unknown;
|
|
359
|
+
} & import("../index.js").ResponseMetadata>;
|
|
360
|
+
/** Reset / delete the service's accumulated graph */
|
|
361
|
+
deleteGraph: (serviceId: ServiceId | string) => Promise<{
|
|
362
|
+
[x: string]: unknown;
|
|
363
|
+
} & import("../index.js").ResponseMetadata>;
|
|
364
|
+
/** Get the set of explored conversation paths through the graph */
|
|
365
|
+
getGraphPaths: (serviceId: ServiceId | string) => Promise<{
|
|
366
|
+
[x: string]: unknown;
|
|
367
|
+
} & import("../index.js").ResponseMetadata>;
|
|
368
|
+
/** List recorded sessions for the service */
|
|
369
|
+
listSessions: (serviceId: ServiceId | string) => Promise<{
|
|
370
|
+
[x: string]: unknown;
|
|
371
|
+
} & import("../index.js").ResponseMetadata>;
|
|
372
|
+
/** List per-turn observations for the service */
|
|
373
|
+
listTurns: (serviceId: ServiceId | string) => Promise<{
|
|
374
|
+
[x: string]: unknown;
|
|
375
|
+
} & import("../index.js").ResponseMetadata>;
|
|
376
|
+
};
|
|
195
377
|
}
|
|
378
|
+
export {};
|
|
196
379
|
//# sourceMappingURL=simulations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulations.d.ts","sourceRoot":"","sources":["../../../src/resources/simulations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"simulations.d.ts","sourceRoot":"","sources":["../../../src/resources/simulations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC/F,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAMhE,KAAK,8BAA8B,GACjC,UAAU,CAAC,SAAS,CAAC,CAAC,gDAAgD,CAAC,CAAA;AAEzE,MAAM,MAAM,wBAAwB,GAAG,WAAW,CAChD,KAAK,CAAC,qCAAqC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAC3E,CAAA;AAED;;;;;;GAMG;AACH,qBAAa,mBAAoB,SAAQ,uBAAuB;IAC9D,qFAAqF;IAC/E,aAAa,CACjB,IAAI,EAAE,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUtC,4CAA4C;IACtC,UAAU,CAAC,SAAS,EAAE,mBAAmB,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAQxD,kCAAkC;IAC5B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G,MAAM;;;MAMhD;CACF"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import type { components, paths } from '../generated/api.js';
|
|
2
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
3
|
+
export type ListSurfacesParams = NonNullable<paths['/v1/{workspace_id}/surfaces']['get']['parameters']['query']>;
|
|
4
|
+
/** `/surfaces/review` is a narrower paged feed without the workspace-list filters. */
|
|
5
|
+
export type ListSurfacesForReviewParams = NonNullable<paths['/v1/{workspace_id}/surfaces/review']['get']['parameters']['query']>;
|
|
6
|
+
/**
|
|
7
|
+
* Surfaces — short-lived form/intake experiences the platform delivers via
|
|
8
|
+
* SMS / email / web. The full lifecycle is exposed: create, deliver, monitor
|
|
9
|
+
* progress, gate for review, approve / reject / reshape, and archive.
|
|
10
|
+
*
|
|
11
|
+
* @beta New in this release; surface may evolve as the operator review flow
|
|
12
|
+
* stabilizes.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SurfacesResource extends WorkspaceScopedResource {
|
|
15
|
+
/** List surfaces in the workspace */
|
|
16
|
+
list(params?: ListSurfacesParams): Promise<{
|
|
17
|
+
continuation_token?: number | null | undefined;
|
|
18
|
+
has_more: boolean;
|
|
19
|
+
items: {
|
|
20
|
+
channel?: ("sms" | "whatsapp" | "imessage" | "email" | "voice" | "web") | null | undefined;
|
|
21
|
+
context?: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
} | undefined;
|
|
24
|
+
created_at?: string | null | undefined;
|
|
25
|
+
delivered_at?: string | null | undefined;
|
|
26
|
+
delivery_metadata?: {
|
|
27
|
+
[x: string]: unknown;
|
|
28
|
+
} | null | undefined;
|
|
29
|
+
description?: string | null | undefined;
|
|
30
|
+
entity_id?: string | null | undefined;
|
|
31
|
+
event_id: string;
|
|
32
|
+
expires_at?: string | null | undefined;
|
|
33
|
+
fields?: {
|
|
34
|
+
[x: string]: unknown;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
fields_count: number;
|
|
37
|
+
id: string;
|
|
38
|
+
opened_at?: string | null | undefined;
|
|
39
|
+
resource_type?: string | null | undefined;
|
|
40
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
41
|
+
submitted_at?: string | null | undefined;
|
|
42
|
+
submitted_data?: {
|
|
43
|
+
[x: string]: unknown;
|
|
44
|
+
} | null | undefined;
|
|
45
|
+
title?: string | null | undefined;
|
|
46
|
+
}[];
|
|
47
|
+
total?: number | null | undefined;
|
|
48
|
+
} & import("../index.js").ResponseMetadata>;
|
|
49
|
+
listAutoPaging(params?: ListSurfacesParams): AsyncGenerator<{
|
|
50
|
+
channel?: ("sms" | "whatsapp" | "imessage" | "email" | "voice" | "web") | null | undefined;
|
|
51
|
+
context?: {
|
|
52
|
+
[x: string]: unknown;
|
|
53
|
+
} | undefined;
|
|
54
|
+
created_at?: string | null | undefined;
|
|
55
|
+
delivered_at?: string | null | undefined;
|
|
56
|
+
delivery_metadata?: {
|
|
57
|
+
[x: string]: unknown;
|
|
58
|
+
} | null | undefined;
|
|
59
|
+
description?: string | null | undefined;
|
|
60
|
+
entity_id?: string | null | undefined;
|
|
61
|
+
event_id: string;
|
|
62
|
+
expires_at?: string | null | undefined;
|
|
63
|
+
fields?: {
|
|
64
|
+
[x: string]: unknown;
|
|
65
|
+
}[] | undefined;
|
|
66
|
+
fields_count: number;
|
|
67
|
+
id: string;
|
|
68
|
+
opened_at?: string | null | undefined;
|
|
69
|
+
resource_type?: string | null | undefined;
|
|
70
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
71
|
+
submitted_at?: string | null | undefined;
|
|
72
|
+
submitted_data?: {
|
|
73
|
+
[x: string]: unknown;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
title?: string | null | undefined;
|
|
76
|
+
}, any, any>;
|
|
77
|
+
/** Surfaces awaiting review (pending approval / rejection) */
|
|
78
|
+
listForReview(params?: ListSurfacesForReviewParams): Promise<{
|
|
79
|
+
continuation_token?: number | null | undefined;
|
|
80
|
+
has_more: boolean;
|
|
81
|
+
items: {
|
|
82
|
+
channel?: ("sms" | "whatsapp" | "imessage" | "email" | "voice" | "web") | null | undefined;
|
|
83
|
+
context?: {
|
|
84
|
+
[x: string]: unknown;
|
|
85
|
+
} | undefined;
|
|
86
|
+
created_at?: string | null | undefined;
|
|
87
|
+
delivered_at?: string | null | undefined;
|
|
88
|
+
delivery_metadata?: {
|
|
89
|
+
[x: string]: unknown;
|
|
90
|
+
} | null | undefined;
|
|
91
|
+
description?: string | null | undefined;
|
|
92
|
+
entity_id?: string | null | undefined;
|
|
93
|
+
event_id: string;
|
|
94
|
+
expires_at?: string | null | undefined;
|
|
95
|
+
fields?: {
|
|
96
|
+
[x: string]: unknown;
|
|
97
|
+
}[] | undefined;
|
|
98
|
+
fields_count: number;
|
|
99
|
+
id: string;
|
|
100
|
+
opened_at?: string | null | undefined;
|
|
101
|
+
resource_type?: string | null | undefined;
|
|
102
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
103
|
+
submitted_at?: string | null | undefined;
|
|
104
|
+
submitted_data?: {
|
|
105
|
+
[x: string]: unknown;
|
|
106
|
+
} | null | undefined;
|
|
107
|
+
title?: string | null | undefined;
|
|
108
|
+
}[];
|
|
109
|
+
total?: number | null | undefined;
|
|
110
|
+
} & import("../index.js").ResponseMetadata>;
|
|
111
|
+
/** Create a surface (form definition + delivery config) */
|
|
112
|
+
create(body: components['schemas']['CreateSurfaceRequest']): Promise<{
|
|
113
|
+
channel: "sms" | "whatsapp" | "imessage" | "email" | "voice" | "web";
|
|
114
|
+
created_at: string;
|
|
115
|
+
description?: string | null | undefined;
|
|
116
|
+
entity_id: string;
|
|
117
|
+
event_id: string;
|
|
118
|
+
expires_at: string;
|
|
119
|
+
fields_count: number;
|
|
120
|
+
id: string;
|
|
121
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
122
|
+
title: string;
|
|
123
|
+
token?: string | null | undefined;
|
|
124
|
+
url?: string | null | undefined;
|
|
125
|
+
} & import("../index.js").ResponseMetadata>;
|
|
126
|
+
/** Get a single surface */
|
|
127
|
+
get(surfaceId: string): Promise<{
|
|
128
|
+
channel?: ("sms" | "whatsapp" | "imessage" | "email" | "voice" | "web") | null | undefined;
|
|
129
|
+
context?: {
|
|
130
|
+
[x: string]: unknown;
|
|
131
|
+
} | undefined;
|
|
132
|
+
created_at?: string | null | undefined;
|
|
133
|
+
delivered_at?: string | null | undefined;
|
|
134
|
+
delivery_metadata?: {
|
|
135
|
+
[x: string]: unknown;
|
|
136
|
+
} | null | undefined;
|
|
137
|
+
description?: string | null | undefined;
|
|
138
|
+
entity_id?: string | null | undefined;
|
|
139
|
+
event_id: string;
|
|
140
|
+
expires_at?: string | null | undefined;
|
|
141
|
+
fields?: {
|
|
142
|
+
[x: string]: unknown;
|
|
143
|
+
}[] | undefined;
|
|
144
|
+
fields_count: number;
|
|
145
|
+
id: string;
|
|
146
|
+
opened_at?: string | null | undefined;
|
|
147
|
+
resource_type?: string | null | undefined;
|
|
148
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
149
|
+
submitted_at?: string | null | undefined;
|
|
150
|
+
submitted_data?: {
|
|
151
|
+
[x: string]: unknown;
|
|
152
|
+
} | null | undefined;
|
|
153
|
+
title?: string | null | undefined;
|
|
154
|
+
} & import("../index.js").ResponseMetadata>;
|
|
155
|
+
/** Update surface metadata or fields */
|
|
156
|
+
update(surfaceId: string, body: components['schemas']['UpdateSurfaceRequest']): Promise<{
|
|
157
|
+
channel?: ("sms" | "whatsapp" | "imessage" | "email" | "voice" | "web") | null | undefined;
|
|
158
|
+
context?: {
|
|
159
|
+
[x: string]: unknown;
|
|
160
|
+
} | undefined;
|
|
161
|
+
created_at?: string | null | undefined;
|
|
162
|
+
delivered_at?: string | null | undefined;
|
|
163
|
+
delivery_metadata?: {
|
|
164
|
+
[x: string]: unknown;
|
|
165
|
+
} | null | undefined;
|
|
166
|
+
description?: string | null | undefined;
|
|
167
|
+
entity_id?: string | null | undefined;
|
|
168
|
+
event_id: string;
|
|
169
|
+
expires_at?: string | null | undefined;
|
|
170
|
+
fields?: {
|
|
171
|
+
[x: string]: unknown;
|
|
172
|
+
}[] | undefined;
|
|
173
|
+
fields_count: number;
|
|
174
|
+
id: string;
|
|
175
|
+
opened_at?: string | null | undefined;
|
|
176
|
+
resource_type?: string | null | undefined;
|
|
177
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
178
|
+
submitted_at?: string | null | undefined;
|
|
179
|
+
submitted_data?: {
|
|
180
|
+
[x: string]: unknown;
|
|
181
|
+
} | null | undefined;
|
|
182
|
+
title?: string | null | undefined;
|
|
183
|
+
} & import("../index.js").ResponseMetadata>;
|
|
184
|
+
/** Archive (soft-delete) a surface */
|
|
185
|
+
archive(surfaceId: string): Promise<{
|
|
186
|
+
status: "archived";
|
|
187
|
+
surface_id: string;
|
|
188
|
+
} & import("../index.js").ResponseMetadata>;
|
|
189
|
+
/** Deliver the surface to the recipient (SMS/email/etc.) */
|
|
190
|
+
deliver(surfaceId: string, body: components['schemas']['DeliverSurfaceRequest']): Promise<{
|
|
191
|
+
channel?: ("sms" | "whatsapp" | "imessage" | "email" | "voice" | "web") | null | undefined;
|
|
192
|
+
channel_address: string;
|
|
193
|
+
delivered_at?: string | null | undefined;
|
|
194
|
+
delivery_provider?: string | null | undefined;
|
|
195
|
+
from_address?: string | null | undefined;
|
|
196
|
+
from_number?: string | null | undefined;
|
|
197
|
+
message_id?: string | null | undefined;
|
|
198
|
+
status: "delivered" | "pending_review";
|
|
199
|
+
surface_id: string;
|
|
200
|
+
url?: string | null | undefined;
|
|
201
|
+
} & import("../index.js").ResponseMetadata>;
|
|
202
|
+
/** Get fill / completion progress for a surface */
|
|
203
|
+
getProgress(surfaceId: string): Promise<{
|
|
204
|
+
empty_count: number;
|
|
205
|
+
empty_keys: string[];
|
|
206
|
+
filled_count: number;
|
|
207
|
+
filled_keys: string[];
|
|
208
|
+
required_empty_keys: string[];
|
|
209
|
+
surface_id: string;
|
|
210
|
+
total_fields: number;
|
|
211
|
+
} & import("../index.js").ResponseMetadata>;
|
|
212
|
+
/** Approve a pending-review surface */
|
|
213
|
+
approve(surfaceId: string): Promise<{
|
|
214
|
+
action: "approved" | "rejected";
|
|
215
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
216
|
+
surface_id: string;
|
|
217
|
+
} & import("../index.js").ResponseMetadata>;
|
|
218
|
+
/** Reject a pending-review surface */
|
|
219
|
+
reject(surfaceId: string, body: components['schemas']['RejectSurfaceRequest']): Promise<{
|
|
220
|
+
action: "approved" | "rejected";
|
|
221
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
222
|
+
surface_id: string;
|
|
223
|
+
} & import("../index.js").ResponseMetadata>;
|
|
224
|
+
/** Reshape — clone the surface with refined fields (review redirect) */
|
|
225
|
+
reshape(surfaceId: string): Promise<{
|
|
226
|
+
channel: "sms" | "whatsapp" | "imessage" | "email" | "voice" | "web";
|
|
227
|
+
created_at: string;
|
|
228
|
+
description?: string | null | undefined;
|
|
229
|
+
entity_id: string;
|
|
230
|
+
event_id: string;
|
|
231
|
+
expires_at: string;
|
|
232
|
+
fields_count: number;
|
|
233
|
+
id: string;
|
|
234
|
+
status: "created" | "pending_review" | "delivered" | "opened" | "partial" | "completed" | "expired" | "archived";
|
|
235
|
+
title: string;
|
|
236
|
+
token?: string | null | undefined;
|
|
237
|
+
url?: string | null | undefined;
|
|
238
|
+
} & import("../index.js").ResponseMetadata>;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=surfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../src/resources/surfaces.ts"],"names":[],"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C,CAAC,uBAAuB,CAAC;;;;;;;;;;;;IASrF,mDAAmD;IAC7C,WAAW,CAAC,SAAS,EAAE,MAAM;;;;;;;;;IAQnC,uCAAuC;IACjC,OAAO,CAAC,SAAS,EAAE,MAAM;;;;;IAQ/B,sCAAsC;IAChC,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC;;;;;IASnF,wEAAwE;IAClE,OAAO,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;CAOhC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tasks — long-running async jobs the platform spawns (intake processing,
|
|
4
|
+
* tool executions, voice imports). The SDK exposes get-by-id and a
|
|
5
|
+
* by-call lookup for retrieving every task tied to a specific call.
|
|
6
|
+
*
|
|
7
|
+
* @beta New in this release; surface may evolve.
|
|
8
|
+
*/
|
|
9
|
+
export declare class TasksResource extends WorkspaceScopedResource {
|
|
10
|
+
/** Get the current state of a single task */
|
|
11
|
+
get(taskId: string): Promise<{
|
|
12
|
+
cached_tokens?: number | undefined;
|
|
13
|
+
call_sid: string;
|
|
14
|
+
completed_at?: string | null | undefined;
|
|
15
|
+
dispatched_at?: string | null | undefined;
|
|
16
|
+
duration_ms?: number | null | undefined;
|
|
17
|
+
error?: string | null | undefined;
|
|
18
|
+
error_type?: string | null | undefined;
|
|
19
|
+
input_tokens?: number | undefined;
|
|
20
|
+
output_tokens?: number | undefined;
|
|
21
|
+
progress_message?: string | null | undefined;
|
|
22
|
+
progress_step?: number | null | undefined;
|
|
23
|
+
result?: string | null | undefined;
|
|
24
|
+
skill: string;
|
|
25
|
+
status: "pending" | "dispatched" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
26
|
+
sub_tool_count?: number | undefined;
|
|
27
|
+
task_id: string;
|
|
28
|
+
tier: "direct" | "companion" | "desktop" | "computer_use";
|
|
29
|
+
workspace_id: string;
|
|
30
|
+
} & import("../index.js").ResponseMetadata>;
|
|
31
|
+
/** List every task associated with a call (by Twilio call sid) */
|
|
32
|
+
listByCall(callSid: string): Promise<{
|
|
33
|
+
tasks: {
|
|
34
|
+
cached_tokens?: number | undefined;
|
|
35
|
+
call_sid: string;
|
|
36
|
+
completed_at?: string | null | undefined;
|
|
37
|
+
dispatched_at?: string | null | undefined;
|
|
38
|
+
duration_ms?: number | null | undefined;
|
|
39
|
+
error?: string | null | undefined;
|
|
40
|
+
error_type?: string | null | undefined;
|
|
41
|
+
input_tokens?: number | undefined;
|
|
42
|
+
output_tokens?: number | undefined;
|
|
43
|
+
progress_message?: string | null | undefined;
|
|
44
|
+
progress_step?: number | null | undefined;
|
|
45
|
+
result?: string | null | undefined;
|
|
46
|
+
skill: string;
|
|
47
|
+
status: "pending" | "dispatched" | "running" | "completed" | "failed" | "cancelled" | "timeout";
|
|
48
|
+
sub_tool_count?: number | undefined;
|
|
49
|
+
task_id: string;
|
|
50
|
+
tier: "direct" | "companion" | "desktop" | "computer_use";
|
|
51
|
+
workspace_id: string;
|
|
52
|
+
}[];
|
|
53
|
+
} & import("../index.js").ResponseMetadata>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../../src/resources/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,uBAAuB;IACxD,6CAA6C;IACvC,GAAG,CAAC,MAAM,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAQxB,kEAAkE;IAC5D,UAAU,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;CAOjC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { components } from '../generated/api.js';
|
|
2
|
+
import type { ServiceId } from '../core/branded-types.js';
|
|
3
|
+
import { WorkspaceScopedResource } from './base.js';
|
|
4
|
+
/**
|
|
5
|
+
* Tools — manual execution of integration-backed tool calls (used by the
|
|
6
|
+
* tool-testing surface in the developer console) and per-service resolution
|
|
7
|
+
* of which concrete tool implementations bind to a service's tool slots.
|
|
8
|
+
*
|
|
9
|
+
* @beta New in this release; surface may evolve.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ToolsResource extends WorkspaceScopedResource {
|
|
12
|
+
/** Manually execute a tool call against the workspace's integrations */
|
|
13
|
+
execute(body: components['schemas']['ToolExecuteRequest']): Promise<{
|
|
14
|
+
blocked_side_effects?: string[] | undefined;
|
|
15
|
+
dry_run?: boolean | undefined;
|
|
16
|
+
duration_ms?: number | undefined;
|
|
17
|
+
error?: string | null | undefined;
|
|
18
|
+
is_write?: boolean | undefined;
|
|
19
|
+
result?: unknown;
|
|
20
|
+
source?: string | undefined;
|
|
21
|
+
sub_tool_logs?: {
|
|
22
|
+
duration_ms?: number | undefined;
|
|
23
|
+
input?: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
} | undefined;
|
|
26
|
+
output?: string | undefined;
|
|
27
|
+
succeeded?: boolean | undefined;
|
|
28
|
+
tool_name?: string | undefined;
|
|
29
|
+
}[] | undefined;
|
|
30
|
+
tier?: string | undefined;
|
|
31
|
+
tool_type?: string | undefined;
|
|
32
|
+
} & import("../index.js").ResponseMetadata>;
|
|
33
|
+
/** Resolve the bound tool implementations for a service */
|
|
34
|
+
resolveForService(serviceId: ServiceId | string): Promise<{
|
|
35
|
+
service_id: string;
|
|
36
|
+
tools: {
|
|
37
|
+
additional_instructions?: {
|
|
38
|
+
[x: string]: string;
|
|
39
|
+
} | undefined;
|
|
40
|
+
description?: string | undefined;
|
|
41
|
+
input_schema?: {
|
|
42
|
+
[x: string]: unknown;
|
|
43
|
+
} | undefined;
|
|
44
|
+
is_write?: boolean | undefined;
|
|
45
|
+
states?: string[] | undefined;
|
|
46
|
+
tier?: string | undefined;
|
|
47
|
+
tool_name: string;
|
|
48
|
+
tool_type: string;
|
|
49
|
+
}[];
|
|
50
|
+
workspace_id: string;
|
|
51
|
+
} & import("../index.js").ResponseMetadata>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/resources/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAe,MAAM,WAAW,CAAA;AAEhE;;;;;;GAMG;AACH,qBAAa,aAAc,SAAQ,uBAAuB;IACxD,wEAAwE;IAClE,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC;;;;;;;;;;;;;;;;;;;;IAS/D,2DAA2D;IACrD,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM;;;;;;;;;;;;;;;;;;CAOtD"}
|