@getsupervisor/agents-studio-sdk 1.41.0-patch.2 → 1.41.0-patch.3
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.cjs +32 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -1
- package/dist/index.d.ts +66 -1
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -725,6 +725,21 @@ type components = {
|
|
|
725
725
|
[key: string]: components['schemas']['ToolConfigSchemaAction'];
|
|
726
726
|
};
|
|
727
727
|
};
|
|
728
|
+
ToolConnectionListItem: {
|
|
729
|
+
toolAgentConnectionId: string;
|
|
730
|
+
toolId: string;
|
|
731
|
+
workspaceId: string;
|
|
732
|
+
agentId: string;
|
|
733
|
+
connectionKey: string;
|
|
734
|
+
status: 'connected' | 'pending' | 'error' | 'revoked';
|
|
735
|
+
providerRef?: string | null;
|
|
736
|
+
descriptionUsage?: string | null;
|
|
737
|
+
usageExample?: string | null;
|
|
738
|
+
};
|
|
739
|
+
ToolConnectionListResponse: {
|
|
740
|
+
data: components['schemas']['ToolConnectionListItem'][];
|
|
741
|
+
meta: components['schemas']['PaginationMeta'];
|
|
742
|
+
};
|
|
728
743
|
CreateToolConnectionRequest: {
|
|
729
744
|
toolId: string;
|
|
730
745
|
agentId: string;
|
|
@@ -1055,6 +1070,8 @@ type ToolConnectionAuth = components['schemas']['ToolConnectionAuth'];
|
|
|
1055
1070
|
type CreateToolConnectionRequest = components['schemas']['CreateToolConnectionRequest'];
|
|
1056
1071
|
type ToolConnectionRequest = components['schemas']['ToolConnectionRequest'];
|
|
1057
1072
|
type ToolConnectionResponse = components['schemas']['ToolConnectionResponse'];
|
|
1073
|
+
type ToolConnectionListItem = components['schemas']['ToolConnectionListItem'];
|
|
1074
|
+
type ToolConnectionListResponse = components['schemas']['ToolConnectionListResponse'];
|
|
1058
1075
|
type ExecuteToolConnectionRequest = components['schemas']['ExecuteToolConnectionRequest'];
|
|
1059
1076
|
type ErrorResponse = components['schemas']['ErrorResponse'];
|
|
1060
1077
|
type CampaignStatus = components['schemas']['CampaignStatus'];
|
|
@@ -1685,14 +1702,24 @@ type ListToolsOptions = ListQueryOptions & {
|
|
|
1685
1702
|
type ListToolResourcesOptions = Pick<ListQueryOptions, 'page' | 'limit'> & {
|
|
1686
1703
|
type?: 'document' | 'media' | 'file';
|
|
1687
1704
|
};
|
|
1705
|
+
type ListToolConnectionsOptions = ListQueryOptions;
|
|
1688
1706
|
type UploadToolResourcePayload = FormData | (Omit<ToolResourceUploadRequest, 'file'> & {
|
|
1689
1707
|
file: unknown;
|
|
1690
1708
|
});
|
|
1691
1709
|
declare function createToolsApi(cfg: ClientConfig & {
|
|
1692
1710
|
retry?: RetryPolicy;
|
|
1693
1711
|
}): {
|
|
1712
|
+
connections: {
|
|
1713
|
+
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
1714
|
+
readonly create: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
1715
|
+
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
1716
|
+
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1717
|
+
readonly createConnection: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
1718
|
+
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
1719
|
+
};
|
|
1694
1720
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
1695
1721
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
1722
|
+
listConnections(options?: ListToolConnectionsOptions): Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1696
1723
|
uploadResource(toolId: string, payload: UploadToolResourcePayload): Promise<ToolResourceUploadResponse>;
|
|
1697
1724
|
deleteResource(toolId: string, resourceId: string): Promise<void>;
|
|
1698
1725
|
reloadResource(toolId: string, resourceId: string): Promise<ToolResourceReloadResponse>;
|
|
@@ -1841,8 +1868,27 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1841
1868
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1842
1869
|
};
|
|
1843
1870
|
tools: {
|
|
1871
|
+
connections: {
|
|
1872
|
+
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: {
|
|
1873
|
+
idempotencyKey?: string;
|
|
1874
|
+
}) => Promise<ToolConnectionResponse>;
|
|
1875
|
+
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
1876
|
+
idempotencyKey?: string;
|
|
1877
|
+
}) => Promise<ToolConnectionResponse>;
|
|
1878
|
+
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
1879
|
+
idempotencyKey?: string;
|
|
1880
|
+
}) => Promise<ExecuteToolResponse>;
|
|
1881
|
+
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1882
|
+
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
1883
|
+
idempotencyKey?: string;
|
|
1884
|
+
}) => Promise<ToolConnectionResponse>;
|
|
1885
|
+
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
1886
|
+
idempotencyKey?: string;
|
|
1887
|
+
}) => Promise<ExecuteToolResponse>;
|
|
1888
|
+
};
|
|
1844
1889
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
1845
1890
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
1891
|
+
listConnections(options?: ListToolConnectionsOptions): Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1846
1892
|
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
1847
1893
|
file: string;
|
|
1848
1894
|
type?: "document" | "media" | "file";
|
|
@@ -1961,8 +2007,27 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1961
2007
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1962
2008
|
};
|
|
1963
2009
|
tools: {
|
|
2010
|
+
connections: {
|
|
2011
|
+
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: {
|
|
2012
|
+
idempotencyKey?: string;
|
|
2013
|
+
}) => Promise<ToolConnectionResponse>;
|
|
2014
|
+
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
2015
|
+
idempotencyKey?: string;
|
|
2016
|
+
}) => Promise<ToolConnectionResponse>;
|
|
2017
|
+
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2018
|
+
idempotencyKey?: string;
|
|
2019
|
+
}) => Promise<ExecuteToolResponse>;
|
|
2020
|
+
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
2021
|
+
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
2022
|
+
idempotencyKey?: string;
|
|
2023
|
+
}) => Promise<ToolConnectionResponse>;
|
|
2024
|
+
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2025
|
+
idempotencyKey?: string;
|
|
2026
|
+
}) => Promise<ExecuteToolResponse>;
|
|
2027
|
+
};
|
|
1964
2028
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
1965
2029
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
2030
|
+
listConnections(options?: ListToolConnectionsOptions): Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1966
2031
|
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
1967
2032
|
file: string;
|
|
1968
2033
|
type?: "document" | "media" | "file";
|
|
@@ -2045,4 +2110,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2045
2110
|
resolveAccessToken: () => string;
|
|
2046
2111
|
};
|
|
2047
2112
|
|
|
2048
|
-
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 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 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 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 };
|
|
2113
|
+
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 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -725,6 +725,21 @@ type components = {
|
|
|
725
725
|
[key: string]: components['schemas']['ToolConfigSchemaAction'];
|
|
726
726
|
};
|
|
727
727
|
};
|
|
728
|
+
ToolConnectionListItem: {
|
|
729
|
+
toolAgentConnectionId: string;
|
|
730
|
+
toolId: string;
|
|
731
|
+
workspaceId: string;
|
|
732
|
+
agentId: string;
|
|
733
|
+
connectionKey: string;
|
|
734
|
+
status: 'connected' | 'pending' | 'error' | 'revoked';
|
|
735
|
+
providerRef?: string | null;
|
|
736
|
+
descriptionUsage?: string | null;
|
|
737
|
+
usageExample?: string | null;
|
|
738
|
+
};
|
|
739
|
+
ToolConnectionListResponse: {
|
|
740
|
+
data: components['schemas']['ToolConnectionListItem'][];
|
|
741
|
+
meta: components['schemas']['PaginationMeta'];
|
|
742
|
+
};
|
|
728
743
|
CreateToolConnectionRequest: {
|
|
729
744
|
toolId: string;
|
|
730
745
|
agentId: string;
|
|
@@ -1055,6 +1070,8 @@ type ToolConnectionAuth = components['schemas']['ToolConnectionAuth'];
|
|
|
1055
1070
|
type CreateToolConnectionRequest = components['schemas']['CreateToolConnectionRequest'];
|
|
1056
1071
|
type ToolConnectionRequest = components['schemas']['ToolConnectionRequest'];
|
|
1057
1072
|
type ToolConnectionResponse = components['schemas']['ToolConnectionResponse'];
|
|
1073
|
+
type ToolConnectionListItem = components['schemas']['ToolConnectionListItem'];
|
|
1074
|
+
type ToolConnectionListResponse = components['schemas']['ToolConnectionListResponse'];
|
|
1058
1075
|
type ExecuteToolConnectionRequest = components['schemas']['ExecuteToolConnectionRequest'];
|
|
1059
1076
|
type ErrorResponse = components['schemas']['ErrorResponse'];
|
|
1060
1077
|
type CampaignStatus = components['schemas']['CampaignStatus'];
|
|
@@ -1685,14 +1702,24 @@ type ListToolsOptions = ListQueryOptions & {
|
|
|
1685
1702
|
type ListToolResourcesOptions = Pick<ListQueryOptions, 'page' | 'limit'> & {
|
|
1686
1703
|
type?: 'document' | 'media' | 'file';
|
|
1687
1704
|
};
|
|
1705
|
+
type ListToolConnectionsOptions = ListQueryOptions;
|
|
1688
1706
|
type UploadToolResourcePayload = FormData | (Omit<ToolResourceUploadRequest, 'file'> & {
|
|
1689
1707
|
file: unknown;
|
|
1690
1708
|
});
|
|
1691
1709
|
declare function createToolsApi(cfg: ClientConfig & {
|
|
1692
1710
|
retry?: RetryPolicy;
|
|
1693
1711
|
}): {
|
|
1712
|
+
connections: {
|
|
1713
|
+
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
1714
|
+
readonly create: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
1715
|
+
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
1716
|
+
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1717
|
+
readonly createConnection: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
1718
|
+
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
1719
|
+
};
|
|
1694
1720
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
1695
1721
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
1722
|
+
listConnections(options?: ListToolConnectionsOptions): Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1696
1723
|
uploadResource(toolId: string, payload: UploadToolResourcePayload): Promise<ToolResourceUploadResponse>;
|
|
1697
1724
|
deleteResource(toolId: string, resourceId: string): Promise<void>;
|
|
1698
1725
|
reloadResource(toolId: string, resourceId: string): Promise<ToolResourceReloadResponse>;
|
|
@@ -1841,8 +1868,27 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1841
1868
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1842
1869
|
};
|
|
1843
1870
|
tools: {
|
|
1871
|
+
connections: {
|
|
1872
|
+
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: {
|
|
1873
|
+
idempotencyKey?: string;
|
|
1874
|
+
}) => Promise<ToolConnectionResponse>;
|
|
1875
|
+
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
1876
|
+
idempotencyKey?: string;
|
|
1877
|
+
}) => Promise<ToolConnectionResponse>;
|
|
1878
|
+
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
1879
|
+
idempotencyKey?: string;
|
|
1880
|
+
}) => Promise<ExecuteToolResponse>;
|
|
1881
|
+
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1882
|
+
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
1883
|
+
idempotencyKey?: string;
|
|
1884
|
+
}) => Promise<ToolConnectionResponse>;
|
|
1885
|
+
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
1886
|
+
idempotencyKey?: string;
|
|
1887
|
+
}) => Promise<ExecuteToolResponse>;
|
|
1888
|
+
};
|
|
1844
1889
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
1845
1890
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
1891
|
+
listConnections(options?: ListToolConnectionsOptions): Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1846
1892
|
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
1847
1893
|
file: string;
|
|
1848
1894
|
type?: "document" | "media" | "file";
|
|
@@ -1961,8 +2007,27 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1961
2007
|
enable(workspaceId: string, payload: WorkspaceEnableRequest): Promise<WorkspaceEnableResponse>;
|
|
1962
2008
|
};
|
|
1963
2009
|
tools: {
|
|
2010
|
+
connections: {
|
|
2011
|
+
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: {
|
|
2012
|
+
idempotencyKey?: string;
|
|
2013
|
+
}) => Promise<ToolConnectionResponse>;
|
|
2014
|
+
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
2015
|
+
idempotencyKey?: string;
|
|
2016
|
+
}) => Promise<ToolConnectionResponse>;
|
|
2017
|
+
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2018
|
+
idempotencyKey?: string;
|
|
2019
|
+
}) => Promise<ExecuteToolResponse>;
|
|
2020
|
+
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
2021
|
+
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
2022
|
+
idempotencyKey?: string;
|
|
2023
|
+
}) => Promise<ToolConnectionResponse>;
|
|
2024
|
+
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2025
|
+
idempotencyKey?: string;
|
|
2026
|
+
}) => Promise<ExecuteToolResponse>;
|
|
2027
|
+
};
|
|
1964
2028
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
1965
2029
|
listResources(toolId: string, options?: ListToolResourcesOptions): Promise<PaginatedResult<ToolResourceListResponse, ListToolResourcesOptions>>;
|
|
2030
|
+
listConnections(options?: ListToolConnectionsOptions): Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
1966
2031
|
uploadResource(toolId: string, payload: FormData | (Omit<{
|
|
1967
2032
|
file: string;
|
|
1968
2033
|
type?: "document" | "media" | "file";
|
|
@@ -2045,4 +2110,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2045
2110
|
resolveAccessToken: () => string;
|
|
2046
2111
|
};
|
|
2047
2112
|
|
|
2048
|
-
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 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 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 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 };
|
|
2113
|
+
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 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 };
|
package/dist/index.js
CHANGED
|
@@ -1487,7 +1487,15 @@ function createToolsApi(cfg) {
|
|
|
1487
1487
|
});
|
|
1488
1488
|
return res.json();
|
|
1489
1489
|
};
|
|
1490
|
-
|
|
1490
|
+
const fetchToolConnectionsPage = async (options = {}) => {
|
|
1491
|
+
const query = serializeListOptions(options ?? {});
|
|
1492
|
+
const res = await doFetch(`${base}/tools/connections`, {
|
|
1493
|
+
method: "GET",
|
|
1494
|
+
query
|
|
1495
|
+
});
|
|
1496
|
+
return res.json();
|
|
1497
|
+
};
|
|
1498
|
+
const api = {
|
|
1491
1499
|
async list(options = {}) {
|
|
1492
1500
|
const normalizedOptions = { ...options ?? {} };
|
|
1493
1501
|
const response = await fetchToolsPage(normalizedOptions);
|
|
@@ -1501,6 +1509,17 @@ function createToolsApi(cfg) {
|
|
|
1501
1509
|
const response = await fetchPage(normalizedOptions);
|
|
1502
1510
|
return attachPaginator(response, fetchPage, normalizedOptions);
|
|
1503
1511
|
},
|
|
1512
|
+
async listConnections(options = {}) {
|
|
1513
|
+
const normalizedOptions = {
|
|
1514
|
+
...options ?? {}
|
|
1515
|
+
};
|
|
1516
|
+
const response = await fetchToolConnectionsPage(normalizedOptions);
|
|
1517
|
+
return attachPaginator(
|
|
1518
|
+
response,
|
|
1519
|
+
fetchToolConnectionsPage,
|
|
1520
|
+
normalizedOptions
|
|
1521
|
+
);
|
|
1522
|
+
},
|
|
1504
1523
|
async uploadResource(toolId, payload) {
|
|
1505
1524
|
const formData = toFormData(payload);
|
|
1506
1525
|
const res = await doFetch(`${base}/tools/${toolId}/resources`, {
|
|
@@ -1575,6 +1594,18 @@ function createToolsApi(cfg) {
|
|
|
1575
1594
|
return res.json();
|
|
1576
1595
|
}
|
|
1577
1596
|
};
|
|
1597
|
+
const connections = {
|
|
1598
|
+
connect: api.connect,
|
|
1599
|
+
create: api.createConnection,
|
|
1600
|
+
execute: api.executeConnection,
|
|
1601
|
+
list: api.listConnections,
|
|
1602
|
+
createConnection: api.createConnection,
|
|
1603
|
+
executeConnection: api.executeConnection
|
|
1604
|
+
};
|
|
1605
|
+
return {
|
|
1606
|
+
...api,
|
|
1607
|
+
connections
|
|
1608
|
+
};
|
|
1578
1609
|
}
|
|
1579
1610
|
|
|
1580
1611
|
// src/utils/catalog-voices.ts
|