@getsupervisor/agents-studio-sdk 1.41.2-patch.3 → 1.41.2-patch.5
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/CHANGELOG.md +4 -4
- package/README.md +30 -20
- package/dist/index.cjs +63 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -6
- package/dist/index.d.ts +89 -6
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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
|
|
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
|
|
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,28 @@ 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
|
+
}>;
|
|
1769
|
+
type StreamCallsOptions = {
|
|
1770
|
+
after: string | Date;
|
|
1771
|
+
limit?: number;
|
|
1772
|
+
agentBatchId?: string;
|
|
1773
|
+
agentId?: string;
|
|
1774
|
+
executionId?: string;
|
|
1775
|
+
};
|
|
1776
|
+
declare function createCallsApi(cfg: ClientConfig & {
|
|
1777
|
+
retry?: RetryPolicy;
|
|
1778
|
+
}): {
|
|
1779
|
+
list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
|
|
1780
|
+
stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
|
|
1781
|
+
get(callId: string): Promise<Call>;
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1711
1784
|
type ListCampaignsOptions = ListQueryOptions;
|
|
1712
1785
|
type ListCampaignExecutionsOptions = Pick<ListQueryOptions, 'page' | 'limit'>;
|
|
1713
1786
|
type CreateCampaignPayload = {
|
|
@@ -1986,6 +2059,11 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1986
2059
|
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1987
2060
|
};
|
|
1988
2061
|
apiKeys: ApiKeysApi;
|
|
2062
|
+
calls: {
|
|
2063
|
+
list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
|
|
2064
|
+
stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
|
|
2065
|
+
get(callId: string): Promise<Call>;
|
|
2066
|
+
};
|
|
1989
2067
|
webhooks: {
|
|
1990
2068
|
list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
|
|
1991
2069
|
create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
|
|
@@ -2125,6 +2203,11 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2125
2203
|
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
2126
2204
|
};
|
|
2127
2205
|
apiKeys: ApiKeysApi;
|
|
2206
|
+
calls: {
|
|
2207
|
+
list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
|
|
2208
|
+
stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
|
|
2209
|
+
get(callId: string): Promise<Call>;
|
|
2210
|
+
};
|
|
2128
2211
|
webhooks: {
|
|
2129
2212
|
list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
|
|
2130
2213
|
create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
|
|
@@ -2162,4 +2245,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2162
2245
|
resolveAccessToken: () => string;
|
|
2163
2246
|
};
|
|
2164
2247
|
|
|
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 };
|
|
2248
|
+
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
|
|
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
|
|
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
|
|
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,28 @@ 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
|
+
}>;
|
|
1769
|
+
type StreamCallsOptions = {
|
|
1770
|
+
after: string | Date;
|
|
1771
|
+
limit?: number;
|
|
1772
|
+
agentBatchId?: string;
|
|
1773
|
+
agentId?: string;
|
|
1774
|
+
executionId?: string;
|
|
1775
|
+
};
|
|
1776
|
+
declare function createCallsApi(cfg: ClientConfig & {
|
|
1777
|
+
retry?: RetryPolicy;
|
|
1778
|
+
}): {
|
|
1779
|
+
list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
|
|
1780
|
+
stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
|
|
1781
|
+
get(callId: string): Promise<Call>;
|
|
1782
|
+
};
|
|
1783
|
+
|
|
1711
1784
|
type ListCampaignsOptions = ListQueryOptions;
|
|
1712
1785
|
type ListCampaignExecutionsOptions = Pick<ListQueryOptions, 'page' | 'limit'>;
|
|
1713
1786
|
type CreateCampaignPayload = {
|
|
@@ -1986,6 +2059,11 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1986
2059
|
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
1987
2060
|
};
|
|
1988
2061
|
apiKeys: ApiKeysApi;
|
|
2062
|
+
calls: {
|
|
2063
|
+
list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
|
|
2064
|
+
stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
|
|
2065
|
+
get(callId: string): Promise<Call>;
|
|
2066
|
+
};
|
|
1989
2067
|
webhooks: {
|
|
1990
2068
|
list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
|
|
1991
2069
|
create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
|
|
@@ -2125,6 +2203,11 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2125
2203
|
list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
|
|
2126
2204
|
};
|
|
2127
2205
|
apiKeys: ApiKeysApi;
|
|
2206
|
+
calls: {
|
|
2207
|
+
list(options?: ListCallsOptions): Promise<PaginatedResult<CallsListResponse, ListCallsOptions>>;
|
|
2208
|
+
stream(options: StreamCallsOptions): Promise<CallsStreamResponse>;
|
|
2209
|
+
get(callId: string): Promise<Call>;
|
|
2210
|
+
};
|
|
2128
2211
|
webhooks: {
|
|
2129
2212
|
list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
|
|
2130
2213
|
create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
|
|
@@ -2162,4 +2245,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2162
2245
|
resolveAccessToken: () => string;
|
|
2163
2246
|
};
|
|
2164
2247
|
|
|
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 };
|
|
2248
|
+
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,60 @@ 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
|
+
...listOptions
|
|
1294
|
+
} = options ?? {};
|
|
1295
|
+
const query = serializeListOptions(listOptions, {
|
|
1296
|
+
agentBatchId,
|
|
1297
|
+
agentId,
|
|
1298
|
+
executionId,
|
|
1299
|
+
recordedAfter,
|
|
1300
|
+
recordedBefore
|
|
1301
|
+
});
|
|
1302
|
+
const res = await doFetch(`${base}/calls`, {
|
|
1303
|
+
method: "GET",
|
|
1304
|
+
query
|
|
1305
|
+
});
|
|
1306
|
+
return res.json();
|
|
1307
|
+
};
|
|
1308
|
+
return {
|
|
1309
|
+
async list(options = {}) {
|
|
1310
|
+
const normalizedOptions = { ...options ?? {} };
|
|
1311
|
+
const response = await fetchCallsPage(normalizedOptions);
|
|
1312
|
+
return attachPaginator(response, fetchCallsPage, normalizedOptions);
|
|
1313
|
+
},
|
|
1314
|
+
async stream(options) {
|
|
1315
|
+
const query = buildSearchParams([
|
|
1316
|
+
["after", options.after],
|
|
1317
|
+
["limit", options.limit],
|
|
1318
|
+
["agentBatchId", options.agentBatchId],
|
|
1319
|
+
["agentId", options.agentId],
|
|
1320
|
+
["executionId", options.executionId]
|
|
1321
|
+
]);
|
|
1322
|
+
const res = await doFetch(`${base}/calls/stream`, {
|
|
1323
|
+
method: "GET",
|
|
1324
|
+
query
|
|
1325
|
+
});
|
|
1326
|
+
return res.json();
|
|
1327
|
+
},
|
|
1328
|
+
async get(callId) {
|
|
1329
|
+
const res = await doFetch(`${base}/calls/${callId}`, {
|
|
1330
|
+
method: "GET"
|
|
1331
|
+
});
|
|
1332
|
+
return res.json();
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1278
1337
|
// src/api/campaigns.ts
|
|
1279
1338
|
function createCampaignsApi(cfg) {
|
|
1280
1339
|
const { base, doFetch } = createHttp(cfg);
|
|
@@ -2022,6 +2081,7 @@ function createClient(initialCfg) {
|
|
|
2022
2081
|
const stagesApi = createAgentStagesApi(runtimeCfg);
|
|
2023
2082
|
const voicesApi = createVoicesApi(runtimeCfg);
|
|
2024
2083
|
const apiKeysApi = createApiKeysApi(runtimeCfg);
|
|
2084
|
+
const callsApi = createCallsApi(runtimeCfg);
|
|
2025
2085
|
const catalogsApi = createCatalogsApi(runtimeCfg);
|
|
2026
2086
|
const catalogTemplatesApi = createCatalogTemplatesApi(runtimeCfg);
|
|
2027
2087
|
const webhooksApi = createWebhooksApi(runtimeCfg);
|
|
@@ -2093,6 +2153,7 @@ function createClient(initialCfg) {
|
|
|
2093
2153
|
campaigns: createCampaignsApi(runtimeCfg),
|
|
2094
2154
|
voices: voicesApi,
|
|
2095
2155
|
apiKeys: apiKeysApi,
|
|
2156
|
+
calls: callsApi,
|
|
2096
2157
|
webhooks: webhooksApi
|
|
2097
2158
|
};
|
|
2098
2159
|
return {
|
|
@@ -2175,6 +2236,7 @@ export {
|
|
|
2175
2236
|
createAgentVersionsApi,
|
|
2176
2237
|
createAgentsApi,
|
|
2177
2238
|
createApiKeysApi,
|
|
2239
|
+
createCallsApi,
|
|
2178
2240
|
createCampaignsApi,
|
|
2179
2241
|
createCatalogTemplatesApi,
|
|
2180
2242
|
createCatalogsApi,
|