@proteos/sdk 0.90.0 → 0.92.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proteos/sdk",
3
- "version": "0.90.0",
3
+ "version": "0.92.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "TypeScript SDK for the Proteos platform",
6
6
  "repository": {
@@ -153,6 +153,8 @@ export type {
153
153
  ToolUseDeltaPayload,
154
154
  ToolUsePayload,
155
155
  ToolUseStartPayload,
156
+ TransferVoiceRequest,
157
+ TransferVoiceResponse,
156
158
  Turn,
157
159
  UserMessagePayload,
158
160
  VoiceEndedPayload,
@@ -172,6 +174,7 @@ export type {
172
174
  Agent,
173
175
  AgentResourceListOptions,
174
176
  AgentRuntime,
177
+ AgentVoiceStyle,
175
178
  CreateAgentRequest,
176
179
  CreateMcpServerRequest,
177
180
  CreatePromptRequest,
@@ -31,6 +31,8 @@ export interface ModelInfo {
31
31
  runtimes: AgentRuntime[]
32
32
  /** Tokens one request can hold, input and output together. Absent when unknown. */
33
33
  context_window?: number
34
+ /** Whether the model reads images and PDFs sent with the conversation. */
35
+ supports_images: boolean
34
36
  }
35
37
 
36
38
  // ---------------------------------------------------------------------------
@@ -14,7 +14,7 @@
14
14
  */
15
15
 
16
16
  import type { AuditFields, ListOptions, UserRef } from '../types/common.js'
17
- import type { AgentRuntime, ToolKind } from './types.js'
17
+ import type { AgentRuntime, AgentVoiceStyle, ToolKind } from './types.js'
18
18
 
19
19
  export type { ToolKind } from './types.js'
20
20
 
@@ -76,6 +76,11 @@ export interface Session extends AuditFields {
76
76
  ended_at: string | null
77
77
  /** Who ended it; null unless `status` is `ended` (and on sessions ended by the platform). */
78
78
  ended_by: UserRef | null
79
+ /**
80
+ * Whether the voice provider records the voice sessions of this session (see
81
+ * {@link CreateSessionRequest.is_voice_recorded}). Set at create, never changed.
82
+ */
83
+ is_voice_recorded: boolean
79
84
  }
80
85
 
81
86
  /**
@@ -136,6 +141,7 @@ export type EventType =
136
141
  | 'session.updated'
137
142
  | 'session.voice_started'
138
143
  | 'session.voice_ended'
144
+ // The service asking the agent to open the conversation; shows nothing.
139
145
  // A report on a session this one delegated to.
140
146
  | 'delegated_session.updated'
141
147
  // Span (observability).
@@ -188,9 +194,12 @@ export interface ContentBlock extends FileBlock {
188
194
  * under `image`; `json` carries an arbitrary raw object.
189
195
  */
190
196
  export interface ResultBlock {
191
- type: 'text' | 'image' | 'json'
197
+ type: 'text' | 'image' | 'file' | 'json'
192
198
  text?: string
199
+ /** A stored image (type `image`). The model sees it when it reads images. */
193
200
  image?: FileBlock
201
+ /** Any other stored file, such as a PDF (type `file`). */
202
+ file?: FileBlock
194
203
  json?: unknown
195
204
  }
196
205
 
@@ -385,12 +394,22 @@ export interface VoiceRequestPayload {
385
394
  context?: string
386
395
  }
387
396
 
388
- /** Voice was entered on the session. */
397
+ /**
398
+ * Voice was entered on the session. `transferred_from_session_id` is set when
399
+ * it was not entered here but came with the person: the session they were
400
+ * handed over from, or handed back from.
401
+ */
389
402
  export interface VoiceStartedPayload {
390
403
  voice_session_id: string
404
+ transferred_from_session_id?: string
391
405
  }
392
406
 
393
- /** Why a voice session ended. `superseded` is never reported by a page. */
407
+ /**
408
+ * Why a voice session ended. `superseded` and `transferred` are never reported
409
+ * by a page. `transferred` is the reason of the `session.voice_ended` in the log
410
+ * of a session the person was handed over from: the voice session itself goes on
411
+ * in the session they were handed to.
412
+ */
394
413
  export type VoiceEndReason =
395
414
  | 'user'
396
415
  | 'idle'
@@ -399,16 +418,19 @@ export type VoiceEndReason =
399
418
  | 'browser_left'
400
419
  | 'provider_closed'
401
420
  | 'superseded'
421
+ | 'transferred'
402
422
 
403
423
  /**
404
424
  * Voice was left: why, and how long the voice session lasted: what the voice
405
425
  * provider says, or the time since voice was entered when the page went away
406
- * without it (null when nobody learned it).
426
+ * without it (null when nobody learned it). With `transferred` the voice session
427
+ * goes on in `transferred_to_session_id`, and no duration is known yet.
407
428
  */
408
429
  export interface VoiceEndedPayload {
409
430
  voice_session_id: string
410
431
  end_reason: VoiceEndReason
411
432
  duration_seconds: number | null
433
+ transferred_to_session_id?: string
412
434
  }
413
435
 
414
436
  /** Opens a model-request span. */
@@ -539,6 +561,18 @@ export interface CreateSessionRequest {
539
561
  agent_key: string
540
562
  title?: string
541
563
  client_tools?: ClientToolSchema[]
564
+ /**
565
+ * Replaces the voice assistant's instructions in the voice sessions of this
566
+ * session, at most 40,000 characters. `{{delegate}}` and `{{do_not_delegate}}` in them stand
567
+ * for the words the voice model in use is told to hand a request over with, and
568
+ * not to; the service fills them in. No response or event returns them.
569
+ */
570
+ voice_instructions?: string
571
+ /**
572
+ * The voice provider records the voice sessions of this session; a recording
573
+ * is read with `sessions.getVoiceRecording`.
574
+ */
575
+ is_voice_recorded?: boolean
542
576
  }
543
577
 
544
578
  /**
@@ -579,11 +613,13 @@ export interface AppendEventRequest {
579
613
  * One time a person talked to a session's agent through the voice assistant. The
580
614
  * assistant listens and speaks; what was said is in the session's event log
581
615
  * (`user.speech`, `agent.speech`) and everything asked for runs as turns of the
582
- * session. A session has at most one active voice session.
616
+ * session. A session has at most one active voice session. A hand-over moves the
617
+ * voice session to the session the person is handed to, and back.
583
618
  */
584
619
  export interface VoiceSession {
585
620
  id: string
586
621
  org_id: string
622
+ /** The session the person talks to. */
587
623
  session_id: string
588
624
  status: 'active' | 'ended'
589
625
  /** Null while it is active. */
@@ -591,6 +627,10 @@ export interface VoiceSession {
591
627
  /** How long it lasted: what the voice provider says, or the time since voice
592
628
  * was entered when the page went away without it. Null when not known. */
593
629
  duration_seconds: number | null
630
+ /** How much of `duration_seconds` the voice model was paused (standby):
631
+ * nobody spoke, and the provider bills that time at its lower rate. Null when
632
+ * not known. */
633
+ standby_seconds: number | null
594
634
  created_by: UserRef
595
635
  created_at: string
596
636
  ended_at: string | null
@@ -608,10 +648,20 @@ export interface StartVoiceRequest {
608
648
  export interface StartVoiceResponse {
609
649
  voice_session: VoiceSession
610
650
  sdp_answer: string
611
- /** How long nobody may speak before the page leaves voice. */
651
+ /** How long nobody may speak, while the voice model listens, before the page
652
+ * leaves voice. */
612
653
  idle_timeout_seconds: number
613
654
  /** How long a voice session may last at most. */
614
655
  max_duration_seconds: number
656
+ /** How long nobody speaks before the voice provider pauses the voice model
657
+ * (standby); speech wakes it. 0: it never pauses. */
658
+ standby_after_seconds: number
659
+ /** How long the voice model may stay paused in one stretch before the page
660
+ * leaves voice. */
661
+ max_standby_seconds: number
662
+ /** When the voice of the session's agent speaks: the page tells a
663
+ * moderator's voice model when the conversation has gone quiet. */
664
+ voice_style: AgentVoiceStyle
615
665
  }
616
666
 
617
667
  /** One finished utterance as the page heard it from the voice provider. */
@@ -653,13 +703,43 @@ export interface AppendSpeechRequest {
653
703
  */
654
704
  export interface EndVoiceRequest {
655
705
  voice_session_id: string
656
- end_reason: Exclude<VoiceEndReason, 'superseded'>
706
+ end_reason: Exclude<VoiceEndReason, 'superseded' | 'transferred'>
657
707
  duration_seconds?: number | null
708
+ /** How much of `duration_seconds` the voice model was paused, as the voice
709
+ * provider says. */
710
+ standby_seconds?: number | null
658
711
  /** What was said since the last speech report: a page that is being closed
659
712
  * has one request left to send. */
660
713
  segments?: SpeechSegment[]
661
714
  }
662
715
 
716
+ /**
717
+ * Moves the session's active voice session to another session, when the person
718
+ * is handed over to it or handed back. The connection to the voice provider
719
+ * stays as it is; what the person asks for next runs as turns of the target.
720
+ */
721
+ export interface TransferVoiceRequest {
722
+ /** The voice session the page started (see {@link AppendSpeechRequest}). */
723
+ voice_session_id: string
724
+ /** A session the session delegated to, or the one that delegated to it. */
725
+ target_session_id: string
726
+ }
727
+
728
+ /**
729
+ * The voice session on its new session, and the `session.voice_started` written
730
+ * to that session's log: what the log holds up to it was not said to the voice
731
+ * model.
732
+ */
733
+ export interface TransferVoiceResponse {
734
+ voice_session: VoiceSession
735
+ started: SessionEvent
736
+ /** The voice style of the agent the voice speaks for now. */
737
+ voice_style: AgentVoiceStyle
738
+ /** Whether a turn of that session runs, as its log says up to `started`.
739
+ * The page follows the log from `started` on. */
740
+ is_turn_running: boolean
741
+ }
742
+
663
743
  /** List filter for sessions (in addition to pagination/sorting). */
664
744
  export interface ListSessionsOptions extends ListOptions {
665
745
  /** Filter by the agent the session runs. */
@@ -21,6 +21,8 @@ import type {
21
21
  SessionStreamOptions,
22
22
  StartVoiceRequest,
23
23
  StartVoiceResponse,
24
+ TransferVoiceRequest,
25
+ TransferVoiceResponse,
24
26
  Turn,
25
27
  VoiceSession,
26
28
  } from './session-types.js'
@@ -140,6 +142,16 @@ export interface SessionService {
140
142
  * talked to by voice; 501 `voice_disabled`; 502 `voice_provider_failed`.
141
143
  */
142
144
  startVoice(id: string, request: StartVoiceRequest): Promise<StartVoiceResponse>
145
+ /**
146
+ * Moves the session's active voice session to a session it delegated to, or
147
+ * to the one that delegated to it: the person was handed over and talks to
148
+ * that session's agent from here on. The page keeps its connection to the
149
+ * voice provider and reports to the target session from then on.
150
+ * @throws {ProteosError} 400 `invalid_voice_request` when the target is
151
+ * neither; 409 `voice_not_supported` when the target is over; 409
152
+ * `voice_session_not_active`.
153
+ */
154
+ transferVoice(id: string, request: TransferVoiceRequest): Promise<TransferVoiceResponse>
143
155
  /**
144
156
  * Reports what was said in the session's active voice session and returns the
145
157
  * events written. With `starts_turn` the last of them is the
@@ -162,6 +174,23 @@ export interface SessionService {
162
174
  request: EndVoiceRequest,
163
175
  requestOptions?: RequestOptions,
164
176
  ): Promise<VoiceSession>
177
+ /**
178
+ * The voice provider's recording of an ended voice session of the session, for
179
+ * a session created with `is_voice_recorded`: a WAV file (16-bit PCM, stereo,
180
+ * the person on the left channel and the voice assistant on the right). The
181
+ * ids of a session's voice sessions are in its `session.voice_started` and
182
+ * `session.voice_ended` events. `options.timeout` covers reading the whole
183
+ * file, so raise it for a long recording.
184
+ * @throws {ProteosError} 404 `voice_recording_not_found` when the voice session
185
+ * is not one of this session or was not recorded; 409
186
+ * `voice_recording_not_ready` while the voice session is active or the provider
187
+ * does not have the recording yet (ask again).
188
+ */
189
+ getVoiceRecording(
190
+ id: string,
191
+ voiceSessionId: string,
192
+ requestOptions?: RequestOptions,
193
+ ): Promise<Blob>
165
194
  }
166
195
 
167
196
  export class SessionServiceImpl implements SessionService {
@@ -309,6 +338,14 @@ export class SessionServiceImpl implements SessionService {
309
338
  )
310
339
  }
311
340
 
341
+ async transferVoice(id: string, request: TransferVoiceRequest): Promise<TransferVoiceResponse> {
342
+ return this.client.request<TransferVoiceResponse>(
343
+ 'POST',
344
+ `${SESSIONS_BASE_PATH}/${id}/voice/transfer`,
345
+ request,
346
+ )
347
+ }
348
+
312
349
  async appendSpeech(
313
350
  id: string,
314
351
  request: AppendSpeechRequest,
@@ -335,6 +372,20 @@ export class SessionServiceImpl implements SessionService {
335
372
  requestOptions,
336
373
  )
337
374
  }
375
+
376
+ async getVoiceRecording(
377
+ id: string,
378
+ voiceSessionId: string,
379
+ requestOptions?: RequestOptions,
380
+ ): Promise<Blob> {
381
+ const { response } = await this.client.requestRaw(
382
+ 'GET',
383
+ `${SESSIONS_BASE_PATH}/${id}/voice/${voiceSessionId}/recording`,
384
+ undefined,
385
+ requestOptions,
386
+ )
387
+ return await response.blob()
388
+ }
338
389
  }
339
390
 
340
391
  /**
@@ -57,6 +57,14 @@ export interface ModelConfig {
57
57
  */
58
58
  export type AgentRuntime = 'durable' | 'embedded' | 'sandbox'
59
59
 
60
+ /**
61
+ * When an agent's voice speaks in a voice session. `conversational` answers
62
+ * everything the person says. `listener` sits in on people who talk to each
63
+ * other and speaks only when addressed by the agent's name. `moderator` does
64
+ * the same and also speaks up when the conversation has gone quiet.
65
+ */
66
+ export type AgentVoiceStyle = 'conversational' | 'listener' | 'moderator'
67
+
60
68
  /**
61
69
  * A configured persona: a system prompt + model config + the skills, tools,
62
70
  * sub-agents and MCP servers it can use. All references are by key (immutable):
@@ -94,6 +102,9 @@ export interface Agent extends AuditFields {
94
102
  * (personal) knowledge space.
95
103
  */
96
104
  has_memory: boolean
105
+ /** When the agent's voice speaks in a voice session. A change applies to the
106
+ * next voice session. */
107
+ voice_style: AgentVoiceStyle
97
108
  /** What runs this agent's sessions. A session keeps the runtime it was created with. */
98
109
  runtime: AgentRuntime
99
110
  version: number
@@ -116,6 +127,8 @@ export interface CreateAgentRequest {
116
127
  has_memory?: boolean
117
128
  /** Defaults to `durable`. */
118
129
  runtime?: AgentRuntime
130
+ /** Defaults to `conversational`. */
131
+ voice_style?: AgentVoiceStyle
119
132
  }
120
133
 
121
134
  export interface UpdateAgentRequest {
@@ -133,6 +146,7 @@ export interface UpdateAgentRequest {
133
146
  has_workspace?: boolean
134
147
  has_memory?: boolean
135
148
  runtime?: AgentRuntime
149
+ voice_style?: AgentVoiceStyle
136
150
  }
137
151
 
138
152
  export type ListAgentsOptions = AgentResourceListOptions
@@ -108,6 +108,8 @@ export const PLATFORM_ENTITIES: readonly PlatformEntity[] = [
108
108
  // their preset catalog.
109
109
  { slug: 'sending-rules', name: 'Sending Rules' },
110
110
  { slug: 'email-signatures', name: 'Email Signatures' },
111
+ // Reusable messages and snippets, the organisation's and each person's own.
112
+ { slug: 'message-templates', name: 'Message Templates' },
111
113
  // The channel_action ledger: acts through a connection that are neither a
112
114
  // message nor a reaction (LinkedIn invitations, profile visits, InMail).
113
115
  { slug: 'channel-actions', name: 'Channel Actions' },
@@ -142,6 +144,9 @@ export const PLATFORM_ENTITIES: readonly PlatformEntity[] = [
142
144
  // Discovery (discovery-service): what users send Proteos to show how they
143
145
  // work — screenshots, recordings, written feedback. Mass noun, no plural.
144
146
  { slug: 'discovery-evidence', name: 'Discovery Evidence' },
147
+ // Interview guides an admin writes; whoever reads a definition reads its
148
+ // interviews, and whoever writes it invites people.
149
+ { slug: 'discovery-interview-definitions', name: 'Discovery Interview Definitions' },
145
150
  ] as const
146
151
 
147
152
  /** Just the platform entity slugs, in canonical order. */
@@ -178,6 +183,9 @@ export const SCOPED_PLATFORM_ENTITY_SLUGS: readonly string[] = [
178
183
  // grant at all is treated as scoped (own rows), so every org member can
179
184
  // send feedback and see what they sent.
180
185
  'discovery-evidence',
186
+ // discovery-service: an interview definition is owned by its creator; its
187
+ // interviews follow it.
188
+ 'discovery-interview-definitions',
181
189
  ]
182
190
 
183
191
  /** True when `slug` belongs to a platform entity (reserved; can't be user-created). */
@@ -1,4 +1,5 @@
1
1
  import type { ProteosClient } from '../client.js'
2
+ import { INVOKE_TIMEOUT_MS } from '../types/options.js'
2
3
  import type {
3
4
  ConnectionTokenResponse,
4
5
  Connector,
@@ -133,6 +134,7 @@ class ConnectorConnectionServiceImpl implements ConnectorConnectionService {
133
134
  'POST',
134
135
  `${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}/methods/${encodeURIComponent(method)}/invoke`,
135
136
  params,
137
+ { timeout: INVOKE_TIMEOUT_MS },
136
138
  )
137
139
  return response.result
138
140
  }
@@ -50,6 +50,7 @@ import type {
50
50
  CreateConversationTypeRequest,
51
51
  CreateEmailSignatureRequest,
52
52
  CreateGlossaryTermRequest,
53
+ CreateMessageTemplateRequest,
53
54
  CreateSendingRuleRequest,
54
55
  CreateToneProfileSetupRequest,
55
56
  CreateTranscriptionFromTextRequest,
@@ -92,6 +93,7 @@ import type {
92
93
  ListGlossaryTermsQuery,
93
94
  ListMeetingBotsQuery,
94
95
  ListMessagesQuery,
96
+ ListMessageTemplatesQuery,
95
97
  ListMistranscribedTermsQuery,
96
98
  ListReactionsResponse,
97
99
  ListResponse,
@@ -107,12 +109,15 @@ import type {
107
109
  Message,
108
110
  MessageDraftVersions,
109
111
  MessageSignature,
112
+ MessageTemplate,
110
113
  MintCallTokenRequest,
111
114
  MistranscribedTerm,
112
115
  PerformChannelActionRequest,
113
116
  PhoneNumber,
114
117
  Reaction,
115
118
  RecordPermissionEventRequest,
119
+ RenderedMessageTemplate,
120
+ RenderMessageTemplateRequest,
116
121
  ResolveEmailSignatureQuery,
117
122
  ResolveToneProfileQuery,
118
123
  RespondChannelActionRequest,
@@ -146,6 +151,7 @@ import type {
146
151
  UpdateDraftRequest,
147
152
  UpdateEmailSignatureRequest,
148
153
  UpdateGlossaryTermRequest,
154
+ UpdateMessageTemplateRequest,
149
155
  UpdatePhoneNumberRequest,
150
156
  UpdateSendingRuleRequest,
151
157
  UpdateTranscriptionRequest,
@@ -177,6 +183,8 @@ export class ConversationClient {
177
183
  /** Outbound send constraints: windows, connection limits, frequency caps + presets. */
178
184
  readonly sendingRules: SendingRuleService
179
185
  readonly emailSignatures: EmailSignatureService
186
+ /** Reusable messages and snippets, and rendering one for a recipient. */
187
+ readonly messageTemplates: MessageTemplateService
180
188
  /**
181
189
  * Channel actions: acts performed through a connection that are neither a
182
190
  * message nor a reaction — LinkedIn invitations, profile visits, InMail.
@@ -225,6 +233,7 @@ export class ConversationClient {
225
233
  this.conversationFilters = new ConversationFilterServiceImpl(client)
226
234
  this.sendingRules = new SendingRuleServiceImpl(client)
227
235
  this.emailSignatures = new EmailSignatureServiceImpl(client)
236
+ this.messageTemplates = new MessageTemplateServiceImpl(client)
228
237
  this.channelActions = new ChannelActionServiceImpl(client)
229
238
  this.channelEvents = new ChannelEventServiceImpl(client)
230
239
  this.glossaryTerms = new GlossaryTermServiceImpl(client)
@@ -2026,6 +2035,7 @@ class CallServiceImpl implements CallService {
2026
2035
  }
2027
2036
 
2028
2037
  export type * from './types.js'
2038
+ export { UNSUBSCRIBE_URL_PLACEHOLDER } from './types.js'
2029
2039
  // Re-export voice types (the live dictation stream lives on this service now)
2030
2040
  export type {
2031
2041
  TranscribeStreamOptions,
@@ -2237,6 +2247,82 @@ class EmailSignatureServiceImpl implements EmailSignatureService {
2237
2247
  }
2238
2248
  }
2239
2249
 
2250
+ /**
2251
+ * Message templates: reusable messages and snippets whose subject and body are
2252
+ * Liquid templates. A send or a draft names one with its `template` field.
2253
+ */
2254
+ export interface MessageTemplateService {
2255
+ list(query?: ListMessageTemplatesQuery): Promise<ListResponse<MessageTemplate>>
2256
+ /** By id or by key. */
2257
+ get(idOrKey: string): Promise<MessageTemplate>
2258
+ create(request: CreateMessageTemplateRequest): Promise<MessageTemplate>
2259
+ update(id: string, request: UpdateMessageTemplateRequest): Promise<MessageTemplate>
2260
+ /** Creates or replaces the template a key names; an equivalent body writes nothing. */
2261
+ upsertByKey(
2262
+ key: string,
2263
+ request: Omit<CreateMessageTemplateRequest, 'key'>,
2264
+ ): Promise<MessageTemplate>
2265
+ delete(id: string): Promise<void>
2266
+ /**
2267
+ * Fills in a stored or an inline template: what a send of it would store,
2268
+ * with the signature the email would get.
2269
+ */
2270
+ render(request: RenderMessageTemplateRequest): Promise<RenderedMessageTemplate>
2271
+ }
2272
+
2273
+ class MessageTemplateServiceImpl implements MessageTemplateService {
2274
+ constructor(private readonly client: ProteosClient) {}
2275
+
2276
+ list(query: ListMessageTemplatesQuery = {}): Promise<ListResponse<MessageTemplate>> {
2277
+ return this.client.requestWithQuery('GET', `${CONVERSATION_BASE_PATH}/message-templates`, query)
2278
+ }
2279
+
2280
+ get(idOrKey: string): Promise<MessageTemplate> {
2281
+ return this.client.request(
2282
+ 'GET',
2283
+ `${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(idOrKey)}`,
2284
+ )
2285
+ }
2286
+
2287
+ create(request: CreateMessageTemplateRequest): Promise<MessageTemplate> {
2288
+ return this.client.request('POST', `${CONVERSATION_BASE_PATH}/message-templates`, request)
2289
+ }
2290
+
2291
+ update(id: string, request: UpdateMessageTemplateRequest): Promise<MessageTemplate> {
2292
+ return this.client.request(
2293
+ 'PATCH',
2294
+ `${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(id)}`,
2295
+ request,
2296
+ )
2297
+ }
2298
+
2299
+ upsertByKey(
2300
+ key: string,
2301
+ request: Omit<CreateMessageTemplateRequest, 'key'>,
2302
+ ): Promise<MessageTemplate> {
2303
+ return this.client.request(
2304
+ 'PUT',
2305
+ `${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(key)}`,
2306
+ request,
2307
+ )
2308
+ }
2309
+
2310
+ async delete(id: string): Promise<void> {
2311
+ await this.client.request(
2312
+ 'DELETE',
2313
+ `${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(id)}`,
2314
+ )
2315
+ }
2316
+
2317
+ render(request: RenderMessageTemplateRequest): Promise<RenderedMessageTemplate> {
2318
+ return this.client.request(
2319
+ 'POST',
2320
+ `${CONVERSATION_BASE_PATH}/message-templates/render`,
2321
+ request,
2322
+ )
2323
+ }
2324
+ }
2325
+
2240
2326
  /**
2241
2327
  * Channel actions — the ledger of acts performed through a connection that
2242
2328
  * are neither a message nor a reaction (LinkedIn invitations, profile visits,