@getsupervisor/agents-studio-sdk 1.27.0 → 1.30.0
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 +22 -0
- package/dist/index.cjs +50 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +52 -2
- package/dist/index.d.ts +52 -2
- package/dist/index.js +49 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -602,6 +602,14 @@ type components = {
|
|
|
602
602
|
UpdateEventSubscriptionRequest: {
|
|
603
603
|
isActive?: boolean;
|
|
604
604
|
};
|
|
605
|
+
ForkAgentFromTemplateRequest: {
|
|
606
|
+
templateId: string;
|
|
607
|
+
templateVersionId?: string;
|
|
608
|
+
name?: string | null;
|
|
609
|
+
description?: string | null;
|
|
610
|
+
status?: 'inactive' | 'training' | 'active';
|
|
611
|
+
debounceDelayMs?: number | null;
|
|
612
|
+
};
|
|
605
613
|
BlueprintStageTriggerCondition: {
|
|
606
614
|
type: 'intent' | 'rule' | 'expression';
|
|
607
615
|
value: string;
|
|
@@ -762,6 +770,7 @@ type AgentDetail = components['schemas']['AgentDetail'];
|
|
|
762
770
|
type AgentSummary = components['schemas']['AgentSummary'];
|
|
763
771
|
type AgentListResponse = components['schemas']['AgentListResponse'];
|
|
764
772
|
type CreateAgentRequest = components['schemas']['CreateAgentRequest'];
|
|
773
|
+
type ForkAgentFromTemplateRequest = components['schemas']['ForkAgentFromTemplateRequest'];
|
|
765
774
|
type UpdateAgentRequest = components['schemas']['UpdateAgentRequest'];
|
|
766
775
|
type AgentTagRequest = components['schemas']['AgentTagRequest'];
|
|
767
776
|
type AgentTagsResponse = components['schemas']['AgentTagsResponse'];
|
|
@@ -796,6 +805,24 @@ type CatalogItemCreateRequestSchema = components['schemas']['CatalogItemCreateRe
|
|
|
796
805
|
type CatalogItemCreateRequest = Omit<CatalogItemCreateRequestSchema, 'metadata'> & {
|
|
797
806
|
metadata: Record<string, unknown>;
|
|
798
807
|
};
|
|
808
|
+
type CatalogTemplateVisibility = 'system' | 'community' | 'private';
|
|
809
|
+
type CatalogTemplateSummary = {
|
|
810
|
+
id: string;
|
|
811
|
+
slug: string;
|
|
812
|
+
name: string;
|
|
813
|
+
description: string;
|
|
814
|
+
tags: string[];
|
|
815
|
+
agentVersionId: string;
|
|
816
|
+
visibility: CatalogTemplateVisibility;
|
|
817
|
+
isActive: boolean;
|
|
818
|
+
usageCount: number;
|
|
819
|
+
createdAt: string;
|
|
820
|
+
updatedAt: string;
|
|
821
|
+
};
|
|
822
|
+
type CatalogTemplateDetail = CatalogTemplateSummary & {
|
|
823
|
+
createdBy: string | null;
|
|
824
|
+
};
|
|
825
|
+
type CatalogTemplateListResponse = CatalogTemplateSummary[];
|
|
799
826
|
type ApiKeySummary = {
|
|
800
827
|
id: string;
|
|
801
828
|
name: string;
|
|
@@ -1469,6 +1496,7 @@ type AgentsApi = {
|
|
|
1469
1496
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponse, ListAgentsOptions>>;
|
|
1470
1497
|
get(agentId: string): Promise<AgentDetail>;
|
|
1471
1498
|
create(payload: CreateAgentRequest): Promise<AgentDetail>;
|
|
1499
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentDetail>;
|
|
1472
1500
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentDetail>;
|
|
1473
1501
|
delete(agent: string | AgentEntity): Promise<void>;
|
|
1474
1502
|
};
|
|
@@ -1476,10 +1504,11 @@ type AgentListResponseWithEntities = {
|
|
|
1476
1504
|
data: AgentEntity[];
|
|
1477
1505
|
meta: AgentListResponse['meta'];
|
|
1478
1506
|
};
|
|
1479
|
-
type AgentsApiWithEntities = Omit<AgentsApi, 'get' | 'create' | 'update' | 'list'> & {
|
|
1507
|
+
type AgentsApiWithEntities = Omit<AgentsApi, 'get' | 'create' | 'update' | 'list' | 'forkFromTemplate'> & {
|
|
1480
1508
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponseWithEntities, ListAgentsOptions>>;
|
|
1481
1509
|
get(agentId: string): Promise<AgentEntity>;
|
|
1482
1510
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1511
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentEntity>;
|
|
1483
1512
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1484
1513
|
};
|
|
1485
1514
|
declare function createAgentsApi(cfg: ClientConfig & {
|
|
@@ -1496,6 +1525,17 @@ declare function createApiKeysApi(cfg: ClientConfig & {
|
|
|
1496
1525
|
retry?: RetryPolicy;
|
|
1497
1526
|
}): ApiKeysApi;
|
|
1498
1527
|
|
|
1528
|
+
type ListCatalogTemplatesOptions = {
|
|
1529
|
+
visibility?: CatalogTemplateVisibility;
|
|
1530
|
+
tags?: string[];
|
|
1531
|
+
};
|
|
1532
|
+
declare function createCatalogTemplatesApi(cfg: ClientConfig & {
|
|
1533
|
+
retry?: RetryPolicy;
|
|
1534
|
+
}): {
|
|
1535
|
+
list(options?: ListCatalogTemplatesOptions): Promise<CatalogTemplateSummary[]>;
|
|
1536
|
+
get(templateId: string): Promise<CatalogTemplateDetail>;
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1499
1539
|
type ListCatalogItemsOptions = ListQueryOptions;
|
|
1500
1540
|
declare function createCatalogsApi(cfg: ClientConfig & {
|
|
1501
1541
|
retry?: RetryPolicy;
|
|
@@ -1657,6 +1697,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1657
1697
|
}, ListAgentsOptions>>;
|
|
1658
1698
|
get(agentId: string): Promise<AgentEntity>;
|
|
1659
1699
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1700
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentEntity>;
|
|
1660
1701
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1661
1702
|
};
|
|
1662
1703
|
workspaces: {
|
|
@@ -1686,6 +1727,10 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1686
1727
|
}): Promise<ToolConnectionResponse>;
|
|
1687
1728
|
};
|
|
1688
1729
|
catalogs: {
|
|
1730
|
+
templates: {
|
|
1731
|
+
list(options?: ListCatalogTemplatesOptions): Promise<CatalogTemplateSummary[]>;
|
|
1732
|
+
get(templateId: string): Promise<CatalogTemplateDetail>;
|
|
1733
|
+
};
|
|
1689
1734
|
list(options?: ListCatalogItemsOptions): Promise<PaginatedResult<CatalogItemListResponse, ListCatalogItemsOptions>>;
|
|
1690
1735
|
get(itemId: string): Promise<CatalogItemDetail>;
|
|
1691
1736
|
create(payload: CatalogItemCreateRequest): Promise<CatalogItemDetail>;
|
|
@@ -1760,6 +1805,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1760
1805
|
}, ListAgentsOptions>>;
|
|
1761
1806
|
get(agentId: string): Promise<AgentEntity>;
|
|
1762
1807
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1808
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentEntity>;
|
|
1763
1809
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1764
1810
|
};
|
|
1765
1811
|
workspaces: {
|
|
@@ -1789,6 +1835,10 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1789
1835
|
}): Promise<ToolConnectionResponse>;
|
|
1790
1836
|
};
|
|
1791
1837
|
catalogs: {
|
|
1838
|
+
templates: {
|
|
1839
|
+
list(options?: ListCatalogTemplatesOptions): Promise<CatalogTemplateSummary[]>;
|
|
1840
|
+
get(templateId: string): Promise<CatalogTemplateDetail>;
|
|
1841
|
+
};
|
|
1792
1842
|
list(options?: ListCatalogItemsOptions): Promise<PaginatedResult<CatalogItemListResponse, ListCatalogItemsOptions>>;
|
|
1793
1843
|
get(itemId: string): Promise<CatalogItemDetail>;
|
|
1794
1844
|
create(payload: CatalogItemCreateRequest): Promise<CatalogItemDetail>;
|
|
@@ -1835,4 +1885,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
1835
1885
|
resolveAccessToken: () => string;
|
|
1836
1886
|
};
|
|
1837
1887
|
|
|
1838
|
-
export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, 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 CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, 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 WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
|
|
1888
|
+
export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, 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 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 CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, type ForkAgentFromTemplateRequest, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, 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 WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -602,6 +602,14 @@ type components = {
|
|
|
602
602
|
UpdateEventSubscriptionRequest: {
|
|
603
603
|
isActive?: boolean;
|
|
604
604
|
};
|
|
605
|
+
ForkAgentFromTemplateRequest: {
|
|
606
|
+
templateId: string;
|
|
607
|
+
templateVersionId?: string;
|
|
608
|
+
name?: string | null;
|
|
609
|
+
description?: string | null;
|
|
610
|
+
status?: 'inactive' | 'training' | 'active';
|
|
611
|
+
debounceDelayMs?: number | null;
|
|
612
|
+
};
|
|
605
613
|
BlueprintStageTriggerCondition: {
|
|
606
614
|
type: 'intent' | 'rule' | 'expression';
|
|
607
615
|
value: string;
|
|
@@ -762,6 +770,7 @@ type AgentDetail = components['schemas']['AgentDetail'];
|
|
|
762
770
|
type AgentSummary = components['schemas']['AgentSummary'];
|
|
763
771
|
type AgentListResponse = components['schemas']['AgentListResponse'];
|
|
764
772
|
type CreateAgentRequest = components['schemas']['CreateAgentRequest'];
|
|
773
|
+
type ForkAgentFromTemplateRequest = components['schemas']['ForkAgentFromTemplateRequest'];
|
|
765
774
|
type UpdateAgentRequest = components['schemas']['UpdateAgentRequest'];
|
|
766
775
|
type AgentTagRequest = components['schemas']['AgentTagRequest'];
|
|
767
776
|
type AgentTagsResponse = components['schemas']['AgentTagsResponse'];
|
|
@@ -796,6 +805,24 @@ type CatalogItemCreateRequestSchema = components['schemas']['CatalogItemCreateRe
|
|
|
796
805
|
type CatalogItemCreateRequest = Omit<CatalogItemCreateRequestSchema, 'metadata'> & {
|
|
797
806
|
metadata: Record<string, unknown>;
|
|
798
807
|
};
|
|
808
|
+
type CatalogTemplateVisibility = 'system' | 'community' | 'private';
|
|
809
|
+
type CatalogTemplateSummary = {
|
|
810
|
+
id: string;
|
|
811
|
+
slug: string;
|
|
812
|
+
name: string;
|
|
813
|
+
description: string;
|
|
814
|
+
tags: string[];
|
|
815
|
+
agentVersionId: string;
|
|
816
|
+
visibility: CatalogTemplateVisibility;
|
|
817
|
+
isActive: boolean;
|
|
818
|
+
usageCount: number;
|
|
819
|
+
createdAt: string;
|
|
820
|
+
updatedAt: string;
|
|
821
|
+
};
|
|
822
|
+
type CatalogTemplateDetail = CatalogTemplateSummary & {
|
|
823
|
+
createdBy: string | null;
|
|
824
|
+
};
|
|
825
|
+
type CatalogTemplateListResponse = CatalogTemplateSummary[];
|
|
799
826
|
type ApiKeySummary = {
|
|
800
827
|
id: string;
|
|
801
828
|
name: string;
|
|
@@ -1469,6 +1496,7 @@ type AgentsApi = {
|
|
|
1469
1496
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponse, ListAgentsOptions>>;
|
|
1470
1497
|
get(agentId: string): Promise<AgentDetail>;
|
|
1471
1498
|
create(payload: CreateAgentRequest): Promise<AgentDetail>;
|
|
1499
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentDetail>;
|
|
1472
1500
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentDetail>;
|
|
1473
1501
|
delete(agent: string | AgentEntity): Promise<void>;
|
|
1474
1502
|
};
|
|
@@ -1476,10 +1504,11 @@ type AgentListResponseWithEntities = {
|
|
|
1476
1504
|
data: AgentEntity[];
|
|
1477
1505
|
meta: AgentListResponse['meta'];
|
|
1478
1506
|
};
|
|
1479
|
-
type AgentsApiWithEntities = Omit<AgentsApi, 'get' | 'create' | 'update' | 'list'> & {
|
|
1507
|
+
type AgentsApiWithEntities = Omit<AgentsApi, 'get' | 'create' | 'update' | 'list' | 'forkFromTemplate'> & {
|
|
1480
1508
|
list(options?: ListAgentsOptions): Promise<PaginatedResult<AgentListResponseWithEntities, ListAgentsOptions>>;
|
|
1481
1509
|
get(agentId: string): Promise<AgentEntity>;
|
|
1482
1510
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1511
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentEntity>;
|
|
1483
1512
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1484
1513
|
};
|
|
1485
1514
|
declare function createAgentsApi(cfg: ClientConfig & {
|
|
@@ -1496,6 +1525,17 @@ declare function createApiKeysApi(cfg: ClientConfig & {
|
|
|
1496
1525
|
retry?: RetryPolicy;
|
|
1497
1526
|
}): ApiKeysApi;
|
|
1498
1527
|
|
|
1528
|
+
type ListCatalogTemplatesOptions = {
|
|
1529
|
+
visibility?: CatalogTemplateVisibility;
|
|
1530
|
+
tags?: string[];
|
|
1531
|
+
};
|
|
1532
|
+
declare function createCatalogTemplatesApi(cfg: ClientConfig & {
|
|
1533
|
+
retry?: RetryPolicy;
|
|
1534
|
+
}): {
|
|
1535
|
+
list(options?: ListCatalogTemplatesOptions): Promise<CatalogTemplateSummary[]>;
|
|
1536
|
+
get(templateId: string): Promise<CatalogTemplateDetail>;
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1499
1539
|
type ListCatalogItemsOptions = ListQueryOptions;
|
|
1500
1540
|
declare function createCatalogsApi(cfg: ClientConfig & {
|
|
1501
1541
|
retry?: RetryPolicy;
|
|
@@ -1657,6 +1697,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1657
1697
|
}, ListAgentsOptions>>;
|
|
1658
1698
|
get(agentId: string): Promise<AgentEntity>;
|
|
1659
1699
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1700
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentEntity>;
|
|
1660
1701
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1661
1702
|
};
|
|
1662
1703
|
workspaces: {
|
|
@@ -1686,6 +1727,10 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1686
1727
|
}): Promise<ToolConnectionResponse>;
|
|
1687
1728
|
};
|
|
1688
1729
|
catalogs: {
|
|
1730
|
+
templates: {
|
|
1731
|
+
list(options?: ListCatalogTemplatesOptions): Promise<CatalogTemplateSummary[]>;
|
|
1732
|
+
get(templateId: string): Promise<CatalogTemplateDetail>;
|
|
1733
|
+
};
|
|
1689
1734
|
list(options?: ListCatalogItemsOptions): Promise<PaginatedResult<CatalogItemListResponse, ListCatalogItemsOptions>>;
|
|
1690
1735
|
get(itemId: string): Promise<CatalogItemDetail>;
|
|
1691
1736
|
create(payload: CatalogItemCreateRequest): Promise<CatalogItemDetail>;
|
|
@@ -1760,6 +1805,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1760
1805
|
}, ListAgentsOptions>>;
|
|
1761
1806
|
get(agentId: string): Promise<AgentEntity>;
|
|
1762
1807
|
create(payload: CreateAgentRequest): Promise<AgentEntity>;
|
|
1808
|
+
forkFromTemplate(payload: ForkAgentFromTemplateRequest): Promise<AgentEntity>;
|
|
1763
1809
|
update(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
|
|
1764
1810
|
};
|
|
1765
1811
|
workspaces: {
|
|
@@ -1789,6 +1835,10 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
1789
1835
|
}): Promise<ToolConnectionResponse>;
|
|
1790
1836
|
};
|
|
1791
1837
|
catalogs: {
|
|
1838
|
+
templates: {
|
|
1839
|
+
list(options?: ListCatalogTemplatesOptions): Promise<CatalogTemplateSummary[]>;
|
|
1840
|
+
get(templateId: string): Promise<CatalogTemplateDetail>;
|
|
1841
|
+
};
|
|
1792
1842
|
list(options?: ListCatalogItemsOptions): Promise<PaginatedResult<CatalogItemListResponse, ListCatalogItemsOptions>>;
|
|
1793
1843
|
get(itemId: string): Promise<CatalogItemDetail>;
|
|
1794
1844
|
create(payload: CatalogItemCreateRequest): Promise<CatalogItemDetail>;
|
|
@@ -1835,4 +1885,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
1835
1885
|
resolveAccessToken: () => string;
|
|
1836
1886
|
};
|
|
1837
1887
|
|
|
1838
|
-
export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, 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 CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, 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 WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
|
|
1888
|
+
export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, 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 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 CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, type ForkAgentFromTemplateRequest, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentStageTriggersOptions, type ListAgentStagesOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, 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 WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
|
package/dist/index.js
CHANGED
|
@@ -1158,6 +1158,14 @@ function createAgentsApi(cfg, relatedApis) {
|
|
|
1158
1158
|
});
|
|
1159
1159
|
return res.json();
|
|
1160
1160
|
};
|
|
1161
|
+
const forkAgentFromTemplate = async (payload) => {
|
|
1162
|
+
const res = await doFetch(`${base}/agents:from-template`, {
|
|
1163
|
+
method: "POST",
|
|
1164
|
+
body: JSON.stringify(payload),
|
|
1165
|
+
headers: jsonHeaders
|
|
1166
|
+
});
|
|
1167
|
+
return res.json();
|
|
1168
|
+
};
|
|
1161
1169
|
const updateAgent = async (agentId, payload) => {
|
|
1162
1170
|
const res = await doFetch(`${base}/agents/${agentId}`, {
|
|
1163
1171
|
method: "PATCH",
|
|
@@ -1179,6 +1187,7 @@ function createAgentsApi(cfg, relatedApis) {
|
|
|
1179
1187
|
list: listAgents,
|
|
1180
1188
|
get: getAgentDetail,
|
|
1181
1189
|
create: createAgent,
|
|
1190
|
+
forkFromTemplate: forkAgentFromTemplate,
|
|
1182
1191
|
update: updateAgent,
|
|
1183
1192
|
delete: deleteAgent
|
|
1184
1193
|
};
|
|
@@ -1230,6 +1239,10 @@ function createAgentsApi(cfg, relatedApis) {
|
|
|
1230
1239
|
const detail = await createAgent(payload);
|
|
1231
1240
|
return wrapAgent(detail);
|
|
1232
1241
|
},
|
|
1242
|
+
async forkFromTemplate(payload) {
|
|
1243
|
+
const detail = await forkAgentFromTemplate(payload);
|
|
1244
|
+
return wrapAgent(detail);
|
|
1245
|
+
},
|
|
1233
1246
|
async update(agentId, payload) {
|
|
1234
1247
|
const detail = await updateAgent(agentId, payload);
|
|
1235
1248
|
return wrapAgent(detail);
|
|
@@ -1268,6 +1281,36 @@ function createApiKeysApi(cfg) {
|
|
|
1268
1281
|
};
|
|
1269
1282
|
}
|
|
1270
1283
|
|
|
1284
|
+
// src/api/catalog-templates.ts
|
|
1285
|
+
function createCatalogTemplatesApi(cfg) {
|
|
1286
|
+
const { base, doFetch } = createHttp(cfg);
|
|
1287
|
+
const buildListQuery = (options) => {
|
|
1288
|
+
const query = {};
|
|
1289
|
+
if (options.visibility) {
|
|
1290
|
+
query.visibility = options.visibility;
|
|
1291
|
+
}
|
|
1292
|
+
if (options.tags && options.tags.length > 0) {
|
|
1293
|
+
query.tags = options.tags;
|
|
1294
|
+
}
|
|
1295
|
+
return query;
|
|
1296
|
+
};
|
|
1297
|
+
return {
|
|
1298
|
+
async list(options = {}) {
|
|
1299
|
+
const res = await doFetch(`${base}/catalogs/templates`, {
|
|
1300
|
+
method: "GET",
|
|
1301
|
+
query: buildListQuery(options)
|
|
1302
|
+
});
|
|
1303
|
+
return res.json();
|
|
1304
|
+
},
|
|
1305
|
+
async get(templateId) {
|
|
1306
|
+
const res = await doFetch(`${base}/catalogs/templates/${templateId}`, {
|
|
1307
|
+
method: "GET"
|
|
1308
|
+
});
|
|
1309
|
+
return res.json();
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1271
1314
|
// src/api/catalogs.ts
|
|
1272
1315
|
function createCatalogsApi(cfg) {
|
|
1273
1316
|
const { base, doFetch } = createHttp(cfg);
|
|
@@ -1828,6 +1871,7 @@ function createClient(initialCfg) {
|
|
|
1828
1871
|
const voicesApi = createVoicesApi(runtimeCfg);
|
|
1829
1872
|
const apiKeysApi = createApiKeysApi(runtimeCfg);
|
|
1830
1873
|
const catalogsApi = createCatalogsApi(runtimeCfg);
|
|
1874
|
+
const catalogTemplatesApi = createCatalogTemplatesApi(runtimeCfg);
|
|
1831
1875
|
const webhooksApi = createWebhooksApi(runtimeCfg);
|
|
1832
1876
|
const agentsApi = createAgentsApi(runtimeCfg, {
|
|
1833
1877
|
instructionsApi,
|
|
@@ -1895,7 +1939,10 @@ function createClient(initialCfg) {
|
|
|
1895
1939
|
},
|
|
1896
1940
|
workspaces: createWorkspacesApi(runtimeCfg),
|
|
1897
1941
|
tools: createToolsApi(runtimeCfg),
|
|
1898
|
-
catalogs:
|
|
1942
|
+
catalogs: {
|
|
1943
|
+
...catalogsApi,
|
|
1944
|
+
templates: catalogTemplatesApi
|
|
1945
|
+
},
|
|
1899
1946
|
voices: voicesApi,
|
|
1900
1947
|
apiKeys: apiKeysApi,
|
|
1901
1948
|
webhooks: webhooksApi
|
|
@@ -1980,6 +2027,7 @@ export {
|
|
|
1980
2027
|
createAgentVersionsApi,
|
|
1981
2028
|
createAgentsApi,
|
|
1982
2029
|
createApiKeysApi,
|
|
2030
|
+
createCatalogTemplatesApi,
|
|
1983
2031
|
createCatalogsApi,
|
|
1984
2032
|
createClient,
|
|
1985
2033
|
createHttp,
|