@proteos/sdk 0.61.0 → 0.75.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.
Files changed (40) hide show
  1. package/dist/{chunk-OOOTPEJK.js → chunk-3VQQEJV6.js} +71 -11
  2. package/dist/chunk-3VQQEJV6.js.map +1 -0
  3. package/dist/{chunk-25PD6TYH.cjs → chunk-C4CH6CEY.cjs} +75 -10
  4. package/dist/chunk-C4CH6CEY.cjs.map +1 -0
  5. package/dist/index.cjs +379 -130
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +813 -81
  8. package/dist/index.d.ts +813 -81
  9. package/dist/index.js +250 -13
  10. package/dist/index.js.map +1 -1
  11. package/dist/meta/index.cjs +109 -89
  12. package/dist/meta/index.d.cts +1 -1
  13. package/dist/meta/index.d.ts +1 -1
  14. package/dist/meta/index.js +1 -1
  15. package/dist/{types-DQmqR_G8.d.cts → types-Dp-AB2QZ.d.cts} +561 -48
  16. package/dist/{types-DQmqR_G8.d.ts → types-Dp-AB2QZ.d.ts} +561 -48
  17. package/package.json +3 -3
  18. package/src/agent/session-types.ts +8 -1
  19. package/src/agent/sessions.ts +6 -4
  20. package/src/agent/types.ts +9 -0
  21. package/src/auth/platform-entities.ts +6 -0
  22. package/src/client.ts +28 -4
  23. package/src/conversation/index.ts +327 -15
  24. package/src/conversation/types.ts +594 -5
  25. package/src/data/entity-indexes.ts +54 -0
  26. package/src/data/index.ts +12 -0
  27. package/src/data/types.ts +66 -0
  28. package/src/errors.ts +5 -0
  29. package/src/index.ts +57 -0
  30. package/src/meta/components.ts +23 -3
  31. package/src/meta/index.ts +8 -0
  32. package/src/meta/layout/common-props.ts +9 -0
  33. package/src/meta/layout/elements.ts +57 -0
  34. package/src/meta/layout/index.ts +5 -0
  35. package/src/meta/layout/page-layout.ts +15 -3
  36. package/src/meta/types.ts +206 -21
  37. package/src/scheduling/types.ts +5 -1
  38. package/src/workflow/types.ts +10 -2
  39. package/dist/chunk-25PD6TYH.cjs.map +0 -1
  40. package/dist/chunk-OOOTPEJK.js.map +0 -1
@@ -21,11 +21,18 @@ import type {
21
21
  ConversationBrief,
22
22
  ConversationFilter,
23
23
  ConversationFilterEvent,
24
+ ConversationNote,
25
+ ConversationObjective,
26
+ ConversationObjectiveDefinition,
27
+ ConversationObjectiveProgress,
28
+ ConversationOutcomeOption,
24
29
  ConversationTag,
25
30
  ConversationTagDefinition,
26
31
  ConversationTagEvaluation,
27
32
  ConversationTagSet,
28
33
  ConversationType,
34
+ CountConversationObjectivesQuery,
35
+ CountConversationObjectivesResponse,
29
36
  CountConversationTagsQuery,
30
37
  CountConversationTagsResponse,
31
38
  CreateAgentListenerRequest,
@@ -35,6 +42,8 @@ import type {
35
42
  CreateContactRequest,
36
43
  CreateConversationBriefRequest,
37
44
  CreateConversationFilterRequest,
45
+ CreateConversationNoteRequest,
46
+ CreateConversationObjectiveDefinitionRequest,
38
47
  CreateConversationTagDefinitionRequest,
39
48
  CreateConversationTagRequest,
40
49
  CreateConversationTagSetRequest,
@@ -53,6 +62,8 @@ import type {
53
62
  EmailSuppressionKind,
54
63
  EvaluateConversationTagsRequest,
55
64
  GetConnectionHealthQuery,
65
+ GetManyConversationObjectiveDefinitionsQuery,
66
+ GetManyConversationObjectivesQuery,
56
67
  GlossaryTerm,
57
68
  InstallConnectionRequest,
58
69
  InstallConnectionResponse,
@@ -66,8 +77,10 @@ import type {
66
77
  ListContactRecordLinksQuery,
67
78
  ListContactsQuery,
68
79
  ListConversationBriefsQuery,
80
+ ListMeetingBotsQuery,
69
81
  ListConversationFilterEventsQuery,
70
82
  ListConversationFiltersQuery,
83
+ ListConversationNotesQuery,
71
84
  ListConversationsQuery,
72
85
  ListConversationTagDefinitionsQuery,
73
86
  ListConversationTagEvaluationsQuery,
@@ -88,6 +101,7 @@ import type {
88
101
  MaterializeTranscriptionRequest,
89
102
  MergeContactsRequest,
90
103
  Message,
104
+ MeetingBot,
91
105
  MintCallTokenRequest,
92
106
  MistranscribedTerm,
93
107
  PerformChannelActionRequest,
@@ -102,6 +116,7 @@ import type {
102
116
  SendingLimitPreset,
103
117
  SendingRule,
104
118
  SendMessageRequest,
119
+ SetCallRecordingRequest,
105
120
  SetDefaultSenderRequest,
106
121
  SyncConnectionRequest,
107
122
  ToneProfile,
@@ -114,6 +129,8 @@ import type {
114
129
  UpdateContactRequest,
115
130
  UpdateConversationBriefRequest,
116
131
  UpdateConversationFilterRequest,
132
+ UpdateConversationNoteRequest,
133
+ UpdateConversationObjectiveDefinitionRequest,
117
134
  UpdateConversationRequest,
118
135
  UpdateConversationTagDefinitionRequest,
119
136
  UpdateConversationTagRequest,
@@ -167,6 +184,10 @@ export class ConversationClient {
167
184
  readonly conversationTagSets: ConversationTagSetService
168
185
  /** Conversation intelligence: the observations produced + their evaluation history. */
169
186
  readonly conversationTags: ConversationTagService
187
+ /** Conversation objectives: WHAT a conversation should achieve (config, keyed, module-deployable). */
188
+ readonly conversationObjectiveDefinitions: ConversationObjectiveDefinitionService
189
+ /** Conversation objectives: the org-wide ledger of standings + grouped counts (read-only). */
190
+ readonly conversationObjectives: ConversationObjectiveService
170
191
  /** Generic audience taxonomy; membership lives on the contact. */
171
192
  readonly contactGroups: ContactGroupService
172
193
  /** Tone-of-voice synthesis: per-user setups + the generated profiles. */
@@ -174,13 +195,17 @@ export class ConversationClient {
174
195
  readonly transcriptions: TranscriptionService
175
196
  /** Review-pass findings: likely misheard terms awaiting accept/reject. */
176
197
  readonly mistranscribedTerms: MistranscribedTermService
177
- /** Meeting bots (Ava): dispatch into a meeting URL, remove from a meeting. */
198
+ /** Meeting bots (Ava): dispatch into a meeting URL, summaries. */
178
199
  readonly meetings: MeetingService
200
+ /** Ava's bots as remembered by the platform: list them, withdraw her from a meeting. */
201
+ readonly meetingBots: MeetingBotService
179
202
  /** Realtime speech-to-text (dictation) — moved here from agent-service. */
180
203
  readonly voice: VoiceService
181
204
  readonly calls: CallService
182
205
  /** Conversation briefs: guidance prepared ahead of a conversation (call, meeting) with a contact. */
183
206
  readonly conversationBriefs: ConversationBriefService
207
+ /** Conversation notes: what a person recorded about a conversation (append log, author-stamped). */
208
+ readonly conversationNotes: ConversationNoteService
184
209
 
185
210
  constructor(client: ProteosClient) {
186
211
  this.connections = new ConnectionServiceImpl(client)
@@ -197,18 +222,77 @@ export class ConversationClient {
197
222
  this.conversationTagDefinitions = new ConversationTagDefinitionServiceImpl(client)
198
223
  this.conversationTagSets = new ConversationTagSetServiceImpl(client)
199
224
  this.conversationTags = new ConversationTagServiceImpl(client)
225
+ this.conversationObjectiveDefinitions = new ConversationObjectiveDefinitionServiceImpl(client)
226
+ this.conversationObjectives = new ConversationObjectiveServiceImpl(client)
200
227
  this.contactGroups = new ContactGroupServiceImpl(client)
201
228
  this.toneProfiles = new ToneProfileServiceImpl(client)
202
229
  this.transcriptions = new TranscriptionServiceImpl(client)
203
230
  this.mistranscribedTerms = new MistranscribedTermServiceImpl(client)
204
231
  this.meetings = new MeetingServiceImpl(client)
232
+ this.meetingBots = new MeetingBotServiceImpl(client)
205
233
  this.voice = new VoiceServiceImpl(client)
206
234
  this.calls = new CallServiceImpl(client)
207
235
  this.conversationBriefs = new ConversationBriefServiceImpl(client)
236
+ this.conversationNotes = new ConversationNoteServiceImpl(client)
208
237
  }
209
238
  }
210
239
 
211
- /** Meeting bots (Ava) — dispatch by meeting URL and removal. */
240
+ /** Conversation notes — what a person recorded about a conversation. */
241
+ export interface ConversationNoteService {
242
+ /** A conversation's notes, oldest first by default. */
243
+ list(
244
+ conversationId: string,
245
+ query?: ListConversationNotesQuery,
246
+ ): Promise<ListResponse<ConversationNote>>
247
+ create(conversationId: string, request: CreateConversationNoteRequest): Promise<ConversationNote>
248
+ /** Author only (403 `conversation_note_not_author`). */
249
+ update(id: string, request: UpdateConversationNoteRequest): Promise<ConversationNote>
250
+ /** Author only (403 `conversation_note_not_author`). */
251
+ delete(id: string): Promise<void>
252
+ }
253
+
254
+ class ConversationNoteServiceImpl implements ConversationNoteService {
255
+ constructor(private readonly client: ProteosClient) {}
256
+
257
+ list(
258
+ conversationId: string,
259
+ query: ListConversationNotesQuery = {},
260
+ ): Promise<ListResponse<ConversationNote>> {
261
+ return this.client.requestWithQuery(
262
+ 'GET',
263
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/notes`,
264
+ query,
265
+ )
266
+ }
267
+
268
+ create(
269
+ conversationId: string,
270
+ request: CreateConversationNoteRequest,
271
+ ): Promise<ConversationNote> {
272
+ return this.client.request(
273
+ 'POST',
274
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/notes`,
275
+ request,
276
+ )
277
+ }
278
+
279
+ update(id: string, request: UpdateConversationNoteRequest): Promise<ConversationNote> {
280
+ return this.client.request(
281
+ 'PATCH',
282
+ `${CONVERSATION_BASE_PATH}/conversation-notes/${encodeURIComponent(id)}`,
283
+ request,
284
+ )
285
+ }
286
+
287
+ delete(id: string): Promise<void> {
288
+ return this.client.request(
289
+ 'DELETE',
290
+ `${CONVERSATION_BASE_PATH}/conversation-notes/${encodeURIComponent(id)}`,
291
+ )
292
+ }
293
+ }
294
+
295
+ /** Meeting bots (Ava) — dispatch by meeting URL, summaries. */
212
296
  export interface MeetingService {
213
297
  /**
214
298
  * Send Ava to a meeting URL. Resolves with the pre-minted meeting
@@ -216,8 +300,6 @@ export interface MeetingService {
216
300
  * turns then stream in as inbound messages while the meeting runs.
217
301
  */
218
302
  dispatch(request: DispatchMeetingBotRequest): Promise<Conversation>
219
- /** Make the bot leave the meeting and end the conversation (by conversation id). */
220
- remove(conversationId: string): Promise<Conversation>
221
303
  /**
222
304
  * START regenerating this meeting conversation's markdown summary from its
223
305
  * stored transcript, overwriting any existing one when it lands. Generation
@@ -241,17 +323,42 @@ class MeetingServiceImpl implements MeetingService {
241
323
  return this.client.request('POST', `${CONVERSATION_BASE_PATH}/meetings`, request)
242
324
  }
243
325
 
244
- remove(conversationId: string): Promise<Conversation> {
326
+ summarize(conversationId: string): Promise<Conversation> {
245
327
  return this.client.request(
246
- 'DELETE',
247
- `${CONVERSATION_BASE_PATH}/meetings/${encodeURIComponent(conversationId)}`,
328
+ 'POST',
329
+ `${CONVERSATION_BASE_PATH}/meetings/${encodeURIComponent(conversationId)}/summarize`,
248
330
  )
249
331
  }
332
+ }
250
333
 
251
- summarize(conversationId: string): Promise<Conversation> {
334
+ /**
335
+ * Ava's bots as the platform remembers them: what a client shows as "Ava joins"
336
+ * for a meeting, and the door to withdraw her.
337
+ */
338
+ export interface MeetingBotService {
339
+ /** The bots the caller may see, soonest meeting first. */
340
+ list(query?: ListMeetingBotsQuery): Promise<ListResponse<MeetingBot>>
341
+ /**
342
+ * Withdraw Ava from the meeting this bot belongs to: every bot of that
343
+ * meeting instance the caller may act on (scheduled from their connection,
344
+ * or on a meeting they are invited to) is cancelled (scheduled) or leaves
345
+ * the call (live), the rows become `removed`, and the calendar will not
346
+ * schedule her again. Re-add her explicitly with `meetings.dispatch`.
347
+ */
348
+ remove(id: string): Promise<MeetingBot>
349
+ }
350
+
351
+ class MeetingBotServiceImpl implements MeetingBotService {
352
+ constructor(private readonly client: ProteosClient) {}
353
+
354
+ list(query: ListMeetingBotsQuery = {}): Promise<ListResponse<MeetingBot>> {
355
+ return this.client.requestWithQuery('GET', `${CONVERSATION_BASE_PATH}/meeting-bots`, query)
356
+ }
357
+
358
+ remove(id: string): Promise<MeetingBot> {
252
359
  return this.client.request(
253
- 'POST',
254
- `${CONVERSATION_BASE_PATH}/meetings/${encodeURIComponent(conversationId)}/summarize`,
360
+ 'DELETE',
361
+ `${CONVERSATION_BASE_PATH}/meeting-bots/${encodeURIComponent(id)}`,
255
362
  )
256
363
  }
257
364
  }
@@ -654,6 +761,18 @@ export interface ConversationService {
654
761
  get(id: string): Promise<Conversation>
655
762
  /** Patch the user-editable surface (subject, summary, status, metadata). */
656
763
  update(id: string, request: UpdateConversationRequest): Promise<Conversation>
764
+ /**
765
+ * What the conversation may end with: its type's outcomes, then its
766
+ * channel's system outcomes — the picker's list and the valid
767
+ * `outcome_key` values for `update`.
768
+ */
769
+ listOutcomes(id: string): Promise<{ data: ConversationOutcomeOption[] }>
770
+ /**
771
+ * Where the conversation stands against its objectives: the current phase,
772
+ * every phase's status, every applicable objective's standing and the
773
+ * definitions they reference — the checklist from one read.
774
+ */
775
+ getObjectiveProgress(id: string): Promise<ConversationObjectiveProgress>
657
776
  end(id: string): Promise<Conversation>
658
777
  /**
659
778
  * Hard-delete the conversation, its thread children, and every dependent
@@ -682,6 +801,21 @@ class ConversationServiceImpl implements ConversationService {
682
801
  )
683
802
  }
684
803
 
804
+ listOutcomes(id: string): Promise<{ data: ConversationOutcomeOption[] }> {
805
+ return this.client.request(
806
+ 'GET',
807
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(id)}/outcomes`,
808
+ )
809
+ }
810
+
811
+ async getObjectiveProgress(id: string): Promise<ConversationObjectiveProgress> {
812
+ const response = await this.client.request<{ data: ConversationObjectiveProgress }>(
813
+ 'GET',
814
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(id)}/objective-progress`,
815
+ )
816
+ return response.data
817
+ }
818
+
685
819
  update(id: string, request: UpdateConversationRequest): Promise<Conversation> {
686
820
  return this.client.request(
687
821
  'PATCH',
@@ -1259,6 +1393,14 @@ export interface ConversationTagService {
1259
1393
  list(query?: ListConversationTagsQuery): Promise<ListResponse<ConversationTag>>
1260
1394
  /** Grouped counts for dashboards — `group_by` is a comma-joined string. */
1261
1395
  counts(query?: CountConversationTagsQuery): Promise<CountConversationTagsResponse>
1396
+ /**
1397
+ * The enabled definitions the enabled sets select for the conversation right
1398
+ * now (`evaluate_on` ignored, like a manual evaluation) — what a person may
1399
+ * tag it with, incl. its outcome definition(s) (`role === 'outcome'`).
1400
+ */
1401
+ listApplicableDefinitions(
1402
+ conversationId: string,
1403
+ ): Promise<ListResponse<ConversationTagDefinition>>
1262
1404
  }
1263
1405
 
1264
1406
  class ConversationTagServiceImpl implements ConversationTagService {
@@ -1283,6 +1425,15 @@ class ConversationTagServiceImpl implements ConversationTagService {
1283
1425
  )
1284
1426
  }
1285
1427
 
1428
+ listApplicableDefinitions(
1429
+ conversationId: string,
1430
+ ): Promise<ListResponse<ConversationTagDefinition>> {
1431
+ return this.client.request(
1432
+ 'GET',
1433
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/tag-definitions`,
1434
+ )
1435
+ }
1436
+
1286
1437
  evaluate(
1287
1438
  conversationId: string,
1288
1439
  request: EvaluateConversationTagsRequest = {},
@@ -1333,6 +1484,143 @@ class ConversationTagServiceImpl implements ConversationTagService {
1333
1484
  }
1334
1485
  }
1335
1486
 
1487
+ /**
1488
+ * Conversation objective definitions: WHAT a conversation should achieve —
1489
+ * "confirm the budget", "book the demo" — org-wide or per conversation type,
1490
+ * optionally pinned to one of the type's phases, optionally MEASURED (a tag
1491
+ * value condition or an outcome set) so the platform can tell when it was
1492
+ * achieved. Keyed by `key` (not id); `upsert` is the idempotent module-deploy
1493
+ * door.
1494
+ */
1495
+ export interface ConversationObjectiveDefinitionService {
1496
+ list(
1497
+ query?: GetManyConversationObjectiveDefinitionsQuery,
1498
+ ): Promise<ListResponse<ConversationObjectiveDefinition>>
1499
+ /** One page, explicitly (`query.page`) — the door a page walker calls; same wire call as `list`. */
1500
+ listPage(
1501
+ query?: GetManyConversationObjectiveDefinitionsQuery,
1502
+ ): Promise<ListResponse<ConversationObjectiveDefinition>>
1503
+ get(key: string): Promise<ConversationObjectiveDefinition>
1504
+ create(
1505
+ request: CreateConversationObjectiveDefinitionRequest,
1506
+ ): Promise<ConversationObjectiveDefinition>
1507
+ /** Partial update; `measure: null` clears the measure (guidance only). */
1508
+ update(
1509
+ key: string,
1510
+ request: UpdateConversationObjectiveDefinitionRequest,
1511
+ ): Promise<ConversationObjectiveDefinition>
1512
+ /** Idempotent create-or-update by key (PUT) — what `pro module deploy` calls. */
1513
+ upsert(
1514
+ key: string,
1515
+ request: CreateConversationObjectiveDefinitionRequest,
1516
+ ): Promise<ConversationObjectiveDefinition>
1517
+ delete(key: string): Promise<void>
1518
+ }
1519
+
1520
+ class ConversationObjectiveDefinitionServiceImpl implements ConversationObjectiveDefinitionService {
1521
+ constructor(private readonly client: ProteosClient) {}
1522
+
1523
+ list(
1524
+ query: GetManyConversationObjectiveDefinitionsQuery = {},
1525
+ ): Promise<ListResponse<ConversationObjectiveDefinition>> {
1526
+ return this.listPage(query)
1527
+ }
1528
+
1529
+ listPage(
1530
+ query: GetManyConversationObjectiveDefinitionsQuery = {},
1531
+ ): Promise<ListResponse<ConversationObjectiveDefinition>> {
1532
+ return this.client.requestWithQuery(
1533
+ 'GET',
1534
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions`,
1535
+ query,
1536
+ )
1537
+ }
1538
+
1539
+ get(key: string): Promise<ConversationObjectiveDefinition> {
1540
+ return this.client.request(
1541
+ 'GET',
1542
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`,
1543
+ )
1544
+ }
1545
+
1546
+ create(
1547
+ request: CreateConversationObjectiveDefinitionRequest,
1548
+ ): Promise<ConversationObjectiveDefinition> {
1549
+ return this.client.request(
1550
+ 'POST',
1551
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions`,
1552
+ request,
1553
+ )
1554
+ }
1555
+
1556
+ update(
1557
+ key: string,
1558
+ request: UpdateConversationObjectiveDefinitionRequest,
1559
+ ): Promise<ConversationObjectiveDefinition> {
1560
+ return this.client.request(
1561
+ 'PATCH',
1562
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`,
1563
+ request,
1564
+ )
1565
+ }
1566
+
1567
+ upsert(
1568
+ key: string,
1569
+ request: CreateConversationObjectiveDefinitionRequest,
1570
+ ): Promise<ConversationObjectiveDefinition> {
1571
+ return this.client.request(
1572
+ 'PUT',
1573
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`,
1574
+ { ...request, key },
1575
+ )
1576
+ }
1577
+
1578
+ async delete(key: string): Promise<void> {
1579
+ await this.client.request(
1580
+ 'DELETE',
1581
+ `${CONVERSATION_BASE_PATH}/conversation-objective-definitions/${encodeURIComponent(key)}`,
1582
+ )
1583
+ }
1584
+ }
1585
+
1586
+ /**
1587
+ * Conversation objectives: the org-wide ledger of every applicable
1588
+ * definition's standing on every conversation (open rows included), plus
1589
+ * grouped counts for dashboards. Read-only — a standing is resolved by the
1590
+ * service from the conversation's tags and outcome; the per-conversation
1591
+ * checklist is `conversations.getObjectiveProgress`.
1592
+ */
1593
+ export interface ConversationObjectiveService {
1594
+ /** The ledger (filter by conversation, definition, type, phase, channel, status, source, time window on `recorded_at`). */
1595
+ list(query?: GetManyConversationObjectivesQuery): Promise<ListResponse<ConversationObjective>>
1596
+ /** Grouped counts for dashboards — `group_by` is a comma-joined string. */
1597
+ counts(query?: CountConversationObjectivesQuery): Promise<CountConversationObjectivesResponse>
1598
+ }
1599
+
1600
+ class ConversationObjectiveServiceImpl implements ConversationObjectiveService {
1601
+ constructor(private readonly client: ProteosClient) {}
1602
+
1603
+ list(
1604
+ query: GetManyConversationObjectivesQuery = {},
1605
+ ): Promise<ListResponse<ConversationObjective>> {
1606
+ return this.client.requestWithQuery(
1607
+ 'GET',
1608
+ `${CONVERSATION_BASE_PATH}/conversation-objectives`,
1609
+ query,
1610
+ )
1611
+ }
1612
+
1613
+ counts(
1614
+ query: CountConversationObjectivesQuery = {},
1615
+ ): Promise<CountConversationObjectivesResponse> {
1616
+ return this.client.requestWithQuery(
1617
+ 'GET',
1618
+ `${CONVERSATION_BASE_PATH}/conversation-objectives/counts`,
1619
+ query,
1620
+ )
1621
+ }
1622
+ }
1623
+
1336
1624
  /**
1337
1625
  * Contact groups: the generic org-shared audience taxonomy. Membership lives
1338
1626
  * on the contact (`Contact.group_key`, one group per contact — assign via
@@ -1624,6 +1912,14 @@ class MistranscribedTermServiceImpl implements MistranscribedTermService {
1624
1912
  */
1625
1913
  export interface CallService {
1626
1914
  mintToken(request: MintCallTokenRequest): Promise<CallTokenResponse>
1915
+ /**
1916
+ * The conversation a provider call became — the softphone's outbound
1917
+ * browser-leg CallSid. 404 `call_not_found` until the call-start callback
1918
+ * minted it (poll briefly).
1919
+ */
1920
+ getCallConversation(connectionId: string, externalCallId: string): Promise<Conversation>
1921
+ /** Start / resume (true) or pause (false) the recording of a live phone conversation. */
1922
+ setRecording(conversationId: string, request: SetCallRecordingRequest): Promise<Conversation>
1627
1923
  /** A phone connection's provider numbers with status + routing. */
1628
1924
  listPhoneNumbers(connectionId: string): Promise<{ data: PhoneNumber[] }>
1629
1925
  /** Replace one number's routing (who it rings). Returns the refreshed list. */
@@ -1651,6 +1947,21 @@ class CallServiceImpl implements CallService {
1651
1947
  return this.client.request('POST', `${CONVERSATION_BASE_PATH}/calls/token`, request)
1652
1948
  }
1653
1949
 
1950
+ getCallConversation(connectionId: string, externalCallId: string): Promise<Conversation> {
1951
+ return this.client.request(
1952
+ 'GET',
1953
+ `${CONVERSATION_BASE_PATH}/connections/${encodeURIComponent(connectionId)}/calls/${encodeURIComponent(externalCallId)}`,
1954
+ )
1955
+ }
1956
+
1957
+ setRecording(conversationId: string, request: SetCallRecordingRequest): Promise<Conversation> {
1958
+ return this.client.request(
1959
+ 'PUT',
1960
+ `${CONVERSATION_BASE_PATH}/conversations/${encodeURIComponent(conversationId)}/recording`,
1961
+ request,
1962
+ )
1963
+ }
1964
+
1654
1965
  listPhoneNumbers(connectionId: string): Promise<{ data: PhoneNumber[] }> {
1655
1966
  return this.client.request(
1656
1967
  'GET',
@@ -1703,11 +2014,12 @@ export type {
1703
2014
  /**
1704
2015
  * Conversation briefs — guidance prepared ahead of a conversation ("talk to
1705
2016
  * these people about this"; the conversation sibling of message drafts).
1706
- * Binding is explicit: the softphone carries the brief id into the call, or
1707
- * `attach` names the conversation. Any number of briefs may be open for the
1708
- * same people. Edits/attach on a non-open brief fail 409
1709
- * `conversation_brief_not_editable`; a conversation already carrying a brief
1710
- * refuses another (409 `conversation_brief_already_attached`).
2017
+ * Binding is explicit: the softphone carries the brief id into the call, a
2018
+ * brief naming a calendar event attaches to that meeting's conversation when
2019
+ * the meeting bot starts, or `attach` names the conversation. Any number of
2020
+ * briefs may be open for the same people or meeting, and a conversation may
2021
+ * carry several. Edits/attach on a non-open brief fail 409
2022
+ * `conversation_brief_not_editable`.
1711
2023
  */
1712
2024
  export interface ConversationBriefService {
1713
2025
  list(query?: ListConversationBriefsQuery): Promise<ListResponse<ConversationBrief>>