@carbonvoice/cv-mcp-server 1.0.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/dist/bootstrap.js +3 -0
- package/dist/carbon-voice.js +20 -0
- package/dist/config/env.js +28 -0
- package/dist/config/index.js +17 -0
- package/dist/constants.js +9 -0
- package/dist/generated/carbon-voice-api/CarbonVoiceSimplifiedAPI.zod.js +1416 -0
- package/dist/generated/carbon-voice-api.js +377 -0
- package/dist/generated/index.js +17 -0
- package/dist/generated/models/AIPrompt.js +2 -0
- package/dist/generated/models/AIPromptControllerGetPromptsOwnerType.js +87 -0
- package/dist/generated/models/AIPromptControllerGetPromptsParams.js +2 -0
- package/dist/generated/models/AIPromptOwnerType.js +87 -0
- package/dist/generated/models/AIPromptResponseFormat.js +86 -0
- package/dist/generated/models/AIPromptWithMessagesResponse.js +2 -0
- package/dist/generated/models/AIPromptWithMessagesResult.js +2 -0
- package/dist/generated/models/AIResponse.js +2 -0
- package/dist/generated/models/AIResponseControllerGetAllResponsesDirection.js +86 -0
- package/dist/generated/models/AIResponseControllerGetAllResponsesParams.js +2 -0
- package/dist/generated/models/AIShareLinkResponse.js +2 -0
- package/dist/generated/models/AddAttachmentsResponse.js +2 -0
- package/dist/generated/models/AddLinkAttachmentPayload.js +80 -0
- package/dist/generated/models/AddMessageToFolderPayload.js +80 -0
- package/dist/generated/models/AllConversationsResponse.js +2 -0
- package/dist/generated/models/App.js +2 -0
- package/dist/generated/models/AppWebhooksAuthenticationHeader.js +80 -0
- package/dist/generated/models/AppWebhooksUrlMode.js +86 -0
- package/dist/generated/models/AsyncConversationStats.js +2 -0
- package/dist/generated/models/Attachment.js +2 -0
- package/dist/generated/models/AttachmentLocation.js +80 -0
- package/dist/generated/models/AttachmentType.js +87 -0
- package/dist/generated/models/AudioModelV2.js +80 -0
- package/dist/generated/models/Conversation.js +2 -0
- package/dist/generated/models/ConversationResponse.js +2 -0
- package/dist/generated/models/ConversationResponseType.js +88 -0
- package/dist/generated/models/ConversationType.js +88 -0
- package/dist/generated/models/ConversationVisibility.js +87 -0
- package/dist/generated/models/CreateAIPrompt.js +2 -0
- package/dist/generated/models/CreateAIPromptOwnerType.js +87 -0
- package/dist/generated/models/CreateAIPromptResponseFormat.js +86 -0
- package/dist/generated/models/CreateAIResponse.js +80 -0
- package/dist/generated/models/CreateConversationMessage.js +2 -0
- package/dist/generated/models/CreateConversationMessageFromMessageType.js +87 -0
- package/dist/generated/models/CreateFolderPayload.js +2 -0
- package/dist/generated/models/CreateFolderPayloadType.js +86 -0
- package/dist/generated/models/CreateShareLinkAIResponse.js +80 -0
- package/dist/generated/models/CreateVoicememoMessage.js +80 -0
- package/dist/generated/models/Folder.js +2 -0
- package/dist/generated/models/FolderType.js +86 -0
- package/dist/generated/models/FolderWithMessages.js +2 -0
- package/dist/generated/models/GetAllRootFoldersParams.js +2 -0
- package/dist/generated/models/GetAllRootFoldersSortBy.js +87 -0
- package/dist/generated/models/GetAllRootFoldersSortDirection.js +86 -0
- package/dist/generated/models/GetAllRootFoldersType.js +86 -0
- package/dist/generated/models/GetByIdDirection.js +85 -0
- package/dist/generated/models/GetByIdParams.js +2 -0
- package/dist/generated/models/GetCountsGroupedByWorkspaceParams.js +2 -0
- package/dist/generated/models/GetCountsGroupedByWorkspaceType.js +86 -0
- package/dist/generated/models/GetFolderByIdDirection.js +86 -0
- package/dist/generated/models/GetFolderByIdParams.js +2 -0
- package/dist/generated/models/GetMessageByIdParams.js +80 -0
- package/dist/generated/models/GetMessageResponse.js +2 -0
- package/dist/generated/models/GetTenRecentAIPromptResponse.js +2 -0
- package/dist/generated/models/GetTenRecentMessagesResponse.js +2 -0
- package/dist/generated/models/GetTenRecentMessagesResponseParams.js +80 -0
- package/dist/generated/models/Label.js +2 -0
- package/dist/generated/models/LabelBehavior.js +87 -0
- package/dist/generated/models/LabelType.js +88 -0
- package/dist/generated/models/Language.js +2 -0
- package/dist/generated/models/ListCountFoldersGroupedByWorkspace.js +2 -0
- package/dist/generated/models/ListFoldersResponse.js +2 -0
- package/dist/generated/models/ListFoldersResponseSortBy.js +87 -0
- package/dist/generated/models/ListFoldersResponseSortDirection.js +86 -0
- package/dist/generated/models/ListFoldersResponseType.js +86 -0
- package/dist/generated/models/ListMessagesFilter.js +2 -0
- package/dist/generated/models/ListMessagesFilterType.js +89 -0
- package/dist/generated/models/ListMessagesParams.js +2 -0
- package/dist/generated/models/ListMessagesResponse.js +2 -0
- package/dist/generated/models/ListMessagesResponseSortDirection.js +86 -0
- package/dist/generated/models/ListMessagesSortDirection.js +86 -0
- package/dist/generated/models/ListMessagesType.js +89 -0
- package/dist/generated/models/Message.js +2 -0
- package/dist/generated/models/MessageStatus.js +95 -0
- package/dist/generated/models/MessageType.js +89 -0
- package/dist/generated/models/MessageV2.js +2 -0
- package/dist/generated/models/MessageV2AudioDelivery.js +86 -0
- package/dist/generated/models/MessageV2Status.js +95 -0
- package/dist/generated/models/MessageV2Type.js +89 -0
- package/dist/generated/models/MessageV2UsersCaughtUp.js +87 -0
- package/dist/generated/models/MessageV2UtmData.js +2 -0
- package/dist/generated/models/MoveFolderPayload.js +80 -0
- package/dist/generated/models/PromptResponse.js +2 -0
- package/dist/generated/models/ReactionSummary.js +2 -0
- package/dist/generated/models/ReactionSummaryReactionCounts.js +80 -0
- package/dist/generated/models/ResponseByLanguage.js +2 -0
- package/dist/generated/models/ResponseByLanguageJson.js +80 -0
- package/dist/generated/models/SearchUserParams.js +80 -0
- package/dist/generated/models/SearchUsersBody.js +80 -0
- package/dist/generated/models/SendDirectMessage.js +2 -0
- package/dist/generated/models/SendDirectMessageFromMessageType.js +87 -0
- package/dist/generated/models/SimplifiedAIPrompt.js +80 -0
- package/dist/generated/models/Stats.js +80 -0
- package/dist/generated/models/SubFolder.js +2 -0
- package/dist/generated/models/SubFolderType.js +86 -0
- package/dist/generated/models/SubscribeUserPayload.js +2 -0
- package/dist/generated/models/SubscribeUserPayloadSubscriptionsItem.js +116 -0
- package/dist/generated/models/SubscribedUser.js +2 -0
- package/dist/generated/models/SubscribedUserSubscriptionsItem.js +116 -0
- package/dist/generated/models/SubscriptionAction.js +2 -0
- package/dist/generated/models/SubscriptionActionActionId.js +85 -0
- package/dist/generated/models/SubscriptionActionEntityType.js +85 -0
- package/dist/generated/models/SubscriptionFilter.js +2 -0
- package/dist/generated/models/SubscriptionFilterOperator.js +87 -0
- package/dist/generated/models/SubscriptionFilterValue.js +80 -0
- package/dist/generated/models/TextModel.js +2 -0
- package/dist/generated/models/TextModelType.js +89 -0
- package/dist/generated/models/TimedText.js +80 -0
- package/dist/generated/models/ToRecipient.js +80 -0
- package/dist/generated/models/UpdateFolderNamePayload.js +80 -0
- package/dist/generated/models/User.js +80 -0
- package/dist/generated/models/UserReaction.js +80 -0
- package/dist/generated/models/UserStats.js +80 -0
- package/dist/generated/models/UsersNotAllowedReceiveNotifications.js +80 -0
- package/dist/generated/models/UsersNotAllowedReceiveNotificationsV2.js +80 -0
- package/dist/generated/models/UtmData.js +80 -0
- package/dist/generated/models/Voice.js +2 -0
- package/dist/generated/models/VoiceGender.js +86 -0
- package/dist/generated/models/VoiceQuality.js +87 -0
- package/dist/generated/models/VoiceType.js +88 -0
- package/dist/generated/models/WorkspaceBasicInfo.js +80 -0
- package/dist/generated/models/index.js +215 -0
- package/dist/index-v1.js +80 -0
- package/dist/interfaces/folder.interface.js +2 -0
- package/dist/interfaces/get-by-id.interface.js +2 -0
- package/dist/interfaces/index.js +20 -0
- package/dist/interfaces/mcp-tool-response.interface.js +2 -0
- package/dist/interfaces/message.interface.js +2 -0
- package/dist/schemas/index.js +17 -0
- package/dist/schemas/message.js +10 -0
- package/dist/server-delete.js +624 -0
- package/dist/server-test.js +93 -0
- package/dist/server.js +365 -0
- package/dist/sse.js +134 -0
- package/dist/sse.v2.js +29 -0
- package/dist/stdio.js +39 -0
- package/dist/utils/axios-instance.js +234 -0
- package/dist/utils/errors.js +22 -0
- package/dist/utils/format-to-mcp-tool-response.js +40 -0
- package/dist/utils/index.js +19 -0
- package/dist/utils/logger.js +111 -0
- package/dist/utils/zod-schema-transformer.js +66 -0
- package/dist/utils/zod-transformer.js +24 -0
- package/package.json +66 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCarbonVoiceSimplifiedAPI = void 0;
|
|
4
|
+
const axios_instance_1 = require("../utils/axios-instance");
|
|
5
|
+
const getCarbonVoiceSimplifiedAPI = () => {
|
|
6
|
+
const aIPromptControllerGetPrompts = (params) => {
|
|
7
|
+
return (0, axios_instance_1.mutator)({ url: `/prompts`, method: 'GET', params });
|
|
8
|
+
};
|
|
9
|
+
const aIPromptControllerCreatePrompt = (createAIPrompt) => {
|
|
10
|
+
return (0, axios_instance_1.mutator)({
|
|
11
|
+
url: `/prompts`,
|
|
12
|
+
method: 'POST',
|
|
13
|
+
headers: { 'Content-Type': 'application/json' },
|
|
14
|
+
data: createAIPrompt,
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const aIPromptControllerDeletePrompt = (id) => {
|
|
18
|
+
return (0, axios_instance_1.mutator)({ url: `/prompts/${id}`, method: 'DELETE' });
|
|
19
|
+
};
|
|
20
|
+
const aIResponseControllerGetAllResponses = (params) => {
|
|
21
|
+
return (0, axios_instance_1.mutator)({ url: `/responses`, method: 'GET', params });
|
|
22
|
+
};
|
|
23
|
+
const aIResponseControllerCreateResponse = (createAIResponse) => {
|
|
24
|
+
return (0, axios_instance_1.mutator)({
|
|
25
|
+
url: `/responses`,
|
|
26
|
+
method: 'POST',
|
|
27
|
+
headers: { 'Content-Type': 'application/json' },
|
|
28
|
+
data: createAIResponse,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const aIResponseControllerGetLatestTenAIResponseByPrompt = (promptId) => {
|
|
32
|
+
return (0, axios_instance_1.mutator)({
|
|
33
|
+
url: `/responses/prompt/${promptId}/latest-ten`,
|
|
34
|
+
method: 'GET',
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* @summary Generate AI Prompt Response by share-link-ids
|
|
39
|
+
*/
|
|
40
|
+
const createShareLinkAIResponse = (createShareLinkAIResponse) => {
|
|
41
|
+
return (0, axios_instance_1.mutator)({
|
|
42
|
+
url: `/responses/share-link`,
|
|
43
|
+
method: 'POST',
|
|
44
|
+
headers: { 'Content-Type': 'application/json' },
|
|
45
|
+
data: createShareLinkAIResponse,
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const aIResponseControllerDeletePrompt = (id) => {
|
|
49
|
+
return (0, axios_instance_1.mutator)({ url: `/responses/${id}`, method: 'DELETE' });
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Apps that the user has access to (subscribed or not). If the user is the owner of the app, details will be returned with the private fields.
|
|
53
|
+
* @summary Get List of My Apps
|
|
54
|
+
*/
|
|
55
|
+
const getMyApps = () => {
|
|
56
|
+
return (0, axios_instance_1.mutator)({ url: `/apps`, method: 'GET' });
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* @summary Subscribe user into app
|
|
60
|
+
*/
|
|
61
|
+
const subscribeUserIntoApp = (clientId, subscribeUserPayload) => {
|
|
62
|
+
return (0, axios_instance_1.mutator)({
|
|
63
|
+
url: `/apps/${clientId}/subscribe`,
|
|
64
|
+
method: 'POST',
|
|
65
|
+
headers: { 'Content-Type': 'application/json' },
|
|
66
|
+
data: subscribeUserPayload,
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* @summary Unsubscribe user from app
|
|
71
|
+
*/
|
|
72
|
+
const unsubscribeUserFromApp = (clientId) => {
|
|
73
|
+
return (0, axios_instance_1.mutator)({
|
|
74
|
+
url: `/apps/${clientId}/unsubscribe`,
|
|
75
|
+
method: 'DELETE',
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
const languageControllerGetAll = () => {
|
|
79
|
+
return (0, axios_instance_1.mutator)({ url: `/languages/all`, method: 'GET' });
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* @summary Get last ten recent Messages including (Conversation, Creator, Labels)
|
|
83
|
+
*/
|
|
84
|
+
const getTenRecentMessagesResponse = (params) => {
|
|
85
|
+
return (0, axios_instance_1.mutator)({
|
|
86
|
+
url: `/simplified/messages/latest-ten`,
|
|
87
|
+
method: 'GET',
|
|
88
|
+
params,
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* @summary Get Message By ID
|
|
93
|
+
*/
|
|
94
|
+
const getMessageById = (id, params) => {
|
|
95
|
+
return (0, axios_instance_1.mutator)({
|
|
96
|
+
url: `/simplified/messages/${id}`,
|
|
97
|
+
method: 'GET',
|
|
98
|
+
params,
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* By default return messages created in last 5 days.
|
|
103
|
+
|
|
104
|
+
The **maximum** allowed range between dates is **31 days**.
|
|
105
|
+
* @summary List Messages
|
|
106
|
+
*/
|
|
107
|
+
const listMessages = (params) => {
|
|
108
|
+
return (0, axios_instance_1.mutator)({
|
|
109
|
+
url: `/simplified/messages`,
|
|
110
|
+
method: 'GET',
|
|
111
|
+
params,
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Max number of links is **100** per API call. If you want to add more, should make another api call.
|
|
116
|
+
* @summary Add Link Attachments to a message
|
|
117
|
+
*/
|
|
118
|
+
const addLinkAttachmentsToMessage = (id, addLinkAttachmentPayload) => {
|
|
119
|
+
return (0, axios_instance_1.mutator)({
|
|
120
|
+
url: `/simplified/messages/${id}/attachments/bulk/link`,
|
|
121
|
+
method: 'POST',
|
|
122
|
+
headers: { 'Content-Type': 'application/json' },
|
|
123
|
+
data: addLinkAttachmentPayload,
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* In order to create a Message, you must provide **transcript** or **link** attachments.
|
|
128
|
+
* @summary Send a Message to a Conversation
|
|
129
|
+
*/
|
|
130
|
+
const createConversationMessage = (id, createConversationMessage) => {
|
|
131
|
+
return (0, axios_instance_1.mutator)({
|
|
132
|
+
url: `/simplified/messages/conversation/${id}`,
|
|
133
|
+
method: 'POST',
|
|
134
|
+
headers: { 'Content-Type': 'application/json' },
|
|
135
|
+
data: createConversationMessage,
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* In order to create a Message, you must provide **transcript** or **link** attachments.
|
|
140
|
+
* @summary Send a Direct Message to a User or a Group of Users
|
|
141
|
+
*/
|
|
142
|
+
const sendDirectMessage = (sendDirectMessage) => {
|
|
143
|
+
return (0, axios_instance_1.mutator)({
|
|
144
|
+
url: `/simplified/messages/direct`,
|
|
145
|
+
method: 'POST',
|
|
146
|
+
headers: { 'Content-Type': 'application/json' },
|
|
147
|
+
data: sendDirectMessage,
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* In order to create a voicememo message, you must provide **transcript** or **link** attachments.
|
|
152
|
+
* @summary Create a Voicememo Message
|
|
153
|
+
*/
|
|
154
|
+
const createVoiceMemoMessage = (createVoicememoMessage) => {
|
|
155
|
+
return (0, axios_instance_1.mutator)({
|
|
156
|
+
url: `/simplified/messages/voicememo`,
|
|
157
|
+
method: 'POST',
|
|
158
|
+
headers: { 'Content-Type': 'application/json' },
|
|
159
|
+
data: createVoicememoMessage,
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* It's required to inform one of (**email**, **phone**)
|
|
164
|
+
* @summary Search user by email or phone
|
|
165
|
+
*/
|
|
166
|
+
const searchUser = (params) => {
|
|
167
|
+
return (0, axios_instance_1.mutator)({
|
|
168
|
+
url: `/simplified/users/search`,
|
|
169
|
+
method: 'GET',
|
|
170
|
+
params,
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* @summary Search users by their emails, phones or IDs
|
|
175
|
+
*/
|
|
176
|
+
const searchUsers = (searchUsersBody) => {
|
|
177
|
+
return (0, axios_instance_1.mutator)({
|
|
178
|
+
url: `/simplified/users/search`,
|
|
179
|
+
method: 'POST',
|
|
180
|
+
headers: { 'Content-Type': 'application/json' },
|
|
181
|
+
data: searchUsersBody,
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* @summary Get User By ID
|
|
186
|
+
*/
|
|
187
|
+
const getUserById = (id) => {
|
|
188
|
+
return (0, axios_instance_1.mutator)({ url: `/simplified/users/${id}`, method: 'GET' });
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* @summary Get all user conversations (Only _id and name available
|
|
192
|
+
*/
|
|
193
|
+
const getAllConversations = () => {
|
|
194
|
+
return (0, axios_instance_1.mutator)({
|
|
195
|
+
url: `/simplified/conversations/all`,
|
|
196
|
+
method: 'GET',
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* @summary Get a conversation by id
|
|
201
|
+
*/
|
|
202
|
+
const getConversationById = (id) => {
|
|
203
|
+
return (0, axios_instance_1.mutator)({
|
|
204
|
+
url: `/simplified/conversations/${id}`,
|
|
205
|
+
method: 'GET',
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* @summary Get Conversation Users
|
|
210
|
+
*/
|
|
211
|
+
const getConversationUsers = (id) => {
|
|
212
|
+
return (0, axios_instance_1.mutator)({
|
|
213
|
+
url: `/simplified/conversations/${id}/users`,
|
|
214
|
+
method: 'GET',
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* @summary Get all Workspaces that user has access to with basic info
|
|
219
|
+
*/
|
|
220
|
+
const getAllWorkspacesWithBasicInfo = () => {
|
|
221
|
+
return (0, axios_instance_1.mutator)({
|
|
222
|
+
url: `/simplified/workspaces/basic-info`,
|
|
223
|
+
method: 'GET',
|
|
224
|
+
});
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* @summary List of System AI Prompts
|
|
228
|
+
*/
|
|
229
|
+
const getSystemAIPrompts = () => {
|
|
230
|
+
return (0, axios_instance_1.mutator)({
|
|
231
|
+
url: `/simplified/public/system-prompts`,
|
|
232
|
+
method: 'GET',
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* @summary Get Sample AI Responses for a System AI Prompt
|
|
237
|
+
*/
|
|
238
|
+
const getAiSystemPromptResponse = (promptId) => {
|
|
239
|
+
return (0, axios_instance_1.mutator)({
|
|
240
|
+
url: `/simplified/public/responses/prompt/${promptId}/sample`,
|
|
241
|
+
method: 'GET',
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* @summary Get all root Folders
|
|
246
|
+
*/
|
|
247
|
+
const getAllRootFolders = (params) => {
|
|
248
|
+
return (0, axios_instance_1.mutator)({
|
|
249
|
+
url: `/simplified/folders`,
|
|
250
|
+
method: 'GET',
|
|
251
|
+
params,
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* @summary Create a new Folder
|
|
256
|
+
*/
|
|
257
|
+
const createFolder = (createFolderPayload) => {
|
|
258
|
+
return (0, axios_instance_1.mutator)({
|
|
259
|
+
url: `/simplified/folders`,
|
|
260
|
+
method: 'POST',
|
|
261
|
+
headers: { 'Content-Type': 'application/json' },
|
|
262
|
+
data: createFolderPayload,
|
|
263
|
+
});
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* @summary Get count of all folders, messages and message_ids not in folders grouped by workspace
|
|
267
|
+
*/
|
|
268
|
+
const getCountsGroupedByWorkspace = (params) => {
|
|
269
|
+
return (0, axios_instance_1.mutator)({
|
|
270
|
+
url: `/simplified/folders/count-by-workspace`,
|
|
271
|
+
method: 'GET',
|
|
272
|
+
params,
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* @summary Get Folder with Messages
|
|
277
|
+
*/
|
|
278
|
+
const getFolderMessages = (id) => {
|
|
279
|
+
return (0, axios_instance_1.mutator)({
|
|
280
|
+
url: `/simplified/folders/${id}/messages`,
|
|
281
|
+
method: 'GET',
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
/**
|
|
285
|
+
* @summary Get Folder by ID
|
|
286
|
+
*/
|
|
287
|
+
const getFolderById = (id, params) => {
|
|
288
|
+
return (0, axios_instance_1.mutator)({
|
|
289
|
+
url: `/simplified/folders/${id}`,
|
|
290
|
+
method: 'GET',
|
|
291
|
+
params,
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* @summary Update Folder Name
|
|
296
|
+
*/
|
|
297
|
+
const updateFolderName = (id, updateFolderNamePayload) => {
|
|
298
|
+
return (0, axios_instance_1.mutator)({
|
|
299
|
+
url: `/simplified/folders/${id}`,
|
|
300
|
+
method: 'PATCH',
|
|
301
|
+
headers: { 'Content-Type': 'application/json' },
|
|
302
|
+
data: updateFolderNamePayload,
|
|
303
|
+
});
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* @summary Delete Folder and all subfolders and messages in nested folders
|
|
307
|
+
*/
|
|
308
|
+
const deleteFolder = (id) => {
|
|
309
|
+
return (0, axios_instance_1.mutator)({
|
|
310
|
+
url: `/simplified/folders/${id}`,
|
|
311
|
+
method: 'DELETE',
|
|
312
|
+
});
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Only allowed to move messages of type: voicememo,prerecorded.
|
|
316
|
+
* @summary Move a message into specific Folder or into a Workspace
|
|
317
|
+
*/
|
|
318
|
+
const addMessageToFolderOrWorkspace = (addMessageToFolderPayload) => {
|
|
319
|
+
return (0, axios_instance_1.mutator)({
|
|
320
|
+
url: `/simplified/folders/message`,
|
|
321
|
+
method: 'PATCH',
|
|
322
|
+
headers: { 'Content-Type': 'application/json' },
|
|
323
|
+
data: addMessageToFolderPayload,
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* @summary Move a Folder into another Folder or into a Workspace
|
|
328
|
+
*/
|
|
329
|
+
const moveFolder = (id, moveFolderPayload) => {
|
|
330
|
+
return (0, axios_instance_1.mutator)({
|
|
331
|
+
url: `/simplified/folders/${id}/move`,
|
|
332
|
+
method: 'PATCH',
|
|
333
|
+
headers: { 'Content-Type': 'application/json' },
|
|
334
|
+
data: moveFolderPayload,
|
|
335
|
+
});
|
|
336
|
+
};
|
|
337
|
+
return {
|
|
338
|
+
aIPromptControllerGetPrompts,
|
|
339
|
+
aIPromptControllerCreatePrompt,
|
|
340
|
+
aIPromptControllerDeletePrompt,
|
|
341
|
+
aIResponseControllerGetAllResponses,
|
|
342
|
+
aIResponseControllerCreateResponse,
|
|
343
|
+
aIResponseControllerGetLatestTenAIResponseByPrompt,
|
|
344
|
+
createShareLinkAIResponse,
|
|
345
|
+
aIResponseControllerDeletePrompt,
|
|
346
|
+
getMyApps,
|
|
347
|
+
subscribeUserIntoApp,
|
|
348
|
+
unsubscribeUserFromApp,
|
|
349
|
+
languageControllerGetAll,
|
|
350
|
+
getTenRecentMessagesResponse,
|
|
351
|
+
getMessageById,
|
|
352
|
+
listMessages,
|
|
353
|
+
addLinkAttachmentsToMessage,
|
|
354
|
+
createConversationMessage,
|
|
355
|
+
sendDirectMessage,
|
|
356
|
+
createVoiceMemoMessage,
|
|
357
|
+
searchUser,
|
|
358
|
+
searchUsers,
|
|
359
|
+
getUserById,
|
|
360
|
+
getAllConversations,
|
|
361
|
+
getConversationById,
|
|
362
|
+
getConversationUsers,
|
|
363
|
+
getAllWorkspacesWithBasicInfo,
|
|
364
|
+
getSystemAIPrompts,
|
|
365
|
+
getAiSystemPromptResponse,
|
|
366
|
+
getAllRootFolders,
|
|
367
|
+
createFolder,
|
|
368
|
+
getCountsGroupedByWorkspace,
|
|
369
|
+
getFolderMessages,
|
|
370
|
+
getFolderById,
|
|
371
|
+
updateFolderName,
|
|
372
|
+
deleteFolder,
|
|
373
|
+
addMessageToFolderOrWorkspace,
|
|
374
|
+
moveFolder,
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
exports.getCarbonVoiceSimplifiedAPI = getCarbonVoiceSimplifiedAPI;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./carbon-voice-api"), exports);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Generated by orval v7.9.0 🍺
|
|
4
|
+
* Do not edit manually.
|
|
5
|
+
* Carbon Voice Simplified API
|
|
6
|
+
* # Introduction
|
|
7
|
+
|
|
8
|
+
The simplified version of the Carbon Voice API is designed to enhance usability for third-party clients looking to
|
|
9
|
+
seamlessly integrate with our application. By streamlining authentication methods, providing clear error handling guidelines,
|
|
10
|
+
and implementing straightforward rate limiting policies, we ensure that developers can quickly and efficiently connect to our services.
|
|
11
|
+
This user-friendly approach minimizes complexity, making it easier for external applications to leverage the powerful communication
|
|
12
|
+
features of Carbon Voice without extensive technical overhead.
|
|
13
|
+
|
|
14
|
+
This API is designed for people who feel comfortable integrating with RESTful APIs.
|
|
15
|
+
|
|
16
|
+
## Full API Version
|
|
17
|
+
We also have a full version of the API. You can find it [here](/docs).
|
|
18
|
+
|
|
19
|
+
## Terminology
|
|
20
|
+
|
|
21
|
+
* **Workspace**: An area that groups together people and Conversations.
|
|
22
|
+
* **Conversation**: A channel of communication. A grouping of people and messages related to a given topic.
|
|
23
|
+
* **Collaborators**: A group of people who are part of a Conversation.
|
|
24
|
+
* **Discussion**: Any post into a conversation
|
|
25
|
+
* **CarbonLink**: A link (on a website, QR code, or phone call) to start a conversation.
|
|
26
|
+
|
|
27
|
+
## BaseURL
|
|
28
|
+
|
|
29
|
+
This API is served over HTTPS.
|
|
30
|
+
|
|
31
|
+
All URLs referenced in the documentation have the following base: https://api.carbonvoice.app/api/simplified.
|
|
32
|
+
|
|
33
|
+
## Authentication
|
|
34
|
+
|
|
35
|
+
There are three ways to authenticate with this API:
|
|
36
|
+
|
|
37
|
+
* with an OAuth2 Access Token in the Authorization request header field
|
|
38
|
+
(which uses the Bearer authentication scheme to transmit the Access Token)
|
|
39
|
+
* with your Client ID and Client Secret credentials
|
|
40
|
+
* with a PXToken
|
|
41
|
+
|
|
42
|
+
Each endpoint supports only one option.
|
|
43
|
+
|
|
44
|
+
<SecurityDefinitions />
|
|
45
|
+
|
|
46
|
+
## Errors
|
|
47
|
+
|
|
48
|
+
When an error occurs, you will receive an error object. Most of these error objects
|
|
49
|
+
contain an error code and an error description so that your applications can more
|
|
50
|
+
efficiently identify the problem.
|
|
51
|
+
|
|
52
|
+
If you get an 4xx HTTP response code, then you can assume that there is a bad request
|
|
53
|
+
from your end. In this case, check the [Error Responses section](#section/Introduction/Error-Responses) for more context.
|
|
54
|
+
|
|
55
|
+
5xx errors suggest a problem on our end, so in this case, check [Carbon Voice's Status](https://status.carbonvoice.app)
|
|
56
|
+
to see how our systems are doing.
|
|
57
|
+
|
|
58
|
+
In any other case you can use our support options.
|
|
59
|
+
|
|
60
|
+
## Error Responses
|
|
61
|
+
|
|
62
|
+
`{ "success": false, requestId: "uuid", errmsg: "error message"`
|
|
63
|
+
|
|
64
|
+
## Rate-Limiting
|
|
65
|
+
|
|
66
|
+
This API is subject to rate limiting. The limits differ per endpoint.
|
|
67
|
+
|
|
68
|
+
If you exceed the provided rate limit for a given endpoint, you will receive the 429
|
|
69
|
+
Too Many Requests response with the following message: Too many requests. Check the
|
|
70
|
+
X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
|
|
71
|
+
|
|
72
|
+
For details on rate limiting, refer to Rate Limit Policy.
|
|
73
|
+
|
|
74
|
+
## Support
|
|
75
|
+
|
|
76
|
+
If you have problems or need help with your case, you can always reach out to our Support.
|
|
77
|
+
|
|
78
|
+
* OpenAPI spec version: 1.0.0
|
|
79
|
+
*/
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.AIPromptControllerGetPromptsOwnerType = void 0;
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
83
|
+
exports.AIPromptControllerGetPromptsOwnerType = {
|
|
84
|
+
user: 'user',
|
|
85
|
+
workspace: 'workspace',
|
|
86
|
+
system: 'system',
|
|
87
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Generated by orval v7.9.0 🍺
|
|
4
|
+
* Do not edit manually.
|
|
5
|
+
* Carbon Voice Simplified API
|
|
6
|
+
* # Introduction
|
|
7
|
+
|
|
8
|
+
The simplified version of the Carbon Voice API is designed to enhance usability for third-party clients looking to
|
|
9
|
+
seamlessly integrate with our application. By streamlining authentication methods, providing clear error handling guidelines,
|
|
10
|
+
and implementing straightforward rate limiting policies, we ensure that developers can quickly and efficiently connect to our services.
|
|
11
|
+
This user-friendly approach minimizes complexity, making it easier for external applications to leverage the powerful communication
|
|
12
|
+
features of Carbon Voice without extensive technical overhead.
|
|
13
|
+
|
|
14
|
+
This API is designed for people who feel comfortable integrating with RESTful APIs.
|
|
15
|
+
|
|
16
|
+
## Full API Version
|
|
17
|
+
We also have a full version of the API. You can find it [here](/docs).
|
|
18
|
+
|
|
19
|
+
## Terminology
|
|
20
|
+
|
|
21
|
+
* **Workspace**: An area that groups together people and Conversations.
|
|
22
|
+
* **Conversation**: A channel of communication. A grouping of people and messages related to a given topic.
|
|
23
|
+
* **Collaborators**: A group of people who are part of a Conversation.
|
|
24
|
+
* **Discussion**: Any post into a conversation
|
|
25
|
+
* **CarbonLink**: A link (on a website, QR code, or phone call) to start a conversation.
|
|
26
|
+
|
|
27
|
+
## BaseURL
|
|
28
|
+
|
|
29
|
+
This API is served over HTTPS.
|
|
30
|
+
|
|
31
|
+
All URLs referenced in the documentation have the following base: https://api.carbonvoice.app/api/simplified.
|
|
32
|
+
|
|
33
|
+
## Authentication
|
|
34
|
+
|
|
35
|
+
There are three ways to authenticate with this API:
|
|
36
|
+
|
|
37
|
+
* with an OAuth2 Access Token in the Authorization request header field
|
|
38
|
+
(which uses the Bearer authentication scheme to transmit the Access Token)
|
|
39
|
+
* with your Client ID and Client Secret credentials
|
|
40
|
+
* with a PXToken
|
|
41
|
+
|
|
42
|
+
Each endpoint supports only one option.
|
|
43
|
+
|
|
44
|
+
<SecurityDefinitions />
|
|
45
|
+
|
|
46
|
+
## Errors
|
|
47
|
+
|
|
48
|
+
When an error occurs, you will receive an error object. Most of these error objects
|
|
49
|
+
contain an error code and an error description so that your applications can more
|
|
50
|
+
efficiently identify the problem.
|
|
51
|
+
|
|
52
|
+
If you get an 4xx HTTP response code, then you can assume that there is a bad request
|
|
53
|
+
from your end. In this case, check the [Error Responses section](#section/Introduction/Error-Responses) for more context.
|
|
54
|
+
|
|
55
|
+
5xx errors suggest a problem on our end, so in this case, check [Carbon Voice's Status](https://status.carbonvoice.app)
|
|
56
|
+
to see how our systems are doing.
|
|
57
|
+
|
|
58
|
+
In any other case you can use our support options.
|
|
59
|
+
|
|
60
|
+
## Error Responses
|
|
61
|
+
|
|
62
|
+
`{ "success": false, requestId: "uuid", errmsg: "error message"`
|
|
63
|
+
|
|
64
|
+
## Rate-Limiting
|
|
65
|
+
|
|
66
|
+
This API is subject to rate limiting. The limits differ per endpoint.
|
|
67
|
+
|
|
68
|
+
If you exceed the provided rate limit for a given endpoint, you will receive the 429
|
|
69
|
+
Too Many Requests response with the following message: Too many requests. Check the
|
|
70
|
+
X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
|
|
71
|
+
|
|
72
|
+
For details on rate limiting, refer to Rate Limit Policy.
|
|
73
|
+
|
|
74
|
+
## Support
|
|
75
|
+
|
|
76
|
+
If you have problems or need help with your case, you can always reach out to our Support.
|
|
77
|
+
|
|
78
|
+
* OpenAPI spec version: 1.0.0
|
|
79
|
+
*/
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.AIPromptOwnerType = void 0;
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
83
|
+
exports.AIPromptOwnerType = {
|
|
84
|
+
user: 'user',
|
|
85
|
+
workspace: 'workspace',
|
|
86
|
+
system: 'system',
|
|
87
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Generated by orval v7.9.0 🍺
|
|
4
|
+
* Do not edit manually.
|
|
5
|
+
* Carbon Voice Simplified API
|
|
6
|
+
* # Introduction
|
|
7
|
+
|
|
8
|
+
The simplified version of the Carbon Voice API is designed to enhance usability for third-party clients looking to
|
|
9
|
+
seamlessly integrate with our application. By streamlining authentication methods, providing clear error handling guidelines,
|
|
10
|
+
and implementing straightforward rate limiting policies, we ensure that developers can quickly and efficiently connect to our services.
|
|
11
|
+
This user-friendly approach minimizes complexity, making it easier for external applications to leverage the powerful communication
|
|
12
|
+
features of Carbon Voice without extensive technical overhead.
|
|
13
|
+
|
|
14
|
+
This API is designed for people who feel comfortable integrating with RESTful APIs.
|
|
15
|
+
|
|
16
|
+
## Full API Version
|
|
17
|
+
We also have a full version of the API. You can find it [here](/docs).
|
|
18
|
+
|
|
19
|
+
## Terminology
|
|
20
|
+
|
|
21
|
+
* **Workspace**: An area that groups together people and Conversations.
|
|
22
|
+
* **Conversation**: A channel of communication. A grouping of people and messages related to a given topic.
|
|
23
|
+
* **Collaborators**: A group of people who are part of a Conversation.
|
|
24
|
+
* **Discussion**: Any post into a conversation
|
|
25
|
+
* **CarbonLink**: A link (on a website, QR code, or phone call) to start a conversation.
|
|
26
|
+
|
|
27
|
+
## BaseURL
|
|
28
|
+
|
|
29
|
+
This API is served over HTTPS.
|
|
30
|
+
|
|
31
|
+
All URLs referenced in the documentation have the following base: https://api.carbonvoice.app/api/simplified.
|
|
32
|
+
|
|
33
|
+
## Authentication
|
|
34
|
+
|
|
35
|
+
There are three ways to authenticate with this API:
|
|
36
|
+
|
|
37
|
+
* with an OAuth2 Access Token in the Authorization request header field
|
|
38
|
+
(which uses the Bearer authentication scheme to transmit the Access Token)
|
|
39
|
+
* with your Client ID and Client Secret credentials
|
|
40
|
+
* with a PXToken
|
|
41
|
+
|
|
42
|
+
Each endpoint supports only one option.
|
|
43
|
+
|
|
44
|
+
<SecurityDefinitions />
|
|
45
|
+
|
|
46
|
+
## Errors
|
|
47
|
+
|
|
48
|
+
When an error occurs, you will receive an error object. Most of these error objects
|
|
49
|
+
contain an error code and an error description so that your applications can more
|
|
50
|
+
efficiently identify the problem.
|
|
51
|
+
|
|
52
|
+
If you get an 4xx HTTP response code, then you can assume that there is a bad request
|
|
53
|
+
from your end. In this case, check the [Error Responses section](#section/Introduction/Error-Responses) for more context.
|
|
54
|
+
|
|
55
|
+
5xx errors suggest a problem on our end, so in this case, check [Carbon Voice's Status](https://status.carbonvoice.app)
|
|
56
|
+
to see how our systems are doing.
|
|
57
|
+
|
|
58
|
+
In any other case you can use our support options.
|
|
59
|
+
|
|
60
|
+
## Error Responses
|
|
61
|
+
|
|
62
|
+
`{ "success": false, requestId: "uuid", errmsg: "error message"`
|
|
63
|
+
|
|
64
|
+
## Rate-Limiting
|
|
65
|
+
|
|
66
|
+
This API is subject to rate limiting. The limits differ per endpoint.
|
|
67
|
+
|
|
68
|
+
If you exceed the provided rate limit for a given endpoint, you will receive the 429
|
|
69
|
+
Too Many Requests response with the following message: Too many requests. Check the
|
|
70
|
+
X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
|
|
71
|
+
|
|
72
|
+
For details on rate limiting, refer to Rate Limit Policy.
|
|
73
|
+
|
|
74
|
+
## Support
|
|
75
|
+
|
|
76
|
+
If you have problems or need help with your case, you can always reach out to our Support.
|
|
77
|
+
|
|
78
|
+
* OpenAPI spec version: 1.0.0
|
|
79
|
+
*/
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.AIPromptResponseFormat = void 0;
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
83
|
+
exports.AIPromptResponseFormat = {
|
|
84
|
+
text: 'text',
|
|
85
|
+
json: 'json',
|
|
86
|
+
};
|