@band-ai/rest-client 0.0.117 → 0.0.118
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/README.md +12 -12
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +39 -12
- package/dist/cjs/Client.js +70 -25
- package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +6 -0
- package/dist/cjs/api/errors/ServiceUnavailableError.js +54 -0
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -2
- package/dist/cjs/api/errors/index.d.ts +1 -0
- package/dist/cjs/api/errors/index.js +1 -0
- package/dist/cjs/api/resources/agentApiActivity/client/Client.d.ts +45 -0
- package/dist/cjs/api/resources/agentApiActivity/client/Client.js +137 -0
- package/dist/cjs/api/resources/agentApiActivity/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentApiActivity/client/index.js +17 -0
- package/dist/cjs/api/resources/agentApiActivity/client/requests/ReportAgentChatActivityRequest.d.ts +10 -0
- package/dist/cjs/api/resources/agentApiActivity/client/requests/ReportAgentChatActivityRequest.js +3 -0
- package/dist/cjs/api/resources/agentApiActivity/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentApiActivity/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/agentApiActivity/exports.d.ts +2 -0
- package/dist/cjs/api/resources/agentApiActivity/exports.js +21 -0
- package/dist/cjs/api/resources/agentApiActivity/index.d.ts +2 -0
- package/dist/cjs/api/resources/agentApiActivity/index.js +18 -0
- package/dist/cjs/api/resources/agentApiActivity/types/ReportAgentChatActivityResponse.d.ts +4 -0
- package/dist/cjs/api/resources/agentApiActivity/types/ReportAgentChatActivityResponse.js +3 -0
- package/dist/cjs/api/resources/agentApiActivity/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/agentApiActivity/types/index.js +17 -0
- package/dist/cjs/api/resources/agentApiChats/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/agentApiChats/client/Client.js +51 -51
- package/dist/cjs/api/resources/agentApiContacts/client/Client.d.ts +33 -33
- package/dist/cjs/api/resources/agentApiContacts/client/Client.js +88 -88
- package/dist/cjs/api/resources/agentApiMemories/client/Client.d.ts +50 -50
- package/dist/cjs/api/resources/agentApiMemories/client/Client.js +100 -100
- package/dist/cjs/api/resources/agentApiMessages/client/Client.d.ts +49 -49
- package/dist/cjs/api/resources/agentApiMessages/client/Client.js +79 -76
- package/dist/cjs/api/resources/humanApiAgents/client/Client.d.ts +107 -0
- package/dist/cjs/api/resources/humanApiAgents/client/Client.js +299 -0
- package/dist/cjs/api/resources/humanApiAgents/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiAgents/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/DeleteMyAgentRequest.d.ts +10 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/DeleteMyAgentRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/ListMyAgentsRequest.d.ts +35 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/ListMyAgentsRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/RegisterMyAgentRequest.d.ts +13 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/RegisterMyAgentRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/humanApiAgents/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiAgents/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiAgents/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiAgents/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiAgents/index.js +18 -0
- package/dist/cjs/api/resources/humanApiAgents/types/DeleteMyAgentResponse.d.ts +15 -0
- package/dist/cjs/api/resources/humanApiAgents/types/DeleteMyAgentResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiAgents/types/ListMyAgentsRequestOrder.d.ts +5 -0
- package/dist/cjs/api/resources/humanApiAgents/types/ListMyAgentsRequestOrder.js +8 -0
- package/dist/cjs/api/resources/humanApiAgents/types/ListMyAgentsRequestSort.d.ts +6 -0
- package/dist/cjs/api/resources/humanApiAgents/types/ListMyAgentsRequestSort.js +9 -0
- package/dist/cjs/api/resources/humanApiAgents/types/ListMyAgentsResponse.d.ts +36 -0
- package/dist/cjs/api/resources/humanApiAgents/types/ListMyAgentsResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiAgents/types/RegisterMyAgentResponse.d.ts +27 -0
- package/dist/cjs/api/resources/humanApiAgents/types/RegisterMyAgentResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiAgents/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/humanApiAgents/types/index.js +21 -0
- package/dist/cjs/api/resources/humanApiChats/client/Client.d.ts +81 -0
- package/dist/cjs/api/resources/humanApiChats/client/Client.js +262 -0
- package/dist/cjs/api/resources/humanApiChats/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiChats/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiChats/client/requests/CreateMyChatRoomRequest.d.ts +17 -0
- package/dist/cjs/api/resources/humanApiChats/client/requests/CreateMyChatRoomRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiChats/client/requests/ListMyChatsRequest.d.ts +32 -0
- package/dist/cjs/api/resources/humanApiChats/client/requests/ListMyChatsRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiChats/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiChats/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiChats/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiChats/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiChats/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiChats/index.js +18 -0
- package/dist/cjs/api/resources/humanApiChats/types/CreateMyChatRoomResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiChats/types/CreateMyChatRoomResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiChats/types/GetMyChatRoomResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiChats/types/GetMyChatRoomResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestOrder.d.ts +5 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestOrder.js +8 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestSortBy.d.ts +5 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestSortBy.js +8 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestStatus.d.ts +6 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestStatus.js +9 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestType.d.ts +6 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsRequestType.js +9 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsResponse.d.ts +23 -0
- package/dist/cjs/api/resources/humanApiChats/types/ListMyChatsResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiChats/types/index.d.ts +7 -0
- package/dist/cjs/api/resources/humanApiChats/types/index.js +23 -0
- package/dist/cjs/api/resources/humanApiContacts/client/Client.d.ts +201 -0
- package/dist/cjs/api/resources/humanApiContacts/client/Client.js +648 -0
- package/dist/cjs/api/resources/humanApiContacts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiContacts/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/CreateContactRequestRequest.d.ts +19 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/CreateContactRequestRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ListMyContactsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ListMyContactsRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ListReceivedContactRequestsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ListReceivedContactRequestsRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ListSentContactRequestsRequest.d.ts +17 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ListSentContactRequestsRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/RemoveMyContactRequest.d.ts +10 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/RemoveMyContactRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ResolveHandleRequest.d.ts +10 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/ResolveHandleRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/index.d.ts +6 -0
- package/dist/cjs/api/resources/humanApiContacts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiContacts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiContacts/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiContacts/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiContacts/index.js +18 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ApproveContactRequestResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ApproveContactRequestResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/CancelContactRequestResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiContacts/types/CancelContactRequestResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/CreateContactRequestResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiContacts/types/CreateContactRequestResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListMyContactsResponse.d.ts +21 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListMyContactsResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListReceivedContactRequestsResponse.d.ts +21 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListReceivedContactRequestsResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListSentContactRequestsRequestStatus.d.ts +9 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListSentContactRequestsRequestStatus.js +12 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListSentContactRequestsResponse.d.ts +21 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ListSentContactRequestsResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/RejectContactRequestResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiContacts/types/RejectContactRequestResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/RemoveMyContactResponse.d.ts +8 -0
- package/dist/cjs/api/resources/humanApiContacts/types/RemoveMyContactResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ResolveHandleResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiContacts/types/ResolveHandleResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiContacts/types/index.d.ts +10 -0
- package/dist/cjs/api/resources/humanApiContacts/types/index.js +26 -0
- package/dist/cjs/api/resources/humanApiMemories/client/Client.d.ts +131 -0
- package/dist/cjs/api/resources/humanApiMemories/client/Client.js +426 -0
- package/dist/cjs/api/resources/humanApiMemories/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiMemories/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiMemories/client/requests/ListUserMemoriesRequest.d.ts +31 -0
- package/dist/cjs/api/resources/humanApiMemories/client/requests/ListUserMemoriesRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiMemories/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiMemories/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiMemories/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiMemories/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiMemories/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiMemories/index.js +18 -0
- package/dist/cjs/api/resources/humanApiMemories/types/ArchiveUserMemoryResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiMemories/types/ArchiveUserMemoryResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiMemories/types/GetUserMemoryResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiMemories/types/GetUserMemoryResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiMemories/types/ListUserMemoriesResponse.d.ts +13 -0
- package/dist/cjs/api/resources/humanApiMemories/types/ListUserMemoriesResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiMemories/types/RestoreUserMemoryResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiMemories/types/RestoreUserMemoryResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiMemories/types/SupersedeUserMemoryResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiMemories/types/SupersedeUserMemoryResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiMemories/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/humanApiMemories/types/index.js +21 -0
- package/dist/cjs/api/resources/humanApiMessages/client/Client.d.ts +97 -0
- package/dist/cjs/api/resources/humanApiMessages/client/Client.js +237 -0
- package/dist/cjs/api/resources/humanApiMessages/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiMessages/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiMessages/client/requests/ListMyChatMessagesRequest.d.ts +26 -0
- package/dist/cjs/api/resources/humanApiMessages/client/requests/ListMyChatMessagesRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiMessages/client/requests/SendMyChatMessageRequest.d.ts +15 -0
- package/dist/cjs/api/resources/humanApiMessages/client/requests/SendMyChatMessageRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiMessages/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiMessages/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiMessages/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiMessages/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiMessages/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiMessages/index.js +18 -0
- package/dist/cjs/api/resources/humanApiMessages/types/ListMyChatMessagesRequestMessageType.d.ts +10 -0
- package/dist/cjs/api/resources/humanApiMessages/types/ListMyChatMessagesRequestMessageType.js +13 -0
- package/dist/cjs/api/resources/humanApiMessages/types/ListMyChatMessagesResponse.d.ts +23 -0
- package/dist/cjs/api/resources/humanApiMessages/types/ListMyChatMessagesResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiMessages/types/SendMyChatMessageResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiMessages/types/SendMyChatMessageResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiMessages/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/humanApiMessages/types/index.js +19 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/Client.d.ts +84 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/Client.js +264 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/requests/AddMyChatParticipantRequest.d.ts +12 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/requests/AddMyChatParticipantRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/requests/ListMyChatParticipantsRequest.d.ts +23 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/requests/ListMyChatParticipantsRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiParticipants/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiParticipants/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiParticipants/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiParticipants/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiParticipants/index.js +18 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/AddMyChatParticipantResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/AddMyChatParticipantResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/ListMyChatParticipantsRequestParticipantType.d.ts +5 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/ListMyChatParticipantsRequestParticipantType.js +8 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/ListMyChatParticipantsResponse.d.ts +23 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/ListMyChatParticipantsResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/RemoveMyChatParticipantResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/RemoveMyChatParticipantResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/index.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiParticipants/types/index.js +20 -0
- package/dist/cjs/api/resources/humanApiPeers/client/Client.d.ts +46 -0
- package/dist/cjs/api/resources/humanApiPeers/client/Client.js +140 -0
- package/dist/cjs/api/resources/humanApiPeers/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiPeers/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiPeers/client/requests/ListMyPeersRequest.d.ts +20 -0
- package/dist/cjs/api/resources/humanApiPeers/client/requests/ListMyPeersRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiPeers/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiPeers/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiPeers/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiPeers/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiPeers/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiPeers/index.js +18 -0
- package/dist/cjs/api/resources/humanApiPeers/types/ListMyPeersRequestType.d.ts +5 -0
- package/dist/cjs/api/resources/humanApiPeers/types/ListMyPeersRequestType.js +8 -0
- package/dist/cjs/api/resources/humanApiPeers/types/ListMyPeersResponse.d.ts +13 -0
- package/dist/cjs/api/resources/humanApiPeers/types/ListMyPeersResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiPeers/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiPeers/types/index.js +18 -0
- package/dist/cjs/api/resources/humanApiProfile/client/Client.d.ts +46 -0
- package/dist/cjs/api/resources/humanApiProfile/client/Client.js +171 -0
- package/dist/cjs/api/resources/humanApiProfile/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiProfile/client/index.js +17 -0
- package/dist/cjs/api/resources/humanApiProfile/client/requests/UpdateMyProfileRequest.d.ts +21 -0
- package/dist/cjs/api/resources/humanApiProfile/client/requests/UpdateMyProfileRequest.js +3 -0
- package/dist/cjs/api/resources/humanApiProfile/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/humanApiProfile/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/humanApiProfile/exports.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiProfile/exports.js +21 -0
- package/dist/cjs/api/resources/humanApiProfile/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiProfile/index.js +18 -0
- package/dist/cjs/api/resources/humanApiProfile/types/GetMyProfileResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiProfile/types/GetMyProfileResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiProfile/types/UpdateMyProfileResponse.d.ts +4 -0
- package/dist/cjs/api/resources/humanApiProfile/types/UpdateMyProfileResponse.js +3 -0
- package/dist/cjs/api/resources/humanApiProfile/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/humanApiProfile/types/index.js +18 -0
- package/dist/cjs/api/resources/index.d.ts +27 -0
- package/dist/cjs/api/resources/index.js +28 -1
- package/dist/cjs/api/types/AgentActivityResponse.d.ts +7 -0
- package/dist/cjs/api/types/AgentActivityResponse.js +3 -0
- package/dist/cjs/api/types/AgentRegisterRequest.d.ts +9 -0
- package/dist/cjs/api/types/AgentRegisterRequest.js +3 -0
- package/dist/cjs/api/types/ChatParticipantDetails.d.ts +29 -0
- package/dist/cjs/api/types/ChatParticipantDetails.js +12 -0
- package/dist/cjs/api/types/Contact.d.ts +41 -0
- package/dist/cjs/api/types/Contact.js +12 -0
- package/dist/cjs/api/types/ContactRequest.d.ts +68 -0
- package/dist/cjs/api/types/ContactRequest.js +25 -0
- package/dist/cjs/api/types/ContactRequestActionResponse.d.ts +18 -0
- package/dist/cjs/api/types/ContactRequestActionResponse.js +13 -0
- package/dist/cjs/api/types/MeChatRoom.d.ts +35 -0
- package/dist/cjs/api/types/MeChatRoom.js +19 -0
- package/dist/cjs/api/types/MyAgent.d.ts +29 -0
- package/dist/cjs/api/types/MyAgent.js +3 -0
- package/dist/cjs/api/types/ResolvedEntity.d.ts +21 -0
- package/dist/cjs/api/types/ResolvedEntity.js +12 -0
- package/dist/cjs/api/types/UserDetails.d.ts +25 -0
- package/dist/cjs/api/types/UserDetails.js +12 -0
- package/dist/cjs/api/types/UserMemory.d.ts +73 -0
- package/dist/cjs/api/types/UserMemory.js +40 -0
- package/dist/cjs/api/types/index.d.ts +11 -0
- package/dist/cjs/api/types/index.js +11 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +39 -12
- package/dist/esm/Client.mjs +59 -14
- package/dist/esm/api/errors/ServiceUnavailableError.d.mts +6 -0
- package/dist/esm/api/errors/ServiceUnavailableError.mjs +17 -0
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -2
- package/dist/esm/api/errors/index.d.mts +1 -0
- package/dist/esm/api/errors/index.mjs +1 -0
- package/dist/esm/api/resources/agentApiActivity/client/Client.d.mts +45 -0
- package/dist/esm/api/resources/agentApiActivity/client/Client.mjs +100 -0
- package/dist/esm/api/resources/agentApiActivity/client/index.d.mts +1 -0
- package/dist/esm/api/resources/agentApiActivity/client/index.mjs +1 -0
- package/dist/esm/api/resources/agentApiActivity/client/requests/ReportAgentChatActivityRequest.d.mts +10 -0
- package/dist/esm/api/resources/agentApiActivity/client/requests/ReportAgentChatActivityRequest.mjs +2 -0
- package/dist/esm/api/resources/agentApiActivity/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/agentApiActivity/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/agentApiActivity/exports.d.mts +2 -0
- package/dist/esm/api/resources/agentApiActivity/exports.mjs +3 -0
- package/dist/esm/api/resources/agentApiActivity/index.d.mts +2 -0
- package/dist/esm/api/resources/agentApiActivity/index.mjs +2 -0
- package/dist/esm/api/resources/agentApiActivity/types/ReportAgentChatActivityResponse.d.mts +4 -0
- package/dist/esm/api/resources/agentApiActivity/types/ReportAgentChatActivityResponse.mjs +2 -0
- package/dist/esm/api/resources/agentApiActivity/types/index.d.mts +1 -0
- package/dist/esm/api/resources/agentApiActivity/types/index.mjs +1 -0
- package/dist/esm/api/resources/agentApiChats/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/agentApiChats/client/Client.mjs +51 -51
- package/dist/esm/api/resources/agentApiContacts/client/Client.d.mts +33 -33
- package/dist/esm/api/resources/agentApiContacts/client/Client.mjs +88 -88
- package/dist/esm/api/resources/agentApiMemories/client/Client.d.mts +50 -50
- package/dist/esm/api/resources/agentApiMemories/client/Client.mjs +100 -100
- package/dist/esm/api/resources/agentApiMessages/client/Client.d.mts +49 -49
- package/dist/esm/api/resources/agentApiMessages/client/Client.mjs +79 -76
- package/dist/esm/api/resources/humanApiAgents/client/Client.d.mts +107 -0
- package/dist/esm/api/resources/humanApiAgents/client/Client.mjs +262 -0
- package/dist/esm/api/resources/humanApiAgents/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiAgents/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/DeleteMyAgentRequest.d.mts +10 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/DeleteMyAgentRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/ListMyAgentsRequest.d.mts +35 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/ListMyAgentsRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/RegisterMyAgentRequest.d.mts +13 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/RegisterMyAgentRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/humanApiAgents/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiAgents/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiAgents/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiAgents/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiAgents/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiAgents/types/DeleteMyAgentResponse.d.mts +15 -0
- package/dist/esm/api/resources/humanApiAgents/types/DeleteMyAgentResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiAgents/types/ListMyAgentsRequestOrder.d.mts +5 -0
- package/dist/esm/api/resources/humanApiAgents/types/ListMyAgentsRequestOrder.mjs +5 -0
- package/dist/esm/api/resources/humanApiAgents/types/ListMyAgentsRequestSort.d.mts +6 -0
- package/dist/esm/api/resources/humanApiAgents/types/ListMyAgentsRequestSort.mjs +6 -0
- package/dist/esm/api/resources/humanApiAgents/types/ListMyAgentsResponse.d.mts +36 -0
- package/dist/esm/api/resources/humanApiAgents/types/ListMyAgentsResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiAgents/types/RegisterMyAgentResponse.d.mts +27 -0
- package/dist/esm/api/resources/humanApiAgents/types/RegisterMyAgentResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiAgents/types/index.d.mts +5 -0
- package/dist/esm/api/resources/humanApiAgents/types/index.mjs +5 -0
- package/dist/esm/api/resources/humanApiChats/client/Client.d.mts +81 -0
- package/dist/esm/api/resources/humanApiChats/client/Client.mjs +225 -0
- package/dist/esm/api/resources/humanApiChats/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiChats/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiChats/client/requests/CreateMyChatRoomRequest.d.mts +17 -0
- package/dist/esm/api/resources/humanApiChats/client/requests/CreateMyChatRoomRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiChats/client/requests/ListMyChatsRequest.d.mts +32 -0
- package/dist/esm/api/resources/humanApiChats/client/requests/ListMyChatsRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiChats/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiChats/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiChats/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiChats/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiChats/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiChats/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiChats/types/CreateMyChatRoomResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiChats/types/CreateMyChatRoomResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiChats/types/GetMyChatRoomResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiChats/types/GetMyChatRoomResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestOrder.d.mts +5 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestOrder.mjs +5 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestSortBy.d.mts +5 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestSortBy.mjs +5 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestStatus.d.mts +6 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestStatus.mjs +6 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestType.d.mts +6 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsRequestType.mjs +6 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsResponse.d.mts +23 -0
- package/dist/esm/api/resources/humanApiChats/types/ListMyChatsResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiChats/types/index.d.mts +7 -0
- package/dist/esm/api/resources/humanApiChats/types/index.mjs +7 -0
- package/dist/esm/api/resources/humanApiContacts/client/Client.d.mts +201 -0
- package/dist/esm/api/resources/humanApiContacts/client/Client.mjs +611 -0
- package/dist/esm/api/resources/humanApiContacts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiContacts/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/CreateContactRequestRequest.d.mts +19 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/CreateContactRequestRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ListMyContactsRequest.d.mts +13 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ListMyContactsRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ListReceivedContactRequestsRequest.d.mts +13 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ListReceivedContactRequestsRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ListSentContactRequestsRequest.d.mts +17 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ListSentContactRequestsRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/RemoveMyContactRequest.d.mts +10 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/RemoveMyContactRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ResolveHandleRequest.d.mts +10 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/ResolveHandleRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/index.d.mts +6 -0
- package/dist/esm/api/resources/humanApiContacts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiContacts/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiContacts/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiContacts/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiContacts/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/ApproveContactRequestResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiContacts/types/ApproveContactRequestResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/CancelContactRequestResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiContacts/types/CancelContactRequestResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/CreateContactRequestResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiContacts/types/CreateContactRequestResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListMyContactsResponse.d.mts +21 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListMyContactsResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListReceivedContactRequestsResponse.d.mts +21 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListReceivedContactRequestsResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListSentContactRequestsRequestStatus.d.mts +9 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListSentContactRequestsRequestStatus.mjs +9 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListSentContactRequestsResponse.d.mts +21 -0
- package/dist/esm/api/resources/humanApiContacts/types/ListSentContactRequestsResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/RejectContactRequestResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiContacts/types/RejectContactRequestResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/RemoveMyContactResponse.d.mts +8 -0
- package/dist/esm/api/resources/humanApiContacts/types/RemoveMyContactResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/ResolveHandleResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiContacts/types/ResolveHandleResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiContacts/types/index.d.mts +10 -0
- package/dist/esm/api/resources/humanApiContacts/types/index.mjs +10 -0
- package/dist/esm/api/resources/humanApiMemories/client/Client.d.mts +131 -0
- package/dist/esm/api/resources/humanApiMemories/client/Client.mjs +389 -0
- package/dist/esm/api/resources/humanApiMemories/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiMemories/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiMemories/client/requests/ListUserMemoriesRequest.d.mts +31 -0
- package/dist/esm/api/resources/humanApiMemories/client/requests/ListUserMemoriesRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiMemories/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiMemories/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiMemories/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiMemories/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiMemories/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiMemories/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiMemories/types/ArchiveUserMemoryResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiMemories/types/ArchiveUserMemoryResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiMemories/types/GetUserMemoryResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiMemories/types/GetUserMemoryResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiMemories/types/ListUserMemoriesResponse.d.mts +13 -0
- package/dist/esm/api/resources/humanApiMemories/types/ListUserMemoriesResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiMemories/types/RestoreUserMemoryResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiMemories/types/RestoreUserMemoryResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiMemories/types/SupersedeUserMemoryResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiMemories/types/SupersedeUserMemoryResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiMemories/types/index.d.mts +5 -0
- package/dist/esm/api/resources/humanApiMemories/types/index.mjs +5 -0
- package/dist/esm/api/resources/humanApiMessages/client/Client.d.mts +97 -0
- package/dist/esm/api/resources/humanApiMessages/client/Client.mjs +200 -0
- package/dist/esm/api/resources/humanApiMessages/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiMessages/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiMessages/client/requests/ListMyChatMessagesRequest.d.mts +26 -0
- package/dist/esm/api/resources/humanApiMessages/client/requests/ListMyChatMessagesRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiMessages/client/requests/SendMyChatMessageRequest.d.mts +15 -0
- package/dist/esm/api/resources/humanApiMessages/client/requests/SendMyChatMessageRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiMessages/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiMessages/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiMessages/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiMessages/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiMessages/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiMessages/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiMessages/types/ListMyChatMessagesRequestMessageType.d.mts +10 -0
- package/dist/esm/api/resources/humanApiMessages/types/ListMyChatMessagesRequestMessageType.mjs +10 -0
- package/dist/esm/api/resources/humanApiMessages/types/ListMyChatMessagesResponse.d.mts +23 -0
- package/dist/esm/api/resources/humanApiMessages/types/ListMyChatMessagesResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiMessages/types/SendMyChatMessageResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiMessages/types/SendMyChatMessageResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiMessages/types/index.d.mts +3 -0
- package/dist/esm/api/resources/humanApiMessages/types/index.mjs +3 -0
- package/dist/esm/api/resources/humanApiParticipants/client/Client.d.mts +84 -0
- package/dist/esm/api/resources/humanApiParticipants/client/Client.mjs +227 -0
- package/dist/esm/api/resources/humanApiParticipants/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiParticipants/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiParticipants/client/requests/AddMyChatParticipantRequest.d.mts +12 -0
- package/dist/esm/api/resources/humanApiParticipants/client/requests/AddMyChatParticipantRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiParticipants/client/requests/ListMyChatParticipantsRequest.d.mts +23 -0
- package/dist/esm/api/resources/humanApiParticipants/client/requests/ListMyChatParticipantsRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiParticipants/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiParticipants/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiParticipants/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiParticipants/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiParticipants/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiParticipants/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiParticipants/types/AddMyChatParticipantResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiParticipants/types/AddMyChatParticipantResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiParticipants/types/ListMyChatParticipantsRequestParticipantType.d.mts +5 -0
- package/dist/esm/api/resources/humanApiParticipants/types/ListMyChatParticipantsRequestParticipantType.mjs +5 -0
- package/dist/esm/api/resources/humanApiParticipants/types/ListMyChatParticipantsResponse.d.mts +23 -0
- package/dist/esm/api/resources/humanApiParticipants/types/ListMyChatParticipantsResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiParticipants/types/RemoveMyChatParticipantResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiParticipants/types/RemoveMyChatParticipantResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiParticipants/types/index.d.mts +4 -0
- package/dist/esm/api/resources/humanApiParticipants/types/index.mjs +4 -0
- package/dist/esm/api/resources/humanApiPeers/client/Client.d.mts +46 -0
- package/dist/esm/api/resources/humanApiPeers/client/Client.mjs +103 -0
- package/dist/esm/api/resources/humanApiPeers/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiPeers/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiPeers/client/requests/ListMyPeersRequest.d.mts +20 -0
- package/dist/esm/api/resources/humanApiPeers/client/requests/ListMyPeersRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiPeers/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiPeers/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiPeers/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiPeers/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiPeers/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiPeers/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiPeers/types/ListMyPeersRequestType.d.mts +5 -0
- package/dist/esm/api/resources/humanApiPeers/types/ListMyPeersRequestType.mjs +5 -0
- package/dist/esm/api/resources/humanApiPeers/types/ListMyPeersResponse.d.mts +13 -0
- package/dist/esm/api/resources/humanApiPeers/types/ListMyPeersResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiPeers/types/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiPeers/types/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiProfile/client/Client.d.mts +46 -0
- package/dist/esm/api/resources/humanApiProfile/client/Client.mjs +134 -0
- package/dist/esm/api/resources/humanApiProfile/client/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiProfile/client/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiProfile/client/requests/UpdateMyProfileRequest.d.mts +21 -0
- package/dist/esm/api/resources/humanApiProfile/client/requests/UpdateMyProfileRequest.mjs +2 -0
- package/dist/esm/api/resources/humanApiProfile/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/humanApiProfile/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/humanApiProfile/exports.d.mts +2 -0
- package/dist/esm/api/resources/humanApiProfile/exports.mjs +3 -0
- package/dist/esm/api/resources/humanApiProfile/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiProfile/index.mjs +2 -0
- package/dist/esm/api/resources/humanApiProfile/types/GetMyProfileResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiProfile/types/GetMyProfileResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiProfile/types/UpdateMyProfileResponse.d.mts +4 -0
- package/dist/esm/api/resources/humanApiProfile/types/UpdateMyProfileResponse.mjs +2 -0
- package/dist/esm/api/resources/humanApiProfile/types/index.d.mts +2 -0
- package/dist/esm/api/resources/humanApiProfile/types/index.mjs +2 -0
- package/dist/esm/api/resources/index.d.mts +27 -0
- package/dist/esm/api/resources/index.mjs +27 -0
- package/dist/esm/api/types/AgentActivityResponse.d.mts +7 -0
- package/dist/esm/api/types/AgentActivityResponse.mjs +2 -0
- package/dist/esm/api/types/AgentRegisterRequest.d.mts +9 -0
- package/dist/esm/api/types/AgentRegisterRequest.mjs +2 -0
- package/dist/esm/api/types/ChatParticipantDetails.d.mts +29 -0
- package/dist/esm/api/types/ChatParticipantDetails.mjs +9 -0
- package/dist/esm/api/types/Contact.d.mts +41 -0
- package/dist/esm/api/types/Contact.mjs +9 -0
- package/dist/esm/api/types/ContactRequest.d.mts +68 -0
- package/dist/esm/api/types/ContactRequest.mjs +22 -0
- package/dist/esm/api/types/ContactRequestActionResponse.d.mts +18 -0
- package/dist/esm/api/types/ContactRequestActionResponse.mjs +10 -0
- package/dist/esm/api/types/MeChatRoom.d.mts +35 -0
- package/dist/esm/api/types/MeChatRoom.mjs +16 -0
- package/dist/esm/api/types/MyAgent.d.mts +29 -0
- package/dist/esm/api/types/MyAgent.mjs +2 -0
- package/dist/esm/api/types/ResolvedEntity.d.mts +21 -0
- package/dist/esm/api/types/ResolvedEntity.mjs +9 -0
- package/dist/esm/api/types/UserDetails.d.mts +25 -0
- package/dist/esm/api/types/UserDetails.mjs +9 -0
- package/dist/esm/api/types/UserMemory.d.mts +73 -0
- package/dist/esm/api/types/UserMemory.mjs +37 -0
- package/dist/esm/api/types/index.d.mts +11 -0
- package/dist/esm/api/types/index.mjs +11 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +142 -43
- package/reference.md +2650 -472
|
@@ -0,0 +1,648 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.HumanApiContactsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const Band = __importStar(require("../../../index.js"));
|
|
54
|
+
/**
|
|
55
|
+
* Manage user contacts and contact requests.
|
|
56
|
+
*/
|
|
57
|
+
class HumanApiContactsClient {
|
|
58
|
+
constructor(options) {
|
|
59
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Rejects a pending contact request you received.
|
|
63
|
+
*
|
|
64
|
+
* The requester will not be notified of the rejection.
|
|
65
|
+
*
|
|
66
|
+
* @param {string} id - Contact request ID
|
|
67
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link Band.UnauthorizedError}
|
|
70
|
+
* @throws {@link Band.ForbiddenError}
|
|
71
|
+
* @throws {@link Band.NotFoundError}
|
|
72
|
+
* @throws {@link Band.ConflictError}
|
|
73
|
+
* @throws {@link Band.UnprocessableEntityError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.humanApiContacts.rejectContactRequest("daca00d0-eb6b-4db1-8201-c46015c93d04")
|
|
77
|
+
*/
|
|
78
|
+
rejectContactRequest(id, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__rejectContactRequest(id, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__rejectContactRequest(id, requestOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
84
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
85
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
86
|
+
const _response = yield core.fetcher({
|
|
87
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, `api/v1/me/contacts/requests/${core.url.encodePathParam(id)}/reject`),
|
|
88
|
+
method: "POST",
|
|
89
|
+
headers: _headers,
|
|
90
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
91
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
92
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
93
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
94
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
95
|
+
logging: this._options.logging,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
+
}
|
|
100
|
+
if (_response.error.reason === "status-code") {
|
|
101
|
+
switch (_response.error.statusCode) {
|
|
102
|
+
case 401:
|
|
103
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
104
|
+
case 403:
|
|
105
|
+
throw new Band.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
106
|
+
case 404:
|
|
107
|
+
throw new Band.NotFoundError(_response.error.body, _response.rawResponse);
|
|
108
|
+
case 409:
|
|
109
|
+
throw new Band.ConflictError(_response.error.body, _response.rawResponse);
|
|
110
|
+
case 422:
|
|
111
|
+
throw new Band.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
112
|
+
default:
|
|
113
|
+
throw new errors.BandError({
|
|
114
|
+
statusCode: _response.error.statusCode,
|
|
115
|
+
body: _response.error.body,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/me/contacts/requests/{id}/reject");
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Removes a contact by handle or contact record ID.
|
|
125
|
+
*
|
|
126
|
+
* This is a bidirectional operation — both you and the other party
|
|
127
|
+
* will be removed from each other's contact lists.
|
|
128
|
+
*
|
|
129
|
+
* @param {Band.RemoveMyContactRequest} request
|
|
130
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
|
+
*
|
|
132
|
+
* @throws {@link Band.BadRequestError}
|
|
133
|
+
* @throws {@link Band.UnauthorizedError}
|
|
134
|
+
* @throws {@link Band.ForbiddenError}
|
|
135
|
+
* @throws {@link Band.NotFoundError}
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* await client.humanApiContacts.removeMyContact()
|
|
139
|
+
*/
|
|
140
|
+
removeMyContact(request = {}, requestOptions) {
|
|
141
|
+
return core.HttpResponsePromise.fromPromise(this.__removeMyContact(request, requestOptions));
|
|
142
|
+
}
|
|
143
|
+
__removeMyContact() {
|
|
144
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
145
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
146
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
147
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
148
|
+
const _response = yield core.fetcher({
|
|
149
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, "api/v1/me/contacts/remove"),
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers: _headers,
|
|
152
|
+
contentType: "application/json",
|
|
153
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
154
|
+
requestType: "json",
|
|
155
|
+
body: request,
|
|
156
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
157
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
158
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
159
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
160
|
+
logging: this._options.logging,
|
|
161
|
+
});
|
|
162
|
+
if (_response.ok) {
|
|
163
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
164
|
+
}
|
|
165
|
+
if (_response.error.reason === "status-code") {
|
|
166
|
+
switch (_response.error.statusCode) {
|
|
167
|
+
case 400:
|
|
168
|
+
throw new Band.BadRequestError(_response.error.body, _response.rawResponse);
|
|
169
|
+
case 401:
|
|
170
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
171
|
+
case 403:
|
|
172
|
+
throw new Band.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
173
|
+
case 404:
|
|
174
|
+
throw new Band.NotFoundError(_response.error.body, _response.rawResponse);
|
|
175
|
+
default:
|
|
176
|
+
throw new errors.BandError({
|
|
177
|
+
statusCode: _response.error.statusCode,
|
|
178
|
+
body: _response.error.body,
|
|
179
|
+
rawResponse: _response.rawResponse,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/me/contacts/remove");
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Returns a paginated list of pending contact requests you have received.
|
|
188
|
+
*
|
|
189
|
+
* These are requests from other users who want to add you as a contact.
|
|
190
|
+
* You can approve or reject each request.
|
|
191
|
+
*
|
|
192
|
+
* @param {Band.ListReceivedContactRequestsRequest} request
|
|
193
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
194
|
+
*
|
|
195
|
+
* @throws {@link Band.UnauthorizedError}
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* await client.humanApiContacts.listReceivedContactRequests({
|
|
199
|
+
* page: 1,
|
|
200
|
+
* page_size: 1
|
|
201
|
+
* })
|
|
202
|
+
*/
|
|
203
|
+
listReceivedContactRequests(request = {}, requestOptions) {
|
|
204
|
+
return core.HttpResponsePromise.fromPromise(this.__listReceivedContactRequests(request, requestOptions));
|
|
205
|
+
}
|
|
206
|
+
__listReceivedContactRequests() {
|
|
207
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
208
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
209
|
+
const { page, page_size: pageSize } = request;
|
|
210
|
+
const _queryParams = {
|
|
211
|
+
page,
|
|
212
|
+
page_size: pageSize,
|
|
213
|
+
};
|
|
214
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
215
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
216
|
+
const _response = yield core.fetcher({
|
|
217
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, "api/v1/me/contacts/requests"),
|
|
218
|
+
method: "GET",
|
|
219
|
+
headers: _headers,
|
|
220
|
+
queryString: core.url
|
|
221
|
+
.queryBuilder()
|
|
222
|
+
.addMany(_queryParams)
|
|
223
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
224
|
+
.build(),
|
|
225
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
226
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
227
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
228
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
229
|
+
logging: this._options.logging,
|
|
230
|
+
});
|
|
231
|
+
if (_response.ok) {
|
|
232
|
+
return {
|
|
233
|
+
data: _response.body,
|
|
234
|
+
rawResponse: _response.rawResponse,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
if (_response.error.reason === "status-code") {
|
|
238
|
+
switch (_response.error.statusCode) {
|
|
239
|
+
case 401:
|
|
240
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
241
|
+
default:
|
|
242
|
+
throw new errors.BandError({
|
|
243
|
+
statusCode: _response.error.statusCode,
|
|
244
|
+
body: _response.error.body,
|
|
245
|
+
rawResponse: _response.rawResponse,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/me/contacts/requests");
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Sends a contact request to another user.
|
|
254
|
+
*
|
|
255
|
+
* You can include an optional message (max 500 characters).
|
|
256
|
+
* The recipient will be able to approve or reject the request.
|
|
257
|
+
*
|
|
258
|
+
* **Constraints:**
|
|
259
|
+
* - Cannot send a request to yourself
|
|
260
|
+
* - Cannot send a request if you're already contacts
|
|
261
|
+
* - Only one pending request per recipient at a time
|
|
262
|
+
*
|
|
263
|
+
* @param {Band.CreateContactRequestRequest} request
|
|
264
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
265
|
+
*
|
|
266
|
+
* @throws {@link Band.BadRequestError}
|
|
267
|
+
* @throws {@link Band.UnauthorizedError}
|
|
268
|
+
* @throws {@link Band.NotFoundError}
|
|
269
|
+
* @throws {@link Band.ConflictError}
|
|
270
|
+
* @throws {@link Band.UnprocessableEntityError}
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* await client.humanApiContacts.createContactRequest({
|
|
274
|
+
* contact_request: {
|
|
275
|
+
* recipient_handle: "@johndoe"
|
|
276
|
+
* }
|
|
277
|
+
* })
|
|
278
|
+
*/
|
|
279
|
+
createContactRequest(request, requestOptions) {
|
|
280
|
+
return core.HttpResponsePromise.fromPromise(this.__createContactRequest(request, requestOptions));
|
|
281
|
+
}
|
|
282
|
+
__createContactRequest(request, requestOptions) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
285
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
286
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
287
|
+
const _response = yield core.fetcher({
|
|
288
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, "api/v1/me/contacts/requests"),
|
|
289
|
+
method: "POST",
|
|
290
|
+
headers: _headers,
|
|
291
|
+
contentType: "application/json",
|
|
292
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
293
|
+
requestType: "json",
|
|
294
|
+
body: request,
|
|
295
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
296
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
297
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
298
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
299
|
+
logging: this._options.logging,
|
|
300
|
+
});
|
|
301
|
+
if (_response.ok) {
|
|
302
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
303
|
+
}
|
|
304
|
+
if (_response.error.reason === "status-code") {
|
|
305
|
+
switch (_response.error.statusCode) {
|
|
306
|
+
case 400:
|
|
307
|
+
throw new Band.BadRequestError(_response.error.body, _response.rawResponse);
|
|
308
|
+
case 401:
|
|
309
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
310
|
+
case 404:
|
|
311
|
+
throw new Band.NotFoundError(_response.error.body, _response.rawResponse);
|
|
312
|
+
case 409:
|
|
313
|
+
throw new Band.ConflictError(_response.error.body, _response.rawResponse);
|
|
314
|
+
case 422:
|
|
315
|
+
throw new Band.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
316
|
+
default:
|
|
317
|
+
throw new errors.BandError({
|
|
318
|
+
statusCode: _response.error.statusCode,
|
|
319
|
+
body: _response.error.body,
|
|
320
|
+
rawResponse: _response.rawResponse,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/me/contacts/requests");
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Returns a paginated list of contact requests you have sent.
|
|
329
|
+
*
|
|
330
|
+
* By default includes all statuses. Use the `status` parameter to filter.
|
|
331
|
+
* You can cancel pending requests.
|
|
332
|
+
*
|
|
333
|
+
* @param {Band.ListSentContactRequestsRequest} request
|
|
334
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
335
|
+
*
|
|
336
|
+
* @throws {@link Band.UnauthorizedError}
|
|
337
|
+
*
|
|
338
|
+
* @example
|
|
339
|
+
* await client.humanApiContacts.listSentContactRequests({
|
|
340
|
+
* status: "all",
|
|
341
|
+
* page: 1,
|
|
342
|
+
* page_size: 1
|
|
343
|
+
* })
|
|
344
|
+
*/
|
|
345
|
+
listSentContactRequests(request = {}, requestOptions) {
|
|
346
|
+
return core.HttpResponsePromise.fromPromise(this.__listSentContactRequests(request, requestOptions));
|
|
347
|
+
}
|
|
348
|
+
__listSentContactRequests() {
|
|
349
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
350
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
351
|
+
const { status, page, page_size: pageSize } = request;
|
|
352
|
+
const _queryParams = {
|
|
353
|
+
status: status != null ? status : undefined,
|
|
354
|
+
page,
|
|
355
|
+
page_size: pageSize,
|
|
356
|
+
};
|
|
357
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
358
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
359
|
+
const _response = yield core.fetcher({
|
|
360
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, "api/v1/me/contacts/requests/sent"),
|
|
361
|
+
method: "GET",
|
|
362
|
+
headers: _headers,
|
|
363
|
+
queryString: core.url
|
|
364
|
+
.queryBuilder()
|
|
365
|
+
.addMany(_queryParams)
|
|
366
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
367
|
+
.build(),
|
|
368
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
369
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
370
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
371
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
372
|
+
logging: this._options.logging,
|
|
373
|
+
});
|
|
374
|
+
if (_response.ok) {
|
|
375
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
376
|
+
}
|
|
377
|
+
if (_response.error.reason === "status-code") {
|
|
378
|
+
switch (_response.error.statusCode) {
|
|
379
|
+
case 401:
|
|
380
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
381
|
+
default:
|
|
382
|
+
throw new errors.BandError({
|
|
383
|
+
statusCode: _response.error.statusCode,
|
|
384
|
+
body: _response.error.body,
|
|
385
|
+
rawResponse: _response.rawResponse,
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/me/contacts/requests/sent");
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Approves a pending contact request you received.
|
|
394
|
+
*
|
|
395
|
+
* This creates a bidirectional contact relationship - both you and the requester
|
|
396
|
+
* will be added to each other's contacts.
|
|
397
|
+
*
|
|
398
|
+
* @param {string} id - Contact request ID
|
|
399
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
400
|
+
*
|
|
401
|
+
* @throws {@link Band.UnauthorizedError}
|
|
402
|
+
* @throws {@link Band.ForbiddenError}
|
|
403
|
+
* @throws {@link Band.NotFoundError}
|
|
404
|
+
* @throws {@link Band.ConflictError}
|
|
405
|
+
* @throws {@link Band.UnprocessableEntityError}
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* await client.humanApiContacts.approveContactRequest("daca00d0-eb6b-4db1-8201-c46015c93d04")
|
|
409
|
+
*/
|
|
410
|
+
approveContactRequest(id, requestOptions) {
|
|
411
|
+
return core.HttpResponsePromise.fromPromise(this.__approveContactRequest(id, requestOptions));
|
|
412
|
+
}
|
|
413
|
+
__approveContactRequest(id, requestOptions) {
|
|
414
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
415
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
416
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
417
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
418
|
+
const _response = yield core.fetcher({
|
|
419
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, `api/v1/me/contacts/requests/${core.url.encodePathParam(id)}/approve`),
|
|
420
|
+
method: "POST",
|
|
421
|
+
headers: _headers,
|
|
422
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
423
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
424
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
425
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
426
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
427
|
+
logging: this._options.logging,
|
|
428
|
+
});
|
|
429
|
+
if (_response.ok) {
|
|
430
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
431
|
+
}
|
|
432
|
+
if (_response.error.reason === "status-code") {
|
|
433
|
+
switch (_response.error.statusCode) {
|
|
434
|
+
case 401:
|
|
435
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
436
|
+
case 403:
|
|
437
|
+
throw new Band.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
438
|
+
case 404:
|
|
439
|
+
throw new Band.NotFoundError(_response.error.body, _response.rawResponse);
|
|
440
|
+
case 409:
|
|
441
|
+
throw new Band.ConflictError(_response.error.body, _response.rawResponse);
|
|
442
|
+
case 422:
|
|
443
|
+
throw new Band.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
444
|
+
default:
|
|
445
|
+
throw new errors.BandError({
|
|
446
|
+
statusCode: _response.error.statusCode,
|
|
447
|
+
body: _response.error.body,
|
|
448
|
+
rawResponse: _response.rawResponse,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/me/contacts/requests/{id}/approve");
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Resolves a handle (e.g., "@johndoe" or "johndoe") to a user entity.
|
|
457
|
+
*
|
|
458
|
+
* Use this before sending a contact request to verify the handle exists
|
|
459
|
+
* and to get the user's details for confirmation.
|
|
460
|
+
*
|
|
461
|
+
* @param {Band.ResolveHandleRequest} request
|
|
462
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
463
|
+
*
|
|
464
|
+
* @throws {@link Band.BadRequestError}
|
|
465
|
+
* @throws {@link Band.UnauthorizedError}
|
|
466
|
+
* @throws {@link Band.ForbiddenError}
|
|
467
|
+
* @throws {@link Band.NotFoundError}
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* await client.humanApiContacts.resolveHandle({
|
|
471
|
+
* handle: "@johndoe"
|
|
472
|
+
* })
|
|
473
|
+
*/
|
|
474
|
+
resolveHandle(request, requestOptions) {
|
|
475
|
+
return core.HttpResponsePromise.fromPromise(this.__resolveHandle(request, requestOptions));
|
|
476
|
+
}
|
|
477
|
+
__resolveHandle(request, requestOptions) {
|
|
478
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
479
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
480
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
481
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
482
|
+
const _response = yield core.fetcher({
|
|
483
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, "api/v1/me/contacts/resolve"),
|
|
484
|
+
method: "POST",
|
|
485
|
+
headers: _headers,
|
|
486
|
+
contentType: "application/json",
|
|
487
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
488
|
+
requestType: "json",
|
|
489
|
+
body: request,
|
|
490
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
491
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
492
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
493
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
494
|
+
logging: this._options.logging,
|
|
495
|
+
});
|
|
496
|
+
if (_response.ok) {
|
|
497
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
498
|
+
}
|
|
499
|
+
if (_response.error.reason === "status-code") {
|
|
500
|
+
switch (_response.error.statusCode) {
|
|
501
|
+
case 400:
|
|
502
|
+
throw new Band.BadRequestError(_response.error.body, _response.rawResponse);
|
|
503
|
+
case 401:
|
|
504
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
505
|
+
case 403:
|
|
506
|
+
throw new Band.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
507
|
+
case 404:
|
|
508
|
+
throw new Band.NotFoundError(_response.error.body, _response.rawResponse);
|
|
509
|
+
default:
|
|
510
|
+
throw new errors.BandError({
|
|
511
|
+
statusCode: _response.error.statusCode,
|
|
512
|
+
body: _response.error.body,
|
|
513
|
+
rawResponse: _response.rawResponse,
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/api/v1/me/contacts/resolve");
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Cancels a pending contact request you sent.
|
|
522
|
+
*
|
|
523
|
+
* You can only cancel requests that are still pending.
|
|
524
|
+
*
|
|
525
|
+
* @param {string} id - Contact request ID
|
|
526
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
527
|
+
*
|
|
528
|
+
* @throws {@link Band.UnauthorizedError}
|
|
529
|
+
* @throws {@link Band.ForbiddenError}
|
|
530
|
+
* @throws {@link Band.NotFoundError}
|
|
531
|
+
* @throws {@link Band.ConflictError}
|
|
532
|
+
* @throws {@link Band.UnprocessableEntityError}
|
|
533
|
+
*
|
|
534
|
+
* @example
|
|
535
|
+
* await client.humanApiContacts.cancelContactRequest("daca00d0-eb6b-4db1-8201-c46015c93d04")
|
|
536
|
+
*/
|
|
537
|
+
cancelContactRequest(id, requestOptions) {
|
|
538
|
+
return core.HttpResponsePromise.fromPromise(this.__cancelContactRequest(id, requestOptions));
|
|
539
|
+
}
|
|
540
|
+
__cancelContactRequest(id, requestOptions) {
|
|
541
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
542
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
543
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
544
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
545
|
+
const _response = yield core.fetcher({
|
|
546
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, `api/v1/me/contacts/requests/${core.url.encodePathParam(id)}`),
|
|
547
|
+
method: "DELETE",
|
|
548
|
+
headers: _headers,
|
|
549
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
550
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
551
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
552
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
553
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
554
|
+
logging: this._options.logging,
|
|
555
|
+
});
|
|
556
|
+
if (_response.ok) {
|
|
557
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
558
|
+
}
|
|
559
|
+
if (_response.error.reason === "status-code") {
|
|
560
|
+
switch (_response.error.statusCode) {
|
|
561
|
+
case 401:
|
|
562
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
563
|
+
case 403:
|
|
564
|
+
throw new Band.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
565
|
+
case 404:
|
|
566
|
+
throw new Band.NotFoundError(_response.error.body, _response.rawResponse);
|
|
567
|
+
case 409:
|
|
568
|
+
throw new Band.ConflictError(_response.error.body, _response.rawResponse);
|
|
569
|
+
case 422:
|
|
570
|
+
throw new Band.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
571
|
+
default:
|
|
572
|
+
throw new errors.BandError({
|
|
573
|
+
statusCode: _response.error.statusCode,
|
|
574
|
+
body: _response.error.body,
|
|
575
|
+
rawResponse: _response.rawResponse,
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/api/v1/me/contacts/requests/{id}");
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Returns a paginated list of all your active contacts.
|
|
584
|
+
*
|
|
585
|
+
* Each contact includes the contact's user details (handle, display name, email).
|
|
586
|
+
*
|
|
587
|
+
* @param {Band.ListMyContactsRequest} request
|
|
588
|
+
* @param {HumanApiContactsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
589
|
+
*
|
|
590
|
+
* @throws {@link Band.UnauthorizedError}
|
|
591
|
+
* @throws {@link Band.ForbiddenError}
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* await client.humanApiContacts.listMyContacts({
|
|
595
|
+
* page: 1,
|
|
596
|
+
* page_size: 1
|
|
597
|
+
* })
|
|
598
|
+
*/
|
|
599
|
+
listMyContacts(request = {}, requestOptions) {
|
|
600
|
+
return core.HttpResponsePromise.fromPromise(this.__listMyContacts(request, requestOptions));
|
|
601
|
+
}
|
|
602
|
+
__listMyContacts() {
|
|
603
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
604
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
605
|
+
const { page, page_size: pageSize } = request;
|
|
606
|
+
const _queryParams = {
|
|
607
|
+
page,
|
|
608
|
+
page_size: pageSize,
|
|
609
|
+
};
|
|
610
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
611
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
612
|
+
const _response = yield core.fetcher({
|
|
613
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BandEnvironment.Default, "api/v1/me/contacts"),
|
|
614
|
+
method: "GET",
|
|
615
|
+
headers: _headers,
|
|
616
|
+
queryString: core.url
|
|
617
|
+
.queryBuilder()
|
|
618
|
+
.addMany(_queryParams)
|
|
619
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
620
|
+
.build(),
|
|
621
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
622
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
623
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
624
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
625
|
+
logging: this._options.logging,
|
|
626
|
+
});
|
|
627
|
+
if (_response.ok) {
|
|
628
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
629
|
+
}
|
|
630
|
+
if (_response.error.reason === "status-code") {
|
|
631
|
+
switch (_response.error.statusCode) {
|
|
632
|
+
case 401:
|
|
633
|
+
throw new Band.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
634
|
+
case 403:
|
|
635
|
+
throw new Band.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
636
|
+
default:
|
|
637
|
+
throw new errors.BandError({
|
|
638
|
+
statusCode: _response.error.statusCode,
|
|
639
|
+
body: _response.error.body,
|
|
640
|
+
rawResponse: _response.rawResponse,
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/me/contacts");
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
exports.HumanApiContactsClient = HumanApiContactsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|