@getsupervisor/agents-studio-sdk 1.31.0 → 1.33.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.cts CHANGED
@@ -94,11 +94,14 @@ type components = {
94
94
  };
95
95
  Instruction: {
96
96
  id: string;
97
+ agentId: string;
97
98
  versionId: string;
98
99
  order: number;
99
100
  content: string;
100
- createdAt?: string;
101
- updatedAt?: string;
101
+ status: 'active' | 'inactive';
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ deletedAt?: string | null;
102
105
  };
103
106
  InstructionListResponse: {
104
107
  data: components['schemas']['Instruction'][];
@@ -107,16 +110,13 @@ type components = {
107
110
  CreateInstructionRequest: {
108
111
  order: number;
109
112
  content: string;
113
+ status?: 'active' | 'inactive';
110
114
  };
111
- InstructionCreatedResponse: {
112
- id: string;
113
- versionId: string;
114
- order: number;
115
- createdAt: string;
116
- };
115
+ InstructionCreatedResponse: components['schemas']['Instruction'];
117
116
  UpdateInstructionRequest: {
118
117
  order?: number;
119
118
  content?: string;
119
+ status?: 'active' | 'inactive';
120
120
  };
121
121
  VoiceSummary: {
122
122
  id: string;
@@ -1006,18 +1006,6 @@ declare function createAgentBlueprintsApi(cfg: ClientConfig & {
1006
1006
  retry?: RetryPolicy;
1007
1007
  }): AgentBlueprintsApi$1;
1008
1008
 
1009
- type ListAgentInstructionsOptions = ListQueryOptions & {
1010
- versionId?: string;
1011
- };
1012
- declare function createAgentInstructionsApi(cfg: ClientConfig & {
1013
- retry?: RetryPolicy;
1014
- }): {
1015
- list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
1016
- create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
1017
- update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
1018
- delete(agentId: string, instructionId: string): Promise<void>;
1019
- };
1020
-
1021
1009
  declare function createAgentPhonesApi(cfg: ClientConfig & {
1022
1010
  retry?: RetryPolicy;
1023
1011
  }): {
@@ -1093,7 +1081,6 @@ declare function createAgentVersionsApi(cfg: ClientConfig & {
1093
1081
  deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
1094
1082
  };
1095
1083
 
1096
- type AgentInstructionsApi = ReturnType<typeof createAgentInstructionsApi>;
1097
1084
  type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
1098
1085
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
1099
1086
  type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
@@ -1102,7 +1089,6 @@ type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
1102
1089
  type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
1103
1090
  type AgentStagesApi = ReturnType<typeof createAgentStagesApi>;
1104
1091
  type AgentStageTriggersApi = ReturnType<typeof createAgentStageTriggersApi>;
1105
- type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
1106
1092
  type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
1107
1093
  type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
1108
1094
  type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
@@ -1113,7 +1099,6 @@ type AgentStagesHelper = ReturnType<typeof bindAgentStages>;
1113
1099
  type AgentBase = AgentSummary & Partial<Omit<AgentDetail, keyof AgentSummary>>;
1114
1100
  interface AgentEntity extends AgentBase {
1115
1101
  agentId: string;
1116
- instructions: AgentInstructionsHelper;
1117
1102
  tagAssignments: AgentTagsHelper;
1118
1103
  phones: AgentPhonesHelper;
1119
1104
  schedule: AgentScheduleHelper;
@@ -1125,7 +1110,6 @@ interface AgentEntity extends AgentBase {
1125
1110
  refresh(): Promise<AgentEntity>;
1126
1111
  }
1127
1112
  type AgentEntityFactoryOptions = {
1128
- instructionsApi: AgentInstructionsApi;
1129
1113
  tagsApi: AgentTagsApi;
1130
1114
  phonesApi: AgentPhonesApi;
1131
1115
  scheduleApi: AgentScheduleApi;
@@ -1138,27 +1122,6 @@ type AgentEntityFactoryOptions = {
1138
1122
  updateAgent(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
1139
1123
  deleteAgent(agentId: string): Promise<void>;
1140
1124
  };
1141
- declare const bindAgentInstructions: (api: AgentInstructionsApi, agentId: string) => {
1142
- list(opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<{
1143
- data: components["schemas"]["Instruction"][];
1144
- meta?: components["schemas"]["PaginationMeta"];
1145
- }, ListAgentInstructionsOptions>>;
1146
- create(payload: CreateInstructionRequest): Promise<{
1147
- id: string;
1148
- versionId: string;
1149
- order: number;
1150
- createdAt: string;
1151
- }>;
1152
- update(instructionId: string, payload: UpdateInstructionRequest): Promise<{
1153
- id: string;
1154
- versionId: string;
1155
- order: number;
1156
- content: string;
1157
- createdAt?: string;
1158
- updatedAt?: string;
1159
- }>;
1160
- delete(instructionId: string): Promise<void>;
1161
- };
1162
1125
  declare const bindAgentStageTriggers: (api: AgentStageTriggersApi, agentId: string, blueprintId: string, stageId: string) => {
1163
1126
  list(opts?: ListAgentStageTriggersOptions): Promise<PaginatedResult<{
1164
1127
  data: components["schemas"]["BlueprintStageTrigger"][];
@@ -1454,17 +1417,25 @@ declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
1454
1417
  }>;
1455
1418
  readonly create: (payload: CreateInstructionRequest) => Promise<{
1456
1419
  id: string;
1420
+ agentId: string;
1457
1421
  versionId: string;
1458
1422
  order: number;
1423
+ content: string;
1424
+ status: "active" | "inactive";
1459
1425
  createdAt: string;
1426
+ updatedAt: string;
1427
+ deletedAt?: string | null;
1460
1428
  }>;
1461
1429
  readonly update: (instructionId: string, payload: UpdateInstructionRequest) => Promise<{
1462
1430
  id: string;
1431
+ agentId: string;
1463
1432
  versionId: string;
1464
1433
  order: number;
1465
1434
  content: string;
1466
- createdAt?: string;
1467
- updatedAt?: string;
1435
+ status: "active" | "inactive";
1436
+ createdAt: string;
1437
+ updatedAt: string;
1438
+ deletedAt?: string | null;
1468
1439
  }>;
1469
1440
  readonly delete: (instructionId: string) => Promise<void>;
1470
1441
  };
@@ -1481,7 +1452,6 @@ type AgentSnapshot = AgentDetail | AgentSummary;
1481
1452
  declare const createAgentEntity: (dto: AgentSnapshot, options: AgentEntityFactoryOptions) => AgentEntity;
1482
1453
 
1483
1454
  type AgentEntityDependencies = {
1484
- instructionsApi: ReturnType<typeof createAgentInstructionsApi>;
1485
1455
  tagsApi: ReturnType<typeof createAgentTagsApi>;
1486
1456
  phonesApi: ReturnType<typeof createAgentPhonesApi>;
1487
1457
  scheduleApi: ReturnType<typeof createAgentScheduleApi>;
@@ -1647,12 +1617,6 @@ declare function createClient(initialCfg: ClientConfig & {
1647
1617
  scoped(id: string): any;
1648
1618
  };
1649
1619
  agents: {
1650
- instructions: {
1651
- list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
1652
- create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
1653
- update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
1654
- delete(agentId: string, instructionId: string): Promise<void>;
1655
- } & ((agentId: string) => ReturnType<typeof bindAgentInstructions>);
1656
1620
  tags: {
1657
1621
  readonly add: (agentId: string, payload: AgentTagRequest) => Promise<AgentTagsResponse>;
1658
1622
  readonly remove: (agentId: string, tagId: string) => Promise<void>;
@@ -1755,12 +1719,6 @@ declare function createClient(initialCfg: ClientConfig & {
1755
1719
  };
1756
1720
  };
1757
1721
  agents: {
1758
- instructions: {
1759
- list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
1760
- create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
1761
- update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
1762
- delete(agentId: string, instructionId: string): Promise<void>;
1763
- } & ((agentId: string) => ReturnType<typeof bindAgentInstructions>);
1764
1722
  tags: {
1765
1723
  readonly add: (agentId: string, payload: AgentTagRequest) => Promise<AgentTagsResponse>;
1766
1724
  readonly remove: (agentId: string, tagId: string) => Promise<void>;
@@ -1885,4 +1843,4 @@ declare function createHttp(cfg: ClientConfig & {
1885
1843
  resolveAccessToken: () => string;
1886
1844
  };
1887
1845
 
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 };
1846
+ 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 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, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
package/dist/index.d.ts CHANGED
@@ -94,11 +94,14 @@ type components = {
94
94
  };
95
95
  Instruction: {
96
96
  id: string;
97
+ agentId: string;
97
98
  versionId: string;
98
99
  order: number;
99
100
  content: string;
100
- createdAt?: string;
101
- updatedAt?: string;
101
+ status: 'active' | 'inactive';
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ deletedAt?: string | null;
102
105
  };
103
106
  InstructionListResponse: {
104
107
  data: components['schemas']['Instruction'][];
@@ -107,16 +110,13 @@ type components = {
107
110
  CreateInstructionRequest: {
108
111
  order: number;
109
112
  content: string;
113
+ status?: 'active' | 'inactive';
110
114
  };
111
- InstructionCreatedResponse: {
112
- id: string;
113
- versionId: string;
114
- order: number;
115
- createdAt: string;
116
- };
115
+ InstructionCreatedResponse: components['schemas']['Instruction'];
117
116
  UpdateInstructionRequest: {
118
117
  order?: number;
119
118
  content?: string;
119
+ status?: 'active' | 'inactive';
120
120
  };
121
121
  VoiceSummary: {
122
122
  id: string;
@@ -1006,18 +1006,6 @@ declare function createAgentBlueprintsApi(cfg: ClientConfig & {
1006
1006
  retry?: RetryPolicy;
1007
1007
  }): AgentBlueprintsApi$1;
1008
1008
 
1009
- type ListAgentInstructionsOptions = ListQueryOptions & {
1010
- versionId?: string;
1011
- };
1012
- declare function createAgentInstructionsApi(cfg: ClientConfig & {
1013
- retry?: RetryPolicy;
1014
- }): {
1015
- list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
1016
- create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
1017
- update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
1018
- delete(agentId: string, instructionId: string): Promise<void>;
1019
- };
1020
-
1021
1009
  declare function createAgentPhonesApi(cfg: ClientConfig & {
1022
1010
  retry?: RetryPolicy;
1023
1011
  }): {
@@ -1093,7 +1081,6 @@ declare function createAgentVersionsApi(cfg: ClientConfig & {
1093
1081
  deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
1094
1082
  };
1095
1083
 
1096
- type AgentInstructionsApi = ReturnType<typeof createAgentInstructionsApi>;
1097
1084
  type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
1098
1085
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
1099
1086
  type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
@@ -1102,7 +1089,6 @@ type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
1102
1089
  type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
1103
1090
  type AgentStagesApi = ReturnType<typeof createAgentStagesApi>;
1104
1091
  type AgentStageTriggersApi = ReturnType<typeof createAgentStageTriggersApi>;
1105
- type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
1106
1092
  type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
1107
1093
  type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
1108
1094
  type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
@@ -1113,7 +1099,6 @@ type AgentStagesHelper = ReturnType<typeof bindAgentStages>;
1113
1099
  type AgentBase = AgentSummary & Partial<Omit<AgentDetail, keyof AgentSummary>>;
1114
1100
  interface AgentEntity extends AgentBase {
1115
1101
  agentId: string;
1116
- instructions: AgentInstructionsHelper;
1117
1102
  tagAssignments: AgentTagsHelper;
1118
1103
  phones: AgentPhonesHelper;
1119
1104
  schedule: AgentScheduleHelper;
@@ -1125,7 +1110,6 @@ interface AgentEntity extends AgentBase {
1125
1110
  refresh(): Promise<AgentEntity>;
1126
1111
  }
1127
1112
  type AgentEntityFactoryOptions = {
1128
- instructionsApi: AgentInstructionsApi;
1129
1113
  tagsApi: AgentTagsApi;
1130
1114
  phonesApi: AgentPhonesApi;
1131
1115
  scheduleApi: AgentScheduleApi;
@@ -1138,27 +1122,6 @@ type AgentEntityFactoryOptions = {
1138
1122
  updateAgent(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
1139
1123
  deleteAgent(agentId: string): Promise<void>;
1140
1124
  };
1141
- declare const bindAgentInstructions: (api: AgentInstructionsApi, agentId: string) => {
1142
- list(opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<{
1143
- data: components["schemas"]["Instruction"][];
1144
- meta?: components["schemas"]["PaginationMeta"];
1145
- }, ListAgentInstructionsOptions>>;
1146
- create(payload: CreateInstructionRequest): Promise<{
1147
- id: string;
1148
- versionId: string;
1149
- order: number;
1150
- createdAt: string;
1151
- }>;
1152
- update(instructionId: string, payload: UpdateInstructionRequest): Promise<{
1153
- id: string;
1154
- versionId: string;
1155
- order: number;
1156
- content: string;
1157
- createdAt?: string;
1158
- updatedAt?: string;
1159
- }>;
1160
- delete(instructionId: string): Promise<void>;
1161
- };
1162
1125
  declare const bindAgentStageTriggers: (api: AgentStageTriggersApi, agentId: string, blueprintId: string, stageId: string) => {
1163
1126
  list(opts?: ListAgentStageTriggersOptions): Promise<PaginatedResult<{
1164
1127
  data: components["schemas"]["BlueprintStageTrigger"][];
@@ -1454,17 +1417,25 @@ declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
1454
1417
  }>;
1455
1418
  readonly create: (payload: CreateInstructionRequest) => Promise<{
1456
1419
  id: string;
1420
+ agentId: string;
1457
1421
  versionId: string;
1458
1422
  order: number;
1423
+ content: string;
1424
+ status: "active" | "inactive";
1459
1425
  createdAt: string;
1426
+ updatedAt: string;
1427
+ deletedAt?: string | null;
1460
1428
  }>;
1461
1429
  readonly update: (instructionId: string, payload: UpdateInstructionRequest) => Promise<{
1462
1430
  id: string;
1431
+ agentId: string;
1463
1432
  versionId: string;
1464
1433
  order: number;
1465
1434
  content: string;
1466
- createdAt?: string;
1467
- updatedAt?: string;
1435
+ status: "active" | "inactive";
1436
+ createdAt: string;
1437
+ updatedAt: string;
1438
+ deletedAt?: string | null;
1468
1439
  }>;
1469
1440
  readonly delete: (instructionId: string) => Promise<void>;
1470
1441
  };
@@ -1481,7 +1452,6 @@ type AgentSnapshot = AgentDetail | AgentSummary;
1481
1452
  declare const createAgentEntity: (dto: AgentSnapshot, options: AgentEntityFactoryOptions) => AgentEntity;
1482
1453
 
1483
1454
  type AgentEntityDependencies = {
1484
- instructionsApi: ReturnType<typeof createAgentInstructionsApi>;
1485
1455
  tagsApi: ReturnType<typeof createAgentTagsApi>;
1486
1456
  phonesApi: ReturnType<typeof createAgentPhonesApi>;
1487
1457
  scheduleApi: ReturnType<typeof createAgentScheduleApi>;
@@ -1647,12 +1617,6 @@ declare function createClient(initialCfg: ClientConfig & {
1647
1617
  scoped(id: string): any;
1648
1618
  };
1649
1619
  agents: {
1650
- instructions: {
1651
- list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
1652
- create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
1653
- update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
1654
- delete(agentId: string, instructionId: string): Promise<void>;
1655
- } & ((agentId: string) => ReturnType<typeof bindAgentInstructions>);
1656
1620
  tags: {
1657
1621
  readonly add: (agentId: string, payload: AgentTagRequest) => Promise<AgentTagsResponse>;
1658
1622
  readonly remove: (agentId: string, tagId: string) => Promise<void>;
@@ -1755,12 +1719,6 @@ declare function createClient(initialCfg: ClientConfig & {
1755
1719
  };
1756
1720
  };
1757
1721
  agents: {
1758
- instructions: {
1759
- list(agentId: string, opts?: ListAgentInstructionsOptions): Promise<PaginatedResult<InstructionListResponse, ListAgentInstructionsOptions>>;
1760
- create(agentId: string, payload: CreateInstructionRequest): Promise<InstructionCreatedResponse>;
1761
- update(agentId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
1762
- delete(agentId: string, instructionId: string): Promise<void>;
1763
- } & ((agentId: string) => ReturnType<typeof bindAgentInstructions>);
1764
1722
  tags: {
1765
1723
  readonly add: (agentId: string, payload: AgentTagRequest) => Promise<AgentTagsResponse>;
1766
1724
  readonly remove: (agentId: string, tagId: string) => Promise<void>;
@@ -1885,4 +1843,4 @@ declare function createHttp(cfg: ClientConfig & {
1885
1843
  resolveAccessToken: () => string;
1886
1844
  };
1887
1845
 
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 };
1846
+ 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 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, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
package/dist/index.js CHANGED
@@ -347,6 +347,27 @@ function createAgentBlueprintsApi(cfg) {
347
347
  };
348
348
  }
349
349
 
350
+ // src/api/agent-phones.ts
351
+ function createAgentPhonesApi(cfg) {
352
+ const { base, doFetch } = createHttp(cfg);
353
+ const jsonHeaders = { "content-type": "application/json" };
354
+ return {
355
+ async connect(agentId, payload) {
356
+ const res = await doFetch(`${base}/agents/${agentId}/phones`, {
357
+ method: "POST",
358
+ headers: jsonHeaders,
359
+ body: JSON.stringify(payload)
360
+ });
361
+ return res.json();
362
+ },
363
+ async disconnect(agentId, phoneId) {
364
+ await doFetch(`${base}/agents/${agentId}/phones/${phoneId}`, {
365
+ method: "DELETE"
366
+ });
367
+ }
368
+ };
369
+ }
370
+
350
371
  // src/utils/pagination.ts
351
372
  var toNumber = (value) => {
352
373
  return typeof value === "number" ? value : void 0;
@@ -439,76 +460,6 @@ function attachPaginator(response, fetchPage, options) {
439
460
  });
440
461
  }
441
462
 
442
- // src/api/agent-instructions.ts
443
- function createAgentInstructionsApi(cfg) {
444
- const { base, doFetch } = createHttp(cfg);
445
- const jsonHeaders = { "content-type": "application/json" };
446
- const fetchInstructionPage = async (agentId, opts = {}) => {
447
- const { versionId, ...queryOptions } = opts ?? {};
448
- const query = serializeListOptions(queryOptions, { versionId });
449
- const res = await doFetch(`${base}/agents/${agentId}/instructions`, {
450
- method: "GET",
451
- query
452
- });
453
- return res.json();
454
- };
455
- return {
456
- async list(agentId, opts = {}) {
457
- const normalizedOptions = {
458
- ...opts ?? {}
459
- };
460
- const fetchPage = (options) => fetchInstructionPage(agentId, options);
461
- const response = await fetchPage(normalizedOptions);
462
- return attachPaginator(response, fetchPage, normalizedOptions);
463
- },
464
- async create(agentId, payload) {
465
- const res = await doFetch(`${base}/agents/${agentId}/instructions`, {
466
- method: "POST",
467
- headers: jsonHeaders,
468
- body: JSON.stringify(payload)
469
- });
470
- return res.json();
471
- },
472
- async update(agentId, instructionId, payload) {
473
- const res = await doFetch(
474
- `${base}/agents/${agentId}/instructions/${instructionId}`,
475
- {
476
- method: "PATCH",
477
- headers: jsonHeaders,
478
- body: JSON.stringify(payload)
479
- }
480
- );
481
- return res.json();
482
- },
483
- async delete(agentId, instructionId) {
484
- await doFetch(`${base}/agents/${agentId}/instructions/${instructionId}`, {
485
- method: "DELETE"
486
- });
487
- }
488
- };
489
- }
490
-
491
- // src/api/agent-phones.ts
492
- function createAgentPhonesApi(cfg) {
493
- const { base, doFetch } = createHttp(cfg);
494
- const jsonHeaders = { "content-type": "application/json" };
495
- return {
496
- async connect(agentId, payload) {
497
- const res = await doFetch(`${base}/agents/${agentId}/phones`, {
498
- method: "POST",
499
- headers: jsonHeaders,
500
- body: JSON.stringify(payload)
501
- });
502
- return res.json();
503
- },
504
- async disconnect(agentId, phoneId) {
505
- await doFetch(`${base}/agents/${agentId}/phones/${phoneId}`, {
506
- method: "DELETE"
507
- });
508
- }
509
- };
510
- }
511
-
512
463
  // src/api/agent-schedule-exceptions.ts
513
464
  function createAgentScheduleExceptionsApi(cfg) {
514
465
  const { base, doFetch } = createHttp(cfg);
@@ -898,20 +849,6 @@ function createAgentVersionsApi(cfg) {
898
849
  }
899
850
 
900
851
  // src/entities/agent.ts
901
- var bindAgentInstructions = (api, agentId) => ({
902
- list(opts) {
903
- return api.list(agentId, opts);
904
- },
905
- create(payload) {
906
- return api.create(agentId, payload);
907
- },
908
- update(instructionId, payload) {
909
- return api.update(agentId, instructionId, payload);
910
- },
911
- delete(instructionId) {
912
- return api.delete(agentId, instructionId);
913
- }
914
- });
915
852
  var bindAgentStageTriggers = (api, agentId, blueprintId, stageId) => ({
916
853
  list(opts) {
917
854
  return api.list(agentId, blueprintId, stageId, opts);
@@ -1083,7 +1020,6 @@ var bindAgentBlueprints = (api, agentId) => ({
1083
1020
  });
1084
1021
  var createAgentEntity = (dto, options) => {
1085
1022
  const {
1086
- instructionsApi,
1087
1023
  tagsApi,
1088
1024
  phonesApi,
1089
1025
  scheduleApi,
@@ -1098,7 +1034,6 @@ var createAgentEntity = (dto, options) => {
1098
1034
  } = options;
1099
1035
  const entity = {
1100
1036
  ...dto,
1101
- instructions: bindAgentInstructions(instructionsApi, dto.agentId),
1102
1037
  tagAssignments: bindAgentTags(tagsApi, dto.agentId),
1103
1038
  phones: bindAgentPhones(phonesApi, dto.agentId),
1104
1039
  schedule: bindAgentSchedule(
@@ -1195,7 +1130,6 @@ function createAgentsApi(cfg, relatedApis) {
1195
1130
  return baseApi;
1196
1131
  }
1197
1132
  const wrapAgent = (detail) => createAgentEntity(detail, {
1198
- instructionsApi: relatedApis.instructionsApi,
1199
1133
  tagsApi: relatedApis.tagsApi,
1200
1134
  phonesApi: relatedApis.phonesApi,
1201
1135
  scheduleApi: relatedApis.scheduleApi,
@@ -1859,7 +1793,6 @@ function createClient(initialCfg) {
1859
1793
  const setAccessTokenGetter = (getter) => {
1860
1794
  runtimeCfg.getAccessToken = getter;
1861
1795
  };
1862
- const instructionsApi = createAgentInstructionsApi(runtimeCfg);
1863
1796
  const tagsApi = createAgentTagsApi(runtimeCfg);
1864
1797
  const phonesApi = createAgentPhonesApi(runtimeCfg);
1865
1798
  const scheduleApi = createAgentScheduleApi(runtimeCfg);
@@ -1874,7 +1807,6 @@ function createClient(initialCfg) {
1874
1807
  const catalogTemplatesApi = createCatalogTemplatesApi(runtimeCfg);
1875
1808
  const webhooksApi = createWebhooksApi(runtimeCfg);
1876
1809
  const agentsApi = createAgentsApi(runtimeCfg, {
1877
- instructionsApi,
1878
1810
  tagsApi,
1879
1811
  phonesApi,
1880
1812
  scheduleApi,
@@ -1884,10 +1816,6 @@ function createClient(initialCfg) {
1884
1816
  stagesApi,
1885
1817
  stageTriggersApi
1886
1818
  });
1887
- const instructionsNamespace = Object.assign(
1888
- (agentId) => bindAgentInstructions(instructionsApi, agentId),
1889
- instructionsApi
1890
- );
1891
1819
  const tagsNamespace = Object.assign(
1892
1820
  (agentId) => bindAgentTags(tagsApi, agentId),
1893
1821
  tagsApi
@@ -1929,7 +1857,6 @@ function createClient(initialCfg) {
1929
1857
  const apis = {
1930
1858
  agents: {
1931
1859
  ...agentsApi,
1932
- instructions: instructionsNamespace,
1933
1860
  tags: tagsNamespace,
1934
1861
  phones: phonesNamespace,
1935
1862
  schedule: scheduleNamespace,
@@ -2007,7 +1934,6 @@ export {
2007
1934
  NetworkError,
2008
1935
  TimeoutError,
2009
1936
  bindAgentBlueprints,
2010
- bindAgentInstructions,
2011
1937
  bindAgentPhones,
2012
1938
  bindAgentSchedule,
2013
1939
  bindAgentScheduleExceptions,
@@ -2017,7 +1943,6 @@ export {
2017
1943
  bindAgentVersions,
2018
1944
  createAgentBlueprintsApi,
2019
1945
  createAgentEntity,
2020
- createAgentInstructionsApi,
2021
1946
  createAgentPhonesApi,
2022
1947
  createAgentScheduleApi,
2023
1948
  createAgentScheduleExceptionsApi,