@gtmi/ramp-api-client 0.0.1
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/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/es/index.d.mts +3615 -0
- package/dist/es/index.mjs +2173 -0
- package/package.json +46 -0
- package/src/client.test.ts +50 -0
- package/src/client.ts +15 -0
- package/src/client.types.ts +11 -0
- package/src/generated/client/client.gen.ts +277 -0
- package/src/generated/client/index.ts +27 -0
- package/src/generated/client/types.gen.ts +214 -0
- package/src/generated/client/utils.gen.ts +316 -0
- package/src/generated/client.gen.ts +18 -0
- package/src/generated/core/auth.gen.ts +48 -0
- package/src/generated/core/bodySerializer.gen.ts +82 -0
- package/src/generated/core/params.gen.ts +178 -0
- package/src/generated/core/pathSerializer.gen.ts +171 -0
- package/src/generated/core/queryKeySerializer.gen.ts +117 -0
- package/src/generated/core/serverSentEvents.gen.ts +242 -0
- package/src/generated/core/types.gen.ts +110 -0
- package/src/generated/core/utils.gen.ts +140 -0
- package/src/generated/index.ts +268 -0
- package/src/generated/sdk.gen.ts +1590 -0
- package/src/generated/types.gen.ts +2089 -0
- package/src/generated/zod.gen.ts +358 -0
- package/src/index.ts +7 -0
|
@@ -0,0 +1,1590 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
|
|
3
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client';
|
|
4
|
+
import { client } from './client.gen';
|
|
5
|
+
import type {
|
|
6
|
+
DeleteConversationalIntelligenceOperatorData,
|
|
7
|
+
DeleteConversationalIntelligenceOperatorErrors,
|
|
8
|
+
DeleteConversationalIntelligenceOperatorResponses,
|
|
9
|
+
DeleteConversationMemoryConversationSummariesData,
|
|
10
|
+
DeleteConversationMemoryConversationSummariesErrors,
|
|
11
|
+
DeleteConversationMemoryConversationSummariesResponses,
|
|
12
|
+
DeleteConversationMemoryIdentifiersData,
|
|
13
|
+
DeleteConversationMemoryIdentifiersErrors,
|
|
14
|
+
DeleteConversationMemoryIdentifiersResponses,
|
|
15
|
+
DeleteConversationMemoryObservationsData,
|
|
16
|
+
DeleteConversationMemoryObservationsErrors,
|
|
17
|
+
DeleteConversationMemoryObservationsResponses,
|
|
18
|
+
DeleteConversationMemoryProfilesData,
|
|
19
|
+
DeleteConversationMemoryProfilesErrors,
|
|
20
|
+
DeleteConversationMemoryProfilesResponses,
|
|
21
|
+
DeleteConversationMemoryResetData,
|
|
22
|
+
DeleteConversationMemoryResetErrors,
|
|
23
|
+
DeleteConversationMemoryResetResponses,
|
|
24
|
+
DeleteConversationMemoryTraitGroupsData,
|
|
25
|
+
DeleteConversationMemoryTraitGroupsErrors,
|
|
26
|
+
DeleteConversationMemoryTraitGroupsResponses,
|
|
27
|
+
DeleteLeadGenData,
|
|
28
|
+
DeleteLeadGenErrors,
|
|
29
|
+
DeleteLeadGenResponses,
|
|
30
|
+
DeleteLinkShortenerByCodeData,
|
|
31
|
+
DeleteLinkShortenerByCodeErrors,
|
|
32
|
+
DeleteLinkShortenerByCodeResponses,
|
|
33
|
+
DeleteTemplateData,
|
|
34
|
+
DeleteTemplateErrors,
|
|
35
|
+
DeleteTemplateResponses,
|
|
36
|
+
GetCampaignData,
|
|
37
|
+
GetCampaignErrors,
|
|
38
|
+
GetCampaignResponses,
|
|
39
|
+
GetConversationalIntelligenceOperatorData,
|
|
40
|
+
GetConversationalIntelligenceOperatorErrors,
|
|
41
|
+
GetConversationalIntelligenceOperatorResponses,
|
|
42
|
+
GetConversationMemoryConversationSummariesData,
|
|
43
|
+
GetConversationMemoryConversationSummariesErrors,
|
|
44
|
+
GetConversationMemoryConversationSummariesResponses,
|
|
45
|
+
GetConversationMemoryIdentifiersData,
|
|
46
|
+
GetConversationMemoryIdentifiersErrors,
|
|
47
|
+
GetConversationMemoryIdentifiersResponses,
|
|
48
|
+
GetConversationMemoryObservationsData,
|
|
49
|
+
GetConversationMemoryObservationsErrors,
|
|
50
|
+
GetConversationMemoryObservationsResponses,
|
|
51
|
+
GetConversationMemoryProfilesData,
|
|
52
|
+
GetConversationMemoryProfilesErrors,
|
|
53
|
+
GetConversationMemoryProfilesResponses,
|
|
54
|
+
GetConversationMemoryTraitGroupsData,
|
|
55
|
+
GetConversationMemoryTraitGroupsErrors,
|
|
56
|
+
GetConversationMemoryTraitGroupsResponses,
|
|
57
|
+
GetConversationMemoryTraitsData,
|
|
58
|
+
GetConversationMemoryTraitsErrors,
|
|
59
|
+
GetConversationMemoryTraitsResponses,
|
|
60
|
+
GetConversationsFetchData,
|
|
61
|
+
GetConversationsFetchErrors,
|
|
62
|
+
GetConversationsFetchResponses,
|
|
63
|
+
GetDocsOpenapiJsonData,
|
|
64
|
+
GetDocsOpenapiJsonErrors,
|
|
65
|
+
GetDocsOpenapiJsonResponses,
|
|
66
|
+
GetHealthData,
|
|
67
|
+
GetHealthErrors,
|
|
68
|
+
GetHealthResponses,
|
|
69
|
+
GetIntelligenceConfigurationData,
|
|
70
|
+
GetIntelligenceConfigurationErrors,
|
|
71
|
+
GetIntelligenceConfigurationResponses,
|
|
72
|
+
GetLinkShortenerData,
|
|
73
|
+
GetLinkShortenerErrors,
|
|
74
|
+
GetLinkShortenerResponses,
|
|
75
|
+
GetLookupDemoData,
|
|
76
|
+
GetLookupDemoErrors,
|
|
77
|
+
GetLookupDemoResponses,
|
|
78
|
+
GetParticipantsData,
|
|
79
|
+
GetParticipantsErrors,
|
|
80
|
+
GetParticipantsResponses,
|
|
81
|
+
GetSupportedRegionsData,
|
|
82
|
+
GetSupportedRegionsErrors,
|
|
83
|
+
GetSupportedRegionsResponses,
|
|
84
|
+
GetSyncTokenData,
|
|
85
|
+
GetSyncTokenErrors,
|
|
86
|
+
GetSyncTokenResponses,
|
|
87
|
+
GetVoiceTokenData,
|
|
88
|
+
GetVoiceTokenErrors,
|
|
89
|
+
GetVoiceTokenResponses,
|
|
90
|
+
PatchConversationMemoryConversationSummariesData,
|
|
91
|
+
PatchConversationMemoryConversationSummariesErrors,
|
|
92
|
+
PatchConversationMemoryConversationSummariesResponses,
|
|
93
|
+
PatchConversationMemoryIdentifiersData,
|
|
94
|
+
PatchConversationMemoryIdentifiersErrors,
|
|
95
|
+
PatchConversationMemoryIdentifiersResponses,
|
|
96
|
+
PatchConversationMemoryObservationsData,
|
|
97
|
+
PatchConversationMemoryObservationsErrors,
|
|
98
|
+
PatchConversationMemoryObservationsResponses,
|
|
99
|
+
PatchConversationMemoryProfilesData,
|
|
100
|
+
PatchConversationMemoryProfilesErrors,
|
|
101
|
+
PatchConversationMemoryProfilesResponses,
|
|
102
|
+
PatchConversationMemoryTraitGroupsData,
|
|
103
|
+
PatchConversationMemoryTraitGroupsErrors,
|
|
104
|
+
PatchConversationMemoryTraitGroupsResponses,
|
|
105
|
+
PatchLeadGenData,
|
|
106
|
+
PatchLeadGenErrors,
|
|
107
|
+
PatchLeadGenResponses,
|
|
108
|
+
PatchLinkShortenerData,
|
|
109
|
+
PatchLinkShortenerErrors,
|
|
110
|
+
PatchLinkShortenerResponses,
|
|
111
|
+
PostAssignDemoData,
|
|
112
|
+
PostAssignDemoErrors,
|
|
113
|
+
PostAssignDemoResponses,
|
|
114
|
+
PostConversationalIntelligenceOperatorData,
|
|
115
|
+
PostConversationalIntelligenceOperatorErrors,
|
|
116
|
+
PostConversationalIntelligenceOperatorResponses,
|
|
117
|
+
PostConversationMemoryConversationSummariesData,
|
|
118
|
+
PostConversationMemoryConversationSummariesErrors,
|
|
119
|
+
PostConversationMemoryConversationSummariesResponses,
|
|
120
|
+
PostConversationMemoryIdentifiersData,
|
|
121
|
+
PostConversationMemoryIdentifiersErrors,
|
|
122
|
+
PostConversationMemoryIdentifiersResponses,
|
|
123
|
+
PostConversationMemoryObservationsData,
|
|
124
|
+
PostConversationMemoryObservationsErrors,
|
|
125
|
+
PostConversationMemoryObservationsResponses,
|
|
126
|
+
PostConversationMemoryProfilesData,
|
|
127
|
+
PostConversationMemoryProfilesErrors,
|
|
128
|
+
PostConversationMemoryProfilesLookupData,
|
|
129
|
+
PostConversationMemoryProfilesLookupErrors,
|
|
130
|
+
PostConversationMemoryProfilesLookupResponses,
|
|
131
|
+
PostConversationMemoryProfilesResponses,
|
|
132
|
+
PostConversationMemoryRecallData,
|
|
133
|
+
PostConversationMemoryRecallErrors,
|
|
134
|
+
PostConversationMemoryRecallResponses,
|
|
135
|
+
PostConversationMemoryTraitGroupsData,
|
|
136
|
+
PostConversationMemoryTraitGroupsErrors,
|
|
137
|
+
PostConversationMemoryTraitGroupsResponses,
|
|
138
|
+
PostConversationsCommunicationsByConversationIdData,
|
|
139
|
+
PostConversationsCommunicationsByConversationIdErrors,
|
|
140
|
+
PostConversationsCommunicationsByConversationIdResponses,
|
|
141
|
+
PostConversationsData,
|
|
142
|
+
PostConversationsErrors,
|
|
143
|
+
PostConversationsResponses,
|
|
144
|
+
PostConversationsTokenData,
|
|
145
|
+
PostConversationsTokenErrors,
|
|
146
|
+
PostConversationsTokenResponses,
|
|
147
|
+
PostCreateExternalFlexConnectionData,
|
|
148
|
+
PostCreateExternalFlexConnectionErrors,
|
|
149
|
+
PostCreateExternalFlexConnectionResponses,
|
|
150
|
+
PostInstallFlexPluginData,
|
|
151
|
+
PostInstallFlexPluginErrors,
|
|
152
|
+
PostInstallFlexPluginResponses,
|
|
153
|
+
PostIntelligenceConfigurationData,
|
|
154
|
+
PostIntelligenceConfigurationErrors,
|
|
155
|
+
PostIntelligenceConfigurationResponses,
|
|
156
|
+
PostLeadGenData,
|
|
157
|
+
PostLeadGenErrors,
|
|
158
|
+
PostLeadGenMonitorData,
|
|
159
|
+
PostLeadGenMonitorErrors,
|
|
160
|
+
PostLeadGenMonitorResponses,
|
|
161
|
+
PostLeadGenResponses,
|
|
162
|
+
PostLinkShortenerData,
|
|
163
|
+
PostLinkShortenerErrors,
|
|
164
|
+
PostLinkShortenerResponses,
|
|
165
|
+
PostLiveAgentWebchatConnectData,
|
|
166
|
+
PostLiveAgentWebchatConnectErrors,
|
|
167
|
+
PostLiveAgentWebchatConnectResponses,
|
|
168
|
+
PostLiveAgentWebchatEndData,
|
|
169
|
+
PostLiveAgentWebchatEndErrors,
|
|
170
|
+
PostLiveAgentWebchatEndResponses,
|
|
171
|
+
PostLiveAgentWebchatSendData,
|
|
172
|
+
PostLiveAgentWebchatSendErrors,
|
|
173
|
+
PostLiveAgentWebchatSendResponses,
|
|
174
|
+
PostParticipantsData,
|
|
175
|
+
PostParticipantsErrors,
|
|
176
|
+
PostParticipantsResponses,
|
|
177
|
+
PostTemplateAutogenData,
|
|
178
|
+
PostTemplateAutogenErrors,
|
|
179
|
+
PostTemplateAutogenResponses,
|
|
180
|
+
PostTemplateData,
|
|
181
|
+
PostTemplateErrors,
|
|
182
|
+
PostTemplateResponses,
|
|
183
|
+
PostUiConfigData,
|
|
184
|
+
PostUiConfigErrors,
|
|
185
|
+
PostUiConfigResponses,
|
|
186
|
+
PutConversationalIntelligenceOperatorData,
|
|
187
|
+
PutConversationalIntelligenceOperatorErrors,
|
|
188
|
+
PutConversationalIntelligenceOperatorResponses,
|
|
189
|
+
PutConversationsData,
|
|
190
|
+
PutConversationsErrors,
|
|
191
|
+
PutConversationsResponses,
|
|
192
|
+
PutIntelligenceConfigurationData,
|
|
193
|
+
PutIntelligenceConfigurationErrors,
|
|
194
|
+
PutIntelligenceConfigurationResponses,
|
|
195
|
+
PutParticipantsData,
|
|
196
|
+
PutParticipantsErrors,
|
|
197
|
+
PutParticipantsResponses,
|
|
198
|
+
} from './types.gen';
|
|
199
|
+
|
|
200
|
+
export type Options<
|
|
201
|
+
TData extends TDataShape = TDataShape,
|
|
202
|
+
ThrowOnError extends boolean = boolean,
|
|
203
|
+
TResponse = unknown,
|
|
204
|
+
> = Options2<TData, ThrowOnError, TResponse> & {
|
|
205
|
+
/**
|
|
206
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
207
|
+
* individual options. This might be also useful if you want to implement a
|
|
208
|
+
* custom client.
|
|
209
|
+
*/
|
|
210
|
+
client?: Client;
|
|
211
|
+
/**
|
|
212
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
213
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
214
|
+
*/
|
|
215
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* GET /health
|
|
220
|
+
*
|
|
221
|
+
* Health check endpoint for the API service
|
|
222
|
+
*/
|
|
223
|
+
export const getHealth = <ThrowOnError extends boolean = false>(
|
|
224
|
+
options?: Options<GetHealthData, ThrowOnError>,
|
|
225
|
+
): RequestResult<GetHealthResponses, GetHealthErrors, ThrowOnError> =>
|
|
226
|
+
(options?.client ?? client).get<GetHealthResponses, GetHealthErrors, ThrowOnError>({
|
|
227
|
+
url: '/health',
|
|
228
|
+
...options,
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* POST /conversations/token
|
|
233
|
+
*
|
|
234
|
+
* Generates a Twilio Access Token with Chat Grant for Conversations API access
|
|
235
|
+
*/
|
|
236
|
+
export const postConversationsToken = <ThrowOnError extends boolean = false>(
|
|
237
|
+
options: Options<PostConversationsTokenData, ThrowOnError>,
|
|
238
|
+
): RequestResult<PostConversationsTokenResponses, PostConversationsTokenErrors, ThrowOnError> =>
|
|
239
|
+
(options.client ?? client).post<
|
|
240
|
+
PostConversationsTokenResponses,
|
|
241
|
+
PostConversationsTokenErrors,
|
|
242
|
+
ThrowOnError
|
|
243
|
+
>({
|
|
244
|
+
url: '/conversations/token',
|
|
245
|
+
...options,
|
|
246
|
+
headers: {
|
|
247
|
+
'Content-Type': 'application/json',
|
|
248
|
+
...options.headers,
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* GET /sync/token
|
|
254
|
+
*
|
|
255
|
+
* Generates a Twilio Access Token with a SyncGrant so frontends
|
|
256
|
+
* can subscribe to Sync Streams via the twilio-sync JS SDK.
|
|
257
|
+
*/
|
|
258
|
+
export const getSyncToken = <ThrowOnError extends boolean = false>(
|
|
259
|
+
options?: Options<GetSyncTokenData, ThrowOnError>,
|
|
260
|
+
): RequestResult<GetSyncTokenResponses, GetSyncTokenErrors, ThrowOnError> =>
|
|
261
|
+
(options?.client ?? client).get<GetSyncTokenResponses, GetSyncTokenErrors, ThrowOnError>({
|
|
262
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
263
|
+
url: '/sync/token',
|
|
264
|
+
...options,
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* GET /voice/token
|
|
269
|
+
*
|
|
270
|
+
* Generates a Twilio Access Token with a VoiceGrant so browser clients
|
|
271
|
+
* can place outbound calls via the Twilio Voice SDK (WebRTC).
|
|
272
|
+
*/
|
|
273
|
+
export const getVoiceToken = <ThrowOnError extends boolean = false>(
|
|
274
|
+
options?: Options<GetVoiceTokenData, ThrowOnError>,
|
|
275
|
+
): RequestResult<GetVoiceTokenResponses, GetVoiceTokenErrors, ThrowOnError> =>
|
|
276
|
+
(options?.client ?? client).get<GetVoiceTokenResponses, GetVoiceTokenErrors, ThrowOnError>({
|
|
277
|
+
url: '/voice/token',
|
|
278
|
+
...options,
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* POST /ui-config
|
|
283
|
+
*
|
|
284
|
+
* uiConfigPost
|
|
285
|
+
* TODO: Add description
|
|
286
|
+
*/
|
|
287
|
+
export const postUiConfig = <ThrowOnError extends boolean = false>(
|
|
288
|
+
options: Options<PostUiConfigData, ThrowOnError>,
|
|
289
|
+
): RequestResult<PostUiConfigResponses, PostUiConfigErrors, ThrowOnError> =>
|
|
290
|
+
(options.client ?? client).post<PostUiConfigResponses, PostUiConfigErrors, ThrowOnError>({
|
|
291
|
+
url: '/ui-config',
|
|
292
|
+
...options,
|
|
293
|
+
headers: {
|
|
294
|
+
'Content-Type': 'application/json',
|
|
295
|
+
...options.headers,
|
|
296
|
+
},
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* POST /create-external-flex-connection
|
|
301
|
+
*
|
|
302
|
+
* Creates an external Flex connection by setting up Studio Flow, TwiML App, and webhook configurations
|
|
303
|
+
* for handoff from RAMP to an external Twilio Flex account
|
|
304
|
+
*/
|
|
305
|
+
export const postCreateExternalFlexConnection = <ThrowOnError extends boolean = false>(
|
|
306
|
+
options: Options<PostCreateExternalFlexConnectionData, ThrowOnError>,
|
|
307
|
+
): RequestResult<
|
|
308
|
+
PostCreateExternalFlexConnectionResponses,
|
|
309
|
+
PostCreateExternalFlexConnectionErrors,
|
|
310
|
+
ThrowOnError
|
|
311
|
+
> =>
|
|
312
|
+
(options.client ?? client).post<
|
|
313
|
+
PostCreateExternalFlexConnectionResponses,
|
|
314
|
+
PostCreateExternalFlexConnectionErrors,
|
|
315
|
+
ThrowOnError
|
|
316
|
+
>({
|
|
317
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
318
|
+
url: '/create-external-flex-connection',
|
|
319
|
+
...options,
|
|
320
|
+
headers: {
|
|
321
|
+
'Content-Type': 'application/json',
|
|
322
|
+
...options.headers,
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* POST /install-flex-plugin
|
|
328
|
+
*
|
|
329
|
+
* Installs and deploys a Twilio Flex plugin from a configured registry repository
|
|
330
|
+
*/
|
|
331
|
+
export const postInstallFlexPlugin = <ThrowOnError extends boolean = false>(
|
|
332
|
+
options: Options<PostInstallFlexPluginData, ThrowOnError>,
|
|
333
|
+
): RequestResult<PostInstallFlexPluginResponses, PostInstallFlexPluginErrors, ThrowOnError> =>
|
|
334
|
+
(options.client ?? client).post<
|
|
335
|
+
PostInstallFlexPluginResponses,
|
|
336
|
+
PostInstallFlexPluginErrors,
|
|
337
|
+
ThrowOnError
|
|
338
|
+
>({
|
|
339
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
340
|
+
url: '/install-flex-plugin',
|
|
341
|
+
...options,
|
|
342
|
+
headers: {
|
|
343
|
+
'Content-Type': 'application/json',
|
|
344
|
+
...options.headers,
|
|
345
|
+
},
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* POST /live-agent-webchat-connect
|
|
350
|
+
*
|
|
351
|
+
* Creates a Flex Interaction for live agent webchat handoff from RAMP
|
|
352
|
+
*/
|
|
353
|
+
export const postLiveAgentWebchatConnect = <ThrowOnError extends boolean = false>(
|
|
354
|
+
options: Options<PostLiveAgentWebchatConnectData, ThrowOnError>,
|
|
355
|
+
): RequestResult<
|
|
356
|
+
PostLiveAgentWebchatConnectResponses,
|
|
357
|
+
PostLiveAgentWebchatConnectErrors,
|
|
358
|
+
ThrowOnError
|
|
359
|
+
> =>
|
|
360
|
+
(options.client ?? client).post<
|
|
361
|
+
PostLiveAgentWebchatConnectResponses,
|
|
362
|
+
PostLiveAgentWebchatConnectErrors,
|
|
363
|
+
ThrowOnError
|
|
364
|
+
>({
|
|
365
|
+
url: '/live-agent-webchat-connect',
|
|
366
|
+
...options,
|
|
367
|
+
headers: {
|
|
368
|
+
'Content-Type': 'application/json',
|
|
369
|
+
...options.headers,
|
|
370
|
+
},
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* POST /live-agent-webchat-send
|
|
375
|
+
*
|
|
376
|
+
* Sends a message to a Twilio Conversation for live agent webchat
|
|
377
|
+
*/
|
|
378
|
+
export const postLiveAgentWebchatSend = <ThrowOnError extends boolean = false>(
|
|
379
|
+
options: Options<PostLiveAgentWebchatSendData, ThrowOnError>,
|
|
380
|
+
): RequestResult<PostLiveAgentWebchatSendResponses, PostLiveAgentWebchatSendErrors, ThrowOnError> =>
|
|
381
|
+
(options.client ?? client).post<
|
|
382
|
+
PostLiveAgentWebchatSendResponses,
|
|
383
|
+
PostLiveAgentWebchatSendErrors,
|
|
384
|
+
ThrowOnError
|
|
385
|
+
>({
|
|
386
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
387
|
+
url: '/live-agent-webchat-send',
|
|
388
|
+
...options,
|
|
389
|
+
headers: {
|
|
390
|
+
'Content-Type': 'application/json',
|
|
391
|
+
...options.headers,
|
|
392
|
+
},
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* POST /live-agent-webchat-end
|
|
397
|
+
*
|
|
398
|
+
* Ends a live agent webchat session by closing the Flex Interaction Channel and Conversation
|
|
399
|
+
*/
|
|
400
|
+
export const postLiveAgentWebchatEnd = <ThrowOnError extends boolean = false>(
|
|
401
|
+
options: Options<PostLiveAgentWebchatEndData, ThrowOnError>,
|
|
402
|
+
): RequestResult<PostLiveAgentWebchatEndResponses, PostLiveAgentWebchatEndErrors, ThrowOnError> =>
|
|
403
|
+
(options.client ?? client).post<
|
|
404
|
+
PostLiveAgentWebchatEndResponses,
|
|
405
|
+
PostLiveAgentWebchatEndErrors,
|
|
406
|
+
ThrowOnError
|
|
407
|
+
>({
|
|
408
|
+
url: '/live-agent-webchat-end',
|
|
409
|
+
...options,
|
|
410
|
+
headers: {
|
|
411
|
+
'Content-Type': 'application/json',
|
|
412
|
+
...options.headers,
|
|
413
|
+
},
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* DELETE /lead-gen
|
|
418
|
+
*
|
|
419
|
+
* Deletes a lead generation entry by removing the associated phone number from Twilio
|
|
420
|
+
* and the template record from Algolia
|
|
421
|
+
*/
|
|
422
|
+
export const deleteLeadGen = <ThrowOnError extends boolean = false>(
|
|
423
|
+
options?: Options<DeleteLeadGenData, ThrowOnError>,
|
|
424
|
+
): RequestResult<DeleteLeadGenResponses, DeleteLeadGenErrors, ThrowOnError> =>
|
|
425
|
+
(options?.client ?? client).delete<DeleteLeadGenResponses, DeleteLeadGenErrors, ThrowOnError>({
|
|
426
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
427
|
+
url: '/lead-gen',
|
|
428
|
+
...options,
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* PATCH /lead-gen
|
|
433
|
+
*
|
|
434
|
+
* Updates the expiration date of an existing lead generation entry
|
|
435
|
+
*/
|
|
436
|
+
export const patchLeadGen = <ThrowOnError extends boolean = false>(
|
|
437
|
+
options: Options<PatchLeadGenData, ThrowOnError>,
|
|
438
|
+
): RequestResult<PatchLeadGenResponses, PatchLeadGenErrors, ThrowOnError> =>
|
|
439
|
+
(options.client ?? client).patch<PatchLeadGenResponses, PatchLeadGenErrors, ThrowOnError>({
|
|
440
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
441
|
+
url: '/lead-gen',
|
|
442
|
+
...options,
|
|
443
|
+
headers: {
|
|
444
|
+
'Content-Type': 'application/json',
|
|
445
|
+
...options.headers,
|
|
446
|
+
},
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* POST /lead-gen
|
|
451
|
+
*
|
|
452
|
+
* Creates a new lead generation entry by purchasing a toll-free phone number from Twilio,
|
|
453
|
+
* configuring it with voice and SMS webhooks, and storing the mapping in Algolia
|
|
454
|
+
*/
|
|
455
|
+
export const postLeadGen = <ThrowOnError extends boolean = false>(
|
|
456
|
+
options: Options<PostLeadGenData, ThrowOnError>,
|
|
457
|
+
): RequestResult<PostLeadGenResponses, PostLeadGenErrors, ThrowOnError> =>
|
|
458
|
+
(options.client ?? client).post<PostLeadGenResponses, PostLeadGenErrors, ThrowOnError>({
|
|
459
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
460
|
+
url: '/lead-gen',
|
|
461
|
+
...options,
|
|
462
|
+
headers: {
|
|
463
|
+
'Content-Type': 'application/json',
|
|
464
|
+
...options.headers,
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* POST /lead-gen-monitor
|
|
470
|
+
*
|
|
471
|
+
* Monitors and cleans up expired lead generation entries by automatically deleting
|
|
472
|
+
* templates that have passed their expiration date
|
|
473
|
+
*/
|
|
474
|
+
export const postLeadGenMonitor = <ThrowOnError extends boolean = false>(
|
|
475
|
+
options?: Options<PostLeadGenMonitorData, ThrowOnError>,
|
|
476
|
+
): RequestResult<PostLeadGenMonitorResponses, PostLeadGenMonitorErrors, ThrowOnError> =>
|
|
477
|
+
(options?.client ?? client).post<
|
|
478
|
+
PostLeadGenMonitorResponses,
|
|
479
|
+
PostLeadGenMonitorErrors,
|
|
480
|
+
ThrowOnError
|
|
481
|
+
>({
|
|
482
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
483
|
+
url: '/lead-gen-monitor',
|
|
484
|
+
...options,
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* POST /conversations-communications/:conversationId
|
|
489
|
+
*
|
|
490
|
+
* POST handler for creating a Communication within a Conversation
|
|
491
|
+
*/
|
|
492
|
+
export const postConversationsCommunicationsByConversationId = <
|
|
493
|
+
ThrowOnError extends boolean = false,
|
|
494
|
+
>(
|
|
495
|
+
options: Options<PostConversationsCommunicationsByConversationIdData, ThrowOnError>,
|
|
496
|
+
): RequestResult<
|
|
497
|
+
PostConversationsCommunicationsByConversationIdResponses,
|
|
498
|
+
PostConversationsCommunicationsByConversationIdErrors,
|
|
499
|
+
ThrowOnError
|
|
500
|
+
> =>
|
|
501
|
+
(options.client ?? client).post<
|
|
502
|
+
PostConversationsCommunicationsByConversationIdResponses,
|
|
503
|
+
PostConversationsCommunicationsByConversationIdErrors,
|
|
504
|
+
ThrowOnError
|
|
505
|
+
>({
|
|
506
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
507
|
+
url: '/conversations-communications/{conversationId}',
|
|
508
|
+
...options,
|
|
509
|
+
headers: {
|
|
510
|
+
'Content-Type': 'application/json',
|
|
511
|
+
...options.headers,
|
|
512
|
+
},
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* GET /conversations-fetch
|
|
517
|
+
*
|
|
518
|
+
* GET handler for fetching Twilio conversation data
|
|
519
|
+
*/
|
|
520
|
+
export const getConversationsFetch = <ThrowOnError extends boolean = false>(
|
|
521
|
+
options?: Options<GetConversationsFetchData, ThrowOnError>,
|
|
522
|
+
): RequestResult<GetConversationsFetchResponses, GetConversationsFetchErrors, ThrowOnError> =>
|
|
523
|
+
(options?.client ?? client).get<
|
|
524
|
+
GetConversationsFetchResponses,
|
|
525
|
+
GetConversationsFetchErrors,
|
|
526
|
+
ThrowOnError
|
|
527
|
+
>({
|
|
528
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
529
|
+
url: '/conversations-fetch',
|
|
530
|
+
...options,
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* POST /conversations
|
|
535
|
+
*
|
|
536
|
+
* POST handler for creating a new Twilio conversation
|
|
537
|
+
*/
|
|
538
|
+
export const postConversations = <ThrowOnError extends boolean = false>(
|
|
539
|
+
options: Options<PostConversationsData, ThrowOnError>,
|
|
540
|
+
): RequestResult<PostConversationsResponses, PostConversationsErrors, ThrowOnError> =>
|
|
541
|
+
(options.client ?? client).post<
|
|
542
|
+
PostConversationsResponses,
|
|
543
|
+
PostConversationsErrors,
|
|
544
|
+
ThrowOnError
|
|
545
|
+
>({
|
|
546
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
547
|
+
url: '/conversations',
|
|
548
|
+
...options,
|
|
549
|
+
headers: {
|
|
550
|
+
'Content-Type': 'application/json',
|
|
551
|
+
...options.headers,
|
|
552
|
+
},
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* PUT /conversations
|
|
557
|
+
*
|
|
558
|
+
* PUT handler for updating a Twilio conversation
|
|
559
|
+
*/
|
|
560
|
+
export const putConversations = <ThrowOnError extends boolean = false>(
|
|
561
|
+
options: Options<PutConversationsData, ThrowOnError>,
|
|
562
|
+
): RequestResult<PutConversationsResponses, PutConversationsErrors, ThrowOnError> =>
|
|
563
|
+
(options.client ?? client).put<PutConversationsResponses, PutConversationsErrors, ThrowOnError>({
|
|
564
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
565
|
+
url: '/conversations',
|
|
566
|
+
...options,
|
|
567
|
+
headers: {
|
|
568
|
+
'Content-Type': 'application/json',
|
|
569
|
+
...options.headers,
|
|
570
|
+
},
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* GET /participants
|
|
575
|
+
*
|
|
576
|
+
* Retrieves participants from a Twilio conversation
|
|
577
|
+
*/
|
|
578
|
+
export const getParticipants = <ThrowOnError extends boolean = false>(
|
|
579
|
+
options?: Options<GetParticipantsData, ThrowOnError>,
|
|
580
|
+
): RequestResult<GetParticipantsResponses, GetParticipantsErrors, ThrowOnError> =>
|
|
581
|
+
(options?.client ?? client).get<GetParticipantsResponses, GetParticipantsErrors, ThrowOnError>({
|
|
582
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
583
|
+
url: '/participants',
|
|
584
|
+
...options,
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* POST /participants
|
|
589
|
+
*
|
|
590
|
+
* POST handler for adding a participant to a Twilio conversation
|
|
591
|
+
*/
|
|
592
|
+
export const postParticipants = <ThrowOnError extends boolean = false>(
|
|
593
|
+
options: Options<PostParticipantsData, ThrowOnError>,
|
|
594
|
+
): RequestResult<PostParticipantsResponses, PostParticipantsErrors, ThrowOnError> =>
|
|
595
|
+
(options.client ?? client).post<PostParticipantsResponses, PostParticipantsErrors, ThrowOnError>({
|
|
596
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
597
|
+
url: '/participants',
|
|
598
|
+
...options,
|
|
599
|
+
headers: {
|
|
600
|
+
'Content-Type': 'application/json',
|
|
601
|
+
...options.headers,
|
|
602
|
+
},
|
|
603
|
+
});
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* PUT /participants
|
|
607
|
+
*
|
|
608
|
+
* PUT handler for updating a participant in a Twilio conversation
|
|
609
|
+
*/
|
|
610
|
+
export const putParticipants = <ThrowOnError extends boolean = false>(
|
|
611
|
+
options: Options<PutParticipantsData, ThrowOnError>,
|
|
612
|
+
): RequestResult<PutParticipantsResponses, PutParticipantsErrors, ThrowOnError> =>
|
|
613
|
+
(options.client ?? client).put<PutParticipantsResponses, PutParticipantsErrors, ThrowOnError>({
|
|
614
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
615
|
+
url: '/participants',
|
|
616
|
+
...options,
|
|
617
|
+
headers: {
|
|
618
|
+
'Content-Type': 'application/json',
|
|
619
|
+
...options.headers,
|
|
620
|
+
},
|
|
621
|
+
});
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* DELETE /conversational-intelligence-operator
|
|
625
|
+
*
|
|
626
|
+
* DELETE handler for removing a Twilio Conversational Intelligence Operator
|
|
627
|
+
*/
|
|
628
|
+
export const deleteConversationalIntelligenceOperator = <ThrowOnError extends boolean = false>(
|
|
629
|
+
options: Options<DeleteConversationalIntelligenceOperatorData, ThrowOnError>,
|
|
630
|
+
): RequestResult<
|
|
631
|
+
DeleteConversationalIntelligenceOperatorResponses,
|
|
632
|
+
DeleteConversationalIntelligenceOperatorErrors,
|
|
633
|
+
ThrowOnError
|
|
634
|
+
> =>
|
|
635
|
+
(options.client ?? client).delete<
|
|
636
|
+
DeleteConversationalIntelligenceOperatorResponses,
|
|
637
|
+
DeleteConversationalIntelligenceOperatorErrors,
|
|
638
|
+
ThrowOnError
|
|
639
|
+
>({
|
|
640
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
641
|
+
url: '/conversational-intelligence-operator',
|
|
642
|
+
...options,
|
|
643
|
+
headers: {
|
|
644
|
+
'Content-Type': 'application/json',
|
|
645
|
+
...options.headers,
|
|
646
|
+
},
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* GET /conversational-intelligence-operator
|
|
651
|
+
*
|
|
652
|
+
* GET handler for retrieving Twilio Conversational Intelligence Operators
|
|
653
|
+
*/
|
|
654
|
+
export const getConversationalIntelligenceOperator = <ThrowOnError extends boolean = false>(
|
|
655
|
+
options?: Options<GetConversationalIntelligenceOperatorData, ThrowOnError>,
|
|
656
|
+
): RequestResult<
|
|
657
|
+
GetConversationalIntelligenceOperatorResponses,
|
|
658
|
+
GetConversationalIntelligenceOperatorErrors,
|
|
659
|
+
ThrowOnError
|
|
660
|
+
> =>
|
|
661
|
+
(options?.client ?? client).get<
|
|
662
|
+
GetConversationalIntelligenceOperatorResponses,
|
|
663
|
+
GetConversationalIntelligenceOperatorErrors,
|
|
664
|
+
ThrowOnError
|
|
665
|
+
>({
|
|
666
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
667
|
+
url: '/conversational-intelligence-operator',
|
|
668
|
+
...options,
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* POST /conversational-intelligence-operator
|
|
673
|
+
*
|
|
674
|
+
* POST handler for creating a Twilio Conversational Intelligence Operator
|
|
675
|
+
*/
|
|
676
|
+
export const postConversationalIntelligenceOperator = <ThrowOnError extends boolean = false>(
|
|
677
|
+
options: Options<PostConversationalIntelligenceOperatorData, ThrowOnError>,
|
|
678
|
+
): RequestResult<
|
|
679
|
+
PostConversationalIntelligenceOperatorResponses,
|
|
680
|
+
PostConversationalIntelligenceOperatorErrors,
|
|
681
|
+
ThrowOnError
|
|
682
|
+
> =>
|
|
683
|
+
(options.client ?? client).post<
|
|
684
|
+
PostConversationalIntelligenceOperatorResponses,
|
|
685
|
+
PostConversationalIntelligenceOperatorErrors,
|
|
686
|
+
ThrowOnError
|
|
687
|
+
>({
|
|
688
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
689
|
+
url: '/conversational-intelligence-operator',
|
|
690
|
+
...options,
|
|
691
|
+
headers: {
|
|
692
|
+
'Content-Type': 'application/json',
|
|
693
|
+
...options.headers,
|
|
694
|
+
},
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* PUT /conversational-intelligence-operator
|
|
699
|
+
*
|
|
700
|
+
* PUT handler for updating a Twilio Conversational Intelligence Operator
|
|
701
|
+
*/
|
|
702
|
+
export const putConversationalIntelligenceOperator = <ThrowOnError extends boolean = false>(
|
|
703
|
+
options: Options<PutConversationalIntelligenceOperatorData, ThrowOnError>,
|
|
704
|
+
): RequestResult<
|
|
705
|
+
PutConversationalIntelligenceOperatorResponses,
|
|
706
|
+
PutConversationalIntelligenceOperatorErrors,
|
|
707
|
+
ThrowOnError
|
|
708
|
+
> =>
|
|
709
|
+
(options.client ?? client).put<
|
|
710
|
+
PutConversationalIntelligenceOperatorResponses,
|
|
711
|
+
PutConversationalIntelligenceOperatorErrors,
|
|
712
|
+
ThrowOnError
|
|
713
|
+
>({
|
|
714
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
715
|
+
url: '/conversational-intelligence-operator',
|
|
716
|
+
...options,
|
|
717
|
+
headers: {
|
|
718
|
+
'Content-Type': 'application/json',
|
|
719
|
+
...options.headers,
|
|
720
|
+
},
|
|
721
|
+
});
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* GET /intelligence-configuration
|
|
725
|
+
*
|
|
726
|
+
* GET handler for retrieving Twilio Intelligence Configurations
|
|
727
|
+
*/
|
|
728
|
+
export const getIntelligenceConfiguration = <ThrowOnError extends boolean = false>(
|
|
729
|
+
options?: Options<GetIntelligenceConfigurationData, ThrowOnError>,
|
|
730
|
+
): RequestResult<
|
|
731
|
+
GetIntelligenceConfigurationResponses,
|
|
732
|
+
GetIntelligenceConfigurationErrors,
|
|
733
|
+
ThrowOnError
|
|
734
|
+
> =>
|
|
735
|
+
(options?.client ?? client).get<
|
|
736
|
+
GetIntelligenceConfigurationResponses,
|
|
737
|
+
GetIntelligenceConfigurationErrors,
|
|
738
|
+
ThrowOnError
|
|
739
|
+
>({
|
|
740
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
741
|
+
url: '/intelligence-configuration',
|
|
742
|
+
...options,
|
|
743
|
+
});
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* POST /intelligence-configuration
|
|
747
|
+
*
|
|
748
|
+
* Twilio Conversational Intelligence Operators API endpoint.
|
|
749
|
+
*/
|
|
750
|
+
export const postIntelligenceConfiguration = <ThrowOnError extends boolean = false>(
|
|
751
|
+
options: Options<PostIntelligenceConfigurationData, ThrowOnError>,
|
|
752
|
+
): RequestResult<
|
|
753
|
+
PostIntelligenceConfigurationResponses,
|
|
754
|
+
PostIntelligenceConfigurationErrors,
|
|
755
|
+
ThrowOnError
|
|
756
|
+
> =>
|
|
757
|
+
(options.client ?? client).post<
|
|
758
|
+
PostIntelligenceConfigurationResponses,
|
|
759
|
+
PostIntelligenceConfigurationErrors,
|
|
760
|
+
ThrowOnError
|
|
761
|
+
>({
|
|
762
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
763
|
+
url: '/intelligence-configuration',
|
|
764
|
+
...options,
|
|
765
|
+
headers: {
|
|
766
|
+
'Content-Type': 'application/json',
|
|
767
|
+
...options.headers,
|
|
768
|
+
},
|
|
769
|
+
});
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* PUT /intelligence-configuration
|
|
773
|
+
*
|
|
774
|
+
* PUT handler for updating a Twilio Intelligence Configuration
|
|
775
|
+
*/
|
|
776
|
+
export const putIntelligenceConfiguration = <ThrowOnError extends boolean = false>(
|
|
777
|
+
options: Options<PutIntelligenceConfigurationData, ThrowOnError>,
|
|
778
|
+
): RequestResult<
|
|
779
|
+
PutIntelligenceConfigurationResponses,
|
|
780
|
+
PutIntelligenceConfigurationErrors,
|
|
781
|
+
ThrowOnError
|
|
782
|
+
> =>
|
|
783
|
+
(options.client ?? client).put<
|
|
784
|
+
PutIntelligenceConfigurationResponses,
|
|
785
|
+
PutIntelligenceConfigurationErrors,
|
|
786
|
+
ThrowOnError
|
|
787
|
+
>({
|
|
788
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
789
|
+
url: '/intelligence-configuration',
|
|
790
|
+
...options,
|
|
791
|
+
headers: {
|
|
792
|
+
'Content-Type': 'application/json',
|
|
793
|
+
...options.headers,
|
|
794
|
+
},
|
|
795
|
+
});
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* DELETE /conversation-memory-profiles
|
|
799
|
+
*
|
|
800
|
+
* DELETE handler for removing a profile from Conversation Memory
|
|
801
|
+
*/
|
|
802
|
+
export const deleteConversationMemoryProfiles = <ThrowOnError extends boolean = false>(
|
|
803
|
+
options?: Options<DeleteConversationMemoryProfilesData, ThrowOnError>,
|
|
804
|
+
): RequestResult<
|
|
805
|
+
DeleteConversationMemoryProfilesResponses,
|
|
806
|
+
DeleteConversationMemoryProfilesErrors,
|
|
807
|
+
ThrowOnError
|
|
808
|
+
> =>
|
|
809
|
+
(options?.client ?? client).delete<
|
|
810
|
+
DeleteConversationMemoryProfilesResponses,
|
|
811
|
+
DeleteConversationMemoryProfilesErrors,
|
|
812
|
+
ThrowOnError
|
|
813
|
+
>({
|
|
814
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
815
|
+
url: '/conversation-memory-profiles',
|
|
816
|
+
...options,
|
|
817
|
+
});
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* GET /conversation-memory-profiles
|
|
821
|
+
*
|
|
822
|
+
* GET handler for retrieving profiles from Conversation Memory
|
|
823
|
+
*/
|
|
824
|
+
export const getConversationMemoryProfiles = <ThrowOnError extends boolean = false>(
|
|
825
|
+
options?: Options<GetConversationMemoryProfilesData, ThrowOnError>,
|
|
826
|
+
): RequestResult<
|
|
827
|
+
GetConversationMemoryProfilesResponses,
|
|
828
|
+
GetConversationMemoryProfilesErrors,
|
|
829
|
+
ThrowOnError
|
|
830
|
+
> =>
|
|
831
|
+
(options?.client ?? client).get<
|
|
832
|
+
GetConversationMemoryProfilesResponses,
|
|
833
|
+
GetConversationMemoryProfilesErrors,
|
|
834
|
+
ThrowOnError
|
|
835
|
+
>({
|
|
836
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
837
|
+
url: '/conversation-memory-profiles',
|
|
838
|
+
...options,
|
|
839
|
+
});
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* PATCH /conversation-memory-profiles
|
|
843
|
+
*
|
|
844
|
+
* PATCH handler for updating profile traits in Conversation Memory
|
|
845
|
+
*/
|
|
846
|
+
export const patchConversationMemoryProfiles = <ThrowOnError extends boolean = false>(
|
|
847
|
+
options: Options<PatchConversationMemoryProfilesData, ThrowOnError>,
|
|
848
|
+
): RequestResult<
|
|
849
|
+
PatchConversationMemoryProfilesResponses,
|
|
850
|
+
PatchConversationMemoryProfilesErrors,
|
|
851
|
+
ThrowOnError
|
|
852
|
+
> =>
|
|
853
|
+
(options.client ?? client).patch<
|
|
854
|
+
PatchConversationMemoryProfilesResponses,
|
|
855
|
+
PatchConversationMemoryProfilesErrors,
|
|
856
|
+
ThrowOnError
|
|
857
|
+
>({
|
|
858
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
859
|
+
url: '/conversation-memory-profiles',
|
|
860
|
+
...options,
|
|
861
|
+
headers: {
|
|
862
|
+
'Content-Type': 'application/json',
|
|
863
|
+
...options.headers,
|
|
864
|
+
},
|
|
865
|
+
});
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* POST /conversation-memory-profiles
|
|
869
|
+
*
|
|
870
|
+
* POST handler for creating a profile in Conversation Memory
|
|
871
|
+
*/
|
|
872
|
+
export const postConversationMemoryProfiles = <ThrowOnError extends boolean = false>(
|
|
873
|
+
options: Options<PostConversationMemoryProfilesData, ThrowOnError>,
|
|
874
|
+
): RequestResult<
|
|
875
|
+
PostConversationMemoryProfilesResponses,
|
|
876
|
+
PostConversationMemoryProfilesErrors,
|
|
877
|
+
ThrowOnError
|
|
878
|
+
> =>
|
|
879
|
+
(options.client ?? client).post<
|
|
880
|
+
PostConversationMemoryProfilesResponses,
|
|
881
|
+
PostConversationMemoryProfilesErrors,
|
|
882
|
+
ThrowOnError
|
|
883
|
+
>({
|
|
884
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
885
|
+
url: '/conversation-memory-profiles',
|
|
886
|
+
...options,
|
|
887
|
+
headers: {
|
|
888
|
+
'Content-Type': 'application/json',
|
|
889
|
+
...options.headers,
|
|
890
|
+
},
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* POST /conversation-memory-profiles-lookup
|
|
895
|
+
*
|
|
896
|
+
* POST handler for looking up profiles by identifier in Conversation Memory
|
|
897
|
+
*/
|
|
898
|
+
export const postConversationMemoryProfilesLookup = <ThrowOnError extends boolean = false>(
|
|
899
|
+
options: Options<PostConversationMemoryProfilesLookupData, ThrowOnError>,
|
|
900
|
+
): RequestResult<
|
|
901
|
+
PostConversationMemoryProfilesLookupResponses,
|
|
902
|
+
PostConversationMemoryProfilesLookupErrors,
|
|
903
|
+
ThrowOnError
|
|
904
|
+
> =>
|
|
905
|
+
(options.client ?? client).post<
|
|
906
|
+
PostConversationMemoryProfilesLookupResponses,
|
|
907
|
+
PostConversationMemoryProfilesLookupErrors,
|
|
908
|
+
ThrowOnError
|
|
909
|
+
>({
|
|
910
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
911
|
+
url: '/conversation-memory-profiles-lookup',
|
|
912
|
+
...options,
|
|
913
|
+
headers: {
|
|
914
|
+
'Content-Type': 'application/json',
|
|
915
|
+
...options.headers,
|
|
916
|
+
},
|
|
917
|
+
});
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* POST /conversation-memory-recall
|
|
921
|
+
*
|
|
922
|
+
* POST handler for retrieving memories from a Conversation Memory profile
|
|
923
|
+
*/
|
|
924
|
+
export const postConversationMemoryRecall = <ThrowOnError extends boolean = false>(
|
|
925
|
+
options: Options<PostConversationMemoryRecallData, ThrowOnError>,
|
|
926
|
+
): RequestResult<
|
|
927
|
+
PostConversationMemoryRecallResponses,
|
|
928
|
+
PostConversationMemoryRecallErrors,
|
|
929
|
+
ThrowOnError
|
|
930
|
+
> =>
|
|
931
|
+
(options.client ?? client).post<
|
|
932
|
+
PostConversationMemoryRecallResponses,
|
|
933
|
+
PostConversationMemoryRecallErrors,
|
|
934
|
+
ThrowOnError
|
|
935
|
+
>({
|
|
936
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
937
|
+
url: '/conversation-memory-recall',
|
|
938
|
+
...options,
|
|
939
|
+
headers: {
|
|
940
|
+
'Content-Type': 'application/json',
|
|
941
|
+
...options.headers,
|
|
942
|
+
},
|
|
943
|
+
});
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* DELETE /conversation-memory-identifiers
|
|
947
|
+
*
|
|
948
|
+
* DELETE handler for removing a profile identifier from Conversation Memory
|
|
949
|
+
*/
|
|
950
|
+
export const deleteConversationMemoryIdentifiers = <ThrowOnError extends boolean = false>(
|
|
951
|
+
options?: Options<DeleteConversationMemoryIdentifiersData, ThrowOnError>,
|
|
952
|
+
): RequestResult<
|
|
953
|
+
DeleteConversationMemoryIdentifiersResponses,
|
|
954
|
+
DeleteConversationMemoryIdentifiersErrors,
|
|
955
|
+
ThrowOnError
|
|
956
|
+
> =>
|
|
957
|
+
(options?.client ?? client).delete<
|
|
958
|
+
DeleteConversationMemoryIdentifiersResponses,
|
|
959
|
+
DeleteConversationMemoryIdentifiersErrors,
|
|
960
|
+
ThrowOnError
|
|
961
|
+
>({
|
|
962
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
963
|
+
url: '/conversation-memory-identifiers',
|
|
964
|
+
...options,
|
|
965
|
+
});
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* GET /conversation-memory-identifiers
|
|
969
|
+
*
|
|
970
|
+
* GET handler for retrieving profile identifiers from Conversation Memory
|
|
971
|
+
*/
|
|
972
|
+
export const getConversationMemoryIdentifiers = <ThrowOnError extends boolean = false>(
|
|
973
|
+
options?: Options<GetConversationMemoryIdentifiersData, ThrowOnError>,
|
|
974
|
+
): RequestResult<
|
|
975
|
+
GetConversationMemoryIdentifiersResponses,
|
|
976
|
+
GetConversationMemoryIdentifiersErrors,
|
|
977
|
+
ThrowOnError
|
|
978
|
+
> =>
|
|
979
|
+
(options?.client ?? client).get<
|
|
980
|
+
GetConversationMemoryIdentifiersResponses,
|
|
981
|
+
GetConversationMemoryIdentifiersErrors,
|
|
982
|
+
ThrowOnError
|
|
983
|
+
>({
|
|
984
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
985
|
+
url: '/conversation-memory-identifiers',
|
|
986
|
+
...options,
|
|
987
|
+
});
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* PATCH /conversation-memory-identifiers
|
|
991
|
+
*
|
|
992
|
+
* PATCH handler for modifying a profile identifier in Conversation Memory
|
|
993
|
+
*/
|
|
994
|
+
export const patchConversationMemoryIdentifiers = <ThrowOnError extends boolean = false>(
|
|
995
|
+
options: Options<PatchConversationMemoryIdentifiersData, ThrowOnError>,
|
|
996
|
+
): RequestResult<
|
|
997
|
+
PatchConversationMemoryIdentifiersResponses,
|
|
998
|
+
PatchConversationMemoryIdentifiersErrors,
|
|
999
|
+
ThrowOnError
|
|
1000
|
+
> =>
|
|
1001
|
+
(options.client ?? client).patch<
|
|
1002
|
+
PatchConversationMemoryIdentifiersResponses,
|
|
1003
|
+
PatchConversationMemoryIdentifiersErrors,
|
|
1004
|
+
ThrowOnError
|
|
1005
|
+
>({
|
|
1006
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1007
|
+
url: '/conversation-memory-identifiers',
|
|
1008
|
+
...options,
|
|
1009
|
+
headers: {
|
|
1010
|
+
'Content-Type': 'application/json',
|
|
1011
|
+
...options.headers,
|
|
1012
|
+
},
|
|
1013
|
+
});
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* POST /conversation-memory-identifiers
|
|
1017
|
+
*
|
|
1018
|
+
* POST handler for adding an identifier to a Conversation Memory profile
|
|
1019
|
+
*/
|
|
1020
|
+
export const postConversationMemoryIdentifiers = <ThrowOnError extends boolean = false>(
|
|
1021
|
+
options: Options<PostConversationMemoryIdentifiersData, ThrowOnError>,
|
|
1022
|
+
): RequestResult<
|
|
1023
|
+
PostConversationMemoryIdentifiersResponses,
|
|
1024
|
+
PostConversationMemoryIdentifiersErrors,
|
|
1025
|
+
ThrowOnError
|
|
1026
|
+
> =>
|
|
1027
|
+
(options.client ?? client).post<
|
|
1028
|
+
PostConversationMemoryIdentifiersResponses,
|
|
1029
|
+
PostConversationMemoryIdentifiersErrors,
|
|
1030
|
+
ThrowOnError
|
|
1031
|
+
>({
|
|
1032
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1033
|
+
url: '/conversation-memory-identifiers',
|
|
1034
|
+
...options,
|
|
1035
|
+
headers: {
|
|
1036
|
+
'Content-Type': 'application/json',
|
|
1037
|
+
...options.headers,
|
|
1038
|
+
},
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* DELETE /conversation-memory-trait-groups
|
|
1043
|
+
*
|
|
1044
|
+
* DELETE handler for removing a Trait Group from Conversation Memory
|
|
1045
|
+
*/
|
|
1046
|
+
export const deleteConversationMemoryTraitGroups = <ThrowOnError extends boolean = false>(
|
|
1047
|
+
options?: Options<DeleteConversationMemoryTraitGroupsData, ThrowOnError>,
|
|
1048
|
+
): RequestResult<
|
|
1049
|
+
DeleteConversationMemoryTraitGroupsResponses,
|
|
1050
|
+
DeleteConversationMemoryTraitGroupsErrors,
|
|
1051
|
+
ThrowOnError
|
|
1052
|
+
> =>
|
|
1053
|
+
(options?.client ?? client).delete<
|
|
1054
|
+
DeleteConversationMemoryTraitGroupsResponses,
|
|
1055
|
+
DeleteConversationMemoryTraitGroupsErrors,
|
|
1056
|
+
ThrowOnError
|
|
1057
|
+
>({
|
|
1058
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1059
|
+
url: '/conversation-memory-trait-groups',
|
|
1060
|
+
...options,
|
|
1061
|
+
});
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* GET /conversation-memory-trait-groups
|
|
1065
|
+
*
|
|
1066
|
+
* GET handler for retrieving Trait Groups from Conversation Memory
|
|
1067
|
+
*/
|
|
1068
|
+
export const getConversationMemoryTraitGroups = <ThrowOnError extends boolean = false>(
|
|
1069
|
+
options?: Options<GetConversationMemoryTraitGroupsData, ThrowOnError>,
|
|
1070
|
+
): RequestResult<
|
|
1071
|
+
GetConversationMemoryTraitGroupsResponses,
|
|
1072
|
+
GetConversationMemoryTraitGroupsErrors,
|
|
1073
|
+
ThrowOnError
|
|
1074
|
+
> =>
|
|
1075
|
+
(options?.client ?? client).get<
|
|
1076
|
+
GetConversationMemoryTraitGroupsResponses,
|
|
1077
|
+
GetConversationMemoryTraitGroupsErrors,
|
|
1078
|
+
ThrowOnError
|
|
1079
|
+
>({
|
|
1080
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1081
|
+
url: '/conversation-memory-trait-groups',
|
|
1082
|
+
...options,
|
|
1083
|
+
});
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* PATCH /conversation-memory-trait-groups
|
|
1087
|
+
*
|
|
1088
|
+
* PATCH handler for updating a Trait Group in Conversation Memory
|
|
1089
|
+
*/
|
|
1090
|
+
export const patchConversationMemoryTraitGroups = <ThrowOnError extends boolean = false>(
|
|
1091
|
+
options: Options<PatchConversationMemoryTraitGroupsData, ThrowOnError>,
|
|
1092
|
+
): RequestResult<
|
|
1093
|
+
PatchConversationMemoryTraitGroupsResponses,
|
|
1094
|
+
PatchConversationMemoryTraitGroupsErrors,
|
|
1095
|
+
ThrowOnError
|
|
1096
|
+
> =>
|
|
1097
|
+
(options.client ?? client).patch<
|
|
1098
|
+
PatchConversationMemoryTraitGroupsResponses,
|
|
1099
|
+
PatchConversationMemoryTraitGroupsErrors,
|
|
1100
|
+
ThrowOnError
|
|
1101
|
+
>({
|
|
1102
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1103
|
+
url: '/conversation-memory-trait-groups',
|
|
1104
|
+
...options,
|
|
1105
|
+
headers: {
|
|
1106
|
+
'Content-Type': 'application/json',
|
|
1107
|
+
...options.headers,
|
|
1108
|
+
},
|
|
1109
|
+
});
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* POST /conversation-memory-trait-groups
|
|
1113
|
+
*
|
|
1114
|
+
* POST handler for creating a Trait Group in Conversation Memory
|
|
1115
|
+
*/
|
|
1116
|
+
export const postConversationMemoryTraitGroups = <ThrowOnError extends boolean = false>(
|
|
1117
|
+
options: Options<PostConversationMemoryTraitGroupsData, ThrowOnError>,
|
|
1118
|
+
): RequestResult<
|
|
1119
|
+
PostConversationMemoryTraitGroupsResponses,
|
|
1120
|
+
PostConversationMemoryTraitGroupsErrors,
|
|
1121
|
+
ThrowOnError
|
|
1122
|
+
> =>
|
|
1123
|
+
(options.client ?? client).post<
|
|
1124
|
+
PostConversationMemoryTraitGroupsResponses,
|
|
1125
|
+
PostConversationMemoryTraitGroupsErrors,
|
|
1126
|
+
ThrowOnError
|
|
1127
|
+
>({
|
|
1128
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1129
|
+
url: '/conversation-memory-trait-groups',
|
|
1130
|
+
...options,
|
|
1131
|
+
headers: {
|
|
1132
|
+
'Content-Type': 'application/json',
|
|
1133
|
+
...options.headers,
|
|
1134
|
+
},
|
|
1135
|
+
});
|
|
1136
|
+
|
|
1137
|
+
/**
|
|
1138
|
+
* GET /conversation-memory-traits
|
|
1139
|
+
*
|
|
1140
|
+
* GET handler for retrieving profile traits from Conversation Memory
|
|
1141
|
+
*/
|
|
1142
|
+
export const getConversationMemoryTraits = <ThrowOnError extends boolean = false>(
|
|
1143
|
+
options?: Options<GetConversationMemoryTraitsData, ThrowOnError>,
|
|
1144
|
+
): RequestResult<
|
|
1145
|
+
GetConversationMemoryTraitsResponses,
|
|
1146
|
+
GetConversationMemoryTraitsErrors,
|
|
1147
|
+
ThrowOnError
|
|
1148
|
+
> =>
|
|
1149
|
+
(options?.client ?? client).get<
|
|
1150
|
+
GetConversationMemoryTraitsResponses,
|
|
1151
|
+
GetConversationMemoryTraitsErrors,
|
|
1152
|
+
ThrowOnError
|
|
1153
|
+
>({
|
|
1154
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1155
|
+
url: '/conversation-memory-traits',
|
|
1156
|
+
...options,
|
|
1157
|
+
});
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* DELETE /conversation-memory-observations
|
|
1161
|
+
*
|
|
1162
|
+
* DELETE handler for removing an observation from a Conversation Memory profile
|
|
1163
|
+
*/
|
|
1164
|
+
export const deleteConversationMemoryObservations = <ThrowOnError extends boolean = false>(
|
|
1165
|
+
options?: Options<DeleteConversationMemoryObservationsData, ThrowOnError>,
|
|
1166
|
+
): RequestResult<
|
|
1167
|
+
DeleteConversationMemoryObservationsResponses,
|
|
1168
|
+
DeleteConversationMemoryObservationsErrors,
|
|
1169
|
+
ThrowOnError
|
|
1170
|
+
> =>
|
|
1171
|
+
(options?.client ?? client).delete<
|
|
1172
|
+
DeleteConversationMemoryObservationsResponses,
|
|
1173
|
+
DeleteConversationMemoryObservationsErrors,
|
|
1174
|
+
ThrowOnError
|
|
1175
|
+
>({
|
|
1176
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1177
|
+
url: '/conversation-memory-observations',
|
|
1178
|
+
...options,
|
|
1179
|
+
});
|
|
1180
|
+
|
|
1181
|
+
/**
|
|
1182
|
+
* GET /conversation-memory-observations
|
|
1183
|
+
*
|
|
1184
|
+
* GET handler for retrieving observations from a Conversation Memory profile
|
|
1185
|
+
*/
|
|
1186
|
+
export const getConversationMemoryObservations = <ThrowOnError extends boolean = false>(
|
|
1187
|
+
options?: Options<GetConversationMemoryObservationsData, ThrowOnError>,
|
|
1188
|
+
): RequestResult<
|
|
1189
|
+
GetConversationMemoryObservationsResponses,
|
|
1190
|
+
GetConversationMemoryObservationsErrors,
|
|
1191
|
+
ThrowOnError
|
|
1192
|
+
> =>
|
|
1193
|
+
(options?.client ?? client).get<
|
|
1194
|
+
GetConversationMemoryObservationsResponses,
|
|
1195
|
+
GetConversationMemoryObservationsErrors,
|
|
1196
|
+
ThrowOnError
|
|
1197
|
+
>({
|
|
1198
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1199
|
+
url: '/conversation-memory-observations',
|
|
1200
|
+
...options,
|
|
1201
|
+
});
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* PATCH /conversation-memory-observations
|
|
1205
|
+
*
|
|
1206
|
+
* PATCH handler for updating an observation on a Conversation Memory profile
|
|
1207
|
+
*/
|
|
1208
|
+
export const patchConversationMemoryObservations = <ThrowOnError extends boolean = false>(
|
|
1209
|
+
options: Options<PatchConversationMemoryObservationsData, ThrowOnError>,
|
|
1210
|
+
): RequestResult<
|
|
1211
|
+
PatchConversationMemoryObservationsResponses,
|
|
1212
|
+
PatchConversationMemoryObservationsErrors,
|
|
1213
|
+
ThrowOnError
|
|
1214
|
+
> =>
|
|
1215
|
+
(options.client ?? client).patch<
|
|
1216
|
+
PatchConversationMemoryObservationsResponses,
|
|
1217
|
+
PatchConversationMemoryObservationsErrors,
|
|
1218
|
+
ThrowOnError
|
|
1219
|
+
>({
|
|
1220
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1221
|
+
url: '/conversation-memory-observations',
|
|
1222
|
+
...options,
|
|
1223
|
+
headers: {
|
|
1224
|
+
'Content-Type': 'application/json',
|
|
1225
|
+
...options.headers,
|
|
1226
|
+
},
|
|
1227
|
+
});
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* POST /conversation-memory-observations
|
|
1231
|
+
*
|
|
1232
|
+
* POST handler for creating observations on a Conversation Memory profile
|
|
1233
|
+
*/
|
|
1234
|
+
export const postConversationMemoryObservations = <ThrowOnError extends boolean = false>(
|
|
1235
|
+
options: Options<PostConversationMemoryObservationsData, ThrowOnError>,
|
|
1236
|
+
): RequestResult<
|
|
1237
|
+
PostConversationMemoryObservationsResponses,
|
|
1238
|
+
PostConversationMemoryObservationsErrors,
|
|
1239
|
+
ThrowOnError
|
|
1240
|
+
> =>
|
|
1241
|
+
(options.client ?? client).post<
|
|
1242
|
+
PostConversationMemoryObservationsResponses,
|
|
1243
|
+
PostConversationMemoryObservationsErrors,
|
|
1244
|
+
ThrowOnError
|
|
1245
|
+
>({
|
|
1246
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1247
|
+
url: '/conversation-memory-observations',
|
|
1248
|
+
...options,
|
|
1249
|
+
headers: {
|
|
1250
|
+
'Content-Type': 'application/json',
|
|
1251
|
+
...options.headers,
|
|
1252
|
+
},
|
|
1253
|
+
});
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* DELETE /conversation-memory-conversation-summaries
|
|
1257
|
+
*
|
|
1258
|
+
* DELETE handler for removing a conversation summary from a Conversation Memory profile
|
|
1259
|
+
*/
|
|
1260
|
+
export const deleteConversationMemoryConversationSummaries = <ThrowOnError extends boolean = false>(
|
|
1261
|
+
options?: Options<DeleteConversationMemoryConversationSummariesData, ThrowOnError>,
|
|
1262
|
+
): RequestResult<
|
|
1263
|
+
DeleteConversationMemoryConversationSummariesResponses,
|
|
1264
|
+
DeleteConversationMemoryConversationSummariesErrors,
|
|
1265
|
+
ThrowOnError
|
|
1266
|
+
> =>
|
|
1267
|
+
(options?.client ?? client).delete<
|
|
1268
|
+
DeleteConversationMemoryConversationSummariesResponses,
|
|
1269
|
+
DeleteConversationMemoryConversationSummariesErrors,
|
|
1270
|
+
ThrowOnError
|
|
1271
|
+
>({
|
|
1272
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1273
|
+
url: '/conversation-memory-conversation-summaries',
|
|
1274
|
+
...options,
|
|
1275
|
+
});
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* GET /conversation-memory-conversation-summaries
|
|
1279
|
+
*
|
|
1280
|
+
* GET handler for retrieving conversation summaries from a Conversation Memory profile
|
|
1281
|
+
*/
|
|
1282
|
+
export const getConversationMemoryConversationSummaries = <ThrowOnError extends boolean = false>(
|
|
1283
|
+
options?: Options<GetConversationMemoryConversationSummariesData, ThrowOnError>,
|
|
1284
|
+
): RequestResult<
|
|
1285
|
+
GetConversationMemoryConversationSummariesResponses,
|
|
1286
|
+
GetConversationMemoryConversationSummariesErrors,
|
|
1287
|
+
ThrowOnError
|
|
1288
|
+
> =>
|
|
1289
|
+
(options?.client ?? client).get<
|
|
1290
|
+
GetConversationMemoryConversationSummariesResponses,
|
|
1291
|
+
GetConversationMemoryConversationSummariesErrors,
|
|
1292
|
+
ThrowOnError
|
|
1293
|
+
>({
|
|
1294
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1295
|
+
url: '/conversation-memory-conversation-summaries',
|
|
1296
|
+
...options,
|
|
1297
|
+
});
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* PATCH /conversation-memory-conversation-summaries
|
|
1301
|
+
*
|
|
1302
|
+
* PATCH handler for updating a conversation summary on a Conversation Memory profile
|
|
1303
|
+
*/
|
|
1304
|
+
export const patchConversationMemoryConversationSummaries = <ThrowOnError extends boolean = false>(
|
|
1305
|
+
options: Options<PatchConversationMemoryConversationSummariesData, ThrowOnError>,
|
|
1306
|
+
): RequestResult<
|
|
1307
|
+
PatchConversationMemoryConversationSummariesResponses,
|
|
1308
|
+
PatchConversationMemoryConversationSummariesErrors,
|
|
1309
|
+
ThrowOnError
|
|
1310
|
+
> =>
|
|
1311
|
+
(options.client ?? client).patch<
|
|
1312
|
+
PatchConversationMemoryConversationSummariesResponses,
|
|
1313
|
+
PatchConversationMemoryConversationSummariesErrors,
|
|
1314
|
+
ThrowOnError
|
|
1315
|
+
>({
|
|
1316
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1317
|
+
url: '/conversation-memory-conversation-summaries',
|
|
1318
|
+
...options,
|
|
1319
|
+
headers: {
|
|
1320
|
+
'Content-Type': 'application/json',
|
|
1321
|
+
...options.headers,
|
|
1322
|
+
},
|
|
1323
|
+
});
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* POST /conversation-memory-conversation-summaries
|
|
1327
|
+
*
|
|
1328
|
+
* POST handler for creating conversation summaries on a Conversation Memory profile
|
|
1329
|
+
*/
|
|
1330
|
+
export const postConversationMemoryConversationSummaries = <ThrowOnError extends boolean = false>(
|
|
1331
|
+
options: Options<PostConversationMemoryConversationSummariesData, ThrowOnError>,
|
|
1332
|
+
): RequestResult<
|
|
1333
|
+
PostConversationMemoryConversationSummariesResponses,
|
|
1334
|
+
PostConversationMemoryConversationSummariesErrors,
|
|
1335
|
+
ThrowOnError
|
|
1336
|
+
> =>
|
|
1337
|
+
(options.client ?? client).post<
|
|
1338
|
+
PostConversationMemoryConversationSummariesResponses,
|
|
1339
|
+
PostConversationMemoryConversationSummariesErrors,
|
|
1340
|
+
ThrowOnError
|
|
1341
|
+
>({
|
|
1342
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1343
|
+
url: '/conversation-memory-conversation-summaries',
|
|
1344
|
+
...options,
|
|
1345
|
+
headers: {
|
|
1346
|
+
'Content-Type': 'application/json',
|
|
1347
|
+
...options.headers,
|
|
1348
|
+
},
|
|
1349
|
+
});
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* DELETE /conversation-memory-reset
|
|
1353
|
+
*/
|
|
1354
|
+
export const deleteConversationMemoryReset = <ThrowOnError extends boolean = false>(
|
|
1355
|
+
options?: Options<DeleteConversationMemoryResetData, ThrowOnError>,
|
|
1356
|
+
): RequestResult<
|
|
1357
|
+
DeleteConversationMemoryResetResponses,
|
|
1358
|
+
DeleteConversationMemoryResetErrors,
|
|
1359
|
+
ThrowOnError
|
|
1360
|
+
> =>
|
|
1361
|
+
(options?.client ?? client).delete<
|
|
1362
|
+
DeleteConversationMemoryResetResponses,
|
|
1363
|
+
DeleteConversationMemoryResetErrors,
|
|
1364
|
+
ThrowOnError
|
|
1365
|
+
>({
|
|
1366
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1367
|
+
url: '/conversation-memory-reset',
|
|
1368
|
+
...options,
|
|
1369
|
+
});
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* POST /assign-demo
|
|
1373
|
+
*
|
|
1374
|
+
* Assigns a phone number to a target demo template, removing it from any
|
|
1375
|
+
* other templates that currently have it
|
|
1376
|
+
*/
|
|
1377
|
+
export const postAssignDemo = <ThrowOnError extends boolean = false>(
|
|
1378
|
+
options: Options<PostAssignDemoData, ThrowOnError>,
|
|
1379
|
+
): RequestResult<PostAssignDemoResponses, PostAssignDemoErrors, ThrowOnError> =>
|
|
1380
|
+
(options.client ?? client).post<PostAssignDemoResponses, PostAssignDemoErrors, ThrowOnError>({
|
|
1381
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1382
|
+
url: '/assign-demo',
|
|
1383
|
+
...options,
|
|
1384
|
+
headers: {
|
|
1385
|
+
'Content-Type': 'application/json',
|
|
1386
|
+
...options.headers,
|
|
1387
|
+
},
|
|
1388
|
+
});
|
|
1389
|
+
|
|
1390
|
+
/**
|
|
1391
|
+
* GET /lookup-demo
|
|
1392
|
+
*
|
|
1393
|
+
* Returns the demo template(s) a phone number is currently assigned to
|
|
1394
|
+
*/
|
|
1395
|
+
export const getLookupDemo = <ThrowOnError extends boolean = false>(
|
|
1396
|
+
options?: Options<GetLookupDemoData, ThrowOnError>,
|
|
1397
|
+
): RequestResult<GetLookupDemoResponses, GetLookupDemoErrors, ThrowOnError> =>
|
|
1398
|
+
(options?.client ?? client).get<GetLookupDemoResponses, GetLookupDemoErrors, ThrowOnError>({
|
|
1399
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1400
|
+
url: '/lookup-demo',
|
|
1401
|
+
...options,
|
|
1402
|
+
});
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* POST /template-autogen
|
|
1406
|
+
*
|
|
1407
|
+
* Creates AI-generated RAMP templates from a list of requests, one template for each request
|
|
1408
|
+
*/
|
|
1409
|
+
export const postTemplateAutogen = <ThrowOnError extends boolean = false>(
|
|
1410
|
+
options: Options<PostTemplateAutogenData, ThrowOnError>,
|
|
1411
|
+
): RequestResult<PostTemplateAutogenResponses, PostTemplateAutogenErrors, ThrowOnError> =>
|
|
1412
|
+
(options.client ?? client).post<
|
|
1413
|
+
PostTemplateAutogenResponses,
|
|
1414
|
+
PostTemplateAutogenErrors,
|
|
1415
|
+
ThrowOnError
|
|
1416
|
+
>({
|
|
1417
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1418
|
+
url: '/template-autogen',
|
|
1419
|
+
...options,
|
|
1420
|
+
headers: {
|
|
1421
|
+
'Content-Type': 'application/json',
|
|
1422
|
+
...options.headers,
|
|
1423
|
+
},
|
|
1424
|
+
});
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* DELETE /template
|
|
1428
|
+
*
|
|
1429
|
+
* Expects JSON body: { ids: string[] }
|
|
1430
|
+
* If campaign=true, deletes campaigns from Snowflake
|
|
1431
|
+
*/
|
|
1432
|
+
export const deleteTemplate = <ThrowOnError extends boolean = false>(
|
|
1433
|
+
options?: Options<DeleteTemplateData, ThrowOnError>,
|
|
1434
|
+
): RequestResult<DeleteTemplateResponses, DeleteTemplateErrors, ThrowOnError> =>
|
|
1435
|
+
(options?.client ?? client).delete<DeleteTemplateResponses, DeleteTemplateErrors, ThrowOnError>({
|
|
1436
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1437
|
+
url: '/template',
|
|
1438
|
+
...options,
|
|
1439
|
+
});
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* POST /template
|
|
1443
|
+
*
|
|
1444
|
+
* Creates a template
|
|
1445
|
+
*/
|
|
1446
|
+
export const postTemplate = <ThrowOnError extends boolean = false>(
|
|
1447
|
+
options: Options<PostTemplateData, ThrowOnError>,
|
|
1448
|
+
): RequestResult<PostTemplateResponses, PostTemplateErrors, ThrowOnError> =>
|
|
1449
|
+
(options.client ?? client).post<PostTemplateResponses, PostTemplateErrors, ThrowOnError>({
|
|
1450
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1451
|
+
url: '/template',
|
|
1452
|
+
...options,
|
|
1453
|
+
headers: {
|
|
1454
|
+
'Content-Type': 'application/json',
|
|
1455
|
+
...options.headers,
|
|
1456
|
+
},
|
|
1457
|
+
});
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* GET /campaign
|
|
1461
|
+
*
|
|
1462
|
+
* Gets all campaign templates based off of search arguments
|
|
1463
|
+
*/
|
|
1464
|
+
export const getCampaign = <ThrowOnError extends boolean = false>(
|
|
1465
|
+
options?: Options<GetCampaignData, ThrowOnError>,
|
|
1466
|
+
): RequestResult<GetCampaignResponses, GetCampaignErrors, ThrowOnError> =>
|
|
1467
|
+
(options?.client ?? client).get<GetCampaignResponses, GetCampaignErrors, ThrowOnError>({
|
|
1468
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1469
|
+
url: '/campaign',
|
|
1470
|
+
...options,
|
|
1471
|
+
});
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* GET /supported-regions
|
|
1475
|
+
*
|
|
1476
|
+
* Returns the regions in which a phone number can currently be purchased,
|
|
1477
|
+
* derived from the account's Twilio-approved regulatory bundles plus US/CA toll-free
|
|
1478
|
+
*/
|
|
1479
|
+
export const getSupportedRegions = <ThrowOnError extends boolean = false>(
|
|
1480
|
+
options?: Options<GetSupportedRegionsData, ThrowOnError>,
|
|
1481
|
+
): RequestResult<GetSupportedRegionsResponses, GetSupportedRegionsErrors, ThrowOnError> =>
|
|
1482
|
+
(options?.client ?? client).get<
|
|
1483
|
+
GetSupportedRegionsResponses,
|
|
1484
|
+
GetSupportedRegionsErrors,
|
|
1485
|
+
ThrowOnError
|
|
1486
|
+
>({
|
|
1487
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1488
|
+
url: '/supported-regions',
|
|
1489
|
+
...options,
|
|
1490
|
+
});
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* GET /link-shortener
|
|
1494
|
+
*
|
|
1495
|
+
* Returns all short links stored in the link.twilioramp.com account
|
|
1496
|
+
*/
|
|
1497
|
+
export const getLinkShortener = <ThrowOnError extends boolean = false>(
|
|
1498
|
+
options?: Options<GetLinkShortenerData, ThrowOnError>,
|
|
1499
|
+
): RequestResult<GetLinkShortenerResponses, GetLinkShortenerErrors, ThrowOnError> =>
|
|
1500
|
+
(options?.client ?? client).get<GetLinkShortenerResponses, GetLinkShortenerErrors, ThrowOnError>({
|
|
1501
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1502
|
+
url: '/link-shortener',
|
|
1503
|
+
...options,
|
|
1504
|
+
});
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* PATCH /link-shortener
|
|
1508
|
+
*
|
|
1509
|
+
* Persists a generated short link onto the Algolia `conversationAdmin` record and
|
|
1510
|
+
* upserts the Snowflake `GENERATED_TEMPLATES` row so the link survives a page refresh
|
|
1511
|
+
*/
|
|
1512
|
+
export const patchLinkShortener = <ThrowOnError extends boolean = false>(
|
|
1513
|
+
options: Options<PatchLinkShortenerData, ThrowOnError>,
|
|
1514
|
+
): RequestResult<PatchLinkShortenerResponses, PatchLinkShortenerErrors, ThrowOnError> =>
|
|
1515
|
+
(options.client ?? client).patch<
|
|
1516
|
+
PatchLinkShortenerResponses,
|
|
1517
|
+
PatchLinkShortenerErrors,
|
|
1518
|
+
ThrowOnError
|
|
1519
|
+
>({
|
|
1520
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1521
|
+
url: '/link-shortener',
|
|
1522
|
+
...options,
|
|
1523
|
+
headers: {
|
|
1524
|
+
'Content-Type': 'application/json',
|
|
1525
|
+
...options.headers,
|
|
1526
|
+
},
|
|
1527
|
+
});
|
|
1528
|
+
|
|
1529
|
+
/**
|
|
1530
|
+
* POST /link-shortener
|
|
1531
|
+
*
|
|
1532
|
+
* Shortens one or more URLs via the link.twilioramp.com API
|
|
1533
|
+
*/
|
|
1534
|
+
export const postLinkShortener = <ThrowOnError extends boolean = false>(
|
|
1535
|
+
options: Options<PostLinkShortenerData, ThrowOnError>,
|
|
1536
|
+
): RequestResult<PostLinkShortenerResponses, PostLinkShortenerErrors, ThrowOnError> =>
|
|
1537
|
+
(options.client ?? client).post<
|
|
1538
|
+
PostLinkShortenerResponses,
|
|
1539
|
+
PostLinkShortenerErrors,
|
|
1540
|
+
ThrowOnError
|
|
1541
|
+
>({
|
|
1542
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1543
|
+
url: '/link-shortener',
|
|
1544
|
+
...options,
|
|
1545
|
+
headers: {
|
|
1546
|
+
'Content-Type': 'application/json',
|
|
1547
|
+
...options.headers,
|
|
1548
|
+
},
|
|
1549
|
+
});
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* DELETE /link-shortener/:code
|
|
1553
|
+
*
|
|
1554
|
+
* Deletes a short link by its code via the link.twilioramp.com API
|
|
1555
|
+
*/
|
|
1556
|
+
export const deleteLinkShortenerByCode = <ThrowOnError extends boolean = false>(
|
|
1557
|
+
options: Options<DeleteLinkShortenerByCodeData, ThrowOnError>,
|
|
1558
|
+
): RequestResult<
|
|
1559
|
+
DeleteLinkShortenerByCodeResponses,
|
|
1560
|
+
DeleteLinkShortenerByCodeErrors,
|
|
1561
|
+
ThrowOnError
|
|
1562
|
+
> =>
|
|
1563
|
+
(options.client ?? client).delete<
|
|
1564
|
+
DeleteLinkShortenerByCodeResponses,
|
|
1565
|
+
DeleteLinkShortenerByCodeErrors,
|
|
1566
|
+
ThrowOnError
|
|
1567
|
+
>({
|
|
1568
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1569
|
+
url: '/link-shortener/{code}',
|
|
1570
|
+
...options,
|
|
1571
|
+
});
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* GET /docs/openapi.json
|
|
1575
|
+
*
|
|
1576
|
+
* docsSpecGet
|
|
1577
|
+
* Serves the generated OpenAPI JSON spec
|
|
1578
|
+
*/
|
|
1579
|
+
export const getDocsOpenapiJson = <ThrowOnError extends boolean = false>(
|
|
1580
|
+
options?: Options<GetDocsOpenapiJsonData, ThrowOnError>,
|
|
1581
|
+
): RequestResult<GetDocsOpenapiJsonResponses, GetDocsOpenapiJsonErrors, ThrowOnError> =>
|
|
1582
|
+
(options?.client ?? client).get<
|
|
1583
|
+
GetDocsOpenapiJsonResponses,
|
|
1584
|
+
GetDocsOpenapiJsonErrors,
|
|
1585
|
+
ThrowOnError
|
|
1586
|
+
>({
|
|
1587
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
1588
|
+
url: '/docs/openapi.json',
|
|
1589
|
+
...options,
|
|
1590
|
+
});
|