@getsupervisor/agents-studio-sdk 1.15.0 → 1.17.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/dist/index.d.ts CHANGED
@@ -51,6 +51,11 @@ type components = {
51
51
  ToolConnectionResponse: external['components/schemas.yaml']['ToolConnectionResponse'];
52
52
  ExecuteToolRequest: external['components/schemas.yaml']['ExecuteToolRequest'];
53
53
  ExecuteToolResponse: external['components/schemas.yaml']['ExecuteToolResponse'];
54
+ CatalogItemLinks: external['components/schemas.yaml']['CatalogItemLinks'];
55
+ CatalogItemSummary: external['components/schemas.yaml']['CatalogItemSummary'];
56
+ CatalogItemDetail: external['components/schemas.yaml']['CatalogItemDetail'];
57
+ CatalogItemListResponse: external['components/schemas.yaml']['CatalogItemListResponse'];
58
+ CatalogItemCreateRequest: external['components/schemas.yaml']['CatalogItemCreateRequest'];
54
59
  WorkspaceEnableRequest: external['components/schemas.yaml']['WorkspaceEnableRequest'];
55
60
  WorkspaceEnableResponse: external['components/schemas.yaml']['WorkspaceEnableResponse'];
56
61
  ErrorResponse: external['components/schemas.yaml']['ErrorResponse'];
@@ -67,6 +72,7 @@ type components = {
67
72
  WorkspaceId: external['components/parameters.yaml']['WorkspaceId'];
68
73
  ToolId: external['components/parameters.yaml']['ToolId'];
69
74
  ResourceId: external['components/parameters.yaml']['ResourceId'];
75
+ CatalogItemId: external['components/parameters.yaml']['CatalogItemId'];
70
76
  PageParam: external['components/parameters.yaml']['PageParam'];
71
77
  LimitParam: external['components/parameters.yaml']['LimitParam'];
72
78
  Page: external['components/parameters.yaml']['Page'];
@@ -170,6 +176,14 @@ type external = {
170
176
  get: unknown;
171
177
  post: unknown;
172
178
  };
179
+ 'paths/catalogs/catalog-item-by-id.yaml': {
180
+ get: unknown;
181
+ delete: unknown;
182
+ };
183
+ 'paths/catalogs/catalog-items.yaml': {
184
+ get: unknown;
185
+ post: unknown;
186
+ };
173
187
  'paths/tools/tool-connect.yaml': {
174
188
  post: unknown;
175
189
  };
@@ -263,6 +277,11 @@ type WorkspaceEnableRequest = components['schemas']['WorkspaceEnableRequest'];
263
277
  type WorkspaceEnableResponse = components['schemas']['WorkspaceEnableResponse'];
264
278
  type VoiceSummary = components['schemas']['VoiceSummary'];
265
279
  type VoiceListResponse = components['schemas']['VoiceListResponse'];
280
+ type CatalogItemLinks = components['schemas']['CatalogItemLinks'];
281
+ type CatalogItemSummary = components['schemas']['CatalogItemSummary'];
282
+ type CatalogItemDetail = components['schemas']['CatalogItemDetail'];
283
+ type CatalogItemListResponse = components['schemas']['CatalogItemListResponse'];
284
+ type CatalogItemCreateRequest = components['schemas']['CatalogItemCreateRequest'];
266
285
  type ApiKeySummary = {
267
286
  id: string;
268
287
  name: string;
@@ -601,6 +620,16 @@ declare function createApiKeysApi(cfg: ClientConfig & {
601
620
  retry?: RetryPolicy;
602
621
  }): ApiKeysApi;
603
622
 
623
+ type ListCatalogItemsOptions = ListQueryOptions;
624
+ declare function createCatalogsApi(cfg: ClientConfig & {
625
+ retry?: RetryPolicy;
626
+ }): {
627
+ list(options?: ListCatalogItemsOptions): Promise<PaginatedResult<CatalogItemListResponse, ListCatalogItemsOptions>>;
628
+ get(itemId: string): Promise<CatalogItemDetail>;
629
+ create(payload: CatalogItemCreateRequest): Promise<CatalogItemDetail>;
630
+ remove(itemId: string): Promise<void>;
631
+ };
632
+
604
633
  type ListToolsOptions = ListQueryOptions & {
605
634
  agentType?: 'chat' | 'voice';
606
635
  };
@@ -747,6 +776,12 @@ declare function createClient(initialCfg: ClientConfig & {
747
776
  execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
748
777
  connect(toolId: string, payload: ToolConnectionRequest): Promise<ToolConnectionResponse>;
749
778
  };
779
+ catalogs: {
780
+ list(options?: ListCatalogItemsOptions): Promise<PaginatedResult<CatalogItemListResponse, ListCatalogItemsOptions>>;
781
+ get(itemId: string): Promise<CatalogItemDetail>;
782
+ create(payload: CatalogItemCreateRequest): Promise<CatalogItemDetail>;
783
+ remove(itemId: string): Promise<void>;
784
+ };
750
785
  voices: {
751
786
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
752
787
  };
@@ -818,6 +853,12 @@ declare function createClient(initialCfg: ClientConfig & {
818
853
  execute(toolId: string, payload: ExecuteToolRequest): Promise<ExecuteToolResponse>;
819
854
  connect(toolId: string, payload: ToolConnectionRequest): Promise<ToolConnectionResponse>;
820
855
  };
856
+ catalogs: {
857
+ list(options?: ListCatalogItemsOptions): Promise<PaginatedResult<CatalogItemListResponse, ListCatalogItemsOptions>>;
858
+ get(itemId: string): Promise<CatalogItemDetail>;
859
+ create(payload: CatalogItemCreateRequest): Promise<CatalogItemDetail>;
860
+ remove(itemId: string): Promise<void>;
861
+ };
821
862
  voices: {
822
863
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
823
864
  };
@@ -847,4 +888,4 @@ declare function createHttp(cfg: ClientConfig & {
847
888
  resolveAccessToken: () => string;
848
889
  };
849
890
 
850
- 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 AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, 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 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 UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
891
+ 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 AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, 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 CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, 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 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 UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
package/dist/index.js CHANGED
@@ -1046,6 +1046,52 @@ function createApiKeysApi(cfg) {
1046
1046
  };
1047
1047
  }
1048
1048
 
1049
+ // src/api/catalogs.ts
1050
+ function createCatalogsApi(cfg) {
1051
+ const { base, doFetch } = createHttp(cfg);
1052
+ const jsonHeaders = { "content-type": "application/json" };
1053
+ const fetchCatalogItemsPage = async (options = {}) => {
1054
+ const query = serializeListOptions(options ?? {});
1055
+ const res = await doFetch(`${base}/v1/catalogs/items`, {
1056
+ method: "GET",
1057
+ query
1058
+ });
1059
+ return res.json();
1060
+ };
1061
+ return {
1062
+ async list(options = {}) {
1063
+ const normalizedOptions = {
1064
+ ...options ?? {}
1065
+ };
1066
+ const response = await fetchCatalogItemsPage(normalizedOptions);
1067
+ return attachPaginator(
1068
+ response,
1069
+ fetchCatalogItemsPage,
1070
+ normalizedOptions
1071
+ );
1072
+ },
1073
+ async get(itemId) {
1074
+ const res = await doFetch(`${base}/v1/catalogs/items/${itemId}`, {
1075
+ method: "GET"
1076
+ });
1077
+ return res.json();
1078
+ },
1079
+ async create(payload) {
1080
+ const res = await doFetch(`${base}/v1/catalogs/items`, {
1081
+ method: "POST",
1082
+ headers: jsonHeaders,
1083
+ body: JSON.stringify(payload)
1084
+ });
1085
+ return res.json();
1086
+ },
1087
+ async remove(itemId) {
1088
+ await doFetch(`${base}/v1/catalogs/items/${itemId}`, {
1089
+ method: "DELETE"
1090
+ });
1091
+ }
1092
+ };
1093
+ }
1094
+
1049
1095
  // src/api/tools.ts
1050
1096
  var isFormData = (value) => {
1051
1097
  return typeof FormData !== "undefined" && value instanceof FormData;
@@ -1266,6 +1312,7 @@ function createClient(initialCfg) {
1266
1312
  const blueprintsApi = createAgentBlueprintsApi(runtimeCfg);
1267
1313
  const voicesApi = createVoicesApi(runtimeCfg);
1268
1314
  const apiKeysApi = createApiKeysApi(runtimeCfg);
1315
+ const catalogsApi = createCatalogsApi(runtimeCfg);
1269
1316
  const agentsApi = createAgentsApi(runtimeCfg, {
1270
1317
  instructionsApi,
1271
1318
  tagsApi,
@@ -1318,6 +1365,7 @@ function createClient(initialCfg) {
1318
1365
  },
1319
1366
  workspaces: createWorkspacesApi(runtimeCfg),
1320
1367
  tools: createToolsApi(runtimeCfg),
1368
+ catalogs: catalogsApi,
1321
1369
  voices: voicesApi,
1322
1370
  apiKeys: apiKeysApi
1323
1371
  };
@@ -1397,6 +1445,7 @@ export {
1397
1445
  createAgentVersionsApi,
1398
1446
  createAgentsApi,
1399
1447
  createApiKeysApi,
1448
+ createCatalogsApi,
1400
1449
  createClient,
1401
1450
  createHttp,
1402
1451
  createToolsApi,