2025-09-09 14:37:32 +05:30
|
|
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
|
|
2026-01-17 14:43:45 +05:30
|
|
|
import type { Client,Options as ClientOptions, TDataShape } from '@hey-api/client-fetch';
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
import { client as _heyApiClient } from './client.gen';
|
2026-03-23 11:36:39 +05:30
|
|
|
import type { ArchiveApiKeyApiV1UserApiKeysApiKeyIdDeleteData, ArchiveApiKeyApiV1UserApiKeysApiKeyIdDeleteError, ArchiveApiKeyApiV1UserApiKeysApiKeyIdDeleteResponse, ArchiveServiceKeyApiV1UserServiceKeysServiceKeyIdDeleteData, ArchiveServiceKeyApiV1UserServiceKeysServiceKeyIdDeleteError, CompleteTransferFunctionCallApiV1TelephonyTransferResultTransferIdPostData, CompleteTransferFunctionCallApiV1TelephonyTransferResultTransferIdPostError, CreateApiKeyApiV1UserApiKeysPostData, CreateApiKeyApiV1UserApiKeysPostError, CreateApiKeyApiV1UserApiKeysPostResponse, CreateCampaignApiV1CampaignCreatePostData, CreateCampaignApiV1CampaignCreatePostError, CreateCampaignApiV1CampaignCreatePostResponse, CreateCredentialApiV1CredentialsPostData, CreateCredentialApiV1CredentialsPostError, CreateCredentialApiV1CredentialsPostResponse, CreateLoadTestApiV1LooptalkLoadTestsPostData, CreateLoadTestApiV1LooptalkLoadTestsPostError, CreateLoadTestApiV1LooptalkLoadTestsPostResponse, CreateOrUpdateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenPostData, CreateOrUpdateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenPostError, CreateOrUpdateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenPostResponse, CreateRecordingApiV1WorkflowRecordingsPostData, CreateRecordingApiV1WorkflowRecordingsPostError, CreateRecordingApiV1WorkflowRecordingsPostResponse, CreateServiceKeyApiV1UserServiceKeysPostData, CreateServiceKeyApiV1UserServiceKeysPostError, CreateServiceKeyApiV1UserServiceKeysPostResponse, CreateSessionApiV1IntegrationSessionPostData, CreateSessionApiV1IntegrationSessionPostError, CreateSessionApiV1IntegrationSessionPostResponse, CreateTestSessionApiV1LooptalkTestSessionsPostData, CreateTestSessionApiV1LooptalkTestSessionsPostError, CreateTestSessionApiV1LooptalkTestSessionsPostResponse, CreateToolApiV1ToolsPostData, CreateToolApiV1ToolsPostError, CreateToolApiV1ToolsPostResponse, CreateWorkflowApiV1WorkflowCreateDefinitionPostData, CreateWorkflowApiV1WorkflowCreateDefinitionPostError, CreateWorkflowApiV1WorkflowCreateDefinitionPostResponse, CreateWorkflowFromTemplateApiV1WorkflowCreateTemplatePostData, CreateWorkflowFromTemplateApiV1WorkflowCreateTemplatePostError, CreateWorkflowFromTemplateApiV1WorkflowCreateTemplatePostResponse, CreateWorkflowRunApiV1WorkflowWorkflowIdRunsPostData, CreateWorkflowRunApiV1WorkflowWorkflowIdRunsPostError, CreateWorkflowRunApiV1WorkflowWorkflowIdRunsPostResponse, DeactivateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenDeleteData, DeactivateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenDeleteError, DeactivateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenDeleteResponse, DeleteCredentialApiV1CredentialsCredentialUuidDeleteData, DeleteCredentialApiV1CredentialsCredentialUuidDeleteError, DeleteCredentialApiV1CredentialsCredentialUuidDeleteResponse, DeleteDocumentApiV1KnowledgeBaseDocumentsDocumentUuidDeleteData, DeleteDocumentApiV1KnowledgeBaseDocumentsDocumentUuidDeleteError, DeleteLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsDeleteData, DeleteLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsDeleteError, DeleteRecordingApiV1WorkflowRecordingsRecordingIdDeleteData, DeleteRecordingApiV1WorkflowRecordingsRecordingIdDeleteError, DeleteToolApiV1ToolsToolUuidDeleteData, DeleteToolApiV1ToolsToolUuidDeleteError, DeleteToolApiV1ToolsToolUuidDeleteResponse, DownloadCampaignReportApiV1CampaignCampaignIdReportGetData, DownloadCampaignReportApiV1CampaignCampaignIdReportGetError, DownloadWorkflowArtifactApiV1PublicDownloadWorkflowTokenArtifactTypeGetData, DownloadWorkflowArtifactApiV1PublicDownloadWorkflowTokenArtifactTypeGetError, DuplicateWorkflowEndpointApiV1WorkflowWorkflowIdDuplicatePostData, DuplicateWorkflowEndpointApiV1WorkflowWorkflowIdDuplicatePostError, DuplicateWorkflowEndpointApiV1WorkflowWorkflowIdDuplicatePostResponse, DuplicateWorkflowTemplateApiV1WorkflowTemplatesDuplicatePostData, DuplicateWorkflowTemplateApiV1WorkflowTemplatesDuplicatePostError, DuplicateWorkflowTemplateApiV1WorkflowTemplatesDuplicatePostResponse, GetActiveTestsApiV1LooptalkActiveTestsGetData, GetActiveTestsApiV1LooptalkActiveTestsGetError, GetApiKeysApiV1Us
|
2025-09-09 14:37:32 +05:30
|
|
|
|
|
|
|
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
|
|
|
|
|
/**
|
|
|
|
|
* You can provide a client instance returned by `createClient()` instead of
|
|
|
|
|
* individual options. This might be also useful if you want to implement a
|
|
|
|
|
* custom client.
|
|
|
|
|
*/
|
|
|
|
|
client?: Client;
|
|
|
|
|
/**
|
|
|
|
|
* You can pass arbitrary values through the `meta` object. This can be
|
|
|
|
|
* used to access values that aren't defined as part of the SDK function.
|
|
|
|
|
*/
|
|
|
|
|
meta?: Record<string, unknown>;
|
|
|
|
|
};
|
|
|
|
|
|
2025-10-27 15:29:57 +05:30
|
|
|
/**
|
|
|
|
|
* Initiate Call
|
|
|
|
|
* Initiate a call using the configured telephony provider.
|
|
|
|
|
*/
|
|
|
|
|
export const initiateCallApiV1TelephonyInitiateCallPost = <ThrowOnError extends boolean = false>(options: Options<InitiateCallApiV1TelephonyInitiateCallPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, InitiateCallApiV1TelephonyInitiateCallPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/initiate-call',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
2025-11-04 18:12:06 +05:30
|
|
|
* Handle Twilio Status Callback
|
|
|
|
|
* Handle Twilio-specific status callbacks.
|
2025-10-27 15:29:57 +05:30
|
|
|
*/
|
2025-11-04 18:12:06 +05:30
|
|
|
export const handleTwilioStatusCallbackApiV1TelephonyTwilioStatusCallbackWorkflowRunIdPost = <ThrowOnError extends boolean = false>(options: Options<HandleTwilioStatusCallbackApiV1TelephonyTwilioStatusCallbackWorkflowRunIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, HandleTwilioStatusCallbackApiV1TelephonyTwilioStatusCallbackWorkflowRunIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/twilio/status-callback/{workflow_run_id}',
|
2025-10-27 15:29:57 +05:30
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handle Vonage Events
|
2025-11-04 18:12:06 +05:30
|
|
|
* Handle Vonage-specific event webhooks.
|
2025-10-27 15:29:57 +05:30
|
|
|
*
|
|
|
|
|
* Vonage sends all call events to a single endpoint.
|
|
|
|
|
* Events include: started, ringing, answered, complete, failed, etc.
|
|
|
|
|
*/
|
2025-11-04 18:12:06 +05:30
|
|
|
export const handleVonageEventsApiV1TelephonyVonageEventsWorkflowRunIdPost = <ThrowOnError extends boolean = false>(options: Options<HandleVonageEventsApiV1TelephonyVonageEventsWorkflowRunIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, HandleVonageEventsApiV1TelephonyVonageEventsWorkflowRunIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/vonage/events/{workflow_run_id}',
|
2025-10-27 15:29:57 +05:30
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-28 09:36:04 +05:30
|
|
|
/**
|
|
|
|
|
* Handle Vobiz Hangup Callback
|
|
|
|
|
* Handle Vobiz hangup callback (sent when call ends).
|
|
|
|
|
*
|
|
|
|
|
* Vobiz sends callbacks to hangup_url when the call terminates.
|
|
|
|
|
* This includes call duration, status, and billing information.
|
|
|
|
|
*/
|
|
|
|
|
export const handleVobizHangupCallbackApiV1TelephonyVobizHangupCallbackWorkflowRunIdPost = <ThrowOnError extends boolean = false>(options: Options<HandleVobizHangupCallbackApiV1TelephonyVobizHangupCallbackWorkflowRunIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, HandleVobizHangupCallbackApiV1TelephonyVobizHangupCallbackWorkflowRunIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/vobiz/hangup-callback/{workflow_run_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handle Vobiz Ring Callback
|
|
|
|
|
* Handle Vobiz ring callback (sent when call starts ringing).
|
|
|
|
|
*
|
|
|
|
|
* Vobiz can send callbacks to ring_url when the call starts ringing.
|
|
|
|
|
* This is optional and used for tracking ringing status.
|
|
|
|
|
*/
|
|
|
|
|
export const handleVobizRingCallbackApiV1TelephonyVobizRingCallbackWorkflowRunIdPost = <ThrowOnError extends boolean = false>(options: Options<HandleVobizRingCallbackApiV1TelephonyVobizRingCallbackWorkflowRunIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, HandleVobizRingCallbackApiV1TelephonyVobizRingCallbackWorkflowRunIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/vobiz/ring-callback/{workflow_run_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-03 08:32:21 +02:00
|
|
|
/**
|
|
|
|
|
* Handle Cloudonix Status Callback
|
|
|
|
|
* Handle Cloudonix-specific status callbacks.
|
|
|
|
|
*
|
|
|
|
|
* Cloudonix sends call status updates to the callback URL specified during call initiation.
|
|
|
|
|
*/
|
|
|
|
|
export const handleCloudonixStatusCallbackApiV1TelephonyCloudonixStatusCallbackWorkflowRunIdPost = <ThrowOnError extends boolean = false>(options: Options<HandleCloudonixStatusCallbackApiV1TelephonyCloudonixStatusCallbackWorkflowRunIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, HandleCloudonixStatusCallbackApiV1TelephonyCloudonixStatusCallbackWorkflowRunIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/cloudonix/status-callback/{workflow_run_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-12 10:10:30 +05:30
|
|
|
/**
|
|
|
|
|
* Handle Vobiz Hangup Callback By Workflow
|
|
|
|
|
* Handle Vobiz hangup callback with workflow_id - finds workflow run by call_id.
|
|
|
|
|
*/
|
|
|
|
|
export const handleVobizHangupCallbackByWorkflowApiV1TelephonyVobizHangupCallbackWorkflowWorkflowIdPost = <ThrowOnError extends boolean = false>(options: Options<HandleVobizHangupCallbackByWorkflowApiV1TelephonyVobizHangupCallbackWorkflowWorkflowIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, HandleVobizHangupCallbackByWorkflowApiV1TelephonyVobizHangupCallbackWorkflowWorkflowIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/vobiz/hangup-callback/workflow/{workflow_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handle Inbound Telephony
|
|
|
|
|
* Handle inbound telephony calls from any supported provider with common processing
|
|
|
|
|
*/
|
|
|
|
|
export const handleInboundTelephonyApiV1TelephonyInboundWorkflowIdPost = <ThrowOnError extends boolean = false>(options: Options<HandleInboundTelephonyApiV1TelephonyInboundWorkflowIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, HandleInboundTelephonyApiV1TelephonyInboundWorkflowIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/inbound/{workflow_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handle Inbound Fallback
|
|
|
|
|
* Fallback endpoint that returns audio message when calls cannot be processed.
|
|
|
|
|
*/
|
|
|
|
|
export const handleInboundFallbackApiV1TelephonyInboundFallbackPost = <ThrowOnError extends boolean = false>(options?: Options<HandleInboundFallbackApiV1TelephonyInboundFallbackPostData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).post<unknown, unknown, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/inbound/fallback',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-30 17:08:15 +05:30
|
|
|
/**
|
|
|
|
|
* Handle Cloudonix Cdr
|
|
|
|
|
* Handle Cloudonix CDR (Call Detail Record) webhooks.
|
|
|
|
|
*
|
|
|
|
|
* Cloudonix sends CDR records when calls complete. The CDR contains:
|
|
|
|
|
* - domain: Used to identify the organization
|
|
|
|
|
* - call_id: Used to find the workflow run
|
|
|
|
|
* - disposition: Call termination status (ANSWER, BUSY, CANCEL, FAILED, CONGESTION, NOANSWER)
|
|
|
|
|
* - duration/billsec: Call duration information
|
|
|
|
|
*/
|
|
|
|
|
export const handleCloudonixCdrApiV1TelephonyCloudonixCdrPost = <ThrowOnError extends boolean = false>(options?: Options<HandleCloudonixCdrApiV1TelephonyCloudonixCdrPostData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).post<unknown, unknown, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/cloudonix/cdr',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-16 14:33:33 +05:30
|
|
|
/**
|
|
|
|
|
* Initiate Call Transfer
|
|
|
|
|
* Initiate a call transfer via the telephony provider.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint only initiates the outbound call. Transfer context
|
|
|
|
|
* (original_call_sid, etc.) is stored by the caller
|
|
|
|
|
* before invoking this endpoint.
|
|
|
|
|
*/
|
|
|
|
|
export const initiateCallTransferApiV1TelephonyCallTransferPost = <ThrowOnError extends boolean = false>(options: Options<InitiateCallTransferApiV1TelephonyCallTransferPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, InitiateCallTransferApiV1TelephonyCallTransferPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/call-transfer',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Complete Transfer Function Call
|
|
|
|
|
* Webhook endpoint to complete the function call with transfer result.
|
|
|
|
|
*
|
|
|
|
|
* Called by Twilio's StatusCallback when the transfer call status changes.
|
|
|
|
|
*/
|
|
|
|
|
export const completeTransferFunctionCallApiV1TelephonyTransferResultTransferIdPost = <ThrowOnError extends boolean = false>(options: Options<CompleteTransferFunctionCallApiV1TelephonyTransferResultTransferIdPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, CompleteTransferFunctionCallApiV1TelephonyTransferResultTransferIdPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/telephony/transfer-result/{transfer_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Impersonate
|
|
|
|
|
* Impersonate a user as a super-admin.
|
|
|
|
|
* Internally, Stack Auth requires the **provider user ID** (a UUID-ish string)
|
|
|
|
|
* to create an impersonation session.
|
|
|
|
|
*/
|
|
|
|
|
export const impersonateApiV1SuperuserImpersonatePost = <ThrowOnError extends boolean = false>(options: Options<ImpersonateApiV1SuperuserImpersonatePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<ImpersonateApiV1SuperuserImpersonatePostResponse, ImpersonateApiV1SuperuserImpersonatePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/superuser/impersonate',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Workflow Runs
|
|
|
|
|
* Get paginated list of all workflow runs with organization information.
|
|
|
|
|
* Requires superuser privileges.
|
|
|
|
|
*
|
|
|
|
|
* Filters should be provided as a JSON-encoded array of filter criteria.
|
|
|
|
|
* Example: [{"field": "id", "type": "number", "value": {"value": 680}}]
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowRunsApiV1SuperuserWorkflowRunsGet = <ThrowOnError extends boolean = false>(options?: Options<GetWorkflowRunsApiV1SuperuserWorkflowRunsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetWorkflowRunsApiV1SuperuserWorkflowRunsGetResponse, GetWorkflowRunsApiV1SuperuserWorkflowRunsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/superuser/workflow-runs',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Validate Workflow
|
|
|
|
|
* Validate all nodes in a workflow to ensure they have required fields.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* workflow_id: The ID of the workflow to validate
|
|
|
|
|
* user: The authenticated user
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* Object indicating if workflow is valid and any invalid nodes/edges
|
|
|
|
|
*/
|
|
|
|
|
export const validateWorkflowApiV1WorkflowWorkflowIdValidatePost = <ThrowOnError extends boolean = false>(options: Options<ValidateWorkflowApiV1WorkflowWorkflowIdValidatePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<ValidateWorkflowApiV1WorkflowWorkflowIdValidatePostResponse, ValidateWorkflowApiV1WorkflowWorkflowIdValidatePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/validate',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Workflow
|
|
|
|
|
* Create a new workflow from the client
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* request: The create workflow request
|
|
|
|
|
* user: The user to create the workflow for
|
|
|
|
|
*/
|
|
|
|
|
export const createWorkflowApiV1WorkflowCreateDefinitionPost = <ThrowOnError extends boolean = false>(options: Options<CreateWorkflowApiV1WorkflowCreateDefinitionPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateWorkflowApiV1WorkflowCreateDefinitionPostResponse, CreateWorkflowApiV1WorkflowCreateDefinitionPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/create/definition',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Workflow From Template
|
|
|
|
|
* Create a new workflow from a natural language template request.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint:
|
|
|
|
|
* 1. Uses mps_service_key_client to call MPS workflow API
|
|
|
|
|
* 2. Passes organization ID (authenticated mode) or created_by (OSS mode)
|
|
|
|
|
* 3. Creates the workflow in the database
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* request: The template creation request with call_type, use_case, and activity_description
|
|
|
|
|
* user: The authenticated user
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The created workflow
|
|
|
|
|
*
|
|
|
|
|
* Raises:
|
|
|
|
|
* HTTPException: If MPS API call fails
|
|
|
|
|
*/
|
|
|
|
|
export const createWorkflowFromTemplateApiV1WorkflowCreateTemplatePost = <ThrowOnError extends boolean = false>(options: Options<CreateWorkflowFromTemplateApiV1WorkflowCreateTemplatePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateWorkflowFromTemplateApiV1WorkflowCreateTemplatePostResponse, CreateWorkflowFromTemplateApiV1WorkflowCreateTemplatePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/create/template',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-23 18:53:59 +05:30
|
|
|
/**
|
|
|
|
|
* Get Workflow Count
|
|
|
|
|
* Get workflow counts for the authenticated user's organization.
|
|
|
|
|
*
|
|
|
|
|
* This is a lightweight endpoint for checking if the user has workflows,
|
|
|
|
|
* useful for redirect logic without fetching full workflow data.
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowCountApiV1WorkflowCountGet = <ThrowOnError extends boolean = false>(options?: Options<GetWorkflowCountApiV1WorkflowCountGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetWorkflowCountApiV1WorkflowCountGetResponse, GetWorkflowCountApiV1WorkflowCountGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/count',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Get Workflows
|
2026-01-23 18:53:59 +05:30
|
|
|
* Get all workflows for the authenticated user's organization.
|
|
|
|
|
*
|
|
|
|
|
* Returns a lightweight response with only essential fields for listing.
|
|
|
|
|
* Use GET /workflow/fetch/{workflow_id} to get full workflow details.
|
2025-09-09 14:37:32 +05:30
|
|
|
*/
|
|
|
|
|
export const getWorkflowsApiV1WorkflowFetchGet = <ThrowOnError extends boolean = false>(options?: Options<GetWorkflowsApiV1WorkflowFetchGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetWorkflowsApiV1WorkflowFetchGetResponse, GetWorkflowsApiV1WorkflowFetchGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/fetch',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Workflow
|
|
|
|
|
* Get a single workflow by ID
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowApiV1WorkflowFetchWorkflowIdGet = <ThrowOnError extends boolean = false>(options: Options<GetWorkflowApiV1WorkflowFetchWorkflowIdGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetWorkflowApiV1WorkflowFetchWorkflowIdGetResponse, GetWorkflowApiV1WorkflowFetchWorkflowIdGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/fetch/{workflow_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Workflows Summary
|
|
|
|
|
* Get minimal workflow information (id and name only) for all workflows
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowsSummaryApiV1WorkflowSummaryGet = <ThrowOnError extends boolean = false>(options?: Options<GetWorkflowsSummaryApiV1WorkflowSummaryGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetWorkflowsSummaryApiV1WorkflowSummaryGetResponse, GetWorkflowsSummaryApiV1WorkflowSummaryGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/summary',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update Workflow Status
|
|
|
|
|
* Update the status of a workflow (e.g., archive/unarchive).
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* workflow_id: The ID of the workflow to update
|
|
|
|
|
* request: The status update request
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The updated workflow
|
|
|
|
|
*/
|
|
|
|
|
export const updateWorkflowStatusApiV1WorkflowWorkflowIdStatusPut = <ThrowOnError extends boolean = false>(options: Options<UpdateWorkflowStatusApiV1WorkflowWorkflowIdStatusPutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<UpdateWorkflowStatusApiV1WorkflowWorkflowIdStatusPutResponse, UpdateWorkflowStatusApiV1WorkflowWorkflowIdStatusPutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/status',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update Workflow
|
|
|
|
|
* Update an existing workflow.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* workflow_id: The ID of the workflow to update
|
|
|
|
|
* request: The update request containing the new name and workflow definition
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The updated workflow
|
|
|
|
|
*
|
|
|
|
|
* Raises:
|
|
|
|
|
* HTTPException: If the workflow is not found or if there's a database error
|
|
|
|
|
*/
|
|
|
|
|
export const updateWorkflowApiV1WorkflowWorkflowIdPut = <ThrowOnError extends boolean = false>(options: Options<UpdateWorkflowApiV1WorkflowWorkflowIdPutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<UpdateWorkflowApiV1WorkflowWorkflowIdPutResponse, UpdateWorkflowApiV1WorkflowWorkflowIdPutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-21 12:21:40 +05:30
|
|
|
/**
|
|
|
|
|
* Duplicate Workflow Endpoint
|
|
|
|
|
* Duplicate a workflow including its definition, configuration, recordings, and triggers.
|
|
|
|
|
*/
|
|
|
|
|
export const duplicateWorkflowEndpointApiV1WorkflowWorkflowIdDuplicatePost = <ThrowOnError extends boolean = false>(options: Options<DuplicateWorkflowEndpointApiV1WorkflowWorkflowIdDuplicatePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<DuplicateWorkflowEndpointApiV1WorkflowWorkflowIdDuplicatePostResponse, DuplicateWorkflowEndpointApiV1WorkflowWorkflowIdDuplicatePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/duplicate',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Get Workflow Runs
|
2026-01-30 17:08:15 +05:30
|
|
|
* Get workflow runs with optional filtering and sorting.
|
2025-09-09 14:37:32 +05:30
|
|
|
*
|
|
|
|
|
* Filters should be provided as a JSON-encoded array of filter criteria.
|
|
|
|
|
* Example: [{"attribute": "dateRange", "value": {"from": "2024-01-01", "to": "2024-01-31"}}]
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowRunsApiV1WorkflowWorkflowIdRunsGet = <ThrowOnError extends boolean = false>(options: Options<GetWorkflowRunsApiV1WorkflowWorkflowIdRunsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetWorkflowRunsApiV1WorkflowWorkflowIdRunsGetResponse, GetWorkflowRunsApiV1WorkflowWorkflowIdRunsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/runs',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Workflow Run
|
|
|
|
|
* Create a new workflow run when the user decides to execute the workflow via chat or voice
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* workflow_id: The ID of the workflow to run
|
|
|
|
|
* request: The create workflow run request
|
|
|
|
|
* user: The user to create the workflow run for
|
|
|
|
|
*/
|
|
|
|
|
export const createWorkflowRunApiV1WorkflowWorkflowIdRunsPost = <ThrowOnError extends boolean = false>(options: Options<CreateWorkflowRunApiV1WorkflowWorkflowIdRunsPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateWorkflowRunApiV1WorkflowWorkflowIdRunsPostResponse, CreateWorkflowRunApiV1WorkflowWorkflowIdRunsPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/runs',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Workflow Run
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowRunApiV1WorkflowWorkflowIdRunsRunIdGet = <ThrowOnError extends boolean = false>(options: Options<GetWorkflowRunApiV1WorkflowWorkflowIdRunsRunIdGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetWorkflowRunApiV1WorkflowWorkflowIdRunsRunIdGetResponse, GetWorkflowRunApiV1WorkflowWorkflowIdRunsRunIdGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/runs/{run_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Workflow Templates
|
|
|
|
|
* Get all available workflow templates.
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* List of workflow templates
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowTemplatesApiV1WorkflowTemplatesGet = <ThrowOnError extends boolean = false>(options?: Options<GetWorkflowTemplatesApiV1WorkflowTemplatesGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetWorkflowTemplatesApiV1WorkflowTemplatesGetResponse, unknown, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/templates',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Duplicate Workflow Template
|
|
|
|
|
* Duplicate a workflow template to create a new workflow for the user.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* request: The duplicate template request
|
|
|
|
|
* user: The authenticated user
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The newly created workflow
|
|
|
|
|
*/
|
|
|
|
|
export const duplicateWorkflowTemplateApiV1WorkflowTemplatesDuplicatePost = <ThrowOnError extends boolean = false>(options: Options<DuplicateWorkflowTemplateApiV1WorkflowTemplatesDuplicatePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<DuplicateWorkflowTemplateApiV1WorkflowTemplatesDuplicatePostResponse, DuplicateWorkflowTemplateApiV1WorkflowTemplatesDuplicatePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/templates/duplicate',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Default Configurations
|
|
|
|
|
*/
|
|
|
|
|
export const getDefaultConfigurationsApiV1UserConfigurationsDefaultsGet = <ThrowOnError extends boolean = false>(options?: Options<GetDefaultConfigurationsApiV1UserConfigurationsDefaultsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetDefaultConfigurationsApiV1UserConfigurationsDefaultsGetResponse, unknown, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/configurations/defaults',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Auth User
|
|
|
|
|
*/
|
|
|
|
|
export const getAuthUserApiV1UserAuthUserGet = <ThrowOnError extends boolean = false>(options?: Options<GetAuthUserApiV1UserAuthUserGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetAuthUserApiV1UserAuthUserGetResponse, GetAuthUserApiV1UserAuthUserGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/auth/user',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get User Configurations
|
|
|
|
|
*/
|
|
|
|
|
export const getUserConfigurationsApiV1UserConfigurationsUserGet = <ThrowOnError extends boolean = false>(options?: Options<GetUserConfigurationsApiV1UserConfigurationsUserGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetUserConfigurationsApiV1UserConfigurationsUserGetResponse, GetUserConfigurationsApiV1UserConfigurationsUserGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/configurations/user',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update User Configurations
|
|
|
|
|
*/
|
|
|
|
|
export const updateUserConfigurationsApiV1UserConfigurationsUserPut = <ThrowOnError extends boolean = false>(options: Options<UpdateUserConfigurationsApiV1UserConfigurationsUserPutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<UpdateUserConfigurationsApiV1UserConfigurationsUserPutResponse, UpdateUserConfigurationsApiV1UserConfigurationsUserPutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/configurations/user',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Validate User Configurations
|
|
|
|
|
*/
|
|
|
|
|
export const validateUserConfigurationsApiV1UserConfigurationsUserValidateGet = <ThrowOnError extends boolean = false>(options?: Options<ValidateUserConfigurationsApiV1UserConfigurationsUserValidateGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<ValidateUserConfigurationsApiV1UserConfigurationsUserValidateGetResponse, ValidateUserConfigurationsApiV1UserConfigurationsUserValidateGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/configurations/user/validate',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Api Keys
|
|
|
|
|
* Get all API keys for the user's selected organization.
|
|
|
|
|
*/
|
|
|
|
|
export const getApiKeysApiV1UserApiKeysGet = <ThrowOnError extends boolean = false>(options?: Options<GetApiKeysApiV1UserApiKeysGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetApiKeysApiV1UserApiKeysGetResponse, GetApiKeysApiV1UserApiKeysGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/api-keys',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Api Key
|
|
|
|
|
* Create a new API key for the user's selected organization.
|
|
|
|
|
*/
|
|
|
|
|
export const createApiKeyApiV1UserApiKeysPost = <ThrowOnError extends boolean = false>(options: Options<CreateApiKeyApiV1UserApiKeysPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateApiKeyApiV1UserApiKeysPostResponse, CreateApiKeyApiV1UserApiKeysPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/api-keys',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Archive Api Key
|
|
|
|
|
* Archive an API key (soft delete).
|
|
|
|
|
*/
|
|
|
|
|
export const archiveApiKeyApiV1UserApiKeysApiKeyIdDelete = <ThrowOnError extends boolean = false>(options: Options<ArchiveApiKeyApiV1UserApiKeysApiKeyIdDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).delete<ArchiveApiKeyApiV1UserApiKeysApiKeyIdDeleteResponse, ArchiveApiKeyApiV1UserApiKeysApiKeyIdDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/api-keys/{api_key_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reactivate Api Key
|
|
|
|
|
* Reactivate an archived API key.
|
|
|
|
|
*/
|
|
|
|
|
export const reactivateApiKeyApiV1UserApiKeysApiKeyIdReactivatePut = <ThrowOnError extends boolean = false>(options: Options<ReactivateApiKeyApiV1UserApiKeysApiKeyIdReactivatePutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<ReactivateApiKeyApiV1UserApiKeysApiKeyIdReactivatePutResponse, ReactivateApiKeyApiV1UserApiKeysApiKeyIdReactivatePutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/api-keys/{api_key_id}/reactivate',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-25 15:05:53 +05:30
|
|
|
/**
|
|
|
|
|
* Get Voices
|
|
|
|
|
* Get available voices for a TTS provider.
|
|
|
|
|
*/
|
|
|
|
|
export const getVoicesApiV1UserConfigurationsVoicesProviderGet = <ThrowOnError extends boolean = false>(options: Options<GetVoicesApiV1UserConfigurationsVoicesProviderGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetVoicesApiV1UserConfigurationsVoicesProviderGetResponse, GetVoicesApiV1UserConfigurationsVoicesProviderGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/configurations/voices/{provider}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Create Campaign
|
|
|
|
|
* Create a new campaign
|
|
|
|
|
*/
|
|
|
|
|
export const createCampaignApiV1CampaignCreatePost = <ThrowOnError extends boolean = false>(options: Options<CreateCampaignApiV1CampaignCreatePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateCampaignApiV1CampaignCreatePostResponse, CreateCampaignApiV1CampaignCreatePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/create',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Campaigns
|
|
|
|
|
* Get campaigns for user's organization
|
|
|
|
|
*/
|
|
|
|
|
export const getCampaignsApiV1CampaignGet = <ThrowOnError extends boolean = false>(options?: Options<GetCampaignsApiV1CampaignGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetCampaignsApiV1CampaignGetResponse, GetCampaignsApiV1CampaignGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Campaign
|
|
|
|
|
* Get campaign details
|
|
|
|
|
*/
|
|
|
|
|
export const getCampaignApiV1CampaignCampaignIdGet = <ThrowOnError extends boolean = false>(options: Options<GetCampaignApiV1CampaignCampaignIdGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetCampaignApiV1CampaignCampaignIdGetResponse, GetCampaignApiV1CampaignCampaignIdGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-17 21:04:15 +05:30
|
|
|
/**
|
|
|
|
|
* Update Campaign
|
|
|
|
|
* Update campaign settings (name, retry config, max concurrency, schedule)
|
|
|
|
|
*/
|
|
|
|
|
export const updateCampaignApiV1CampaignCampaignIdPatch = <ThrowOnError extends boolean = false>(options: Options<UpdateCampaignApiV1CampaignCampaignIdPatchData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).patch<UpdateCampaignApiV1CampaignCampaignIdPatchResponse, UpdateCampaignApiV1CampaignCampaignIdPatchError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Start Campaign
|
|
|
|
|
* Start campaign execution
|
|
|
|
|
*/
|
|
|
|
|
export const startCampaignApiV1CampaignCampaignIdStartPost = <ThrowOnError extends boolean = false>(options: Options<StartCampaignApiV1CampaignCampaignIdStartPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<StartCampaignApiV1CampaignCampaignIdStartPostResponse, StartCampaignApiV1CampaignCampaignIdStartPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}/start',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Pause Campaign
|
|
|
|
|
* Pause campaign execution
|
|
|
|
|
*/
|
|
|
|
|
export const pauseCampaignApiV1CampaignCampaignIdPausePost = <ThrowOnError extends boolean = false>(options: Options<PauseCampaignApiV1CampaignCampaignIdPausePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<PauseCampaignApiV1CampaignCampaignIdPausePostResponse, PauseCampaignApiV1CampaignCampaignIdPausePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}/pause',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Campaign Runs
|
2026-01-30 17:08:15 +05:30
|
|
|
* Get campaign workflow runs with pagination, filters and sorting
|
2025-09-09 14:37:32 +05:30
|
|
|
*/
|
|
|
|
|
export const getCampaignRunsApiV1CampaignCampaignIdRunsGet = <ThrowOnError extends boolean = false>(options: Options<GetCampaignRunsApiV1CampaignCampaignIdRunsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetCampaignRunsApiV1CampaignCampaignIdRunsGetResponse, GetCampaignRunsApiV1CampaignCampaignIdRunsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}/runs',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Resume Campaign
|
|
|
|
|
* Resume a paused campaign
|
|
|
|
|
*/
|
|
|
|
|
export const resumeCampaignApiV1CampaignCampaignIdResumePost = <ThrowOnError extends boolean = false>(options: Options<ResumeCampaignApiV1CampaignCampaignIdResumePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<ResumeCampaignApiV1CampaignCampaignIdResumePostResponse, ResumeCampaignApiV1CampaignCampaignIdResumePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}/resume',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Campaign Progress
|
|
|
|
|
* Get current campaign progress and statistics
|
|
|
|
|
*/
|
|
|
|
|
export const getCampaignProgressApiV1CampaignCampaignIdProgressGet = <ThrowOnError extends boolean = false>(options: Options<GetCampaignProgressApiV1CampaignCampaignIdProgressGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetCampaignProgressApiV1CampaignCampaignIdProgressGetResponse, GetCampaignProgressApiV1CampaignCampaignIdProgressGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}/progress',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-10-09 17:54:31 +05:30
|
|
|
/**
|
|
|
|
|
* Get Campaign Source Download Url
|
|
|
|
|
* Get presigned download URL for campaign CSV source file
|
|
|
|
|
*
|
|
|
|
|
* Only works for CSV source type. For Google Sheets, use the source_id directly.
|
|
|
|
|
* Validates that the campaign belongs to the user's organization for security.
|
|
|
|
|
*/
|
|
|
|
|
export const getCampaignSourceDownloadUrlApiV1CampaignCampaignIdSourceDownloadUrlGet = <ThrowOnError extends boolean = false>(options: Options<GetCampaignSourceDownloadUrlApiV1CampaignCampaignIdSourceDownloadUrlGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetCampaignSourceDownloadUrlApiV1CampaignCampaignIdSourceDownloadUrlGetResponse, GetCampaignSourceDownloadUrlApiV1CampaignCampaignIdSourceDownloadUrlGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}/source-download-url',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-11 17:57:04 +05:30
|
|
|
/**
|
|
|
|
|
* Download Campaign Report
|
|
|
|
|
* Download a CSV report of completed campaign runs.
|
|
|
|
|
*/
|
|
|
|
|
export const downloadCampaignReportApiV1CampaignCampaignIdReportGet = <ThrowOnError extends boolean = false>(options: Options<DownloadCampaignReportApiV1CampaignCampaignIdReportGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<unknown, DownloadCampaignReportApiV1CampaignCampaignIdReportGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/campaign/{campaign_id}/report',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-22 14:08:30 +05:30
|
|
|
/**
|
|
|
|
|
* List Credentials
|
|
|
|
|
* List all webhook credentials for the user's organization.
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* List of credentials (without sensitive data)
|
|
|
|
|
*/
|
|
|
|
|
export const listCredentialsApiV1CredentialsGet = <ThrowOnError extends boolean = false>(options?: Options<ListCredentialsApiV1CredentialsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<ListCredentialsApiV1CredentialsGetResponse, ListCredentialsApiV1CredentialsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/credentials/',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Credential
|
|
|
|
|
* Create a new webhook credential.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* request: The credential creation request
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The created credential (without sensitive data)
|
|
|
|
|
*/
|
|
|
|
|
export const createCredentialApiV1CredentialsPost = <ThrowOnError extends boolean = false>(options: Options<CreateCredentialApiV1CredentialsPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateCredentialApiV1CredentialsPostResponse, CreateCredentialApiV1CredentialsPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/credentials/',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete Credential
|
|
|
|
|
* Delete (soft delete) a webhook credential.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* credential_uuid: The UUID of the credential to delete
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* Success message
|
|
|
|
|
*/
|
|
|
|
|
export const deleteCredentialApiV1CredentialsCredentialUuidDelete = <ThrowOnError extends boolean = false>(options: Options<DeleteCredentialApiV1CredentialsCredentialUuidDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).delete<DeleteCredentialApiV1CredentialsCredentialUuidDeleteResponse, DeleteCredentialApiV1CredentialsCredentialUuidDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/credentials/{credential_uuid}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Credential
|
|
|
|
|
* Get a specific webhook credential by UUID.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* credential_uuid: The UUID of the credential
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The credential (without sensitive data)
|
|
|
|
|
*/
|
|
|
|
|
export const getCredentialApiV1CredentialsCredentialUuidGet = <ThrowOnError extends boolean = false>(options: Options<GetCredentialApiV1CredentialsCredentialUuidGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetCredentialApiV1CredentialsCredentialUuidGetResponse, GetCredentialApiV1CredentialsCredentialUuidGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/credentials/{credential_uuid}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update Credential
|
|
|
|
|
* Update a webhook credential.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* credential_uuid: The UUID of the credential to update
|
|
|
|
|
* request: The update request
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The updated credential (without sensitive data)
|
|
|
|
|
*/
|
|
|
|
|
export const updateCredentialApiV1CredentialsCredentialUuidPut = <ThrowOnError extends boolean = false>(options: Options<UpdateCredentialApiV1CredentialsCredentialUuidPutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<UpdateCredentialApiV1CredentialsCredentialUuidPutResponse, UpdateCredentialApiV1CredentialsCredentialUuidPutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/credentials/{credential_uuid}',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-02 13:11:02 +05:30
|
|
|
/**
|
|
|
|
|
* List Tools
|
|
|
|
|
* List all tools for the user's organization.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* status: Optional filter by status (active, archived, draft)
|
|
|
|
|
* category: Optional filter by category (http_api, native, integration)
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* List of tools
|
|
|
|
|
*/
|
|
|
|
|
export const listToolsApiV1ToolsGet = <ThrowOnError extends boolean = false>(options?: Options<ListToolsApiV1ToolsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<ListToolsApiV1ToolsGetResponse, ListToolsApiV1ToolsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/tools/',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Tool
|
|
|
|
|
* Create a new tool.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* request: The tool creation request
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The created tool
|
|
|
|
|
*/
|
|
|
|
|
export const createToolApiV1ToolsPost = <ThrowOnError extends boolean = false>(options: Options<CreateToolApiV1ToolsPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateToolApiV1ToolsPostResponse, CreateToolApiV1ToolsPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/tools/',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete Tool
|
|
|
|
|
* Archive (soft delete) a tool.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* tool_uuid: The UUID of the tool to delete
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* Success message
|
|
|
|
|
*/
|
|
|
|
|
export const deleteToolApiV1ToolsToolUuidDelete = <ThrowOnError extends boolean = false>(options: Options<DeleteToolApiV1ToolsToolUuidDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).delete<DeleteToolApiV1ToolsToolUuidDeleteResponse, DeleteToolApiV1ToolsToolUuidDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/tools/{tool_uuid}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Tool
|
|
|
|
|
* Get a specific tool by UUID.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* tool_uuid: The UUID of the tool
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The tool
|
|
|
|
|
*/
|
|
|
|
|
export const getToolApiV1ToolsToolUuidGet = <ThrowOnError extends boolean = false>(options: Options<GetToolApiV1ToolsToolUuidGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetToolApiV1ToolsToolUuidGetResponse, GetToolApiV1ToolsToolUuidGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/tools/{tool_uuid}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update Tool
|
|
|
|
|
* Update a tool.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* tool_uuid: The UUID of the tool to update
|
|
|
|
|
* request: The update request
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The updated tool
|
|
|
|
|
*/
|
|
|
|
|
export const updateToolApiV1ToolsToolUuidPut = <ThrowOnError extends boolean = false>(options: Options<UpdateToolApiV1ToolsToolUuidPutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<UpdateToolApiV1ToolsToolUuidPutResponse, UpdateToolApiV1ToolsToolUuidPutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/tools/{tool_uuid}',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-14 16:40:40 +05:30
|
|
|
/**
|
|
|
|
|
* Unarchive Tool
|
|
|
|
|
* Unarchive a tool (restore from archived state).
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* tool_uuid: The UUID of the tool to unarchive
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* The unarchived tool
|
|
|
|
|
*/
|
|
|
|
|
export const unarchiveToolApiV1ToolsToolUuidUnarchivePost = <ThrowOnError extends boolean = false>(options: Options<UnarchiveToolApiV1ToolsToolUuidUnarchivePostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<UnarchiveToolApiV1ToolsToolUuidUnarchivePostResponse, UnarchiveToolApiV1ToolsToolUuidUnarchivePostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/tools/{tool_uuid}/unarchive',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Get Integrations
|
|
|
|
|
* Get all integrations for the user's selected organization.
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* List of integrations associated with the user's selected organization
|
|
|
|
|
*/
|
|
|
|
|
export const getIntegrationsApiV1IntegrationGet = <ThrowOnError extends boolean = false>(options?: Options<GetIntegrationsApiV1IntegrationGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetIntegrationsApiV1IntegrationGetResponse, GetIntegrationsApiV1IntegrationGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/integration/',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Session
|
|
|
|
|
* Create a Nango session for the user's selected organization.
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* Session token and ID for the created session
|
|
|
|
|
*/
|
|
|
|
|
export const createSessionApiV1IntegrationSessionPost = <ThrowOnError extends boolean = false>(options?: Options<CreateSessionApiV1IntegrationSessionPostData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).post<CreateSessionApiV1IntegrationSessionPostResponse, CreateSessionApiV1IntegrationSessionPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/integration/session',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Update Integration
|
|
|
|
|
* Update an integration's selected files (for Google Sheets).
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* integration_id: The ID of the integration to update
|
|
|
|
|
* request: The update request containing selected files
|
|
|
|
|
* user: The authenticated user
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* Updated integration details
|
|
|
|
|
*/
|
|
|
|
|
export const updateIntegrationApiV1IntegrationIntegrationIdPut = <ThrowOnError extends boolean = false>(options: Options<UpdateIntegrationApiV1IntegrationIntegrationIdPutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<UpdateIntegrationApiV1IntegrationIntegrationIdPutResponse, UpdateIntegrationApiV1IntegrationIntegrationIdPutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/integration/{integration_id}',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Integration Access Token
|
|
|
|
|
* Get the latest access token for an integration from Nango.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* integration_id: The ID of the integration
|
|
|
|
|
* user: The authenticated user
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* Dict containing access token and expiration info
|
|
|
|
|
*/
|
|
|
|
|
export const getIntegrationAccessTokenApiV1IntegrationIntegrationIdAccessTokenGet = <ThrowOnError extends boolean = false>(options: Options<GetIntegrationAccessTokenApiV1IntegrationIntegrationIdAccessTokenGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetIntegrationAccessTokenApiV1IntegrationIntegrationIdAccessTokenGetResponse, GetIntegrationAccessTokenApiV1IntegrationIntegrationIdAccessTokenGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/integration/{integration_id}/access-token',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-10-04 12:22:50 +05:30
|
|
|
/**
|
|
|
|
|
* Get Telephony Configuration
|
|
|
|
|
* Get telephony configuration for the user's organization with masked sensitive fields.
|
|
|
|
|
*/
|
|
|
|
|
export const getTelephonyConfigurationApiV1OrganizationsTelephonyConfigGet = <ThrowOnError extends boolean = false>(options?: Options<GetTelephonyConfigurationApiV1OrganizationsTelephonyConfigGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetTelephonyConfigurationApiV1OrganizationsTelephonyConfigGetResponse, GetTelephonyConfigurationApiV1OrganizationsTelephonyConfigGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/telephony-config',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Save Telephony Configuration
|
|
|
|
|
* Save telephony configuration for the user's organization.
|
|
|
|
|
*/
|
|
|
|
|
export const saveTelephonyConfigurationApiV1OrganizationsTelephonyConfigPost = <ThrowOnError extends boolean = false>(options: Options<SaveTelephonyConfigurationApiV1OrganizationsTelephonyConfigPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, SaveTelephonyConfigurationApiV1OrganizationsTelephonyConfigPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/telephony-config',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-23 11:36:39 +05:30
|
|
|
/**
|
|
|
|
|
* Delete Langfuse Credentials
|
|
|
|
|
* Delete Langfuse credentials for the user's organization.
|
|
|
|
|
*/
|
|
|
|
|
export const deleteLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsDelete = <ThrowOnError extends boolean = false>(options?: Options<DeleteLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).delete<unknown, DeleteLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/langfuse-credentials',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Langfuse Credentials
|
|
|
|
|
* Get Langfuse credentials for the user's organization with masked sensitive fields.
|
|
|
|
|
*/
|
|
|
|
|
export const getLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsGet = <ThrowOnError extends boolean = false>(options?: Options<GetLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsGetResponse, GetLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/langfuse-credentials',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Save Langfuse Credentials
|
|
|
|
|
* Save Langfuse credentials for the user's organization.
|
|
|
|
|
*/
|
|
|
|
|
export const saveLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsPost = <ThrowOnError extends boolean = false>(options: Options<SaveLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, SaveLangfuseCredentialsApiV1OrganizationsLangfuseCredentialsPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/langfuse-credentials',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-29 11:57:57 +05:30
|
|
|
/**
|
2026-03-05 13:43:13 +05:30
|
|
|
* Get Campaign Defaults
|
2026-01-29 11:57:57 +05:30
|
|
|
* Get campaign limits for the user's organization.
|
|
|
|
|
*
|
|
|
|
|
* Returns the organization's concurrent call limit and default retry configuration.
|
|
|
|
|
*/
|
2026-03-05 13:43:13 +05:30
|
|
|
export const getCampaignDefaultsApiV1OrganizationsCampaignDefaultsGet = <ThrowOnError extends boolean = false>(options?: Options<GetCampaignDefaultsApiV1OrganizationsCampaignDefaultsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetCampaignDefaultsApiV1OrganizationsCampaignDefaultsGetResponse, GetCampaignDefaultsApiV1OrganizationsCampaignDefaultsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/campaign-defaults',
|
2026-01-29 11:57:57 +05:30
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Generate a signed S3 URL
|
|
|
|
|
* Return a short-lived signed URL for a transcript or recording file stored on S3.
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * Superusers can request any key.
|
|
|
|
|
* * Regular users can only request resources belonging to **their** workflow runs.
|
|
|
|
|
*/
|
|
|
|
|
export const getSignedUrlApiV1S3SignedUrlGet = <ThrowOnError extends boolean = false>(options: Options<GetSignedUrlApiV1S3SignedUrlGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetSignedUrlApiV1S3SignedUrlGetResponse, GetSignedUrlApiV1S3SignedUrlGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/s3/signed-url',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get file metadata for debugging
|
|
|
|
|
* Get file metadata including creation timestamp for debugging.
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * Superusers can request any key.
|
|
|
|
|
* * Regular users can only request resources belonging to **their** workflow runs.
|
|
|
|
|
*/
|
|
|
|
|
export const getFileMetadataApiV1S3FileMetadataGet = <ThrowOnError extends boolean = false>(options: Options<GetFileMetadataApiV1S3FileMetadataGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetFileMetadataApiV1S3FileMetadataGetResponse, GetFileMetadataApiV1S3FileMetadataGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/s3/file-metadata',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-10-09 17:54:31 +05:30
|
|
|
/**
|
|
|
|
|
* Generate a presigned URL for direct CSV upload
|
|
|
|
|
* Generate a presigned PUT URL for direct CSV file upload to S3/MinIO.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint enables browser-to-storage uploads without passing through the backend
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * All authenticated users can upload CSV files scoped to their organization.
|
|
|
|
|
* * Files are stored with organization-scoped keys for multi-tenancy.
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* * upload_url: Presigned URL (valid for 15 minutes) for PUT request
|
|
|
|
|
* * file_key: Unique storage key to use as source_id in campaign creation
|
|
|
|
|
* * expires_in: URL expiration time in seconds
|
|
|
|
|
*/
|
|
|
|
|
export const getPresignedUploadUrlApiV1S3PresignedUploadUrlPost = <ThrowOnError extends boolean = false>(options: Options<GetPresignedUploadUrlApiV1S3PresignedUploadUrlPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<GetPresignedUploadUrlApiV1S3PresignedUploadUrlPostResponse, GetPresignedUploadUrlApiV1S3PresignedUploadUrlPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/s3/presigned-upload-url',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Get Service Keys
|
|
|
|
|
* Get all service keys for the user's organization.
|
|
|
|
|
*/
|
|
|
|
|
export const getServiceKeysApiV1UserServiceKeysGet = <ThrowOnError extends boolean = false>(options?: Options<GetServiceKeysApiV1UserServiceKeysGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetServiceKeysApiV1UserServiceKeysGetResponse, GetServiceKeysApiV1UserServiceKeysGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/service-keys',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Service Key
|
|
|
|
|
* Create a new service key for the user's organization.
|
|
|
|
|
*/
|
|
|
|
|
export const createServiceKeyApiV1UserServiceKeysPost = <ThrowOnError extends boolean = false>(options: Options<CreateServiceKeyApiV1UserServiceKeysPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateServiceKeyApiV1UserServiceKeysPostResponse, CreateServiceKeyApiV1UserServiceKeysPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/service-keys',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Archive Service Key
|
|
|
|
|
* Archive a service key.
|
|
|
|
|
*/
|
|
|
|
|
export const archiveServiceKeyApiV1UserServiceKeysServiceKeyIdDelete = <ThrowOnError extends boolean = false>(options: Options<ArchiveServiceKeyApiV1UserServiceKeysServiceKeyIdDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).delete<unknown, ArchiveServiceKeyApiV1UserServiceKeysServiceKeyIdDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/service-keys/{service_key_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Reactivate Service Key
|
|
|
|
|
* Reactivate an archived service key.
|
|
|
|
|
*
|
|
|
|
|
* Note: This endpoint is provided for API compatibility but service key
|
|
|
|
|
* reactivation is not supported by MPS. Once archived, a service key
|
|
|
|
|
* cannot be reactivated and a new key must be created instead.
|
|
|
|
|
*/
|
|
|
|
|
export const reactivateServiceKeyApiV1UserServiceKeysServiceKeyIdReactivatePut = <ThrowOnError extends boolean = false>(options: Options<ReactivateServiceKeyApiV1UserServiceKeysServiceKeyIdReactivatePutData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).put<unknown, ReactivateServiceKeyApiV1UserServiceKeysServiceKeyIdReactivatePutError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/user/service-keys/{service_key_id}/reactivate',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List Test Sessions
|
|
|
|
|
* List LoopTalk test sessions.
|
|
|
|
|
*/
|
|
|
|
|
export const listTestSessionsApiV1LooptalkTestSessionsGet = <ThrowOnError extends boolean = false>(options?: Options<ListTestSessionsApiV1LooptalkTestSessionsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<ListTestSessionsApiV1LooptalkTestSessionsGetResponse, ListTestSessionsApiV1LooptalkTestSessionsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/test-sessions',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Test Session
|
|
|
|
|
* Create a new LoopTalk test session.
|
|
|
|
|
*/
|
|
|
|
|
export const createTestSessionApiV1LooptalkTestSessionsPost = <ThrowOnError extends boolean = false>(options: Options<CreateTestSessionApiV1LooptalkTestSessionsPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateTestSessionApiV1LooptalkTestSessionsPostResponse, CreateTestSessionApiV1LooptalkTestSessionsPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/test-sessions',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Test Session
|
|
|
|
|
* Get a specific test session.
|
|
|
|
|
*/
|
|
|
|
|
export const getTestSessionApiV1LooptalkTestSessionsTestSessionIdGet = <ThrowOnError extends boolean = false>(options: Options<GetTestSessionApiV1LooptalkTestSessionsTestSessionIdGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetTestSessionApiV1LooptalkTestSessionsTestSessionIdGetResponse, GetTestSessionApiV1LooptalkTestSessionsTestSessionIdGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/test-sessions/{test_session_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Start Test Session
|
|
|
|
|
* Start a LoopTalk test session.
|
|
|
|
|
*/
|
|
|
|
|
export const startTestSessionApiV1LooptalkTestSessionsTestSessionIdStartPost = <ThrowOnError extends boolean = false>(options: Options<StartTestSessionApiV1LooptalkTestSessionsTestSessionIdStartPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, StartTestSessionApiV1LooptalkTestSessionsTestSessionIdStartPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/test-sessions/{test_session_id}/start',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Stop Test Session
|
|
|
|
|
* Stop a running test session.
|
|
|
|
|
*/
|
|
|
|
|
export const stopTestSessionApiV1LooptalkTestSessionsTestSessionIdStopPost = <ThrowOnError extends boolean = false>(options: Options<StopTestSessionApiV1LooptalkTestSessionsTestSessionIdStopPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<unknown, StopTestSessionApiV1LooptalkTestSessionsTestSessionIdStopPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/test-sessions/{test_session_id}/stop',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Test Session Conversation
|
|
|
|
|
* Get conversation details for a test session.
|
|
|
|
|
*/
|
|
|
|
|
export const getTestSessionConversationApiV1LooptalkTestSessionsTestSessionIdConversationGet = <ThrowOnError extends boolean = false>(options: Options<GetTestSessionConversationApiV1LooptalkTestSessionsTestSessionIdConversationGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<unknown, GetTestSessionConversationApiV1LooptalkTestSessionsTestSessionIdConversationGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/test-sessions/{test_session_id}/conversation',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Load Test
|
|
|
|
|
* Create and start a load test.
|
|
|
|
|
*/
|
|
|
|
|
export const createLoadTestApiV1LooptalkLoadTestsPost = <ThrowOnError extends boolean = false>(options: Options<CreateLoadTestApiV1LooptalkLoadTestsPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateLoadTestApiV1LooptalkLoadTestsPostResponse, CreateLoadTestApiV1LooptalkLoadTestsPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/load-tests',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Load Test Stats
|
|
|
|
|
* Get statistics for a load test group.
|
|
|
|
|
*/
|
|
|
|
|
export const getLoadTestStatsApiV1LooptalkLoadTestsLoadTestGroupIdStatsGet = <ThrowOnError extends boolean = false>(options: Options<GetLoadTestStatsApiV1LooptalkLoadTestsLoadTestGroupIdStatsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetLoadTestStatsApiV1LooptalkLoadTestsLoadTestGroupIdStatsGetResponse, GetLoadTestStatsApiV1LooptalkLoadTestsLoadTestGroupIdStatsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/load-tests/{load_test_group_id}/stats',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Active Tests
|
|
|
|
|
* Get information about currently active test sessions.
|
|
|
|
|
*/
|
|
|
|
|
export const getActiveTestsApiV1LooptalkActiveTestsGet = <ThrowOnError extends boolean = false>(options?: Options<GetActiveTestsApiV1LooptalkActiveTestsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<unknown, GetActiveTestsApiV1LooptalkActiveTestsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/looptalk/active-tests',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Current Period Usage
|
|
|
|
|
* Get current billing period usage for the user's organization.
|
|
|
|
|
*/
|
|
|
|
|
export const getCurrentPeriodUsageApiV1OrganizationsUsageCurrentPeriodGet = <ThrowOnError extends boolean = false>(options?: Options<GetCurrentPeriodUsageApiV1OrganizationsUsageCurrentPeriodGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetCurrentPeriodUsageApiV1OrganizationsUsageCurrentPeriodGetResponse, GetCurrentPeriodUsageApiV1OrganizationsUsageCurrentPeriodGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/usage/current-period',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-16 15:04:08 +05:30
|
|
|
/**
|
|
|
|
|
* Get Mps Credits
|
2026-03-19 15:06:59 +05:30
|
|
|
* Get aggregated usage and quota from MPS.
|
|
|
|
|
*
|
|
|
|
|
* OSS users: queries by provider_id (created_by).
|
|
|
|
|
* Hosted users: queries by organization_id.
|
2026-03-16 15:04:08 +05:30
|
|
|
*/
|
|
|
|
|
export const getMpsCreditsApiV1OrganizationsUsageMpsCreditsGet = <ThrowOnError extends boolean = false>(options?: Options<GetMpsCreditsApiV1OrganizationsUsageMpsCreditsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetMpsCreditsApiV1OrganizationsUsageMpsCreditsGetResponse, GetMpsCreditsApiV1OrganizationsUsageMpsCreditsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/usage/mps-credits',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Get Usage History
|
|
|
|
|
* Get paginated workflow runs with usage for the organization.
|
|
|
|
|
*/
|
|
|
|
|
export const getUsageHistoryApiV1OrganizationsUsageRunsGet = <ThrowOnError extends boolean = false>(options?: Options<GetUsageHistoryApiV1OrganizationsUsageRunsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetUsageHistoryApiV1OrganizationsUsageRunsGetResponse, GetUsageHistoryApiV1OrganizationsUsageRunsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/usage/runs',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Daily Usage Breakdown
|
|
|
|
|
* Get daily usage breakdown for the last N days. Only available for organizations with pricing.
|
|
|
|
|
*/
|
|
|
|
|
export const getDailyUsageBreakdownApiV1OrganizationsUsageDailyBreakdownGet = <ThrowOnError extends boolean = false>(options?: Options<GetDailyUsageBreakdownApiV1OrganizationsUsageDailyBreakdownGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetDailyUsageBreakdownApiV1OrganizationsUsageDailyBreakdownGetResponse, GetDailyUsageBreakdownApiV1OrganizationsUsageDailyBreakdownGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/usage/daily-breakdown',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Daily Report
|
|
|
|
|
* Get daily report for the specified date and timezone.
|
|
|
|
|
* If workflow_id is provided, filters results to that specific workflow.
|
|
|
|
|
* If workflow_id is None, includes all workflows for the organization.
|
|
|
|
|
*/
|
|
|
|
|
export const getDailyReportApiV1OrganizationsReportsDailyGet = <ThrowOnError extends boolean = false>(options: Options<GetDailyReportApiV1OrganizationsReportsDailyGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetDailyReportApiV1OrganizationsReportsDailyGetResponse, GetDailyReportApiV1OrganizationsReportsDailyGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/reports/daily',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Workflow Options
|
|
|
|
|
* Get all workflows for the user's organization.
|
|
|
|
|
* Used to populate the workflow selector dropdown in the reports page.
|
|
|
|
|
*/
|
|
|
|
|
export const getWorkflowOptionsApiV1OrganizationsReportsWorkflowsGet = <ThrowOnError extends boolean = false>(options?: Options<GetWorkflowOptionsApiV1OrganizationsReportsWorkflowsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetWorkflowOptionsApiV1OrganizationsReportsWorkflowsGetResponse, GetWorkflowOptionsApiV1OrganizationsReportsWorkflowsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/reports/workflows',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Daily Runs Detail
|
|
|
|
|
* Get detailed workflow runs for the specified date.
|
|
|
|
|
* Used for CSV export functionality.
|
|
|
|
|
*/
|
|
|
|
|
export const getDailyRunsDetailApiV1OrganizationsReportsDailyRunsGet = <ThrowOnError extends boolean = false>(options: Options<GetDailyRunsDetailApiV1OrganizationsReportsDailyRunsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetDailyRunsDetailApiV1OrganizationsReportsDailyRunsGetResponse, GetDailyRunsDetailApiV1OrganizationsReportsDailyRunsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/organizations/reports/daily/runs',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-03 13:52:50 +05:30
|
|
|
/**
|
|
|
|
|
* Get Turn Credentials
|
|
|
|
|
* Get time-limited TURN credentials for WebRTC connections.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint generates ephemeral TURN credentials that are:
|
|
|
|
|
* - Valid for the configured TTL (default: 24 hours)
|
|
|
|
|
* - Cryptographically bound to the user via HMAC
|
|
|
|
|
* - Compatible with coturn's use-auth-secret mode
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* TurnCredentialsResponse with username, password, ttl, and TURN URIs
|
|
|
|
|
*/
|
|
|
|
|
export const getTurnCredentialsApiV1TurnCredentialsGet = <ThrowOnError extends boolean = false>(options?: Options<GetTurnCredentialsApiV1TurnCredentialsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetTurnCredentialsApiV1TurnCredentialsGetResponse, GetTurnCredentialsApiV1TurnCredentialsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/turn/credentials',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-15 17:32:37 +05:30
|
|
|
/**
|
|
|
|
|
* Options Init
|
|
|
|
|
* Handle CORS preflight for init endpoint
|
|
|
|
|
*/
|
|
|
|
|
export const optionsInitApiV1PublicEmbedInitOptions = <ThrowOnError extends boolean = false>(options?: Options<OptionsInitApiV1PublicEmbedInitOptionsData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).options<unknown, unknown, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/embed/init',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Initialize Embed Session
|
|
|
|
|
* Initialize an embed session with token validation and domain checking.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint:
|
|
|
|
|
* 1. Validates the embed token
|
|
|
|
|
* 2. Checks domain whitelist
|
|
|
|
|
* 3. Creates a workflow run
|
|
|
|
|
* 4. Generates a temporary session token
|
|
|
|
|
* 5. Returns configuration for the widget
|
|
|
|
|
*/
|
|
|
|
|
export const initializeEmbedSessionApiV1PublicEmbedInitPost = <ThrowOnError extends boolean = false>(options: Options<InitializeEmbedSessionApiV1PublicEmbedInitPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<InitializeEmbedSessionApiV1PublicEmbedInitPostResponse, InitializeEmbedSessionApiV1PublicEmbedInitPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/embed/init',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Embed Config
|
|
|
|
|
* Get embed configuration without creating a session.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint is used to fetch widget configuration for display purposes
|
|
|
|
|
* without actually starting a call session.
|
|
|
|
|
*/
|
|
|
|
|
export const getEmbedConfigApiV1PublicEmbedConfigTokenGet = <ThrowOnError extends boolean = false>(options: Options<GetEmbedConfigApiV1PublicEmbedConfigTokenGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetEmbedConfigApiV1PublicEmbedConfigTokenGetResponse, GetEmbedConfigApiV1PublicEmbedConfigTokenGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/embed/config/{token}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Options Config
|
|
|
|
|
* Handle CORS preflight for config endpoint
|
|
|
|
|
*/
|
|
|
|
|
export const optionsConfigApiV1PublicEmbedConfigTokenOptions = <ThrowOnError extends boolean = false>(options: Options<OptionsConfigApiV1PublicEmbedConfigTokenOptionsData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).options<unknown, OptionsConfigApiV1PublicEmbedConfigTokenOptionsError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/embed/config/{token}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-07 13:45:21 +05:30
|
|
|
/**
|
|
|
|
|
* Get Public Turn Credentials
|
|
|
|
|
* Get TURN credentials for an embed session.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint allows embedded widgets to obtain TURN server credentials
|
|
|
|
|
* for WebRTC connections without requiring authentication.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* session_token: The session token from embed initialization
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* TurnCredentialsResponse with username, password, ttl, and TURN URIs
|
|
|
|
|
*/
|
|
|
|
|
export const getPublicTurnCredentialsApiV1PublicEmbedTurnCredentialsSessionTokenGet = <ThrowOnError extends boolean = false>(options: Options<GetPublicTurnCredentialsApiV1PublicEmbedTurnCredentialsSessionTokenGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetPublicTurnCredentialsApiV1PublicEmbedTurnCredentialsSessionTokenGetResponse, GetPublicTurnCredentialsApiV1PublicEmbedTurnCredentialsSessionTokenGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/embed/turn-credentials/{session_token}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Options Turn Credentials
|
|
|
|
|
* Handle CORS preflight for TURN credentials endpoint
|
|
|
|
|
*/
|
|
|
|
|
export const optionsTurnCredentialsApiV1PublicEmbedTurnCredentialsSessionTokenOptions = <ThrowOnError extends boolean = false>(options: Options<OptionsTurnCredentialsApiV1PublicEmbedTurnCredentialsSessionTokenOptionsData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).options<unknown, OptionsTurnCredentialsApiV1PublicEmbedTurnCredentialsSessionTokenOptionsError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/embed/turn-credentials/{session_token}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-22 14:08:30 +05:30
|
|
|
/**
|
|
|
|
|
* Initiate Call
|
|
|
|
|
* Initiate a phone call via API trigger.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint allows external systems (CRMs, automation tools, etc.) to
|
|
|
|
|
* programmatically trigger outbound phone calls with custom context variables.
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* uuid: The unique trigger UUID
|
|
|
|
|
* request: The call request with phone number and optional context
|
|
|
|
|
* x_api_key: API key for authentication (passed in X-API-Key header)
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* TriggerCallResponse with workflow run details
|
|
|
|
|
*
|
|
|
|
|
* Raises:
|
|
|
|
|
* HTTPException: Various error conditions (401, 403, 404, 400)
|
|
|
|
|
*/
|
|
|
|
|
export const initiateCallApiV1PublicAgentUuidPost = <ThrowOnError extends boolean = false>(options: Options<InitiateCallApiV1PublicAgentUuidPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<InitiateCallApiV1PublicAgentUuidPostResponse, InitiateCallApiV1PublicAgentUuidPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/agent/{uuid}',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-23 18:53:59 +05:30
|
|
|
/**
|
|
|
|
|
* Download Workflow Artifact
|
|
|
|
|
* Download a workflow recording or transcript via public access token.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint:
|
|
|
|
|
* 1. Validates the public access token
|
|
|
|
|
* 2. Looks up the corresponding workflow run
|
|
|
|
|
* 3. Generates a signed URL for the requested artifact
|
|
|
|
|
* 4. Redirects to the signed URL
|
|
|
|
|
*
|
|
|
|
|
* Args:
|
|
|
|
|
* token: The public access token (UUID format)
|
|
|
|
|
* artifact_type: Type of artifact - "recording" or "transcript"
|
|
|
|
|
* inline: If true, sets Content-Disposition to inline for browser preview
|
|
|
|
|
*
|
|
|
|
|
* Returns:
|
|
|
|
|
* RedirectResponse to the signed URL (302 redirect)
|
|
|
|
|
*
|
|
|
|
|
* Raises:
|
|
|
|
|
* HTTPException 404: If token is invalid or artifact not found
|
|
|
|
|
*/
|
|
|
|
|
export const downloadWorkflowArtifactApiV1PublicDownloadWorkflowTokenArtifactTypeGet = <ThrowOnError extends boolean = false>(options: Options<DownloadWorkflowArtifactApiV1PublicDownloadWorkflowTokenArtifactTypeGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<unknown, DownloadWorkflowArtifactApiV1PublicDownloadWorkflowTokenArtifactTypeGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/public/download/workflow/{token}/{artifact_type}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-15 17:32:37 +05:30
|
|
|
/**
|
|
|
|
|
* Deactivate Embed Token
|
|
|
|
|
* Deactivate the embed token for a workflow.
|
|
|
|
|
*/
|
|
|
|
|
export const deactivateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenDelete = <ThrowOnError extends boolean = false>(options: Options<DeactivateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).delete<DeactivateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenDeleteResponse, DeactivateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/embed-token',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Embed Token
|
|
|
|
|
* Get the embed token for a workflow if it exists.
|
|
|
|
|
*/
|
|
|
|
|
export const getEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenGet = <ThrowOnError extends boolean = false>(options: Options<GetEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenGetResponse, GetEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/embed-token',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create Or Update Embed Token
|
|
|
|
|
* Create or update an embed token for a workflow.
|
|
|
|
|
* Each workflow can have only one active embed token.
|
|
|
|
|
*/
|
|
|
|
|
export const createOrUpdateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenPost = <ThrowOnError extends boolean = false>(options: Options<CreateOrUpdateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateOrUpdateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenPostResponse, CreateOrUpdateEmbedTokenApiV1WorkflowWorkflowIdEmbedTokenPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow/{workflow_id}/embed-token',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-01-17 14:37:03 +05:30
|
|
|
/**
|
|
|
|
|
* Get presigned URL for document upload
|
|
|
|
|
* Generate a presigned PUT URL for uploading a document.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint:
|
|
|
|
|
* 1. Generates a unique document UUID for organizing the S3 key
|
|
|
|
|
* 2. Generates a presigned S3/MinIO URL for uploading the file
|
|
|
|
|
* 3. Returns the upload URL and document metadata
|
|
|
|
|
*
|
|
|
|
|
* After uploading to the returned URL, call /process-document to create
|
|
|
|
|
* the document record and trigger processing.
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * All authenticated users can upload documents scoped to their organization.
|
|
|
|
|
*/
|
|
|
|
|
export const getUploadUrlApiV1KnowledgeBaseUploadUrlPost = <ThrowOnError extends boolean = false>(options: Options<GetUploadUrlApiV1KnowledgeBaseUploadUrlPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<GetUploadUrlApiV1KnowledgeBaseUploadUrlPostResponse, GetUploadUrlApiV1KnowledgeBaseUploadUrlPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/knowledge-base/upload-url',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Trigger document processing
|
|
|
|
|
* Trigger asynchronous processing of an uploaded document.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint should be called after successfully uploading a file to the presigned URL.
|
|
|
|
|
* It will:
|
|
|
|
|
* 1. Create a document record in the database with the specified UUID
|
|
|
|
|
* 2. Enqueue a background task to process the document (chunking and embedding)
|
|
|
|
|
*
|
|
|
|
|
* The document status will be updated from 'pending' -> 'processing' -> 'completed' or 'failed'.
|
|
|
|
|
*
|
2026-02-07 13:45:21 +05:30
|
|
|
* Embedding:
|
|
|
|
|
* Uses OpenAI text-embedding-3-small (1536-dimensional embeddings, requires API key configured in Model Configurations).
|
2026-01-17 14:37:03 +05:30
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * Users can only process documents in their organization.
|
|
|
|
|
*/
|
|
|
|
|
export const processDocumentApiV1KnowledgeBaseProcessDocumentPost = <ThrowOnError extends boolean = false>(options: Options<ProcessDocumentApiV1KnowledgeBaseProcessDocumentPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<ProcessDocumentApiV1KnowledgeBaseProcessDocumentPostResponse, ProcessDocumentApiV1KnowledgeBaseProcessDocumentPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/knowledge-base/process-document',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List documents
|
|
|
|
|
* List all documents for the user's organization.
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * Users can only see documents from their organization.
|
|
|
|
|
*/
|
|
|
|
|
export const listDocumentsApiV1KnowledgeBaseDocumentsGet = <ThrowOnError extends boolean = false>(options?: Options<ListDocumentsApiV1KnowledgeBaseDocumentsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<ListDocumentsApiV1KnowledgeBaseDocumentsGetResponse, ListDocumentsApiV1KnowledgeBaseDocumentsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/knowledge-base/documents',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete document
|
|
|
|
|
* Soft delete a document and its chunks.
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * Users can only delete documents from their organization.
|
|
|
|
|
*/
|
|
|
|
|
export const deleteDocumentApiV1KnowledgeBaseDocumentsDocumentUuidDelete = <ThrowOnError extends boolean = false>(options: Options<DeleteDocumentApiV1KnowledgeBaseDocumentsDocumentUuidDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).delete<unknown, DeleteDocumentApiV1KnowledgeBaseDocumentsDocumentUuidDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/knowledge-base/documents/{document_uuid}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get document details
|
|
|
|
|
* Get details of a specific document.
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * Users can only access documents from their organization.
|
|
|
|
|
*/
|
|
|
|
|
export const getDocumentApiV1KnowledgeBaseDocumentsDocumentUuidGet = <ThrowOnError extends boolean = false>(options: Options<GetDocumentApiV1KnowledgeBaseDocumentsDocumentUuidGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<GetDocumentApiV1KnowledgeBaseDocumentsDocumentUuidGetResponse, GetDocumentApiV1KnowledgeBaseDocumentsDocumentUuidGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/knowledge-base/documents/{document_uuid}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Search for similar chunks
|
|
|
|
|
* Search for document chunks similar to the query.
|
|
|
|
|
*
|
|
|
|
|
* This endpoint uses vector similarity search to find relevant chunks.
|
|
|
|
|
* Results are returned without threshold filtering - apply similarity
|
|
|
|
|
* thresholds at the application layer after optional reranking.
|
|
|
|
|
*
|
|
|
|
|
* Access Control:
|
|
|
|
|
* * Users can only search documents from their organization.
|
|
|
|
|
*/
|
|
|
|
|
export const searchChunksApiV1KnowledgeBaseSearchPost = <ThrowOnError extends boolean = false>(options: Options<SearchChunksApiV1KnowledgeBaseSearchPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<SearchChunksApiV1KnowledgeBaseSearchPostResponse, SearchChunksApiV1KnowledgeBaseSearchPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/knowledge-base/search',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-16 15:04:08 +05:30
|
|
|
/**
|
|
|
|
|
* Get presigned URL for recording upload
|
|
|
|
|
* Generate a presigned PUT URL for uploading an audio recording.
|
|
|
|
|
*/
|
|
|
|
|
export const getUploadUrlApiV1WorkflowRecordingsUploadUrlPost = <ThrowOnError extends boolean = false>(options: Options<GetUploadUrlApiV1WorkflowRecordingsUploadUrlPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<GetUploadUrlApiV1WorkflowRecordingsUploadUrlPostResponse, GetUploadUrlApiV1WorkflowRecordingsUploadUrlPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow-recordings/upload-url',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List recordings for a workflow
|
|
|
|
|
* List recordings for a workflow, optionally filtered by TTS configuration.
|
|
|
|
|
*/
|
|
|
|
|
export const listRecordingsApiV1WorkflowRecordingsGet = <ThrowOnError extends boolean = false>(options: Options<ListRecordingsApiV1WorkflowRecordingsGetData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).get<ListRecordingsApiV1WorkflowRecordingsGetResponse, ListRecordingsApiV1WorkflowRecordingsGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow-recordings/',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create recording record after upload
|
|
|
|
|
* Create a recording record after the audio has been uploaded to storage.
|
|
|
|
|
*/
|
|
|
|
|
export const createRecordingApiV1WorkflowRecordingsPost = <ThrowOnError extends boolean = false>(options: Options<CreateRecordingApiV1WorkflowRecordingsPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<CreateRecordingApiV1WorkflowRecordingsPostResponse, CreateRecordingApiV1WorkflowRecordingsPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow-recordings/',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Delete a recording
|
|
|
|
|
* Soft delete a recording.
|
|
|
|
|
*/
|
|
|
|
|
export const deleteRecordingApiV1WorkflowRecordingsRecordingIdDelete = <ThrowOnError extends boolean = false>(options: Options<DeleteRecordingApiV1WorkflowRecordingsRecordingIdDeleteData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).delete<unknown, DeleteRecordingApiV1WorkflowRecordingsRecordingIdDeleteError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/workflow-recordings/{recording_id}',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-20 18:21:24 +05:30
|
|
|
/**
|
|
|
|
|
* Signup
|
|
|
|
|
*/
|
|
|
|
|
export const signupApiV1AuthSignupPost = <ThrowOnError extends boolean = false>(options: Options<SignupApiV1AuthSignupPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<SignupApiV1AuthSignupPostResponse, SignupApiV1AuthSignupPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/auth/signup',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Login
|
|
|
|
|
*/
|
|
|
|
|
export const loginApiV1AuthLoginPost = <ThrowOnError extends boolean = false>(options: Options<LoginApiV1AuthLoginPostData, ThrowOnError>) => {
|
|
|
|
|
return (options.client ?? _heyApiClient).post<LoginApiV1AuthLoginPostResponse, LoginApiV1AuthLoginPostError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/auth/login',
|
|
|
|
|
...options,
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
...options?.headers
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Current User
|
|
|
|
|
*/
|
|
|
|
|
export const getCurrentUserApiV1AuthMeGet = <ThrowOnError extends boolean = false>(options?: Options<GetCurrentUserApiV1AuthMeGetData, ThrowOnError>) => {
|
|
|
|
|
return (options?.client ?? _heyApiClient).get<GetCurrentUserApiV1AuthMeGetResponse, GetCurrentUserApiV1AuthMeGetError, ThrowOnError>({
|
|
|
|
|
url: '/api/v1/auth/me',
|
|
|
|
|
...options
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-09 14:37:32 +05:30
|
|
|
/**
|
|
|
|
|
* Health
|
|
|
|
|
*/
|
|
|
|
|
export const healthApiV1HealthGet = <ThrowOnError extends boolean = false>(options?: Options<HealthApiV1HealthGetData, ThrowOnError>) => {
|
2026-01-23 18:53:59 +05:30
|
|
|
return (options?.client ?? _heyApiClient).get<HealthApiV1HealthGetResponse, unknown, ThrowOnError>({
|
2025-09-09 14:37:32 +05:30
|
|
|
url: '/api/v1/health',
|
|
|
|
|
...options
|
|
|
|
|
});
|
2026-01-17 14:43:45 +05:30
|
|
|
};
|