@amigo-ai/platform-sdk 0.98.1 → 0.99.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.
@@ -5192,6 +5192,66 @@ export interface paths {
5192
5192
  patch?: never;
5193
5193
  trace?: never;
5194
5194
  };
5195
+ "/v1/{workspace_id}/runs/{run_id}": {
5196
+ parameters: {
5197
+ query?: never;
5198
+ header?: never;
5199
+ path?: never;
5200
+ cookie?: never;
5201
+ };
5202
+ /**
5203
+ * Get one run (framework or conversation) by run_id
5204
+ * @description Resolve a single run by its channel-neutral ``run_id`` and return the canonical ``Run`` — at any status (live, completed, failed, timed out). Federates the Delta ``world.runs`` MV (framework runs), Lakebase ``world.conversations`` (conversation runs), and the live-voice registry, matched by ``run_id`` and scoped to the workspace. Use the returned ``kind`` / ``channel`` / ``source_*`` fields to open the channel-appropriate detail (voice call, text conversation, framework trace). 404 if the run does not exist in this workspace.
5205
+ */
5206
+ get: operations["get_run_v1__workspace_id__runs__run_id__get"];
5207
+ put?: never;
5208
+ post?: never;
5209
+ delete?: never;
5210
+ options?: never;
5211
+ head?: never;
5212
+ patch?: never;
5213
+ trace?: never;
5214
+ };
5215
+ "/v1/{workspace_id}/runs/{run_id}/access-token": {
5216
+ parameters: {
5217
+ query?: never;
5218
+ header?: never;
5219
+ path?: never;
5220
+ cookie?: never;
5221
+ };
5222
+ get?: never;
5223
+ put?: never;
5224
+ /**
5225
+ * Mint a browser-audio access token for an operator on a live run
5226
+ * @description Generate the Twilio browser-audio credentials the console needs to attach the operator's WebRTC leg to a live run, addressed by ``run_id``. This is the media plane companion to ``/takeover`` (the control plane). Requires ``admin`` (Operator:Update), bound to the caller's own operator identity. 404 if the run is not live in this workspace; 409 if its channel has no browser-audio leg.
5227
+ */
5228
+ post: operations["mint_run_access_token_v1__workspace_id__runs__run_id__access_token_post"];
5229
+ delete?: never;
5230
+ options?: never;
5231
+ head?: never;
5232
+ patch?: never;
5233
+ trace?: never;
5234
+ };
5235
+ "/v1/{workspace_id}/runs/{run_id}/authored-turn": {
5236
+ parameters: {
5237
+ query?: never;
5238
+ header?: never;
5239
+ path?: never;
5240
+ cookie?: never;
5241
+ };
5242
+ get?: never;
5243
+ put?: never;
5244
+ /**
5245
+ * Author the next turn on a non-voice run under takeover
5246
+ * @description Stage an operator-authored reply for a NON-voice run (text/sms/email/web) the caller has taken over. The agent-engine send-gate substitutes it for the agent's next outbound (exactly-once), so the caller receives the operator's words while the agent stays suspended. Repeatable — each call stages the next turn. Addressed by the channel-neutral ``run_id``. Requires ``admin`` (Operator:Update), bound to the caller's own operator identity (no impersonation). 404 if the run is not live in this workspace; 409 for voice (voice takeover drives the live audio leg — use the conference, not an authored turn).
5247
+ */
5248
+ post: operations["author_run_turn_v1__workspace_id__runs__run_id__authored_turn_post"];
5249
+ delete?: never;
5250
+ options?: never;
5251
+ head?: never;
5252
+ patch?: never;
5253
+ trace?: never;
5254
+ };
5195
5255
  "/v1/{workspace_id}/runs/{run_id}/guidance": {
5196
5256
  parameters: {
5197
5257
  query?: never;
@@ -5232,6 +5292,26 @@ export interface paths {
5232
5292
  patch?: never;
5233
5293
  trace?: never;
5234
5294
  };
5295
+ "/v1/{workspace_id}/runs/{run_id}/switch-mode": {
5296
+ parameters: {
5297
+ query?: never;
5298
+ header?: never;
5299
+ path?: never;
5300
+ cookie?: never;
5301
+ };
5302
+ get?: never;
5303
+ put?: never;
5304
+ /**
5305
+ * Switch an operator between listen and takeover on a live run
5306
+ * @description Toggle the operator between ``listen`` (monitor) and ``takeover`` (drive) on a run they have already joined, addressed by the channel-neutral ``run_id``. For voice this mutes/unmutes the operator's conference participant. Requires ``admin`` (Operator:Update), bound to the caller's own operator identity (no impersonation). 404 if the run is not live in this workspace; 409 if its channel does not support live takeover yet.
5307
+ */
5308
+ post: operations["switch_run_mode_v1__workspace_id__runs__run_id__switch_mode_post"];
5309
+ delete?: never;
5310
+ options?: never;
5311
+ head?: never;
5312
+ patch?: never;
5313
+ trace?: never;
5314
+ };
5235
5315
  "/v1/{workspace_id}/runs/{run_id}/takeover": {
5236
5316
  parameters: {
5237
5317
  query?: never;
@@ -11105,7 +11185,7 @@ export interface components {
11105
11185
  * Status
11106
11186
  * @enum {string}
11107
11187
  */
11108
- status: "active" | "closed" | "completed" | "in-progress" | "failed";
11188
+ status: "active" | "closed" | "completed" | "in-progress" | "failed" | "paused";
11109
11189
  /**
11110
11190
  * Turn Count
11111
11191
  * @default 0
@@ -16404,7 +16484,7 @@ export interface components {
16404
16484
  */
16405
16485
  created_at: string;
16406
16486
  customer_slug: components["schemas"]["SlugString"];
16407
- display_name: components["schemas"]["NameString"] | null;
16487
+ display_name: components["schemas"]["DescriptionString"] | null;
16408
16488
  /**
16409
16489
  * Expires At
16410
16490
  * Format: date-time
@@ -17174,11 +17254,8 @@ export interface components {
17174
17254
  * @description Stable URL-safe customer identifier.
17175
17255
  */
17176
17256
  customer_slug: string;
17177
- /**
17178
- * Display Name
17179
- * @description Human-readable display name (falls back to customer slug).
17180
- */
17181
- display_name: string;
17257
+ /** @description Human-readable display name (falls back to customer slug). */
17258
+ display_name: components["schemas"]["DescriptionString"];
17182
17259
  /**
17183
17260
  * Max Upload Bytes
17184
17261
  * @description Maximum allowed upload size in bytes.
@@ -21117,6 +21194,47 @@ export interface components {
21117
21194
  */
21118
21195
  workspace_id: string;
21119
21196
  };
21197
+ /** RunAccessTokenRequest */
21198
+ RunAccessTokenRequest: {
21199
+ /**
21200
+ * Operator Id
21201
+ * Format: uuid
21202
+ */
21203
+ operator_id: string;
21204
+ };
21205
+ /** RunAccessTokenResponse */
21206
+ RunAccessTokenResponse: {
21207
+ /** Conference Sid */
21208
+ conference_sid?: string | null;
21209
+ /** Connect Params */
21210
+ connect_params?: {
21211
+ [key: string]: string;
21212
+ };
21213
+ /** Identity */
21214
+ identity: string;
21215
+ /** Token */
21216
+ token: string;
21217
+ };
21218
+ /** RunAuthoredTurnRequest */
21219
+ RunAuthoredTurnRequest: {
21220
+ /**
21221
+ * Operator Id
21222
+ * Format: uuid
21223
+ */
21224
+ operator_id: string;
21225
+ /** Text */
21226
+ text: string;
21227
+ };
21228
+ /** RunAuthoredTurnResponse */
21229
+ RunAuthoredTurnResponse: {
21230
+ /**
21231
+ * Run Id
21232
+ * Format: uuid
21233
+ */
21234
+ run_id: string;
21235
+ /** Staged */
21236
+ staged: boolean;
21237
+ };
21120
21238
  /**
21121
21239
  * RunGuidanceRequest
21122
21240
  * @description Operator guidance for a live run. ``operator_id`` is in the body because this
@@ -21224,6 +21342,34 @@ export interface components {
21224
21342
  /** Tags */
21225
21343
  tags?: string[];
21226
21344
  };
21345
+ /** RunSwitchModeRequest */
21346
+ RunSwitchModeRequest: {
21347
+ /**
21348
+ * Mode
21349
+ * @enum {string}
21350
+ */
21351
+ mode: "listen" | "takeover";
21352
+ /**
21353
+ * Operator Id
21354
+ * Format: uuid
21355
+ */
21356
+ operator_id: string;
21357
+ /** Participant Call Sid */
21358
+ participant_call_sid: string;
21359
+ };
21360
+ /** RunSwitchModeResponse */
21361
+ RunSwitchModeResponse: {
21362
+ /**
21363
+ * Mode
21364
+ * @enum {string}
21365
+ */
21366
+ mode: "listen" | "takeover";
21367
+ /**
21368
+ * Run Id
21369
+ * Format: uuid
21370
+ */
21371
+ run_id: string;
21372
+ };
21227
21373
  /** RunTakeoverRequest */
21228
21374
  RunTakeoverRequest: {
21229
21375
  /**
@@ -26080,7 +26226,7 @@ export interface components {
26080
26226
  * Status
26081
26227
  * @enum {string}
26082
26228
  */
26083
- status: "active" | "closed" | "completed" | "in-progress" | "failed";
26229
+ status: "active" | "closed" | "completed" | "in-progress" | "failed" | "paused";
26084
26230
  /**
26085
26231
  * Turn Count
26086
26232
  * @default 0
@@ -27908,7 +28054,7 @@ export interface components {
27908
28054
  * Status
27909
28055
  * @enum {string}
27910
28056
  */
27911
- status: "active" | "closed" | "completed" | "in-progress" | "failed";
28057
+ status: "active" | "closed" | "completed" | "in-progress" | "failed" | "paused";
27912
28058
  /**
27913
28059
  * Turn Count
27914
28060
  * @default 0
@@ -33852,7 +33998,7 @@ export interface operations {
33852
33998
  /** @description Filter by channel */
33853
33999
  channel_kind?: components["schemas"]["ChannelKind"] | null;
33854
34000
  /** @description Filter by status */
33855
- status?: ("active" | "closed" | "completed" | "in-progress" | "failed") | null;
34001
+ status?: ("active" | "closed" | "completed" | "in-progress" | "failed" | "paused") | null;
33856
34002
  limit?: number;
33857
34003
  offset?: number;
33858
34004
  };
@@ -41257,9 +41403,9 @@ export interface operations {
41257
41403
  sort_by?: string[];
41258
41404
  limit?: number;
41259
41405
  continuation_token?: unknown;
41260
- status?: ("live" | "running" | "paused" | "completed" | "failed" | "timed_out") | null;
41261
- kind?: ("conversation" | "framework") | null;
41262
- channel?: ("voice" | "text" | "sms" | "email" | "web") | null;
41406
+ status?: ("live" | "running" | "paused" | "completed" | "failed" | "timed_out")[];
41407
+ kind?: ("conversation" | "framework")[];
41408
+ channel?: ("voice" | "text" | "sms" | "email" | "web")[];
41263
41409
  };
41264
41410
  header?: never;
41265
41411
  path: {
@@ -41292,8 +41438,8 @@ export interface operations {
41292
41438
  runs_summary_v1__workspace_id__runs_summary_get: {
41293
41439
  parameters: {
41294
41440
  query?: {
41295
- kind?: ("conversation" | "framework") | null;
41296
- channel?: ("voice" | "text" | "sms" | "email" | "web") | null;
41441
+ kind?: ("conversation" | "framework")[];
41442
+ channel?: ("voice" | "text" | "sms" | "email" | "web")[];
41297
41443
  };
41298
41444
  header?: never;
41299
41445
  path: {
@@ -41323,6 +41469,110 @@ export interface operations {
41323
41469
  };
41324
41470
  };
41325
41471
  };
41472
+ get_run_v1__workspace_id__runs__run_id__get: {
41473
+ parameters: {
41474
+ query?: never;
41475
+ header?: never;
41476
+ path: {
41477
+ workspace_id: string;
41478
+ run_id: string;
41479
+ };
41480
+ cookie?: never;
41481
+ };
41482
+ requestBody?: never;
41483
+ responses: {
41484
+ /** @description Successful Response */
41485
+ 200: {
41486
+ headers: {
41487
+ [name: string]: unknown;
41488
+ };
41489
+ content: {
41490
+ "application/json": components["schemas"]["Run"];
41491
+ };
41492
+ };
41493
+ /** @description Validation Error */
41494
+ 422: {
41495
+ headers: {
41496
+ [name: string]: unknown;
41497
+ };
41498
+ content: {
41499
+ "application/json": components["schemas"]["HTTPValidationError"];
41500
+ };
41501
+ };
41502
+ };
41503
+ };
41504
+ mint_run_access_token_v1__workspace_id__runs__run_id__access_token_post: {
41505
+ parameters: {
41506
+ query?: never;
41507
+ header?: never;
41508
+ path: {
41509
+ workspace_id: string;
41510
+ run_id: string;
41511
+ };
41512
+ cookie?: never;
41513
+ };
41514
+ requestBody: {
41515
+ content: {
41516
+ "application/json": components["schemas"]["RunAccessTokenRequest"];
41517
+ };
41518
+ };
41519
+ responses: {
41520
+ /** @description Successful Response */
41521
+ 200: {
41522
+ headers: {
41523
+ [name: string]: unknown;
41524
+ };
41525
+ content: {
41526
+ "application/json": components["schemas"]["RunAccessTokenResponse"];
41527
+ };
41528
+ };
41529
+ /** @description Validation Error */
41530
+ 422: {
41531
+ headers: {
41532
+ [name: string]: unknown;
41533
+ };
41534
+ content: {
41535
+ "application/json": components["schemas"]["HTTPValidationError"];
41536
+ };
41537
+ };
41538
+ };
41539
+ };
41540
+ author_run_turn_v1__workspace_id__runs__run_id__authored_turn_post: {
41541
+ parameters: {
41542
+ query?: never;
41543
+ header?: never;
41544
+ path: {
41545
+ workspace_id: string;
41546
+ run_id: string;
41547
+ };
41548
+ cookie?: never;
41549
+ };
41550
+ requestBody: {
41551
+ content: {
41552
+ "application/json": components["schemas"]["RunAuthoredTurnRequest"];
41553
+ };
41554
+ };
41555
+ responses: {
41556
+ /** @description Successful Response */
41557
+ 200: {
41558
+ headers: {
41559
+ [name: string]: unknown;
41560
+ };
41561
+ content: {
41562
+ "application/json": components["schemas"]["RunAuthoredTurnResponse"];
41563
+ };
41564
+ };
41565
+ /** @description Validation Error */
41566
+ 422: {
41567
+ headers: {
41568
+ [name: string]: unknown;
41569
+ };
41570
+ content: {
41571
+ "application/json": components["schemas"]["HTTPValidationError"];
41572
+ };
41573
+ };
41574
+ };
41575
+ };
41326
41576
  send_run_guidance_v1__workspace_id__runs__run_id__guidance_post: {
41327
41577
  parameters: {
41328
41578
  query?: never;
@@ -41395,6 +41645,42 @@ export interface operations {
41395
41645
  };
41396
41646
  };
41397
41647
  };
41648
+ switch_run_mode_v1__workspace_id__runs__run_id__switch_mode_post: {
41649
+ parameters: {
41650
+ query?: never;
41651
+ header?: never;
41652
+ path: {
41653
+ workspace_id: string;
41654
+ run_id: string;
41655
+ };
41656
+ cookie?: never;
41657
+ };
41658
+ requestBody: {
41659
+ content: {
41660
+ "application/json": components["schemas"]["RunSwitchModeRequest"];
41661
+ };
41662
+ };
41663
+ responses: {
41664
+ /** @description Successful Response */
41665
+ 200: {
41666
+ headers: {
41667
+ [name: string]: unknown;
41668
+ };
41669
+ content: {
41670
+ "application/json": components["schemas"]["RunSwitchModeResponse"];
41671
+ };
41672
+ };
41673
+ /** @description Validation Error */
41674
+ 422: {
41675
+ headers: {
41676
+ [name: string]: unknown;
41677
+ };
41678
+ content: {
41679
+ "application/json": components["schemas"]["HTTPValidationError"];
41680
+ };
41681
+ };
41682
+ };
41683
+ };
41398
41684
  take_over_run_v1__workspace_id__runs__run_id__takeover_post: {
41399
41685
  parameters: {
41400
41686
  query?: never;