import { TOperationName } from '../core'; /** * This error is exposed when a workflow action fails to complete. * @see {@link https://linkedapi.io/docs/actions-overview/#result-options} * This error signals that the workflow action failed to complete, but the workflow completed as expected. * Common types: * - personNotFound (sendMessage, syncConversation, checkConnectionStatus, sendConnectionRequest, withdrawConnectionRequest, removeConnection, fetchPerson, nvSendMessage, nvSyncConversation, nvFetchPerson) * - selfProfileNotAllowed (fetchPerson, nvFetchPerson) * - messagingNotAllowed (sendMessage, nvSendMessage) * - alreadyPending (sendConnectionRequest) * - alreadyConnected (sendConnectionRequest) * - emailRequired (sendConnectionRequest) * - requestNotAllowed (sendConnectionRequest) * - notPending (withdrawConnectionRequest)) * - retrievingNotAllowed (retrieveConnections, fetchCompany, nvFetchCompany) * - connectionNotFound (removeConnection) * - searchingNotAllowed (searchCompanies, searchPeople, nvSearchCompanies, nvSearchPeople) * - companyNotFound (fetchCompany, nvFetchCompany) * - postNotFound (fetchPost, reactToPost, commentOnPost) * - commentingNotAllowed (commentOnPost) * - noPostingPermission (createPost, reactToPost, commentOnPost) * - noSalesNavigator (nvSendMessage, nvSyncConversation, nvSearchCompanies, nvSearchPeople, nvFetchCompany, nvFetchPerson) * - conversationsNotSynced (pollConversations) */ export declare const LINKED_API_ACTION_ERROR: { readonly personNotFound: "personNotFound"; readonly selfProfileNotAllowed: "selfProfileNotAllowed"; readonly messagingNotAllowed: "messagingNotAllowed"; readonly alreadyPending: "alreadyPending"; readonly alreadyConnected: "alreadyConnected"; readonly emailRequired: "emailRequired"; readonly requestNotAllowed: "requestNotAllowed"; readonly notPending: "notPending"; readonly retrievingNotAllowed: "retrievingNotAllowed"; readonly connectionNotFound: "connectionNotFound"; readonly searchingNotAllowed: "searchingNotAllowed"; readonly companyNotFound: "companyNotFound"; readonly postNotFound: "postNotFound"; readonly commentingNotAllowed: "commentingNotAllowed"; readonly noPostingPermission: "noPostingPermission"; readonly noSalesNavigator: "noSalesNavigator"; readonly conversationsNotSynced: "conversationsNotSynced"; }; export type TLinkedApiActionErrorType = (typeof LINKED_API_ACTION_ERROR)[keyof typeof LINKED_API_ACTION_ERROR]; export interface TLinkedApiActionError { type: TLinkedApiActionErrorType; message: string; } /** * This error is thrown when a request fails. * @see {@link https://linkedapi.io/docs/making-requests/#common-errors} */ export declare const LINKED_API_ERROR: { readonly linkedApiTokenRequired: "linkedApiTokenRequired"; readonly invalidLinkedApiToken: "invalidLinkedApiToken"; readonly identificationTokenRequired: "identificationTokenRequired"; readonly invalidIdentificationToken: "invalidIdentificationToken"; readonly subscriptionRequired: "subscriptionRequired"; readonly invalidRequestPayload: "invalidRequestPayload"; readonly invalidWorkflow: "invalidWorkflow"; readonly plusPlanRequired: "plusPlanRequired"; readonly linkedinAccountSignedOut: "linkedinAccountSignedOut"; readonly languageNotSupported: "languageNotSupported"; readonly workflowTimeout: "workflowTimeout"; readonly httpError: "httpError"; }; export type TLinkedApiErrorType = (typeof LINKED_API_ERROR)[keyof typeof LINKED_API_ERROR]; export declare class LinkedApiError extends Error { type: TLinkedApiErrorType; message: string; details?: unknown; constructor(type: TLinkedApiErrorType, message: string, details?: unknown); static unknownError(message?: string): LinkedApiError; } /** * This error is thrown when a workflow times out. * Contains workflowId and operationName to continue checking the workflow. */ export declare class LinkedApiWorkflowTimeoutError extends LinkedApiError { readonly workflowId: string; readonly operationName: TOperationName; constructor(workflowId: string, operationName: TOperationName); } //# sourceMappingURL=errors.d.ts.map