@getsupervisor/agents-studio-sdk 1.41.2-patch.4 → 1.41.2-patch.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -51,9 +51,9 @@ type components = {
51
51
  AgentSummary: {
52
52
  agentId: string;
53
53
  name: string;
54
+ description?: string | null;
54
55
  agentType: 'chat' | 'voice';
55
56
  status: 'inactive' | 'training' | 'active' | 'archived';
56
- description?: string | null;
57
57
  workspaceId: string;
58
58
  createdAt: string;
59
59
  updatedAt: string;
@@ -299,7 +299,7 @@ type components = {
299
299
  agentId: string;
300
300
  blueprintId: string;
301
301
  name: string;
302
- title: string;
302
+ title?: string | null;
303
303
  goalPrompt: string;
304
304
  promptInstructions: string[];
305
305
  order: number;
@@ -318,7 +318,7 @@ type components = {
318
318
  };
319
319
  CreateBlueprintStageRequest: {
320
320
  name: string;
321
- title: string;
321
+ title?: string | null;
322
322
  goalPrompt: string;
323
323
  promptInstructions?: string[];
324
324
  order?: number | null;
@@ -329,7 +329,7 @@ type components = {
329
329
  };
330
330
  UpdateBlueprintStageRequest: {
331
331
  name?: string;
332
- title?: string;
332
+ title?: string | null;
333
333
  goalPrompt?: string;
334
334
  promptInstructions?: string[];
335
335
  order?: number | null;
@@ -365,7 +365,7 @@ type components = {
365
365
  };
366
366
  BlueprintStageDraft: {
367
367
  name: string;
368
- title: string;
368
+ title?: string | null;
369
369
  goalPrompt: string;
370
370
  promptInstructions?: string[];
371
371
  order?: number | null;
@@ -655,6 +655,44 @@ type components = {
655
655
  meta: components['schemas']['PaginationMeta'];
656
656
  };
657
657
  CampaignStatus: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'PARTIALLY_COMPLETED';
658
+ Call: {
659
+ id: string;
660
+ title: string;
661
+ customerPhone: string | null;
662
+ durationSeconds: number | null;
663
+ supervisors: components['schemas']['CallSupervisors'];
664
+ goal: components['schemas']['CallGoal'];
665
+ startedAt: string;
666
+ recordingUrl: string | null;
667
+ agentBatchId: string | null;
668
+ agentId: string | null;
669
+ executionId: string | null;
670
+ };
671
+ CallGoal: {
672
+ achieved: boolean;
673
+ reason: string | null;
674
+ };
675
+ CallSupervisors: {
676
+ evaluations: number | null;
677
+ discoveries: number | null;
678
+ risks: number | null;
679
+ };
680
+ CallsListMeta: components['schemas']['PaginationMeta'] & {
681
+ sort: string[];
682
+ appliedFilters: string[];
683
+ };
684
+ CallsListResponse: {
685
+ data: components['schemas']['Call'][];
686
+ meta: components['schemas']['CallsListMeta'];
687
+ };
688
+ CallsStreamMeta: {
689
+ limit: number;
690
+ nextAfter: string | null;
691
+ };
692
+ CallsStreamResponse: {
693
+ data: components['schemas']['Call'][];
694
+ meta: components['schemas']['CallsStreamMeta'];
695
+ };
658
696
  ForkAgentFromTemplateRequest: {
659
697
  templateId: string;
660
698
  templateVersionId?: string;
@@ -855,6 +893,14 @@ type components = {
855
893
  FilterParam?: components['schemas']['QueryFilters'];
856
894
  WebhookId: string;
857
895
  SubscriptionId: string;
896
+ CallId: string;
897
+ AgentBatchIdQuery?: string;
898
+ AgentIdQuery?: string;
899
+ ExecutionIdQuery?: string;
900
+ RecordedAfterParam?: string;
901
+ RecordedBeforeParam?: string;
902
+ CallsAfterParam: string;
903
+ CallsStreamLimitParam?: number;
858
904
  OrParam?: components['schemas']['QueryOrGroups'];
859
905
  ScheduleId: string;
860
906
  ApiKeyId: string;
@@ -1127,6 +1173,11 @@ type Campaign = components['schemas']['Campaign'];
1127
1173
  type CampaignListResponse = components['schemas']['CampaignListResponse'];
1128
1174
  type CampaignExecution = components['schemas']['CampaignExecution'];
1129
1175
  type CampaignExecutionListResponse = components['schemas']['CampaignExecutionListResponse'];
1176
+ type Call = components['schemas']['Call'];
1177
+ type CallsListMeta = components['schemas']['CallsListMeta'];
1178
+ type CallsListResponse = components['schemas']['CallsListResponse'];
1179
+ type CallsStreamMeta = components['schemas']['CallsStreamMeta'];
1180
+ type CallsStreamResponse = components['schemas']['CallsStreamResponse'];
1130
1181
  type WebhookSummary = components['schemas']['WebhookSummary'];
1131
1182
  type WebhookDetail = components['schemas']['WebhookDetail'];
1132
1183
  type WebhookListResponse = components['schemas']['WebhookListResponse'];
@@ -1708,6 +1759,31 @@ declare function createApiKeysApi(cfg: ClientConfig & {
1708
1759
  retry?: RetryPolicy;
1709
1760
  }): ApiKeysApi;
1710
1761
 
1762
+ type ListCallsOptions = ListQueryOptions & Partial<{
1763
+ agentBatchId: string;
1764
+ agentId: string;
1765
+ executionId: string;
1766
+ recordedAfter: string | Date;
1767
+ recordedBefore: string | Date;
1768
+ durationBucket: 'short' | 'medium' | 'long';
1769
+ goalStatus: 'achieved' | 'not_achieved';
1770
+ query: string;
1771
+ }>;
1772
+ type StreamCallsOptions = {
1773
+ after: string | Date;
1774
+ limit?: number;
1775
+ agentBatchId?: string;
1776
+ agentId?: string;
1777
+ executionId?: string;
1778
+ };
1779
+ declare function createCallsApi(cfg: ClientConfig & {
1780
+ retry?: RetryPolicy;
1781
+ }): {
1782
+ list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
1783
+ stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
1784
+ get(callId: string): Promise<Call>;
1785
+ };
1786
+
1711
1787
  type ListCampaignsOptions = ListQueryOptions;
1712
1788
  type ListCampaignExecutionsOptions = Pick<ListQueryOptions, 'page' | 'limit'>;
1713
1789
  type CreateCampaignPayload = {
@@ -1986,6 +2062,11 @@ declare function createClient(initialCfg: ClientConfig & {
1986
2062
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
1987
2063
  };
1988
2064
  apiKeys: ApiKeysApi;
2065
+ calls: {
2066
+ list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
2067
+ stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
2068
+ get(callId: string): Promise<Call>;
2069
+ };
1989
2070
  webhooks: {
1990
2071
  list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
1991
2072
  create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
@@ -2125,6 +2206,11 @@ declare function createClient(initialCfg: ClientConfig & {
2125
2206
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
2126
2207
  };
2127
2208
  apiKeys: ApiKeysApi;
2209
+ calls: {
2210
+ list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
2211
+ stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
2212
+ get(callId: string): Promise<Call>;
2213
+ };
2128
2214
  webhooks: {
2129
2215
  list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
2130
2216
  create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
@@ -2162,4 +2248,4 @@ declare function createHttp(cfg: ClientConfig & {
2162
2248
  resolveAccessToken: () => string;
2163
2249
  };
2164
2250
 
2165
- export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleApi, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentScheduleListResponse, type AgentStageTriggersApi$1 as AgentStageTriggersApi, type AgentStagesApi$1 as AgentStagesApi, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, type ExecuteToolRequest, type ExecuteToolResponse, type ForkAgentFromTemplateRequest, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentSchedulesOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateBlueprintStageRequest, type UpdateBlueprintStageTriggerRequest, type UpdateEventSubscriptionRequest, type UpdateInstructionRequest, type UpdateWebhookRequest, type VoiceListResponse, type VoiceSummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
2251
+ export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleApi, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentScheduleListResponse, type AgentStageTriggersApi$1 as AgentStageTriggersApi, type AgentStagesApi$1 as AgentStagesApi, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Call, type CallsListMeta, type CallsListResponse, type CallsStreamMeta, type CallsStreamResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, type ExecuteToolRequest, type ExecuteToolResponse, type ForkAgentFromTemplateRequest, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentSchedulesOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCallsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, type StreamCallsOptions, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateBlueprintStageRequest, type UpdateBlueprintStageTriggerRequest, type UpdateEventSubscriptionRequest, type UpdateInstructionRequest, type UpdateWebhookRequest, type VoiceListResponse, type VoiceSummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCallsApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
package/dist/index.d.ts CHANGED
@@ -51,9 +51,9 @@ type components = {
51
51
  AgentSummary: {
52
52
  agentId: string;
53
53
  name: string;
54
+ description?: string | null;
54
55
  agentType: 'chat' | 'voice';
55
56
  status: 'inactive' | 'training' | 'active' | 'archived';
56
- description?: string | null;
57
57
  workspaceId: string;
58
58
  createdAt: string;
59
59
  updatedAt: string;
@@ -299,7 +299,7 @@ type components = {
299
299
  agentId: string;
300
300
  blueprintId: string;
301
301
  name: string;
302
- title: string;
302
+ title?: string | null;
303
303
  goalPrompt: string;
304
304
  promptInstructions: string[];
305
305
  order: number;
@@ -318,7 +318,7 @@ type components = {
318
318
  };
319
319
  CreateBlueprintStageRequest: {
320
320
  name: string;
321
- title: string;
321
+ title?: string | null;
322
322
  goalPrompt: string;
323
323
  promptInstructions?: string[];
324
324
  order?: number | null;
@@ -329,7 +329,7 @@ type components = {
329
329
  };
330
330
  UpdateBlueprintStageRequest: {
331
331
  name?: string;
332
- title?: string;
332
+ title?: string | null;
333
333
  goalPrompt?: string;
334
334
  promptInstructions?: string[];
335
335
  order?: number | null;
@@ -365,7 +365,7 @@ type components = {
365
365
  };
366
366
  BlueprintStageDraft: {
367
367
  name: string;
368
- title: string;
368
+ title?: string | null;
369
369
  goalPrompt: string;
370
370
  promptInstructions?: string[];
371
371
  order?: number | null;
@@ -655,6 +655,44 @@ type components = {
655
655
  meta: components['schemas']['PaginationMeta'];
656
656
  };
657
657
  CampaignStatus: 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED' | 'PARTIALLY_COMPLETED';
658
+ Call: {
659
+ id: string;
660
+ title: string;
661
+ customerPhone: string | null;
662
+ durationSeconds: number | null;
663
+ supervisors: components['schemas']['CallSupervisors'];
664
+ goal: components['schemas']['CallGoal'];
665
+ startedAt: string;
666
+ recordingUrl: string | null;
667
+ agentBatchId: string | null;
668
+ agentId: string | null;
669
+ executionId: string | null;
670
+ };
671
+ CallGoal: {
672
+ achieved: boolean;
673
+ reason: string | null;
674
+ };
675
+ CallSupervisors: {
676
+ evaluations: number | null;
677
+ discoveries: number | null;
678
+ risks: number | null;
679
+ };
680
+ CallsListMeta: components['schemas']['PaginationMeta'] & {
681
+ sort: string[];
682
+ appliedFilters: string[];
683
+ };
684
+ CallsListResponse: {
685
+ data: components['schemas']['Call'][];
686
+ meta: components['schemas']['CallsListMeta'];
687
+ };
688
+ CallsStreamMeta: {
689
+ limit: number;
690
+ nextAfter: string | null;
691
+ };
692
+ CallsStreamResponse: {
693
+ data: components['schemas']['Call'][];
694
+ meta: components['schemas']['CallsStreamMeta'];
695
+ };
658
696
  ForkAgentFromTemplateRequest: {
659
697
  templateId: string;
660
698
  templateVersionId?: string;
@@ -855,6 +893,14 @@ type components = {
855
893
  FilterParam?: components['schemas']['QueryFilters'];
856
894
  WebhookId: string;
857
895
  SubscriptionId: string;
896
+ CallId: string;
897
+ AgentBatchIdQuery?: string;
898
+ AgentIdQuery?: string;
899
+ ExecutionIdQuery?: string;
900
+ RecordedAfterParam?: string;
901
+ RecordedBeforeParam?: string;
902
+ CallsAfterParam: string;
903
+ CallsStreamLimitParam?: number;
858
904
  OrParam?: components['schemas']['QueryOrGroups'];
859
905
  ScheduleId: string;
860
906
  ApiKeyId: string;
@@ -1127,6 +1173,11 @@ type Campaign = components['schemas']['Campaign'];
1127
1173
  type CampaignListResponse = components['schemas']['CampaignListResponse'];
1128
1174
  type CampaignExecution = components['schemas']['CampaignExecution'];
1129
1175
  type CampaignExecutionListResponse = components['schemas']['CampaignExecutionListResponse'];
1176
+ type Call = components['schemas']['Call'];
1177
+ type CallsListMeta = components['schemas']['CallsListMeta'];
1178
+ type CallsListResponse = components['schemas']['CallsListResponse'];
1179
+ type CallsStreamMeta = components['schemas']['CallsStreamMeta'];
1180
+ type CallsStreamResponse = components['schemas']['CallsStreamResponse'];
1130
1181
  type WebhookSummary = components['schemas']['WebhookSummary'];
1131
1182
  type WebhookDetail = components['schemas']['WebhookDetail'];
1132
1183
  type WebhookListResponse = components['schemas']['WebhookListResponse'];
@@ -1708,6 +1759,31 @@ declare function createApiKeysApi(cfg: ClientConfig & {
1708
1759
  retry?: RetryPolicy;
1709
1760
  }): ApiKeysApi;
1710
1761
 
1762
+ type ListCallsOptions = ListQueryOptions & Partial<{
1763
+ agentBatchId: string;
1764
+ agentId: string;
1765
+ executionId: string;
1766
+ recordedAfter: string | Date;
1767
+ recordedBefore: string | Date;
1768
+ durationBucket: 'short' | 'medium' | 'long';
1769
+ goalStatus: 'achieved' | 'not_achieved';
1770
+ query: string;
1771
+ }>;
1772
+ type StreamCallsOptions = {
1773
+ after: string | Date;
1774
+ limit?: number;
1775
+ agentBatchId?: string;
1776
+ agentId?: string;
1777
+ executionId?: string;
1778
+ };
1779
+ declare function createCallsApi(cfg: ClientConfig & {
1780
+ retry?: RetryPolicy;
1781
+ }): {
1782
+ list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
1783
+ stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
1784
+ get(callId: string): Promise<Call>;
1785
+ };
1786
+
1711
1787
  type ListCampaignsOptions = ListQueryOptions;
1712
1788
  type ListCampaignExecutionsOptions = Pick<ListQueryOptions, 'page' | 'limit'>;
1713
1789
  type CreateCampaignPayload = {
@@ -1986,6 +2062,11 @@ declare function createClient(initialCfg: ClientConfig & {
1986
2062
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
1987
2063
  };
1988
2064
  apiKeys: ApiKeysApi;
2065
+ calls: {
2066
+ list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
2067
+ stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
2068
+ get(callId: string): Promise<Call>;
2069
+ };
1989
2070
  webhooks: {
1990
2071
  list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
1991
2072
  create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
@@ -2125,6 +2206,11 @@ declare function createClient(initialCfg: ClientConfig & {
2125
2206
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
2126
2207
  };
2127
2208
  apiKeys: ApiKeysApi;
2209
+ calls: {
2210
+ list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
2211
+ stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
2212
+ get(callId: string): Promise<Call>;
2213
+ };
2128
2214
  webhooks: {
2129
2215
  list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
2130
2216
  create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
@@ -2162,4 +2248,4 @@ declare function createHttp(cfg: ClientConfig & {
2162
2248
  resolveAccessToken: () => string;
2163
2249
  };
2164
2250
 
2165
- export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleApi, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentScheduleListResponse, type AgentStageTriggersApi$1 as AgentStageTriggersApi, type AgentStagesApi$1 as AgentStagesApi, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, type ExecuteToolRequest, type ExecuteToolResponse, type ForkAgentFromTemplateRequest, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentSchedulesOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateBlueprintStageRequest, type UpdateBlueprintStageTriggerRequest, type UpdateEventSubscriptionRequest, type UpdateInstructionRequest, type UpdateWebhookRequest, type VoiceListResponse, type VoiceSummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
2251
+ export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleApi, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentScheduleListResponse, type AgentStageTriggersApi$1 as AgentStageTriggersApi, type AgentStagesApi$1 as AgentStagesApi, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Call, type CallsListMeta, type CallsListResponse, type CallsStreamMeta, type CallsStreamResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, type ExecuteToolRequest, type ExecuteToolResponse, type ForkAgentFromTemplateRequest, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentSchedulesOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCallsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, type StreamCallsOptions, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateBlueprintStageRequest, type UpdateBlueprintStageTriggerRequest, type UpdateEventSubscriptionRequest, type UpdateInstructionRequest, type UpdateWebhookRequest, type VoiceListResponse, type VoiceSummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCallsApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
package/dist/index.js CHANGED
@@ -200,6 +200,11 @@ function createHttp(cfg) {
200
200
  }
201
201
 
202
202
  // src/utils/query.ts
203
+ function buildSearchParams(entries) {
204
+ const searchParams = new URLSearchParams();
205
+ entries.forEach(([key, value]) => appendParam(searchParams, key, value));
206
+ return searchParams;
207
+ }
203
208
  function serializeListOptions(options = {}, extra = {}) {
204
209
  const params = new URLSearchParams();
205
210
  appendParam(params, "page", options.page);
@@ -1275,6 +1280,66 @@ function createApiKeysApi(cfg) {
1275
1280
  };
1276
1281
  }
1277
1282
 
1283
+ // src/api/calls.ts
1284
+ function createCallsApi(cfg) {
1285
+ const { base, doFetch } = createHttp(cfg);
1286
+ const fetchCallsPage = async (options = {}) => {
1287
+ const {
1288
+ agentBatchId,
1289
+ agentId,
1290
+ executionId,
1291
+ recordedAfter,
1292
+ recordedBefore,
1293
+ durationBucket,
1294
+ goalStatus,
1295
+ query: searchQuery,
1296
+ ...listOptions
1297
+ } = options ?? {};
1298
+ const query = serializeListOptions(listOptions, {
1299
+ agentBatchId,
1300
+ agentId,
1301
+ executionId,
1302
+ recordedAfter,
1303
+ recordedBefore,
1304
+ durationBucket,
1305
+ goalStatus,
1306
+ query: searchQuery
1307
+ });
1308
+ const res = await doFetch(`${base}/calls`, {
1309
+ method: "GET",
1310
+ query
1311
+ });
1312
+ return res.json();
1313
+ };
1314
+ return {
1315
+ async list(options = {}) {
1316
+ const normalizedOptions = { ...options ?? {} };
1317
+ const response = await fetchCallsPage(normalizedOptions);
1318
+ return attachPaginator(response, fetchCallsPage, normalizedOptions);
1319
+ },
1320
+ async stream(options) {
1321
+ const query = buildSearchParams([
1322
+ ["after", options.after],
1323
+ ["limit", options.limit],
1324
+ ["agentBatchId", options.agentBatchId],
1325
+ ["agentId", options.agentId],
1326
+ ["executionId", options.executionId]
1327
+ ]);
1328
+ const res = await doFetch(`${base}/calls/stream`, {
1329
+ method: "GET",
1330
+ query
1331
+ });
1332
+ return res.json();
1333
+ },
1334
+ async get(callId) {
1335
+ const res = await doFetch(`${base}/calls/${callId}`, {
1336
+ method: "GET"
1337
+ });
1338
+ return res.json();
1339
+ }
1340
+ };
1341
+ }
1342
+
1278
1343
  // src/api/campaigns.ts
1279
1344
  function createCampaignsApi(cfg) {
1280
1345
  const { base, doFetch } = createHttp(cfg);
@@ -2022,6 +2087,7 @@ function createClient(initialCfg) {
2022
2087
  const stagesApi = createAgentStagesApi(runtimeCfg);
2023
2088
  const voicesApi = createVoicesApi(runtimeCfg);
2024
2089
  const apiKeysApi = createApiKeysApi(runtimeCfg);
2090
+ const callsApi = createCallsApi(runtimeCfg);
2025
2091
  const catalogsApi = createCatalogsApi(runtimeCfg);
2026
2092
  const catalogTemplatesApi = createCatalogTemplatesApi(runtimeCfg);
2027
2093
  const webhooksApi = createWebhooksApi(runtimeCfg);
@@ -2093,6 +2159,7 @@ function createClient(initialCfg) {
2093
2159
  campaigns: createCampaignsApi(runtimeCfg),
2094
2160
  voices: voicesApi,
2095
2161
  apiKeys: apiKeysApi,
2162
+ calls: callsApi,
2096
2163
  webhooks: webhooksApi
2097
2164
  };
2098
2165
  return {
@@ -2175,6 +2242,7 @@ export {
2175
2242
  createAgentVersionsApi,
2176
2243
  createAgentsApi,
2177
2244
  createApiKeysApi,
2245
+ createCallsApi,
2178
2246
  createCampaignsApi,
2179
2247
  createCatalogTemplatesApi,
2180
2248
  createCatalogsApi,