@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,1416 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createConversationMessageBody = exports.createConversationMessageBodyFromMessageTypeDefault = exports.createConversationMessageParams = exports.addLinkAttachmentsToMessageBody = exports.addLinkAttachmentsToMessageParams = exports.listMessagesResponse = exports.listMessagesResponseResultsItemLanguageDefault = exports.listMessagesResponseSortDirectionDefault = exports.listMessagesResponseSizeMax = exports.listMessagesResponseSizeDefault = exports.listMessagesResponsePageDefault = exports.listMessagesQueryParams = exports.listMessagesQuerySortDirectionDefault = exports.listMessagesQuerySizeMax = exports.listMessagesQuerySizeDefault = exports.listMessagesQueryPageDefault = exports.getMessageByIdResponse = exports.getMessageByIdResponseMessageLanguageDefault = exports.getMessageByIdQueryParams = exports.getMessageByIdParams = exports.getTenRecentMessagesResponseResponse = exports.getTenRecentMessagesResponseResponseResultsItemMessageLanguageDefault = exports.getTenRecentMessagesResponseQueryParams = exports.languageControllerGetAllResponse = exports.languageControllerGetAllResponseItem = exports.unsubscribeUserFromAppParams = exports.subscribeUserIntoAppResponse = exports.subscribeUserIntoAppResponseSubscriptionFiltersItemOperatorDefault = exports.subscribeUserIntoAppBody = exports.subscribeUserIntoAppBodySubscriptionFiltersItemOperatorDefault = exports.subscribeUserIntoAppParams = exports.getMyAppsResponse = exports.getMyAppsResponseItem = exports.aIResponseControllerDeletePromptParams = exports.createShareLinkAIResponseBody = exports.aIResponseControllerGetLatestTenAIResponseByPromptResponse = exports.aIResponseControllerGetLatestTenAIResponseByPromptResponseResultsItemMessagesItemMessageLanguageDefault = exports.aIResponseControllerGetLatestTenAIResponseByPromptParams = exports.aIResponseControllerCreateResponseBody = exports.aIResponseControllerGetAllResponsesResponse = exports.aIResponseControllerGetAllResponsesResponseItem = exports.aIResponseControllerGetAllResponsesQueryParams = exports.aIResponseControllerGetAllResponsesQueryLimitDefault = exports.aIPromptControllerDeletePromptParams = exports.aIPromptControllerCreatePromptBody = exports.aIPromptControllerGetPromptsResponse = exports.aIPromptControllerGetPromptsResponseItem = exports.aIPromptControllerGetPromptsResponseDescriptionMax = exports.aIPromptControllerGetPromptsResponseNameMax = exports.aIPromptControllerGetPromptsQueryParams = void 0;
|
|
4
|
+
exports.getFolderMessagesResponseFolderSubfoldersItemTotalNestedMessagesCountDefault = exports.getFolderMessagesResponseFolderSubfoldersItemTotalNestedFoldersCountDefault = exports.getFolderMessagesResponseFolderTotalNestedMessagesCountDefault = exports.getFolderMessagesResponseFolderTotalNestedFoldersCountDefault = exports.getFolderMessagesParams = exports.getCountsGroupedByWorkspaceResponse = exports.getCountsGroupedByWorkspaceResponseItem = exports.getCountsGroupedByWorkspaceResponseRootFoldersItemSubfoldersItemTotalNestedMessagesCountDefault = exports.getCountsGroupedByWorkspaceResponseRootFoldersItemSubfoldersItemTotalNestedFoldersCountDefault = exports.getCountsGroupedByWorkspaceResponseRootFoldersItemTotalNestedMessagesCountDefault = exports.getCountsGroupedByWorkspaceResponseRootFoldersItemTotalNestedFoldersCountDefault = exports.getCountsGroupedByWorkspaceQueryParams = exports.createFolderResponse = exports.createFolderResponseSubfoldersItemTotalNestedMessagesCountDefault = exports.createFolderResponseSubfoldersItemTotalNestedFoldersCountDefault = exports.createFolderResponseTotalNestedMessagesCountDefault = exports.createFolderResponseTotalNestedFoldersCountDefault = exports.createFolderBody = exports.getAllRootFoldersResponse = exports.getAllRootFoldersResponseResultsItemSubfoldersItemTotalNestedMessagesCountDefault = exports.getAllRootFoldersResponseResultsItemSubfoldersItemTotalNestedFoldersCountDefault = exports.getAllRootFoldersResponseResultsItemTotalNestedMessagesCountDefault = exports.getAllRootFoldersResponseResultsItemTotalNestedFoldersCountDefault = exports.getAllRootFoldersResponseSortByDefault = exports.getAllRootFoldersResponseSortDirectionDefault = exports.getAllRootFoldersResponseIncludeAllTreeDefault = exports.getAllRootFoldersQueryParams = exports.getAllRootFoldersQuerySortByDefault = exports.getAllRootFoldersQuerySortDirectionDefault = exports.getAllRootFoldersQueryIncludeAllTreeDefault = exports.getAiSystemPromptResponseParams = exports.getAllWorkspacesWithBasicInfoResponse = exports.getAllWorkspacesWithBasicInfoResponseItem = exports.getConversationUsersResponse = exports.getConversationUsersResponseItem = exports.getConversationUsersParams = exports.getConversationByIdResponse = exports.getConversationByIdParams = exports.getAllConversationsResponse = exports.getUserByIdResponse = exports.getUserByIdParams = exports.searchUsersResponse = exports.searchUsersResponseItem = exports.searchUsersBody = exports.searchUserResponse = exports.searchUserQueryParams = exports.createVoiceMemoMessageBody = exports.sendDirectMessageBody = exports.sendDirectMessageBodyFromMessageTypeDefault = exports.sendDirectMessageBodyWorkspaceIdDefault = void 0;
|
|
5
|
+
exports.moveFolderResponse = exports.moveFolderResponseSubfoldersItemTotalNestedMessagesCountDefault = exports.moveFolderResponseSubfoldersItemTotalNestedFoldersCountDefault = exports.moveFolderResponseTotalNestedMessagesCountDefault = exports.moveFolderResponseTotalNestedFoldersCountDefault = exports.moveFolderBody = exports.moveFolderParams = exports.addMessageToFolderOrWorkspaceResponse = exports.addMessageToFolderOrWorkspaceResponseSocketDisconnectsWhileStreamingDefault = exports.addMessageToFolderOrWorkspaceBody = exports.deleteFolderParams = exports.updateFolderNameResponse = exports.updateFolderNameResponseSubfoldersItemTotalNestedMessagesCountDefault = exports.updateFolderNameResponseSubfoldersItemTotalNestedFoldersCountDefault = exports.updateFolderNameResponseTotalNestedMessagesCountDefault = exports.updateFolderNameResponseTotalNestedFoldersCountDefault = exports.updateFolderNameBody = exports.updateFolderNameParams = exports.getFolderByIdResponse = exports.getFolderByIdResponseSubfoldersItemTotalNestedMessagesCountDefault = exports.getFolderByIdResponseSubfoldersItemTotalNestedFoldersCountDefault = exports.getFolderByIdResponseTotalNestedMessagesCountDefault = exports.getFolderByIdResponseTotalNestedFoldersCountDefault = exports.getFolderByIdQueryParams = exports.getFolderByIdQueryDirectionDefault = exports.getFolderByIdQueryIncludeFirstLevelTreeDefault = exports.getFolderByIdParams = exports.getFolderMessagesResponse = exports.getFolderMessagesResponseMessagesItemSocketDisconnectsWhileStreamingDefault = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Generated by orval v7.9.0 🍺
|
|
8
|
+
* Do not edit manually.
|
|
9
|
+
* Carbon Voice Simplified API
|
|
10
|
+
* # Introduction
|
|
11
|
+
|
|
12
|
+
The simplified version of the Carbon Voice API is designed to enhance usability for third-party clients looking to
|
|
13
|
+
seamlessly integrate with our application. By streamlining authentication methods, providing clear error handling guidelines,
|
|
14
|
+
and implementing straightforward rate limiting policies, we ensure that developers can quickly and efficiently connect to our services.
|
|
15
|
+
This user-friendly approach minimizes complexity, making it easier for external applications to leverage the powerful communication
|
|
16
|
+
features of Carbon Voice without extensive technical overhead.
|
|
17
|
+
|
|
18
|
+
This API is designed for people who feel comfortable integrating with RESTful APIs.
|
|
19
|
+
|
|
20
|
+
## Full API Version
|
|
21
|
+
We also have a full version of the API. You can find it [here](/docs).
|
|
22
|
+
|
|
23
|
+
## Terminology
|
|
24
|
+
|
|
25
|
+
* **Workspace**: An area that groups together people and Conversations.
|
|
26
|
+
* **Conversation**: A channel of communication. A grouping of people and messages related to a given topic.
|
|
27
|
+
* **Collaborators**: A group of people who are part of a Conversation.
|
|
28
|
+
* **Discussion**: Any post into a conversation
|
|
29
|
+
* **CarbonLink**: A link (on a website, QR code, or phone call) to start a conversation.
|
|
30
|
+
|
|
31
|
+
## BaseURL
|
|
32
|
+
|
|
33
|
+
This API is served over HTTPS.
|
|
34
|
+
|
|
35
|
+
All URLs referenced in the documentation have the following base: https://api.carbonvoice.app/api/simplified.
|
|
36
|
+
|
|
37
|
+
## Authentication
|
|
38
|
+
|
|
39
|
+
There are three ways to authenticate with this API:
|
|
40
|
+
|
|
41
|
+
* with an OAuth2 Access Token in the Authorization request header field
|
|
42
|
+
(which uses the Bearer authentication scheme to transmit the Access Token)
|
|
43
|
+
* with your Client ID and Client Secret credentials
|
|
44
|
+
* with a PXToken
|
|
45
|
+
|
|
46
|
+
Each endpoint supports only one option.
|
|
47
|
+
|
|
48
|
+
<SecurityDefinitions />
|
|
49
|
+
|
|
50
|
+
## Errors
|
|
51
|
+
|
|
52
|
+
When an error occurs, you will receive an error object. Most of these error objects
|
|
53
|
+
contain an error code and an error description so that your applications can more
|
|
54
|
+
efficiently identify the problem.
|
|
55
|
+
|
|
56
|
+
If you get an 4xx HTTP response code, then you can assume that there is a bad request
|
|
57
|
+
from your end. In this case, check the [Error Responses section](#section/Introduction/Error-Responses) for more context.
|
|
58
|
+
|
|
59
|
+
5xx errors suggest a problem on our end, so in this case, check [Carbon Voice's Status](https://status.carbonvoice.app)
|
|
60
|
+
to see how our systems are doing.
|
|
61
|
+
|
|
62
|
+
In any other case you can use our support options.
|
|
63
|
+
|
|
64
|
+
## Error Responses
|
|
65
|
+
|
|
66
|
+
`{ "success": false, requestId: "uuid", errmsg: "error message"`
|
|
67
|
+
|
|
68
|
+
## Rate-Limiting
|
|
69
|
+
|
|
70
|
+
This API is subject to rate limiting. The limits differ per endpoint.
|
|
71
|
+
|
|
72
|
+
If you exceed the provided rate limit for a given endpoint, you will receive the 429
|
|
73
|
+
Too Many Requests response with the following message: Too many requests. Check the
|
|
74
|
+
X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
|
|
75
|
+
|
|
76
|
+
For details on rate limiting, refer to Rate Limit Policy.
|
|
77
|
+
|
|
78
|
+
## Support
|
|
79
|
+
|
|
80
|
+
If you have problems or need help with your case, you can always reach out to our Support.
|
|
81
|
+
|
|
82
|
+
* OpenAPI spec version: 1.0.0
|
|
83
|
+
*/
|
|
84
|
+
const zod_1 = require("zod");
|
|
85
|
+
exports.aIPromptControllerGetPromptsQueryParams = zod_1.z.object({
|
|
86
|
+
"owner_type": zod_1.z.enum(['user', 'workspace', 'system']).optional(),
|
|
87
|
+
"workspace_id": zod_1.z.string().optional()
|
|
88
|
+
});
|
|
89
|
+
exports.aIPromptControllerGetPromptsResponseNameMax = 100;
|
|
90
|
+
exports.aIPromptControllerGetPromptsResponseDescriptionMax = 500;
|
|
91
|
+
exports.aIPromptControllerGetPromptsResponseItem = zod_1.z.object({
|
|
92
|
+
"id": zod_1.z.string(),
|
|
93
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
94
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
95
|
+
"creator_id": zod_1.z.string(),
|
|
96
|
+
"workspace_id": zod_1.z.string().optional(),
|
|
97
|
+
"prompt": zod_1.z.string(),
|
|
98
|
+
"name": zod_1.z.string().max(exports.aIPromptControllerGetPromptsResponseNameMax),
|
|
99
|
+
"description": zod_1.z.string().max(exports.aIPromptControllerGetPromptsResponseDescriptionMax).optional(),
|
|
100
|
+
"format_instructions": zod_1.z.string().optional(),
|
|
101
|
+
"response_format": zod_1.z.enum(['text', 'json']).optional(),
|
|
102
|
+
"owner_type": zod_1.z.enum(['user', 'workspace', 'system']),
|
|
103
|
+
"category_number": zod_1.z.number().optional(),
|
|
104
|
+
"order_in_category": zod_1.z.number().optional()
|
|
105
|
+
});
|
|
106
|
+
exports.aIPromptControllerGetPromptsResponse = zod_1.z.array(exports.aIPromptControllerGetPromptsResponseItem);
|
|
107
|
+
exports.aIPromptControllerCreatePromptBody = zod_1.z.object({
|
|
108
|
+
"workspace_id": zod_1.z.string().optional(),
|
|
109
|
+
"prompt": zod_1.z.string(),
|
|
110
|
+
"name": zod_1.z.string(),
|
|
111
|
+
"description": zod_1.z.string().optional(),
|
|
112
|
+
"format_instructions": zod_1.z.string().optional(),
|
|
113
|
+
"response_format": zod_1.z.enum(['text', 'json']),
|
|
114
|
+
"owner_type": zod_1.z.enum(['user', 'workspace', 'system'])
|
|
115
|
+
});
|
|
116
|
+
exports.aIPromptControllerDeletePromptParams = zod_1.z.object({
|
|
117
|
+
"id": zod_1.z.string()
|
|
118
|
+
});
|
|
119
|
+
exports.aIResponseControllerGetAllResponsesQueryLimitDefault = 50;
|
|
120
|
+
exports.aIResponseControllerGetAllResponsesQueryParams = zod_1.z.object({
|
|
121
|
+
"message_id": zod_1.z.string().optional(),
|
|
122
|
+
"prompt_id": zod_1.z.string().optional(),
|
|
123
|
+
"channel_id": zod_1.z.string().optional(),
|
|
124
|
+
"limit": zod_1.z.number().default(exports.aIResponseControllerGetAllResponsesQueryLimitDefault),
|
|
125
|
+
"direction": zod_1.z.enum(['older', 'newer']).optional(),
|
|
126
|
+
"date": zod_1.z.string().datetime({}).optional()
|
|
127
|
+
});
|
|
128
|
+
exports.aIResponseControllerGetAllResponsesResponseItem = zod_1.z.object({
|
|
129
|
+
"id": zod_1.z.string(),
|
|
130
|
+
"creator_id": zod_1.z.string(),
|
|
131
|
+
"prompt_id": zod_1.z.string(),
|
|
132
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
133
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
134
|
+
"responses": zod_1.z.array(zod_1.z.object({
|
|
135
|
+
"language": zod_1.z.string().describe('Language'),
|
|
136
|
+
"json": zod_1.z.record(zod_1.z.string(), zod_1.z.string().or(zod_1.z.number()).or(zod_1.z.boolean()).or(zod_1.z.object({})).or(zod_1.z.array(zod_1.z.string()))).optional().describe('Json format'),
|
|
137
|
+
"text": zod_1.z.string().optional().describe('Text format'),
|
|
138
|
+
"html": zod_1.z.string().optional().describe('Html format'),
|
|
139
|
+
"markdown": zod_1.z.string().optional().describe('Markdown format')
|
|
140
|
+
})).describe('Responses by language'),
|
|
141
|
+
"message_ids": zod_1.z.array(zod_1.z.string()),
|
|
142
|
+
"workspace_id": zod_1.z.string().optional(),
|
|
143
|
+
"channel_id": zod_1.z.string().optional()
|
|
144
|
+
});
|
|
145
|
+
exports.aIResponseControllerGetAllResponsesResponse = zod_1.z.array(exports.aIResponseControllerGetAllResponsesResponseItem);
|
|
146
|
+
exports.aIResponseControllerCreateResponseBody = zod_1.z.object({
|
|
147
|
+
"prompt_id": zod_1.z.string(),
|
|
148
|
+
"message_ids": zod_1.z.array(zod_1.z.string()),
|
|
149
|
+
"channel_id": zod_1.z.string().optional(),
|
|
150
|
+
"workspace_id": zod_1.z.string().optional(),
|
|
151
|
+
"language": zod_1.z.string().optional().describe('The language of the response. Defaults to original message.')
|
|
152
|
+
});
|
|
153
|
+
exports.aIResponseControllerGetLatestTenAIResponseByPromptParams = zod_1.z.object({
|
|
154
|
+
"prompt_id": zod_1.z.string()
|
|
155
|
+
});
|
|
156
|
+
exports.aIResponseControllerGetLatestTenAIResponseByPromptResponseResultsItemMessagesItemMessageLanguageDefault = "english";
|
|
157
|
+
exports.aIResponseControllerGetLatestTenAIResponseByPromptResponse = zod_1.z.object({
|
|
158
|
+
"results": zod_1.z.array(zod_1.z.object({
|
|
159
|
+
"ai_response": zod_1.z.object({
|
|
160
|
+
"id": zod_1.z.string(),
|
|
161
|
+
"prompt_id": zod_1.z.string(),
|
|
162
|
+
"creator_id": zod_1.z.string(),
|
|
163
|
+
"responses": zod_1.z.array(zod_1.z.object({
|
|
164
|
+
"language": zod_1.z.string().describe('Language'),
|
|
165
|
+
"json": zod_1.z.record(zod_1.z.string(), zod_1.z.string().or(zod_1.z.number()).or(zod_1.z.boolean()).or(zod_1.z.object({})).or(zod_1.z.array(zod_1.z.string()))).optional().describe('Json format'),
|
|
166
|
+
"text": zod_1.z.string().optional().describe('Text format'),
|
|
167
|
+
"html": zod_1.z.string().optional().describe('Html format'),
|
|
168
|
+
"markdown": zod_1.z.string().optional().describe('Markdown format')
|
|
169
|
+
})),
|
|
170
|
+
"message_ids": zod_1.z.array(zod_1.z.string()),
|
|
171
|
+
"workspace_id": zod_1.z.string().optional(),
|
|
172
|
+
"channel_id": zod_1.z.string().optional(),
|
|
173
|
+
"user_id": zod_1.z.string(),
|
|
174
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
175
|
+
"created_at": zod_1.z.string().datetime({})
|
|
176
|
+
}),
|
|
177
|
+
"messages": zod_1.z.array(zod_1.z.object({
|
|
178
|
+
"message": zod_1.z.object({
|
|
179
|
+
"id": zod_1.z.string().describe('ID'),
|
|
180
|
+
"name": zod_1.z.string().optional().describe('Name'),
|
|
181
|
+
"link": zod_1.z.string().describe('Link to Message'),
|
|
182
|
+
"creator_id": zod_1.z.string().describe('Creator ID'),
|
|
183
|
+
"conversation_id": zod_1.z.string().optional().describe('Conversation ID'),
|
|
184
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
185
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
186
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
187
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
188
|
+
"duration_ms": zod_1.z.number().describe('The length of the message in milliseconds'),
|
|
189
|
+
"audio_url": zod_1.z.string().optional().describe('The URL for the message audio file'),
|
|
190
|
+
"audio_stream_url": zod_1.z.string().optional().describe('The URL for the message audio stream'),
|
|
191
|
+
"transcript": zod_1.z.string().optional().describe('Transcript of the message'),
|
|
192
|
+
"ai_summary": zod_1.z.string().optional().describe('AI Summary generated of the message'),
|
|
193
|
+
"waveform_url": zod_1.z.string().optional().describe('The URL for the message waveform image'),
|
|
194
|
+
"reply_count": zod_1.z.number().describe('The number of replies to the message'),
|
|
195
|
+
"parent_message_id": zod_1.z.string().optional().describe('Parent Message unique ID (only available for replies)'),
|
|
196
|
+
"language": zod_1.z.string().default(exports.aIResponseControllerGetLatestTenAIResponseByPromptResponseResultsItemMessagesItemMessageLanguageDefault).describe('Language for the message (Transcript, AI summary, Audio...)'),
|
|
197
|
+
"status": zod_1.z.enum(['offline', 'paused', 'processing', 'scheduled', 'active', 'deleted', 'account-deleted', 'initializing', 'inprogress', 'canceled', 'failed']).describe('Current status of the Message'),
|
|
198
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).describe('Type of the Message'),
|
|
199
|
+
"attachments": zod_1.z.array(zod_1.z.object({
|
|
200
|
+
"id": zod_1.z.string(),
|
|
201
|
+
"creator_id": zod_1.z.string(),
|
|
202
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
203
|
+
"type": zod_1.z.enum(['link', 'file', 'location']),
|
|
204
|
+
"link": zod_1.z.string(),
|
|
205
|
+
"active_begin": zod_1.z.string().datetime({}).optional(),
|
|
206
|
+
"active_end": zod_1.z.string().datetime({}).optional(),
|
|
207
|
+
"filename": zod_1.z.string().optional(),
|
|
208
|
+
"mime_type": zod_1.z.string().optional(),
|
|
209
|
+
"length_in_bytes": zod_1.z.number().optional(),
|
|
210
|
+
"location": zod_1.z.object({}).optional()
|
|
211
|
+
})).optional().describe('List of attachments for the message'),
|
|
212
|
+
"share_link_id": zod_1.z.string().optional().describe('Share Link ID to a message'),
|
|
213
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID where the message is stored')
|
|
214
|
+
}),
|
|
215
|
+
"creator": zod_1.z.object({
|
|
216
|
+
"id": zod_1.z.string().describe(' ID'),
|
|
217
|
+
"link": zod_1.z.string().describe('Link to User'),
|
|
218
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
219
|
+
"first_name": zod_1.z.string().describe('First Name'),
|
|
220
|
+
"last_name": zod_1.z.string().optional().describe('Last Name'),
|
|
221
|
+
"full_name": zod_1.z.string().describe('Full Name'),
|
|
222
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
223
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('List of emails (First one is the primary)'),
|
|
224
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('List of phones (First one is the primary)'),
|
|
225
|
+
"languages": zod_1.z.array(zod_1.z.string()).optional().describe('List of languages (First one is the primary)')
|
|
226
|
+
}).optional(),
|
|
227
|
+
"conversation": zod_1.z.object({
|
|
228
|
+
"id": zod_1.z.string().describe('ID'),
|
|
229
|
+
"link": zod_1.z.string().describe('Link to Conversation'),
|
|
230
|
+
"name": zod_1.z.string().describe('Name'),
|
|
231
|
+
"description": zod_1.z.string().optional().describe('Description'),
|
|
232
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID'),
|
|
233
|
+
"workspace_name": zod_1.z.string().describe('Workspace Name'),
|
|
234
|
+
"workspace_image_url": zod_1.z.string().optional().describe('Workspace Image Url'),
|
|
235
|
+
"owner_id": zod_1.z.string().describe('owner unique ID'),
|
|
236
|
+
"type": zod_1.z.enum(['directMessage', 'customerConversation', 'namedConversation', 'asyncMeeting']).describe('Type'),
|
|
237
|
+
"visibility": zod_1.z.enum(['private', 'workspace', 'public']).describe('Visibility'),
|
|
238
|
+
"total_messages": zod_1.z.number().describe('Total Messages'),
|
|
239
|
+
"total_duration_ms": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
240
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
241
|
+
"is_private": zod_1.z.boolean().describe('Is Private Conversation'),
|
|
242
|
+
"is_async": zod_1.z.boolean().describe('Is Async Conversation'),
|
|
243
|
+
"async_stats": zod_1.z.object({
|
|
244
|
+
"stats": zod_1.z.object({
|
|
245
|
+
"total_duration_milliseconds": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
246
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
247
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
248
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
249
|
+
"total_users": zod_1.z.number().describe('Total users')
|
|
250
|
+
}).describe('Conversation stats'),
|
|
251
|
+
"user_stats": zod_1.z.array(zod_1.z.object({
|
|
252
|
+
"user_id": zod_1.z.string().describe('User unique ID'),
|
|
253
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
254
|
+
"total_sent_milliseconds": zod_1.z.number().describe('Total sent in milliseconds'),
|
|
255
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
256
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
257
|
+
"total_heard_messages": zod_1.z.number().describe('Total heard messages'),
|
|
258
|
+
"total_unheard_messages": zod_1.z.number().describe('Total unheard messages')
|
|
259
|
+
})).describe('User stats')
|
|
260
|
+
}).optional().describe('Async Meeting Stats'),
|
|
261
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
262
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
263
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
264
|
+
}).optional(),
|
|
265
|
+
"labels": zod_1.z.array(zod_1.z.object({
|
|
266
|
+
"id": zod_1.z.string().describe('ID'),
|
|
267
|
+
"name": zod_1.z.string().describe('Name'),
|
|
268
|
+
"behavior": zod_1.z.enum(['removeOnListenStart', 'removeWhenHeard', 'persistent']).describe('Behavior'),
|
|
269
|
+
"type": zod_1.z.enum(['personal', 'workspace', 'system', 'reaction']).describe('Type'),
|
|
270
|
+
"creator_guid": zod_1.z.string().describe('Creator ID'),
|
|
271
|
+
"space_guid": zod_1.z.string().optional().describe('Workspace ID'),
|
|
272
|
+
"image_url": zod_1.z.string().optional().describe('Image URL'),
|
|
273
|
+
"automatic_playlist": zod_1.z.boolean().optional().describe('Automatic Playlist'),
|
|
274
|
+
"sort_order": zod_1.z.number().optional().describe('Sort Order')
|
|
275
|
+
})).optional()
|
|
276
|
+
}))
|
|
277
|
+
})).optional()
|
|
278
|
+
});
|
|
279
|
+
/**
|
|
280
|
+
* @summary Generate AI Prompt Response by share-link-ids
|
|
281
|
+
*/
|
|
282
|
+
exports.createShareLinkAIResponseBody = zod_1.z.object({
|
|
283
|
+
"prompt_id": zod_1.z.string(),
|
|
284
|
+
"share_link_ids": zod_1.z.array(zod_1.z.string()),
|
|
285
|
+
"language": zod_1.z.string().optional()
|
|
286
|
+
});
|
|
287
|
+
exports.aIResponseControllerDeletePromptParams = zod_1.z.object({
|
|
288
|
+
"id": zod_1.z.string()
|
|
289
|
+
});
|
|
290
|
+
/**
|
|
291
|
+
* 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.
|
|
292
|
+
* @summary Get List of My Apps
|
|
293
|
+
*/
|
|
294
|
+
exports.getMyAppsResponseItem = zod_1.z.object({
|
|
295
|
+
"id": zod_1.z.string().describe('The primary key of the resource.'),
|
|
296
|
+
"name": zod_1.z.string(),
|
|
297
|
+
"description": zod_1.z.string().optional(),
|
|
298
|
+
"client_id": zod_1.z.string(),
|
|
299
|
+
"client_secret": zod_1.z.string().optional(),
|
|
300
|
+
"access_token_lifetime_seconds": zod_1.z.number().optional().describe('Access token lifetime in seconds'),
|
|
301
|
+
"refresh_token_lifetime_seconds": zod_1.z.number().optional().describe('Refresh token lifetime in seconds'),
|
|
302
|
+
"allowed_callback_urls": zod_1.z.string().optional().describe('Allowed callback URLs (comma separated list)'),
|
|
303
|
+
"webhooks_url": zod_1.z.string().optional().describe('Webhook URL to send the data (comma separated list)'),
|
|
304
|
+
"webhooks_authentication_header": zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional().describe('Authentication header configuration for webhooks. Key-value pairs where both key and value are strings.'),
|
|
305
|
+
"allowed_logout_urls": zod_1.z.string().optional().describe('Allowed logout URLs (comma separated list)'),
|
|
306
|
+
"created_at": zod_1.z.string().datetime({}).describe('Created at'),
|
|
307
|
+
"updated_at": zod_1.z.string().datetime({}).describe('Updated at'),
|
|
308
|
+
"deleted_at": zod_1.z.string().datetime({}).optional().describe('Deleted at'),
|
|
309
|
+
"webhooks_url_mode": zod_1.z.enum(['one_per_client', 'one_per_subscription']).describe('Webhook URL mode'),
|
|
310
|
+
"send_invalid_refresh_token_webhook_notification": zod_1.z.boolean().optional().describe('Send invalid refresh token webhook notification'),
|
|
311
|
+
"send_webhook_when_invalid_access_or_refresh_token": zod_1.z.boolean().optional().describe('Send webhook when invalid access or refresh token'),
|
|
312
|
+
"owner_id": zod_1.z.string().optional(),
|
|
313
|
+
"user_is_subscribed_with_valid_tokens": zod_1.z.boolean().describe('Indicates whether the user is subscribed to the app and has valid authentication tokens (access or refresh).'),
|
|
314
|
+
"image_url": zod_1.z.string().optional().describe('Image URL')
|
|
315
|
+
});
|
|
316
|
+
exports.getMyAppsResponse = zod_1.z.array(exports.getMyAppsResponseItem);
|
|
317
|
+
/**
|
|
318
|
+
* @summary Subscribe user into app
|
|
319
|
+
*/
|
|
320
|
+
exports.subscribeUserIntoAppParams = zod_1.z.object({
|
|
321
|
+
"client_id": zod_1.z.string()
|
|
322
|
+
});
|
|
323
|
+
exports.subscribeUserIntoAppBodySubscriptionFiltersItemOperatorDefault = "eq";
|
|
324
|
+
exports.subscribeUserIntoAppBody = zod_1.z.object({
|
|
325
|
+
"subscriptions": zod_1.z.array(zod_1.z.enum(['message.initializing', 'message.started', 'message.paused', 'message.resumed', 'message.offline', 'message.processing', 'message.finished', 'message.deleted', 'message.discussion-notes.added', 'message.label.added', 'message.posted.to.channel', 'message.voicememo.created', 'channel.created', 'channel.deleted', 'channel.user.joined', 'channel.users.added', 'channel.user.left', 'channel.user.removed', 'channel.async-check.mid', 'channel.async-check.ending', 'channel.async.ended', 'channel.async.extended', 'channel.async.shortened', 'channel.ai-summary.generated', 'workspace.user.joined', 'workspace.user.added', 'workspace.user.left', 'workspace.user.removed', 'workspace.findable-channel.created', 'access_token.expired', 'refresh_token.expired', 'ai.prompt.response.generated'])).optional().describe('All events are subscribed by default: message.initializing, message.started, message.paused, message.resumed, message.offline, message.processing, message.finished, message.deleted, message.discussion-notes.added, message.label.added, message.posted.to.channel, message.voicememo.created, channel.created, channel.deleted, channel.user.joined, channel.users.added, channel.user.left, channel.user.removed, channel.async-check.mid, channel.async-check.ending, channel.async.ended, channel.async.extended, channel.async.shortened, channel.ai-summary.generated, workspace.user.joined, workspace.user.added, workspace.user.left, workspace.user.removed, workspace.findable-channel.created, access_token.expired, refresh_token.expired, ai.prompt.response.generated'),
|
|
326
|
+
"webhookURL": zod_1.z.string().optional().describe('Webhook URL to send the data'),
|
|
327
|
+
"subscription_filters": zod_1.z.array(zod_1.z.object({
|
|
328
|
+
"key": zod_1.z.string().describe('What is the key to filter the data before sending to the webhook'),
|
|
329
|
+
"value": zod_1.z.string().or(zod_1.z.number()).or(zod_1.z.array(zod_1.z.string())).describe('What is the value to filter the data (string or number)'),
|
|
330
|
+
"operator": zod_1.z.enum(['eq', 'ne', 'in']).describe('What is the operator to filter the data')
|
|
331
|
+
})).optional(),
|
|
332
|
+
"subscription_actions": zod_1.z.array(zod_1.z.object({
|
|
333
|
+
"action_id": zod_1.z.enum(['run_ai_prompt']).describe('What is the action to perform'),
|
|
334
|
+
"entity_type": zod_1.z.enum(['ai_prompt']).optional().describe('What is the entity_type to perform the action on (required when entity_id is provided)'),
|
|
335
|
+
"entity_id": zod_1.z.string().optional().describe('What is the entity_id to perform the action on (required when entity_type is provided)')
|
|
336
|
+
})).optional().describe('Actions are used only for internal apps. (Not allowed to external apps)')
|
|
337
|
+
});
|
|
338
|
+
exports.subscribeUserIntoAppResponseSubscriptionFiltersItemOperatorDefault = "eq";
|
|
339
|
+
exports.subscribeUserIntoAppResponse = zod_1.z.object({
|
|
340
|
+
"_id": zod_1.z.string().describe('The primary key of the resource.'),
|
|
341
|
+
"created_at": zod_1.z.string().datetime({}).describe('The date and time at which the resource was created.'),
|
|
342
|
+
"updated_at": zod_1.z.string().datetime({}).describe('The date and time at which the resource was last updated.'),
|
|
343
|
+
"id": zod_1.z.string().describe('The primary key of the resource.'),
|
|
344
|
+
"client_id": zod_1.z.string(),
|
|
345
|
+
"user_id": zod_1.z.string(),
|
|
346
|
+
"subscriptions": zod_1.z.array(zod_1.z.enum(['message.initializing', 'message.started', 'message.paused', 'message.resumed', 'message.offline', 'message.processing', 'message.finished', 'message.deleted', 'message.discussion-notes.added', 'message.label.added', 'message.posted.to.channel', 'message.voicememo.created', 'channel.created', 'channel.deleted', 'channel.user.joined', 'channel.users.added', 'channel.user.left', 'channel.user.removed', 'channel.async-check.mid', 'channel.async-check.ending', 'channel.async.ended', 'channel.async.extended', 'channel.async.shortened', 'channel.ai-summary.generated', 'workspace.user.joined', 'workspace.user.added', 'workspace.user.left', 'workspace.user.removed', 'workspace.findable-channel.created', 'access_token.expired', 'refresh_token.expired', 'ai.prompt.response.generated'])),
|
|
347
|
+
"webhookURL": zod_1.z.string().optional().describe('Webhook URL to send the data'),
|
|
348
|
+
"subscription_filters": zod_1.z.array(zod_1.z.object({
|
|
349
|
+
"key": zod_1.z.string().describe('What is the key to filter the data before sending to the webhook'),
|
|
350
|
+
"value": zod_1.z.string().or(zod_1.z.number()).or(zod_1.z.array(zod_1.z.string())).describe('What is the value to filter the data (string or number)'),
|
|
351
|
+
"operator": zod_1.z.enum(['eq', 'ne', 'in']).describe('What is the operator to filter the data')
|
|
352
|
+
})).optional(),
|
|
353
|
+
"subscription_actions": zod_1.z.array(zod_1.z.object({
|
|
354
|
+
"action_id": zod_1.z.enum(['run_ai_prompt']).describe('What is the action to perform'),
|
|
355
|
+
"entity_type": zod_1.z.enum(['ai_prompt']).optional().describe('What is the entity_type to perform the action on (required when entity_id is provided)'),
|
|
356
|
+
"entity_id": zod_1.z.string().optional().describe('What is the entity_id to perform the action on (required when entity_type is provided)')
|
|
357
|
+
})).optional()
|
|
358
|
+
});
|
|
359
|
+
/**
|
|
360
|
+
* @summary Unsubscribe user from app
|
|
361
|
+
*/
|
|
362
|
+
exports.unsubscribeUserFromAppParams = zod_1.z.object({
|
|
363
|
+
"client_id": zod_1.z.string()
|
|
364
|
+
});
|
|
365
|
+
exports.languageControllerGetAllResponseItem = zod_1.z.object({
|
|
366
|
+
"id": zod_1.z.string(),
|
|
367
|
+
"name": zod_1.z.string(),
|
|
368
|
+
"code": zod_1.z.string(),
|
|
369
|
+
"supported": zod_1.z.boolean(),
|
|
370
|
+
"voices": zod_1.z.array(zod_1.z.object({
|
|
371
|
+
"id": zod_1.z.string(),
|
|
372
|
+
"name": zod_1.z.string(),
|
|
373
|
+
"type": zod_1.z.enum(['polly', 'elevenlabs', 'google', 'openai']),
|
|
374
|
+
"gender": zod_1.z.enum(['F', 'M']),
|
|
375
|
+
"quality": zod_1.z.enum(['high', 'medium', 'low']),
|
|
376
|
+
"language_code": zod_1.z.string()
|
|
377
|
+
}))
|
|
378
|
+
});
|
|
379
|
+
exports.languageControllerGetAllResponse = zod_1.z.array(exports.languageControllerGetAllResponseItem);
|
|
380
|
+
/**
|
|
381
|
+
* @summary Get last ten recent Messages including (Conversation, Creator, Labels)
|
|
382
|
+
*/
|
|
383
|
+
exports.getTenRecentMessagesResponseQueryParams = zod_1.z.object({
|
|
384
|
+
"conversation_id": zod_1.z.string().optional().describe('Conversation ID (optional)'),
|
|
385
|
+
"language": zod_1.z.string().optional().describe('Language (optional) - Original language will be used if not provided or not found.')
|
|
386
|
+
});
|
|
387
|
+
exports.getTenRecentMessagesResponseResponseResultsItemMessageLanguageDefault = "english";
|
|
388
|
+
exports.getTenRecentMessagesResponseResponse = zod_1.z.object({
|
|
389
|
+
"results": zod_1.z.array(zod_1.z.object({
|
|
390
|
+
"message": zod_1.z.object({
|
|
391
|
+
"id": zod_1.z.string().describe('ID'),
|
|
392
|
+
"name": zod_1.z.string().optional().describe('Name'),
|
|
393
|
+
"link": zod_1.z.string().describe('Link to Message'),
|
|
394
|
+
"creator_id": zod_1.z.string().describe('Creator ID'),
|
|
395
|
+
"conversation_id": zod_1.z.string().optional().describe('Conversation ID'),
|
|
396
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
397
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
398
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
399
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
400
|
+
"duration_ms": zod_1.z.number().describe('The length of the message in milliseconds'),
|
|
401
|
+
"audio_url": zod_1.z.string().optional().describe('The URL for the message audio file'),
|
|
402
|
+
"audio_stream_url": zod_1.z.string().optional().describe('The URL for the message audio stream'),
|
|
403
|
+
"transcript": zod_1.z.string().optional().describe('Transcript of the message'),
|
|
404
|
+
"ai_summary": zod_1.z.string().optional().describe('AI Summary generated of the message'),
|
|
405
|
+
"waveform_url": zod_1.z.string().optional().describe('The URL for the message waveform image'),
|
|
406
|
+
"reply_count": zod_1.z.number().describe('The number of replies to the message'),
|
|
407
|
+
"parent_message_id": zod_1.z.string().optional().describe('Parent Message unique ID (only available for replies)'),
|
|
408
|
+
"language": zod_1.z.string().default(exports.getTenRecentMessagesResponseResponseResultsItemMessageLanguageDefault).describe('Language for the message (Transcript, AI summary, Audio...)'),
|
|
409
|
+
"status": zod_1.z.enum(['offline', 'paused', 'processing', 'scheduled', 'active', 'deleted', 'account-deleted', 'initializing', 'inprogress', 'canceled', 'failed']).describe('Current status of the Message'),
|
|
410
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).describe('Type of the Message'),
|
|
411
|
+
"attachments": zod_1.z.array(zod_1.z.object({
|
|
412
|
+
"id": zod_1.z.string(),
|
|
413
|
+
"creator_id": zod_1.z.string(),
|
|
414
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
415
|
+
"type": zod_1.z.enum(['link', 'file', 'location']),
|
|
416
|
+
"link": zod_1.z.string(),
|
|
417
|
+
"active_begin": zod_1.z.string().datetime({}).optional(),
|
|
418
|
+
"active_end": zod_1.z.string().datetime({}).optional(),
|
|
419
|
+
"filename": zod_1.z.string().optional(),
|
|
420
|
+
"mime_type": zod_1.z.string().optional(),
|
|
421
|
+
"length_in_bytes": zod_1.z.number().optional(),
|
|
422
|
+
"location": zod_1.z.object({}).optional()
|
|
423
|
+
})).optional().describe('List of attachments for the message'),
|
|
424
|
+
"share_link_id": zod_1.z.string().optional().describe('Share Link ID to a message'),
|
|
425
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID where the message is stored')
|
|
426
|
+
}),
|
|
427
|
+
"creator": zod_1.z.object({
|
|
428
|
+
"id": zod_1.z.string().describe(' ID'),
|
|
429
|
+
"link": zod_1.z.string().describe('Link to User'),
|
|
430
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
431
|
+
"first_name": zod_1.z.string().describe('First Name'),
|
|
432
|
+
"last_name": zod_1.z.string().optional().describe('Last Name'),
|
|
433
|
+
"full_name": zod_1.z.string().describe('Full Name'),
|
|
434
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
435
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('List of emails (First one is the primary)'),
|
|
436
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('List of phones (First one is the primary)'),
|
|
437
|
+
"languages": zod_1.z.array(zod_1.z.string()).optional().describe('List of languages (First one is the primary)')
|
|
438
|
+
}).optional(),
|
|
439
|
+
"conversation": zod_1.z.object({
|
|
440
|
+
"id": zod_1.z.string().describe('ID'),
|
|
441
|
+
"link": zod_1.z.string().describe('Link to Conversation'),
|
|
442
|
+
"name": zod_1.z.string().describe('Name'),
|
|
443
|
+
"description": zod_1.z.string().optional().describe('Description'),
|
|
444
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID'),
|
|
445
|
+
"workspace_name": zod_1.z.string().describe('Workspace Name'),
|
|
446
|
+
"workspace_image_url": zod_1.z.string().optional().describe('Workspace Image Url'),
|
|
447
|
+
"owner_id": zod_1.z.string().describe('owner unique ID'),
|
|
448
|
+
"type": zod_1.z.enum(['directMessage', 'customerConversation', 'namedConversation', 'asyncMeeting']).describe('Type'),
|
|
449
|
+
"visibility": zod_1.z.enum(['private', 'workspace', 'public']).describe('Visibility'),
|
|
450
|
+
"total_messages": zod_1.z.number().describe('Total Messages'),
|
|
451
|
+
"total_duration_ms": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
452
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
453
|
+
"is_private": zod_1.z.boolean().describe('Is Private Conversation'),
|
|
454
|
+
"is_async": zod_1.z.boolean().describe('Is Async Conversation'),
|
|
455
|
+
"async_stats": zod_1.z.object({
|
|
456
|
+
"stats": zod_1.z.object({
|
|
457
|
+
"total_duration_milliseconds": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
458
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
459
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
460
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
461
|
+
"total_users": zod_1.z.number().describe('Total users')
|
|
462
|
+
}).describe('Conversation stats'),
|
|
463
|
+
"user_stats": zod_1.z.array(zod_1.z.object({
|
|
464
|
+
"user_id": zod_1.z.string().describe('User unique ID'),
|
|
465
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
466
|
+
"total_sent_milliseconds": zod_1.z.number().describe('Total sent in milliseconds'),
|
|
467
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
468
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
469
|
+
"total_heard_messages": zod_1.z.number().describe('Total heard messages'),
|
|
470
|
+
"total_unheard_messages": zod_1.z.number().describe('Total unheard messages')
|
|
471
|
+
})).describe('User stats')
|
|
472
|
+
}).optional().describe('Async Meeting Stats'),
|
|
473
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
474
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
475
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
476
|
+
}).optional(),
|
|
477
|
+
"labels": zod_1.z.array(zod_1.z.object({
|
|
478
|
+
"id": zod_1.z.string().describe('ID'),
|
|
479
|
+
"name": zod_1.z.string().describe('Name'),
|
|
480
|
+
"behavior": zod_1.z.enum(['removeOnListenStart', 'removeWhenHeard', 'persistent']).describe('Behavior'),
|
|
481
|
+
"type": zod_1.z.enum(['personal', 'workspace', 'system', 'reaction']).describe('Type'),
|
|
482
|
+
"creator_guid": zod_1.z.string().describe('Creator ID'),
|
|
483
|
+
"space_guid": zod_1.z.string().optional().describe('Workspace ID'),
|
|
484
|
+
"image_url": zod_1.z.string().optional().describe('Image URL'),
|
|
485
|
+
"automatic_playlist": zod_1.z.boolean().optional().describe('Automatic Playlist'),
|
|
486
|
+
"sort_order": zod_1.z.number().optional().describe('Sort Order')
|
|
487
|
+
})).optional()
|
|
488
|
+
})).optional().describe('List of 10 recent messages')
|
|
489
|
+
});
|
|
490
|
+
/**
|
|
491
|
+
* @summary Get Message By ID
|
|
492
|
+
*/
|
|
493
|
+
exports.getMessageByIdParams = zod_1.z.object({
|
|
494
|
+
"id": zod_1.z.string()
|
|
495
|
+
});
|
|
496
|
+
exports.getMessageByIdQueryParams = zod_1.z.object({
|
|
497
|
+
"language": zod_1.z.string().optional().describe('Language (optional) - Original language will be used if not provided or not found.'),
|
|
498
|
+
"fields": zod_1.z.string().optional().describe('Fields (optional) - Additional fields to include in the response. Possible values: conversation, creator, labels.')
|
|
499
|
+
});
|
|
500
|
+
exports.getMessageByIdResponseMessageLanguageDefault = "english";
|
|
501
|
+
exports.getMessageByIdResponse = zod_1.z.object({
|
|
502
|
+
"message": zod_1.z.object({
|
|
503
|
+
"id": zod_1.z.string().describe('ID'),
|
|
504
|
+
"name": zod_1.z.string().optional().describe('Name'),
|
|
505
|
+
"link": zod_1.z.string().describe('Link to Message'),
|
|
506
|
+
"creator_id": zod_1.z.string().describe('Creator ID'),
|
|
507
|
+
"conversation_id": zod_1.z.string().optional().describe('Conversation ID'),
|
|
508
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
509
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
510
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
511
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
512
|
+
"duration_ms": zod_1.z.number().describe('The length of the message in milliseconds'),
|
|
513
|
+
"audio_url": zod_1.z.string().optional().describe('The URL for the message audio file'),
|
|
514
|
+
"audio_stream_url": zod_1.z.string().optional().describe('The URL for the message audio stream'),
|
|
515
|
+
"transcript": zod_1.z.string().optional().describe('Transcript of the message'),
|
|
516
|
+
"ai_summary": zod_1.z.string().optional().describe('AI Summary generated of the message'),
|
|
517
|
+
"waveform_url": zod_1.z.string().optional().describe('The URL for the message waveform image'),
|
|
518
|
+
"reply_count": zod_1.z.number().describe('The number of replies to the message'),
|
|
519
|
+
"parent_message_id": zod_1.z.string().optional().describe('Parent Message unique ID (only available for replies)'),
|
|
520
|
+
"language": zod_1.z.string().default(exports.getMessageByIdResponseMessageLanguageDefault).describe('Language for the message (Transcript, AI summary, Audio...)'),
|
|
521
|
+
"status": zod_1.z.enum(['offline', 'paused', 'processing', 'scheduled', 'active', 'deleted', 'account-deleted', 'initializing', 'inprogress', 'canceled', 'failed']).describe('Current status of the Message'),
|
|
522
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).describe('Type of the Message'),
|
|
523
|
+
"attachments": zod_1.z.array(zod_1.z.object({
|
|
524
|
+
"id": zod_1.z.string(),
|
|
525
|
+
"creator_id": zod_1.z.string(),
|
|
526
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
527
|
+
"type": zod_1.z.enum(['link', 'file', 'location']),
|
|
528
|
+
"link": zod_1.z.string(),
|
|
529
|
+
"active_begin": zod_1.z.string().datetime({}).optional(),
|
|
530
|
+
"active_end": zod_1.z.string().datetime({}).optional(),
|
|
531
|
+
"filename": zod_1.z.string().optional(),
|
|
532
|
+
"mime_type": zod_1.z.string().optional(),
|
|
533
|
+
"length_in_bytes": zod_1.z.number().optional(),
|
|
534
|
+
"location": zod_1.z.object({}).optional()
|
|
535
|
+
})).optional().describe('List of attachments for the message'),
|
|
536
|
+
"share_link_id": zod_1.z.string().optional().describe('Share Link ID to a message'),
|
|
537
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID where the message is stored')
|
|
538
|
+
}),
|
|
539
|
+
"creator": zod_1.z.object({
|
|
540
|
+
"id": zod_1.z.string().describe(' ID'),
|
|
541
|
+
"link": zod_1.z.string().describe('Link to User'),
|
|
542
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
543
|
+
"first_name": zod_1.z.string().describe('First Name'),
|
|
544
|
+
"last_name": zod_1.z.string().optional().describe('Last Name'),
|
|
545
|
+
"full_name": zod_1.z.string().describe('Full Name'),
|
|
546
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
547
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('List of emails (First one is the primary)'),
|
|
548
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('List of phones (First one is the primary)'),
|
|
549
|
+
"languages": zod_1.z.array(zod_1.z.string()).optional().describe('List of languages (First one is the primary)')
|
|
550
|
+
}).optional(),
|
|
551
|
+
"conversation": zod_1.z.object({
|
|
552
|
+
"id": zod_1.z.string().describe('ID'),
|
|
553
|
+
"link": zod_1.z.string().describe('Link to Conversation'),
|
|
554
|
+
"name": zod_1.z.string().describe('Name'),
|
|
555
|
+
"description": zod_1.z.string().optional().describe('Description'),
|
|
556
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID'),
|
|
557
|
+
"workspace_name": zod_1.z.string().describe('Workspace Name'),
|
|
558
|
+
"workspace_image_url": zod_1.z.string().optional().describe('Workspace Image Url'),
|
|
559
|
+
"owner_id": zod_1.z.string().describe('owner unique ID'),
|
|
560
|
+
"type": zod_1.z.enum(['directMessage', 'customerConversation', 'namedConversation', 'asyncMeeting']).describe('Type'),
|
|
561
|
+
"visibility": zod_1.z.enum(['private', 'workspace', 'public']).describe('Visibility'),
|
|
562
|
+
"total_messages": zod_1.z.number().describe('Total Messages'),
|
|
563
|
+
"total_duration_ms": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
564
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
565
|
+
"is_private": zod_1.z.boolean().describe('Is Private Conversation'),
|
|
566
|
+
"is_async": zod_1.z.boolean().describe('Is Async Conversation'),
|
|
567
|
+
"async_stats": zod_1.z.object({
|
|
568
|
+
"stats": zod_1.z.object({
|
|
569
|
+
"total_duration_milliseconds": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
570
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
571
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
572
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
573
|
+
"total_users": zod_1.z.number().describe('Total users')
|
|
574
|
+
}).describe('Conversation stats'),
|
|
575
|
+
"user_stats": zod_1.z.array(zod_1.z.object({
|
|
576
|
+
"user_id": zod_1.z.string().describe('User unique ID'),
|
|
577
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
578
|
+
"total_sent_milliseconds": zod_1.z.number().describe('Total sent in milliseconds'),
|
|
579
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
580
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
581
|
+
"total_heard_messages": zod_1.z.number().describe('Total heard messages'),
|
|
582
|
+
"total_unheard_messages": zod_1.z.number().describe('Total unheard messages')
|
|
583
|
+
})).describe('User stats')
|
|
584
|
+
}).optional().describe('Async Meeting Stats'),
|
|
585
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
586
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
587
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
588
|
+
}).optional(),
|
|
589
|
+
"labels": zod_1.z.array(zod_1.z.object({
|
|
590
|
+
"id": zod_1.z.string().describe('ID'),
|
|
591
|
+
"name": zod_1.z.string().describe('Name'),
|
|
592
|
+
"behavior": zod_1.z.enum(['removeOnListenStart', 'removeWhenHeard', 'persistent']).describe('Behavior'),
|
|
593
|
+
"type": zod_1.z.enum(['personal', 'workspace', 'system', 'reaction']).describe('Type'),
|
|
594
|
+
"creator_guid": zod_1.z.string().describe('Creator ID'),
|
|
595
|
+
"space_guid": zod_1.z.string().optional().describe('Workspace ID'),
|
|
596
|
+
"image_url": zod_1.z.string().optional().describe('Image URL'),
|
|
597
|
+
"automatic_playlist": zod_1.z.boolean().optional().describe('Automatic Playlist'),
|
|
598
|
+
"sort_order": zod_1.z.number().optional().describe('Sort Order')
|
|
599
|
+
})).optional()
|
|
600
|
+
});
|
|
601
|
+
/**
|
|
602
|
+
* By default return messages created in last 5 days.
|
|
603
|
+
|
|
604
|
+
The **maximum** allowed range between dates is **31 days**.
|
|
605
|
+
* @summary List Messages
|
|
606
|
+
*/
|
|
607
|
+
exports.listMessagesQueryPageDefault = 1;
|
|
608
|
+
exports.listMessagesQuerySizeDefault = 10;
|
|
609
|
+
exports.listMessagesQuerySizeMax = 50;
|
|
610
|
+
exports.listMessagesQuerySortDirectionDefault = "DESC";
|
|
611
|
+
exports.listMessagesQueryParams = zod_1.z.object({
|
|
612
|
+
"page": zod_1.z.number().min(1).default(exports.listMessagesQueryPageDefault),
|
|
613
|
+
"size": zod_1.z.number().min(1).max(exports.listMessagesQuerySizeMax).default(exports.listMessagesQuerySizeDefault).describe('Max number of results per page is: **50**'),
|
|
614
|
+
"sort_direction": zod_1.z.enum(['ASC', 'DESC']).default(exports.listMessagesQuerySortDirectionDefault).describe('The field used to sort results is **Creation Date**'),
|
|
615
|
+
"start_date": zod_1.z.string().datetime({}).optional().describe('Start Date range'),
|
|
616
|
+
"end_date": zod_1.z.string().datetime({}).optional().describe('End Date range'),
|
|
617
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID (optional)'),
|
|
618
|
+
"conversation_id": zod_1.z.string().optional().describe('Conversation ID (optional)'),
|
|
619
|
+
"language": zod_1.z.string().optional().describe('Language (optional)'),
|
|
620
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).optional().describe('Type (optional)'),
|
|
621
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID (optional)')
|
|
622
|
+
});
|
|
623
|
+
exports.listMessagesResponsePageDefault = 1;
|
|
624
|
+
exports.listMessagesResponseSizeDefault = 10;
|
|
625
|
+
exports.listMessagesResponseSizeMax = 50;
|
|
626
|
+
exports.listMessagesResponseSortDirectionDefault = "DESC";
|
|
627
|
+
exports.listMessagesResponseResultsItemLanguageDefault = "english";
|
|
628
|
+
exports.listMessagesResponse = zod_1.z.object({
|
|
629
|
+
"page": zod_1.z.number().min(1).default(exports.listMessagesResponsePageDefault),
|
|
630
|
+
"size": zod_1.z.number().min(1).max(exports.listMessagesResponseSizeMax).default(exports.listMessagesResponseSizeDefault).describe('Max number of results per page is: **50**'),
|
|
631
|
+
"sort_direction": zod_1.z.enum(['ASC', 'DESC']).default(exports.listMessagesResponseSortDirectionDefault).describe('The field used to sort results is **Creation Date**'),
|
|
632
|
+
"total": zod_1.z.number().describe('Total number of records by applied filters (if any)'),
|
|
633
|
+
"results_count": zod_1.z.number().describe('Results count (paginated results)'),
|
|
634
|
+
"has_next_page": zod_1.z.boolean().describe('If there is more data available (omitted by pagination)'),
|
|
635
|
+
"filters": zod_1.z.object({
|
|
636
|
+
"start_date": zod_1.z.string().datetime({}).optional().describe('Start Date range'),
|
|
637
|
+
"end_date": zod_1.z.string().datetime({}).optional().describe('End Date range'),
|
|
638
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID (optional)'),
|
|
639
|
+
"conversation_id": zod_1.z.string().optional().describe('Conversation ID (optional)'),
|
|
640
|
+
"language": zod_1.z.string().optional().describe('Language (optional)'),
|
|
641
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).optional().describe('Type (optional)'),
|
|
642
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID (optional)')
|
|
643
|
+
}).optional().describe('Filters'),
|
|
644
|
+
"results": zod_1.z.array(zod_1.z.object({
|
|
645
|
+
"id": zod_1.z.string().describe('ID'),
|
|
646
|
+
"name": zod_1.z.string().optional().describe('Name'),
|
|
647
|
+
"link": zod_1.z.string().describe('Link to Message'),
|
|
648
|
+
"creator_id": zod_1.z.string().describe('Creator ID'),
|
|
649
|
+
"conversation_id": zod_1.z.string().optional().describe('Conversation ID'),
|
|
650
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
651
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
652
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
653
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
654
|
+
"duration_ms": zod_1.z.number().describe('The length of the message in milliseconds'),
|
|
655
|
+
"audio_url": zod_1.z.string().optional().describe('The URL for the message audio file'),
|
|
656
|
+
"audio_stream_url": zod_1.z.string().optional().describe('The URL for the message audio stream'),
|
|
657
|
+
"transcript": zod_1.z.string().optional().describe('Transcript of the message'),
|
|
658
|
+
"ai_summary": zod_1.z.string().optional().describe('AI Summary generated of the message'),
|
|
659
|
+
"waveform_url": zod_1.z.string().optional().describe('The URL for the message waveform image'),
|
|
660
|
+
"reply_count": zod_1.z.number().describe('The number of replies to the message'),
|
|
661
|
+
"parent_message_id": zod_1.z.string().optional().describe('Parent Message unique ID (only available for replies)'),
|
|
662
|
+
"language": zod_1.z.string().default(exports.listMessagesResponseResultsItemLanguageDefault).describe('Language for the message (Transcript, AI summary, Audio...)'),
|
|
663
|
+
"status": zod_1.z.enum(['offline', 'paused', 'processing', 'scheduled', 'active', 'deleted', 'account-deleted', 'initializing', 'inprogress', 'canceled', 'failed']).describe('Current status of the Message'),
|
|
664
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).describe('Type of the Message'),
|
|
665
|
+
"attachments": zod_1.z.array(zod_1.z.object({
|
|
666
|
+
"id": zod_1.z.string(),
|
|
667
|
+
"creator_id": zod_1.z.string(),
|
|
668
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
669
|
+
"type": zod_1.z.enum(['link', 'file', 'location']),
|
|
670
|
+
"link": zod_1.z.string(),
|
|
671
|
+
"active_begin": zod_1.z.string().datetime({}).optional(),
|
|
672
|
+
"active_end": zod_1.z.string().datetime({}).optional(),
|
|
673
|
+
"filename": zod_1.z.string().optional(),
|
|
674
|
+
"mime_type": zod_1.z.string().optional(),
|
|
675
|
+
"length_in_bytes": zod_1.z.number().optional(),
|
|
676
|
+
"location": zod_1.z.object({}).optional()
|
|
677
|
+
})).optional().describe('List of attachments for the message'),
|
|
678
|
+
"share_link_id": zod_1.z.string().optional().describe('Share Link ID to a message'),
|
|
679
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID where the message is stored')
|
|
680
|
+
})).describe('List of Messages')
|
|
681
|
+
});
|
|
682
|
+
/**
|
|
683
|
+
* Max number of links is **100** per API call. If you want to add more, should make another api call.
|
|
684
|
+
* @summary Add Link Attachments to a message
|
|
685
|
+
*/
|
|
686
|
+
exports.addLinkAttachmentsToMessageParams = zod_1.z.object({
|
|
687
|
+
"id": zod_1.z.string()
|
|
688
|
+
});
|
|
689
|
+
exports.addLinkAttachmentsToMessageBody = zod_1.z.object({
|
|
690
|
+
"links": zod_1.z.array(zod_1.z.string()).describe('Array of links to be attached to the message')
|
|
691
|
+
});
|
|
692
|
+
/**
|
|
693
|
+
* In order to create a Message, you must provide **transcript** or **link** attachments.
|
|
694
|
+
* @summary Send a Message to a Conversation
|
|
695
|
+
*/
|
|
696
|
+
exports.createConversationMessageParams = zod_1.z.object({
|
|
697
|
+
"id": zod_1.z.string()
|
|
698
|
+
});
|
|
699
|
+
exports.createConversationMessageBodyFromMessageTypeDefault = "NewMessage";
|
|
700
|
+
exports.createConversationMessageBody = zod_1.z.object({
|
|
701
|
+
"transcript": zod_1.z.string().optional().describe('The Message transcript will be used to generate audio using text-to-speech'),
|
|
702
|
+
"links": zod_1.z.array(zod_1.z.string()).optional().describe('Array of links to be attached to the message'),
|
|
703
|
+
"from_message_type": zod_1.z.enum(['PreRecorded', 'NewMessage', 'Forward']).default(exports.createConversationMessageBodyFromMessageTypeDefault).describe('From Message type'),
|
|
704
|
+
"from_message_id": zod_1.z.string().optional().describe('Message ID to be used as a base for the new message. (Optional only when from_message_type is NewMessage)')
|
|
705
|
+
});
|
|
706
|
+
/**
|
|
707
|
+
* In order to create a Message, you must provide **transcript** or **link** attachments.
|
|
708
|
+
* @summary Send a Direct Message to a User or a Group of Users
|
|
709
|
+
*/
|
|
710
|
+
exports.sendDirectMessageBodyWorkspaceIdDefault = "personal";
|
|
711
|
+
exports.sendDirectMessageBodyFromMessageTypeDefault = "NewMessage";
|
|
712
|
+
exports.sendDirectMessageBody = zod_1.z.object({
|
|
713
|
+
"to": zod_1.z.object({
|
|
714
|
+
"user_ids": zod_1.z.array(zod_1.z.string()).optional().describe('Array of user IDs to send the message to'),
|
|
715
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('Array of email addresses to send the message to')
|
|
716
|
+
}),
|
|
717
|
+
"workspace_id": zod_1.z.string().default(exports.sendDirectMessageBodyWorkspaceIdDefault).describe('The workspace ID to send the message to'),
|
|
718
|
+
"transcript": zod_1.z.string().optional().describe('The Message transcript will be used to generate audio using text-to-speech'),
|
|
719
|
+
"links": zod_1.z.array(zod_1.z.string()).optional().describe('Array of links to be attached to the message'),
|
|
720
|
+
"from_message_type": zod_1.z.enum(['PreRecorded', 'NewMessage', 'Forward']).default(exports.sendDirectMessageBodyFromMessageTypeDefault).describe('From Message type'),
|
|
721
|
+
"from_message_id": zod_1.z.string().optional().describe('Message ID to be used as a base for the new message. (Optional only when from_message_type is NewMessage)')
|
|
722
|
+
});
|
|
723
|
+
/**
|
|
724
|
+
* In order to create a voicememo message, you must provide **transcript** or **link** attachments.
|
|
725
|
+
* @summary Create a Voicememo Message
|
|
726
|
+
*/
|
|
727
|
+
exports.createVoiceMemoMessageBody = zod_1.z.object({
|
|
728
|
+
"transcript": zod_1.z.string().optional().describe('The Message transcript will be used to generate audio using text-to-speech'),
|
|
729
|
+
"links": zod_1.z.array(zod_1.z.string()).optional().describe('Array of links to be attached to the message'),
|
|
730
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID (not allowed when workspace_id specified is different from the folder_id)'),
|
|
731
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID (not allowed when folder_id specified is different from the folder_id)')
|
|
732
|
+
});
|
|
733
|
+
/**
|
|
734
|
+
* It's required to inform one of (**email**, **phone**)
|
|
735
|
+
* @summary Search user by email or phone
|
|
736
|
+
*/
|
|
737
|
+
exports.searchUserQueryParams = zod_1.z.object({
|
|
738
|
+
"email": zod_1.z.string().optional().describe('Email Address'),
|
|
739
|
+
"phone": zod_1.z.string().optional().describe('Phone Number')
|
|
740
|
+
});
|
|
741
|
+
exports.searchUserResponse = zod_1.z.object({
|
|
742
|
+
"id": zod_1.z.string().describe(' ID'),
|
|
743
|
+
"link": zod_1.z.string().describe('Link to User'),
|
|
744
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
745
|
+
"first_name": zod_1.z.string().describe('First Name'),
|
|
746
|
+
"last_name": zod_1.z.string().optional().describe('Last Name'),
|
|
747
|
+
"full_name": zod_1.z.string().describe('Full Name'),
|
|
748
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
749
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('List of emails (First one is the primary)'),
|
|
750
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('List of phones (First one is the primary)'),
|
|
751
|
+
"languages": zod_1.z.array(zod_1.z.string()).optional().describe('List of languages (First one is the primary)')
|
|
752
|
+
});
|
|
753
|
+
/**
|
|
754
|
+
* @summary Search users by their emails, phones or IDs
|
|
755
|
+
*/
|
|
756
|
+
exports.searchUsersBody = zod_1.z.object({
|
|
757
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('Email Addresses'),
|
|
758
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('Phone Numbers'),
|
|
759
|
+
"ids": zod_1.z.array(zod_1.z.string()).optional().describe('User IDs')
|
|
760
|
+
});
|
|
761
|
+
exports.searchUsersResponseItem = zod_1.z.object({
|
|
762
|
+
"id": zod_1.z.string().describe(' ID'),
|
|
763
|
+
"link": zod_1.z.string().describe('Link to User'),
|
|
764
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
765
|
+
"first_name": zod_1.z.string().describe('First Name'),
|
|
766
|
+
"last_name": zod_1.z.string().optional().describe('Last Name'),
|
|
767
|
+
"full_name": zod_1.z.string().describe('Full Name'),
|
|
768
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
769
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('List of emails (First one is the primary)'),
|
|
770
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('List of phones (First one is the primary)'),
|
|
771
|
+
"languages": zod_1.z.array(zod_1.z.string()).optional().describe('List of languages (First one is the primary)')
|
|
772
|
+
});
|
|
773
|
+
exports.searchUsersResponse = zod_1.z.array(exports.searchUsersResponseItem);
|
|
774
|
+
/**
|
|
775
|
+
* @summary Get User By ID
|
|
776
|
+
*/
|
|
777
|
+
exports.getUserByIdParams = zod_1.z.object({
|
|
778
|
+
"id": zod_1.z.string()
|
|
779
|
+
});
|
|
780
|
+
exports.getUserByIdResponse = zod_1.z.object({
|
|
781
|
+
"id": zod_1.z.string().describe(' ID'),
|
|
782
|
+
"link": zod_1.z.string().describe('Link to User'),
|
|
783
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
784
|
+
"first_name": zod_1.z.string().describe('First Name'),
|
|
785
|
+
"last_name": zod_1.z.string().optional().describe('Last Name'),
|
|
786
|
+
"full_name": zod_1.z.string().describe('Full Name'),
|
|
787
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
788
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('List of emails (First one is the primary)'),
|
|
789
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('List of phones (First one is the primary)'),
|
|
790
|
+
"languages": zod_1.z.array(zod_1.z.string()).optional().describe('List of languages (First one is the primary)')
|
|
791
|
+
});
|
|
792
|
+
/**
|
|
793
|
+
* @summary Get all user conversations (Only _id and name available
|
|
794
|
+
*/
|
|
795
|
+
exports.getAllConversationsResponse = zod_1.z.object({
|
|
796
|
+
"results_count": zod_1.z.number().describe('Results count'),
|
|
797
|
+
"results": zod_1.z.array(zod_1.z.object({
|
|
798
|
+
"id": zod_1.z.string().describe('ID'),
|
|
799
|
+
"name": zod_1.z.string().describe('Name'),
|
|
800
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID'),
|
|
801
|
+
"type": zod_1.z.enum(['directMessage', 'customerConversation', 'namedConversation', 'asyncMeeting']).describe('Type')
|
|
802
|
+
})).optional()
|
|
803
|
+
});
|
|
804
|
+
/**
|
|
805
|
+
* @summary Get a conversation by id
|
|
806
|
+
*/
|
|
807
|
+
exports.getConversationByIdParams = zod_1.z.object({
|
|
808
|
+
"id": zod_1.z.string()
|
|
809
|
+
});
|
|
810
|
+
exports.getConversationByIdResponse = zod_1.z.object({
|
|
811
|
+
"id": zod_1.z.string().describe('ID'),
|
|
812
|
+
"link": zod_1.z.string().describe('Link to Conversation'),
|
|
813
|
+
"name": zod_1.z.string().describe('Name'),
|
|
814
|
+
"description": zod_1.z.string().optional().describe('Description'),
|
|
815
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID'),
|
|
816
|
+
"workspace_name": zod_1.z.string().describe('Workspace Name'),
|
|
817
|
+
"workspace_image_url": zod_1.z.string().optional().describe('Workspace Image Url'),
|
|
818
|
+
"owner_id": zod_1.z.string().describe('owner unique ID'),
|
|
819
|
+
"type": zod_1.z.enum(['directMessage', 'customerConversation', 'namedConversation', 'asyncMeeting']).describe('Type'),
|
|
820
|
+
"visibility": zod_1.z.enum(['private', 'workspace', 'public']).describe('Visibility'),
|
|
821
|
+
"total_messages": zod_1.z.number().describe('Total Messages'),
|
|
822
|
+
"total_duration_ms": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
823
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
824
|
+
"is_private": zod_1.z.boolean().describe('Is Private Conversation'),
|
|
825
|
+
"is_async": zod_1.z.boolean().describe('Is Async Conversation'),
|
|
826
|
+
"async_stats": zod_1.z.object({
|
|
827
|
+
"stats": zod_1.z.object({
|
|
828
|
+
"total_duration_milliseconds": zod_1.z.number().describe('Total duration in milliseconds'),
|
|
829
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
830
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
831
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
832
|
+
"total_users": zod_1.z.number().describe('Total users')
|
|
833
|
+
}).describe('Conversation stats'),
|
|
834
|
+
"user_stats": zod_1.z.array(zod_1.z.object({
|
|
835
|
+
"user_id": zod_1.z.string().describe('User unique ID'),
|
|
836
|
+
"total_messages_posted": zod_1.z.number().describe('Total messages posted'),
|
|
837
|
+
"total_sent_milliseconds": zod_1.z.number().describe('Total sent in milliseconds'),
|
|
838
|
+
"total_heard_milliseconds": zod_1.z.number().describe('Total heard in milliseconds'),
|
|
839
|
+
"total_engaged_percentage": zod_1.z.number().describe('Total engaged percentage'),
|
|
840
|
+
"total_heard_messages": zod_1.z.number().describe('Total heard messages'),
|
|
841
|
+
"total_unheard_messages": zod_1.z.number().describe('Total unheard messages')
|
|
842
|
+
})).describe('User stats')
|
|
843
|
+
}).optional().describe('Async Meeting Stats'),
|
|
844
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
845
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
846
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
847
|
+
});
|
|
848
|
+
/**
|
|
849
|
+
* @summary Get Conversation Users
|
|
850
|
+
*/
|
|
851
|
+
exports.getConversationUsersParams = zod_1.z.object({
|
|
852
|
+
"id": zod_1.z.string()
|
|
853
|
+
});
|
|
854
|
+
exports.getConversationUsersResponseItem = zod_1.z.object({
|
|
855
|
+
"id": zod_1.z.string().describe(' ID'),
|
|
856
|
+
"link": zod_1.z.string().describe('Link to User'),
|
|
857
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
858
|
+
"first_name": zod_1.z.string().describe('First Name'),
|
|
859
|
+
"last_name": zod_1.z.string().optional().describe('Last Name'),
|
|
860
|
+
"full_name": zod_1.z.string().describe('Full Name'),
|
|
861
|
+
"image_url": zod_1.z.string().optional().describe('Image Url'),
|
|
862
|
+
"emails": zod_1.z.array(zod_1.z.string()).optional().describe('List of emails (First one is the primary)'),
|
|
863
|
+
"phones": zod_1.z.array(zod_1.z.string()).optional().describe('List of phones (First one is the primary)'),
|
|
864
|
+
"languages": zod_1.z.array(zod_1.z.string()).optional().describe('List of languages (First one is the primary)')
|
|
865
|
+
});
|
|
866
|
+
exports.getConversationUsersResponse = zod_1.z.array(exports.getConversationUsersResponseItem);
|
|
867
|
+
/**
|
|
868
|
+
* @summary Get all Workspaces that user has access to with basic info
|
|
869
|
+
*/
|
|
870
|
+
exports.getAllWorkspacesWithBasicInfoResponseItem = zod_1.z.object({
|
|
871
|
+
"id": zod_1.z.string(),
|
|
872
|
+
"name": zod_1.z.string()
|
|
873
|
+
});
|
|
874
|
+
exports.getAllWorkspacesWithBasicInfoResponse = zod_1.z.array(exports.getAllWorkspacesWithBasicInfoResponseItem);
|
|
875
|
+
/**
|
|
876
|
+
* @summary Get Sample AI Responses for a System AI Prompt
|
|
877
|
+
*/
|
|
878
|
+
exports.getAiSystemPromptResponseParams = zod_1.z.object({
|
|
879
|
+
"prompt_id": zod_1.z.string()
|
|
880
|
+
});
|
|
881
|
+
/**
|
|
882
|
+
* @summary Get all root Folders
|
|
883
|
+
*/
|
|
884
|
+
exports.getAllRootFoldersQueryIncludeAllTreeDefault = false;
|
|
885
|
+
exports.getAllRootFoldersQuerySortDirectionDefault = "ASC";
|
|
886
|
+
exports.getAllRootFoldersQuerySortByDefault = "name";
|
|
887
|
+
exports.getAllRootFoldersQueryParams = zod_1.z.object({
|
|
888
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder Type'),
|
|
889
|
+
"include_all_tree": zod_1.z.boolean().optional().describe('Return all folders tree'),
|
|
890
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
891
|
+
"sort_direction": zod_1.z.enum(['ASC', 'DESC']).default(exports.getAllRootFoldersQuerySortDirectionDefault).describe('Sort order direction'),
|
|
892
|
+
"sort_by": zod_1.z.enum(['created_at', 'last_updated_at', 'name']).default(exports.getAllRootFoldersQuerySortByDefault).describe('Field to sort by')
|
|
893
|
+
});
|
|
894
|
+
exports.getAllRootFoldersResponseIncludeAllTreeDefault = false;
|
|
895
|
+
exports.getAllRootFoldersResponseSortDirectionDefault = "ASC";
|
|
896
|
+
exports.getAllRootFoldersResponseSortByDefault = "name";
|
|
897
|
+
exports.getAllRootFoldersResponseResultsItemTotalNestedFoldersCountDefault = 0;
|
|
898
|
+
exports.getAllRootFoldersResponseResultsItemTotalNestedMessagesCountDefault = 0;
|
|
899
|
+
exports.getAllRootFoldersResponseResultsItemSubfoldersItemTotalNestedFoldersCountDefault = 0;
|
|
900
|
+
exports.getAllRootFoldersResponseResultsItemSubfoldersItemTotalNestedMessagesCountDefault = 0;
|
|
901
|
+
exports.getAllRootFoldersResponse = zod_1.z.object({
|
|
902
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder Type'),
|
|
903
|
+
"include_all_tree": zod_1.z.boolean().optional().describe('Return all folders tree'),
|
|
904
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
905
|
+
"sort_direction": zod_1.z.enum(['ASC', 'DESC']).default(exports.getAllRootFoldersResponseSortDirectionDefault).describe('Sort order direction'),
|
|
906
|
+
"sort_by": zod_1.z.enum(['created_at', 'last_updated_at', 'name']).default(exports.getAllRootFoldersResponseSortByDefault).describe('Field to sort by'),
|
|
907
|
+
"results": zod_1.z.array(zod_1.z.object({
|
|
908
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
909
|
+
"name": zod_1.z.string().describe('Name'),
|
|
910
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
911
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
912
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
913
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
914
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
915
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
916
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
917
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
918
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
919
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
920
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
921
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
922
|
+
"subfolders": zod_1.z.array(zod_1.z.object({
|
|
923
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
924
|
+
"name": zod_1.z.string().describe('Name'),
|
|
925
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
926
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
927
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
928
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
929
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
930
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
931
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
932
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
933
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
934
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
935
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
936
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
937
|
+
})).optional().describe('Subfolders (only one deep level)')
|
|
938
|
+
})).optional().describe('List of Folders')
|
|
939
|
+
});
|
|
940
|
+
/**
|
|
941
|
+
* @summary Create a new Folder
|
|
942
|
+
*/
|
|
943
|
+
exports.createFolderBody = zod_1.z.object({
|
|
944
|
+
"name": zod_1.z.string().describe('Name of the Folder'),
|
|
945
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
946
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID'),
|
|
947
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID')
|
|
948
|
+
});
|
|
949
|
+
exports.createFolderResponseTotalNestedFoldersCountDefault = 0;
|
|
950
|
+
exports.createFolderResponseTotalNestedMessagesCountDefault = 0;
|
|
951
|
+
exports.createFolderResponseSubfoldersItemTotalNestedFoldersCountDefault = 0;
|
|
952
|
+
exports.createFolderResponseSubfoldersItemTotalNestedMessagesCountDefault = 0;
|
|
953
|
+
exports.createFolderResponse = zod_1.z.object({
|
|
954
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
955
|
+
"name": zod_1.z.string().describe('Name'),
|
|
956
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
957
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
958
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
959
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
960
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
961
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
962
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
963
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
964
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
965
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
966
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
967
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
968
|
+
"subfolders": zod_1.z.array(zod_1.z.object({
|
|
969
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
970
|
+
"name": zod_1.z.string().describe('Name'),
|
|
971
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
972
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
973
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
974
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
975
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
976
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
977
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
978
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
979
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
980
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
981
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
982
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
983
|
+
})).optional().describe('Subfolders (only one deep level)')
|
|
984
|
+
});
|
|
985
|
+
/**
|
|
986
|
+
* @summary Get count of all folders, messages and message_ids not in folders grouped by workspace
|
|
987
|
+
*/
|
|
988
|
+
exports.getCountsGroupedByWorkspaceQueryParams = zod_1.z.object({
|
|
989
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder Type'),
|
|
990
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID')
|
|
991
|
+
});
|
|
992
|
+
exports.getCountsGroupedByWorkspaceResponseRootFoldersItemTotalNestedFoldersCountDefault = 0;
|
|
993
|
+
exports.getCountsGroupedByWorkspaceResponseRootFoldersItemTotalNestedMessagesCountDefault = 0;
|
|
994
|
+
exports.getCountsGroupedByWorkspaceResponseRootFoldersItemSubfoldersItemTotalNestedFoldersCountDefault = 0;
|
|
995
|
+
exports.getCountsGroupedByWorkspaceResponseRootFoldersItemSubfoldersItemTotalNestedMessagesCountDefault = 0;
|
|
996
|
+
exports.getCountsGroupedByWorkspaceResponseItem = zod_1.z.object({
|
|
997
|
+
"workspace_id": zod_1.z.string(),
|
|
998
|
+
"total_folders": zod_1.z.number(),
|
|
999
|
+
"total_messages": zod_1.z.number(),
|
|
1000
|
+
"message_ids_without_folder": zod_1.z.array(zod_1.z.string()).optional().describe('List of Messages without Folder'),
|
|
1001
|
+
"root_folders": zod_1.z.array(zod_1.z.object({
|
|
1002
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1003
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1004
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1005
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1006
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1007
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1008
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1009
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1010
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1011
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1012
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1013
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1014
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1015
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
1016
|
+
"subfolders": zod_1.z.array(zod_1.z.object({
|
|
1017
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1018
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1019
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1020
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1021
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1022
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1023
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1024
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1025
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1026
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1027
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1028
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1029
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1030
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
1031
|
+
})).optional().describe('Subfolders (only one deep level)')
|
|
1032
|
+
})).optional().describe('List of Root Folders'),
|
|
1033
|
+
"last_updated_at": zod_1.z.string().datetime({})
|
|
1034
|
+
});
|
|
1035
|
+
exports.getCountsGroupedByWorkspaceResponse = zod_1.z.array(exports.getCountsGroupedByWorkspaceResponseItem);
|
|
1036
|
+
/**
|
|
1037
|
+
* @summary Get Folder with Messages
|
|
1038
|
+
*/
|
|
1039
|
+
exports.getFolderMessagesParams = zod_1.z.object({
|
|
1040
|
+
"id": zod_1.z.string()
|
|
1041
|
+
});
|
|
1042
|
+
exports.getFolderMessagesResponseFolderTotalNestedFoldersCountDefault = 0;
|
|
1043
|
+
exports.getFolderMessagesResponseFolderTotalNestedMessagesCountDefault = 0;
|
|
1044
|
+
exports.getFolderMessagesResponseFolderSubfoldersItemTotalNestedFoldersCountDefault = 0;
|
|
1045
|
+
exports.getFolderMessagesResponseFolderSubfoldersItemTotalNestedMessagesCountDefault = 0;
|
|
1046
|
+
exports.getFolderMessagesResponseMessagesItemSocketDisconnectsWhileStreamingDefault = 0;
|
|
1047
|
+
exports.getFolderMessagesResponse = zod_1.z.object({
|
|
1048
|
+
"folder": zod_1.z.object({
|
|
1049
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1050
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1051
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1052
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1053
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1054
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1055
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1056
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1057
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1058
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1059
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1060
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1061
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1062
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
1063
|
+
"subfolders": zod_1.z.array(zod_1.z.object({
|
|
1064
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1065
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1066
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1067
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1068
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1069
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1070
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1071
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1072
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1073
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1074
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1075
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1076
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1077
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
1078
|
+
})).optional().describe('Subfolders (only one deep level)')
|
|
1079
|
+
}).describe('Folder'),
|
|
1080
|
+
"messages": zod_1.z.array(zod_1.z.object({
|
|
1081
|
+
"message_id": zod_1.z.string(),
|
|
1082
|
+
"creator_id": zod_1.z.string(),
|
|
1083
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1084
|
+
"deleted_at": zod_1.z.string().datetime({}).nullish(),
|
|
1085
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1086
|
+
"workspace_ids": zod_1.z.array(zod_1.z.string()),
|
|
1087
|
+
"channel_ids": zod_1.z.array(zod_1.z.string()),
|
|
1088
|
+
"parent_message_id": zod_1.z.string().nullish(),
|
|
1089
|
+
"heard_ms": zod_1.z.number().nullish().describe('The number of ms of audio listened to by the user requesting the message'),
|
|
1090
|
+
"utm_data": zod_1.z.object({
|
|
1091
|
+
"utm_source": zod_1.z.string().optional(),
|
|
1092
|
+
"utm_medium": zod_1.z.string().optional(),
|
|
1093
|
+
"utm_campaign": zod_1.z.string().optional(),
|
|
1094
|
+
"utm_term": zod_1.z.string().optional(),
|
|
1095
|
+
"utm_content": zod_1.z.string().optional()
|
|
1096
|
+
}).nullish(),
|
|
1097
|
+
"attachments": zod_1.z.array(zod_1.z.object({
|
|
1098
|
+
"id": zod_1.z.string(),
|
|
1099
|
+
"creator_id": zod_1.z.string(),
|
|
1100
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1101
|
+
"type": zod_1.z.enum(['link', 'file', 'location']),
|
|
1102
|
+
"link": zod_1.z.string(),
|
|
1103
|
+
"active_begin": zod_1.z.string().datetime({}).optional(),
|
|
1104
|
+
"active_end": zod_1.z.string().datetime({}).optional(),
|
|
1105
|
+
"filename": zod_1.z.string().optional(),
|
|
1106
|
+
"mime_type": zod_1.z.string().optional(),
|
|
1107
|
+
"length_in_bytes": zod_1.z.number().optional(),
|
|
1108
|
+
"location": zod_1.z.object({}).optional()
|
|
1109
|
+
})),
|
|
1110
|
+
"notes": zod_1.z.string(),
|
|
1111
|
+
"notify": zod_1.z.boolean().describe('Has the logged in user cleared the notification for this message'),
|
|
1112
|
+
"last_heard_update": zod_1.z.string().datetime({}).describe('Last time we listened/updated notify bit'),
|
|
1113
|
+
"reaction_summary": zod_1.z.object({
|
|
1114
|
+
"reaction_counts": zod_1.z.record(zod_1.z.string(), zod_1.z.number()),
|
|
1115
|
+
"top_user_reactions": zod_1.z.array(zod_1.z.object({
|
|
1116
|
+
"user_id": zod_1.z.string(),
|
|
1117
|
+
"reaction_id": zod_1.z.string()
|
|
1118
|
+
}))
|
|
1119
|
+
}),
|
|
1120
|
+
"name": zod_1.z.string().nullish(),
|
|
1121
|
+
"is_text_message": zod_1.z.boolean(),
|
|
1122
|
+
"status": zod_1.z.enum(['offline', 'paused', 'processing', 'scheduled', 'active', 'deleted', 'account-deleted', 'initializing', 'inprogress', 'canceled', 'failed']),
|
|
1123
|
+
"label_ids": zod_1.z.array(zod_1.z.string()),
|
|
1124
|
+
"audio_models": zod_1.z.array(zod_1.z.object({
|
|
1125
|
+
"_id": zod_1.z.string(),
|
|
1126
|
+
"url": zod_1.z.string(),
|
|
1127
|
+
"extension": zod_1.z.string().nullable(),
|
|
1128
|
+
"streaming": zod_1.z.boolean(),
|
|
1129
|
+
"language": zod_1.z.string(),
|
|
1130
|
+
"duration_ms": zod_1.z.number(),
|
|
1131
|
+
"waveform_percentages": zod_1.z.array(zod_1.z.number()),
|
|
1132
|
+
"is_original_audio": zod_1.z.boolean()
|
|
1133
|
+
})),
|
|
1134
|
+
"text_models": zod_1.z.array(zod_1.z.object({
|
|
1135
|
+
"type": zod_1.z.enum(['transcript', 'transcript_with_timecode', 'summary', 'topic', 'bullet_list']),
|
|
1136
|
+
"audio_id": zod_1.z.string().nullable(),
|
|
1137
|
+
"language_id": zod_1.z.string(),
|
|
1138
|
+
"value": zod_1.z.string(),
|
|
1139
|
+
"timecodes": zod_1.z.array(zod_1.z.object({
|
|
1140
|
+
"t": zod_1.z.string().describe('The text'),
|
|
1141
|
+
"s": zod_1.z.number().describe('The start time in ms'),
|
|
1142
|
+
"e": zod_1.z.number().describe('The end time in ms')
|
|
1143
|
+
}))
|
|
1144
|
+
})),
|
|
1145
|
+
"source_message_id": zod_1.z.string().nullable(),
|
|
1146
|
+
"cache_key": zod_1.z.string(),
|
|
1147
|
+
"audio_delivery": zod_1.z.enum(['recording', 'streaming']),
|
|
1148
|
+
"users_not_allowed_to_receive_notifications": zod_1.z.array(zod_1.z.object({
|
|
1149
|
+
"user_id": zod_1.z.string(),
|
|
1150
|
+
"phone": zod_1.z.string()
|
|
1151
|
+
})).optional(),
|
|
1152
|
+
"users_not_allowed_to_receive_notifications_v2": zod_1.z.array(zod_1.z.object({
|
|
1153
|
+
"user_id": zod_1.z.string(),
|
|
1154
|
+
"phone": zod_1.z.string().nullish(),
|
|
1155
|
+
"email": zod_1.z.string().nullish()
|
|
1156
|
+
})).optional(),
|
|
1157
|
+
"duration_ms": zod_1.z.number().describe('The length of the message in milliseconds'),
|
|
1158
|
+
"total_heard_ms": zod_1.z.number().describe('The number of ms of audio listened to by all users'),
|
|
1159
|
+
"notified_users": zod_1.z.number().describe('Then number of users who have a notification for this message and have not listened to the audio.'),
|
|
1160
|
+
"users_caught_up": zod_1.z.enum(['all', 'some', 'none']).describe('The number of users that listened to the audio or removed the notification'),
|
|
1161
|
+
"forward_id": zod_1.z.string().nullish().describe('The ID of a forwarded message (Deprecated, for new implementations we should start using share_link_id'),
|
|
1162
|
+
"share_link_id": zod_1.z.string().nullish().describe('The ID of a Share Link to a message'),
|
|
1163
|
+
"stream_key": zod_1.z.string().nullish().describe('The stream key used to add audio to the message'),
|
|
1164
|
+
"socket_disconnects_while_streaming": zod_1.z.number().describe('The number of times the socket disconnected while the creator was sending audio'),
|
|
1165
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).nullable().describe('Message type'),
|
|
1166
|
+
"channel_sequence": zod_1.z.number().describe('The sequencial id of the message within the channel'),
|
|
1167
|
+
"last_heard_at": zod_1.z.string().datetime({}).describe('The last time anyone listened or cleared notified on this message'),
|
|
1168
|
+
"folder_id": zod_1.z.string().nullish().describe('Folder ID, only present when the message type is one of: voicememo,prerecorded')
|
|
1169
|
+
})).optional().describe('List of Messages')
|
|
1170
|
+
});
|
|
1171
|
+
/**
|
|
1172
|
+
* @summary Get Folder by ID
|
|
1173
|
+
*/
|
|
1174
|
+
exports.getFolderByIdParams = zod_1.z.object({
|
|
1175
|
+
"id": zod_1.z.string()
|
|
1176
|
+
});
|
|
1177
|
+
exports.getFolderByIdQueryIncludeFirstLevelTreeDefault = false;
|
|
1178
|
+
exports.getFolderByIdQueryDirectionDefault = "newer";
|
|
1179
|
+
exports.getFolderByIdQueryParams = zod_1.z.object({
|
|
1180
|
+
"include_first_level_tree": zod_1.z.boolean().optional().describe('Defines if the first level of the folder tree should be returned'),
|
|
1181
|
+
"direction": zod_1.z.enum(['older', 'newer']).default(exports.getFolderByIdQueryDirectionDefault).describe('Direction of the results (newer or older)'),
|
|
1182
|
+
"date": zod_1.z.string().datetime({}).nullish().describe('Return only Subfolders updated based on the date and direction (must inform include_first_level_tree = true)')
|
|
1183
|
+
});
|
|
1184
|
+
exports.getFolderByIdResponseTotalNestedFoldersCountDefault = 0;
|
|
1185
|
+
exports.getFolderByIdResponseTotalNestedMessagesCountDefault = 0;
|
|
1186
|
+
exports.getFolderByIdResponseSubfoldersItemTotalNestedFoldersCountDefault = 0;
|
|
1187
|
+
exports.getFolderByIdResponseSubfoldersItemTotalNestedMessagesCountDefault = 0;
|
|
1188
|
+
exports.getFolderByIdResponse = zod_1.z.object({
|
|
1189
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1190
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1191
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1192
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1193
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1194
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1195
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1196
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1197
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1198
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1199
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1200
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1201
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1202
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
1203
|
+
"subfolders": zod_1.z.array(zod_1.z.object({
|
|
1204
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1205
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1206
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1207
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1208
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1209
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1210
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1211
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1212
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1213
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1214
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1215
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1216
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1217
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
1218
|
+
})).optional().describe('Subfolders (only one deep level)')
|
|
1219
|
+
});
|
|
1220
|
+
/**
|
|
1221
|
+
* @summary Update Folder Name
|
|
1222
|
+
*/
|
|
1223
|
+
exports.updateFolderNameParams = zod_1.z.object({
|
|
1224
|
+
"id": zod_1.z.string()
|
|
1225
|
+
});
|
|
1226
|
+
exports.updateFolderNameBody = zod_1.z.object({
|
|
1227
|
+
"name": zod_1.z.string().describe('New Folder Name')
|
|
1228
|
+
});
|
|
1229
|
+
exports.updateFolderNameResponseTotalNestedFoldersCountDefault = 0;
|
|
1230
|
+
exports.updateFolderNameResponseTotalNestedMessagesCountDefault = 0;
|
|
1231
|
+
exports.updateFolderNameResponseSubfoldersItemTotalNestedFoldersCountDefault = 0;
|
|
1232
|
+
exports.updateFolderNameResponseSubfoldersItemTotalNestedMessagesCountDefault = 0;
|
|
1233
|
+
exports.updateFolderNameResponse = zod_1.z.object({
|
|
1234
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1235
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1236
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1237
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1238
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1239
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1240
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1241
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1242
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1243
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1244
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1245
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1246
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1247
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
1248
|
+
"subfolders": zod_1.z.array(zod_1.z.object({
|
|
1249
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1250
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1251
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1252
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1253
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1254
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1255
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1256
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1257
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1258
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1259
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1260
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1261
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1262
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
1263
|
+
})).optional().describe('Subfolders (only one deep level)')
|
|
1264
|
+
});
|
|
1265
|
+
/**
|
|
1266
|
+
* @summary Delete Folder and all subfolders and messages in nested folders
|
|
1267
|
+
*/
|
|
1268
|
+
exports.deleteFolderParams = zod_1.z.object({
|
|
1269
|
+
"id": zod_1.z.string()
|
|
1270
|
+
});
|
|
1271
|
+
/**
|
|
1272
|
+
* Only allowed to move messages of type: voicememo,prerecorded.
|
|
1273
|
+
* @summary Move a message into specific Folder or into a Workspace
|
|
1274
|
+
*/
|
|
1275
|
+
exports.addMessageToFolderOrWorkspaceBody = zod_1.z.object({
|
|
1276
|
+
"message_id": zod_1.z.string().describe('Only allowed to add messages of type: voicememo,prerecorded'),
|
|
1277
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
1278
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID')
|
|
1279
|
+
});
|
|
1280
|
+
exports.addMessageToFolderOrWorkspaceResponseSocketDisconnectsWhileStreamingDefault = 0;
|
|
1281
|
+
exports.addMessageToFolderOrWorkspaceResponse = zod_1.z.object({
|
|
1282
|
+
"message_id": zod_1.z.string(),
|
|
1283
|
+
"creator_id": zod_1.z.string(),
|
|
1284
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1285
|
+
"deleted_at": zod_1.z.string().datetime({}).nullish(),
|
|
1286
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1287
|
+
"workspace_ids": zod_1.z.array(zod_1.z.string()),
|
|
1288
|
+
"channel_ids": zod_1.z.array(zod_1.z.string()),
|
|
1289
|
+
"parent_message_id": zod_1.z.string().nullish(),
|
|
1290
|
+
"heard_ms": zod_1.z.number().nullish().describe('The number of ms of audio listened to by the user requesting the message'),
|
|
1291
|
+
"utm_data": zod_1.z.object({
|
|
1292
|
+
"utm_source": zod_1.z.string().optional(),
|
|
1293
|
+
"utm_medium": zod_1.z.string().optional(),
|
|
1294
|
+
"utm_campaign": zod_1.z.string().optional(),
|
|
1295
|
+
"utm_term": zod_1.z.string().optional(),
|
|
1296
|
+
"utm_content": zod_1.z.string().optional()
|
|
1297
|
+
}).nullish(),
|
|
1298
|
+
"attachments": zod_1.z.array(zod_1.z.object({
|
|
1299
|
+
"id": zod_1.z.string(),
|
|
1300
|
+
"creator_id": zod_1.z.string(),
|
|
1301
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1302
|
+
"type": zod_1.z.enum(['link', 'file', 'location']),
|
|
1303
|
+
"link": zod_1.z.string(),
|
|
1304
|
+
"active_begin": zod_1.z.string().datetime({}).optional(),
|
|
1305
|
+
"active_end": zod_1.z.string().datetime({}).optional(),
|
|
1306
|
+
"filename": zod_1.z.string().optional(),
|
|
1307
|
+
"mime_type": zod_1.z.string().optional(),
|
|
1308
|
+
"length_in_bytes": zod_1.z.number().optional(),
|
|
1309
|
+
"location": zod_1.z.object({}).optional()
|
|
1310
|
+
})),
|
|
1311
|
+
"notes": zod_1.z.string(),
|
|
1312
|
+
"notify": zod_1.z.boolean().describe('Has the logged in user cleared the notification for this message'),
|
|
1313
|
+
"last_heard_update": zod_1.z.string().datetime({}).describe('Last time we listened/updated notify bit'),
|
|
1314
|
+
"reaction_summary": zod_1.z.object({
|
|
1315
|
+
"reaction_counts": zod_1.z.record(zod_1.z.string(), zod_1.z.number()),
|
|
1316
|
+
"top_user_reactions": zod_1.z.array(zod_1.z.object({
|
|
1317
|
+
"user_id": zod_1.z.string(),
|
|
1318
|
+
"reaction_id": zod_1.z.string()
|
|
1319
|
+
}))
|
|
1320
|
+
}),
|
|
1321
|
+
"name": zod_1.z.string().nullish(),
|
|
1322
|
+
"is_text_message": zod_1.z.boolean(),
|
|
1323
|
+
"status": zod_1.z.enum(['offline', 'paused', 'processing', 'scheduled', 'active', 'deleted', 'account-deleted', 'initializing', 'inprogress', 'canceled', 'failed']),
|
|
1324
|
+
"label_ids": zod_1.z.array(zod_1.z.string()),
|
|
1325
|
+
"audio_models": zod_1.z.array(zod_1.z.object({
|
|
1326
|
+
"_id": zod_1.z.string(),
|
|
1327
|
+
"url": zod_1.z.string(),
|
|
1328
|
+
"extension": zod_1.z.string().nullable(),
|
|
1329
|
+
"streaming": zod_1.z.boolean(),
|
|
1330
|
+
"language": zod_1.z.string(),
|
|
1331
|
+
"duration_ms": zod_1.z.number(),
|
|
1332
|
+
"waveform_percentages": zod_1.z.array(zod_1.z.number()),
|
|
1333
|
+
"is_original_audio": zod_1.z.boolean()
|
|
1334
|
+
})),
|
|
1335
|
+
"text_models": zod_1.z.array(zod_1.z.object({
|
|
1336
|
+
"type": zod_1.z.enum(['transcript', 'transcript_with_timecode', 'summary', 'topic', 'bullet_list']),
|
|
1337
|
+
"audio_id": zod_1.z.string().nullable(),
|
|
1338
|
+
"language_id": zod_1.z.string(),
|
|
1339
|
+
"value": zod_1.z.string(),
|
|
1340
|
+
"timecodes": zod_1.z.array(zod_1.z.object({
|
|
1341
|
+
"t": zod_1.z.string().describe('The text'),
|
|
1342
|
+
"s": zod_1.z.number().describe('The start time in ms'),
|
|
1343
|
+
"e": zod_1.z.number().describe('The end time in ms')
|
|
1344
|
+
}))
|
|
1345
|
+
})),
|
|
1346
|
+
"source_message_id": zod_1.z.string().nullable(),
|
|
1347
|
+
"cache_key": zod_1.z.string(),
|
|
1348
|
+
"audio_delivery": zod_1.z.enum(['recording', 'streaming']),
|
|
1349
|
+
"users_not_allowed_to_receive_notifications": zod_1.z.array(zod_1.z.object({
|
|
1350
|
+
"user_id": zod_1.z.string(),
|
|
1351
|
+
"phone": zod_1.z.string()
|
|
1352
|
+
})).optional(),
|
|
1353
|
+
"users_not_allowed_to_receive_notifications_v2": zod_1.z.array(zod_1.z.object({
|
|
1354
|
+
"user_id": zod_1.z.string(),
|
|
1355
|
+
"phone": zod_1.z.string().nullish(),
|
|
1356
|
+
"email": zod_1.z.string().nullish()
|
|
1357
|
+
})).optional(),
|
|
1358
|
+
"duration_ms": zod_1.z.number().describe('The length of the message in milliseconds'),
|
|
1359
|
+
"total_heard_ms": zod_1.z.number().describe('The number of ms of audio listened to by all users'),
|
|
1360
|
+
"notified_users": zod_1.z.number().describe('Then number of users who have a notification for this message and have not listened to the audio.'),
|
|
1361
|
+
"users_caught_up": zod_1.z.enum(['all', 'some', 'none']).describe('The number of users that listened to the audio or removed the notification'),
|
|
1362
|
+
"forward_id": zod_1.z.string().nullish().describe('The ID of a forwarded message (Deprecated, for new implementations we should start using share_link_id'),
|
|
1363
|
+
"share_link_id": zod_1.z.string().nullish().describe('The ID of a Share Link to a message'),
|
|
1364
|
+
"stream_key": zod_1.z.string().nullish().describe('The stream key used to add audio to the message'),
|
|
1365
|
+
"socket_disconnects_while_streaming": zod_1.z.number().describe('The number of times the socket disconnected while the creator was sending audio'),
|
|
1366
|
+
"type": zod_1.z.enum(['channel', 'prerecorded', 'voicememo', 'stored', 'welcome']).nullable().describe('Message type'),
|
|
1367
|
+
"channel_sequence": zod_1.z.number().describe('The sequencial id of the message within the channel'),
|
|
1368
|
+
"last_heard_at": zod_1.z.string().datetime({}).describe('The last time anyone listened or cleared notified on this message'),
|
|
1369
|
+
"folder_id": zod_1.z.string().nullish().describe('Folder ID, only present when the message type is one of: voicememo,prerecorded')
|
|
1370
|
+
});
|
|
1371
|
+
/**
|
|
1372
|
+
* @summary Move a Folder into another Folder or into a Workspace
|
|
1373
|
+
*/
|
|
1374
|
+
exports.moveFolderParams = zod_1.z.object({
|
|
1375
|
+
"id": zod_1.z.string()
|
|
1376
|
+
});
|
|
1377
|
+
exports.moveFolderBody = zod_1.z.object({
|
|
1378
|
+
"workspace_id": zod_1.z.string().optional().describe('Workspace ID'),
|
|
1379
|
+
"folder_id": zod_1.z.string().optional().describe('Folder ID')
|
|
1380
|
+
});
|
|
1381
|
+
exports.moveFolderResponseTotalNestedFoldersCountDefault = 0;
|
|
1382
|
+
exports.moveFolderResponseTotalNestedMessagesCountDefault = 0;
|
|
1383
|
+
exports.moveFolderResponseSubfoldersItemTotalNestedFoldersCountDefault = 0;
|
|
1384
|
+
exports.moveFolderResponseSubfoldersItemTotalNestedMessagesCountDefault = 0;
|
|
1385
|
+
exports.moveFolderResponse = zod_1.z.object({
|
|
1386
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1387
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1388
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1389
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1390
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1391
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1392
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1393
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1394
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1395
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1396
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1397
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1398
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1399
|
+
"deleted_at": zod_1.z.string().datetime({}).optional(),
|
|
1400
|
+
"subfolders": zod_1.z.array(zod_1.z.object({
|
|
1401
|
+
"id": zod_1.z.string().describe('Unique Identifier'),
|
|
1402
|
+
"name": zod_1.z.string().describe('Name'),
|
|
1403
|
+
"creator_id": zod_1.z.string().describe('Creator'),
|
|
1404
|
+
"parent_folder_id": zod_1.z.string().optional().describe('Parent Folder ID'),
|
|
1405
|
+
"subfolder_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Subfolder IDs'),
|
|
1406
|
+
"message_ids": zod_1.z.array(zod_1.z.string()).optional().describe('List of Message IDs'),
|
|
1407
|
+
"path": zod_1.z.array(zod_1.z.string()).optional().describe('Ordered List of all folders in the path from root to this folder'),
|
|
1408
|
+
"total_nested_folders_count": zod_1.z.number().describe('Total count for all Nested Folders'),
|
|
1409
|
+
"total_nested_messages_count": zod_1.z.number().describe('Total count for all Nested Messages'),
|
|
1410
|
+
"type": zod_1.z.enum(['voicememo', 'prerecorded']).describe('Folder type'),
|
|
1411
|
+
"workspace_id": zod_1.z.string().describe('Workspace ID where folder belongs to'),
|
|
1412
|
+
"created_at": zod_1.z.string().datetime({}),
|
|
1413
|
+
"last_updated_at": zod_1.z.string().datetime({}),
|
|
1414
|
+
"deleted_at": zod_1.z.string().datetime({}).optional()
|
|
1415
|
+
})).optional().describe('Subfolders (only one deep level)')
|
|
1416
|
+
});
|