@getsupervisor/agents-studio-sdk 1.36.1 → 1.37.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
@@ -469,7 +469,6 @@ type components = {
469
469
  };
470
470
  };
471
471
  ExecuteToolRequest: {
472
- workspaceId: string;
473
472
  agentId: string;
474
473
  action: string;
475
474
  args?: {
@@ -844,7 +843,14 @@ type CreateApiKeyRequest = {
844
843
  type CreateApiKeyResponse = ApiKeySummary & {
845
844
  key: string;
846
845
  };
847
- type AgentSchedule = components['schemas']['AgentSchedule'];
846
+ type AgentScheduleSchema = components['schemas']['AgentSchedule'];
847
+ type AgentSchedule = AgentScheduleSchema & {
848
+ id: string;
849
+ };
850
+ type AgentScheduleListResponse = {
851
+ data: AgentSchedule[];
852
+ meta: PaginationMeta;
853
+ };
848
854
  type UpdateAgentScheduleRequest = components['schemas']['UpdateAgentScheduleRequest'];
849
855
  type AgentScheduleException = components['schemas']['AgentScheduleException'];
850
856
  type AgentScheduleExceptionListResponse = components['schemas']['AgentScheduleExceptionListResponse'];
@@ -1023,13 +1029,16 @@ declare function createAgentScheduleExceptionsApi(cfg: ClientConfig & {
1023
1029
  delete(agentId: string, exceptionId: string): Promise<void>;
1024
1030
  };
1025
1031
 
1026
- declare function createAgentScheduleApi(cfg: ClientConfig & {
1027
- retry?: RetryPolicy;
1028
- }): {
1029
- get(agentId: string): Promise<AgentSchedule>;
1032
+ type ListAgentSchedulesOptions = ListQueryOptions;
1033
+ type AgentScheduleApi = {
1034
+ list(agentId: string, options?: ListAgentSchedulesOptions): Promise<PaginatedResult<AgentScheduleListResponse, ListAgentSchedulesOptions>>;
1035
+ get(agentId: string, scheduleId: string): Promise<AgentSchedule>;
1030
1036
  create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1031
- update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1037
+ update(agentId: string, scheduleId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1032
1038
  };
1039
+ declare function createAgentScheduleApi(cfg: ClientConfig & {
1040
+ retry?: RetryPolicy;
1041
+ }): AgentScheduleApi;
1033
1042
 
1034
1043
  type ListAgentStageTriggersOptions = ListQueryOptions;
1035
1044
  type AgentStageTriggersApi$1 = {
@@ -1082,15 +1091,15 @@ declare function createAgentVersionsApi(cfg: ClientConfig & {
1082
1091
 
1083
1092
  type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
1084
1093
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
1085
- type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
1086
1094
  type AgentScheduleExceptionsApi = ReturnType<typeof createAgentScheduleExceptionsApi>;
1095
+ type AgentSchedulesApi = AgentScheduleApi;
1087
1096
  type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
1088
1097
  type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
1089
1098
  type AgentStagesApi = ReturnType<typeof createAgentStagesApi>;
1090
1099
  type AgentStageTriggersApi = ReturnType<typeof createAgentStageTriggersApi>;
1091
1100
  type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
1092
1101
  type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
1093
- type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
1102
+ type AgentSchedulesHelper = ReturnType<typeof bindAgentSchedules>;
1094
1103
  type AgentVersionsHelper = ReturnType<typeof bindAgentVersions>;
1095
1104
  type AgentBlueprintsHelper = ReturnType<typeof bindAgentBlueprints>;
1096
1105
  type AgentStageTriggersHelper = ReturnType<typeof bindAgentStageTriggers>;
@@ -1100,7 +1109,8 @@ interface AgentEntity extends AgentBase {
1100
1109
  agentId: string;
1101
1110
  tagAssignments: AgentTagsHelper;
1102
1111
  phones: AgentPhonesHelper;
1103
- schedule: AgentScheduleHelper;
1112
+ schedule: AgentSchedulesHelper;
1113
+ schedules: AgentSchedulesHelper;
1104
1114
  versions: AgentVersionsHelper;
1105
1115
  blueprints: AgentBlueprintsHelper;
1106
1116
  stages: AgentStagesHelper;
@@ -1111,7 +1121,7 @@ interface AgentEntity extends AgentBase {
1111
1121
  type AgentEntityFactoryOptions = {
1112
1122
  tagsApi: AgentTagsApi;
1113
1123
  phonesApi: AgentPhonesApi;
1114
- scheduleApi: AgentScheduleApi;
1124
+ scheduleApi: AgentSchedulesApi;
1115
1125
  scheduleExceptionsApi: AgentScheduleExceptionsApi;
1116
1126
  versionsApi: AgentVersionsApi;
1117
1127
  blueprintsApi: AgentBlueprintsApi;
@@ -1252,46 +1262,81 @@ declare const bindAgentScheduleExceptions: (api: AgentScheduleExceptionsApi, age
1252
1262
  }>;
1253
1263
  delete(exceptionId: string): Promise<void>;
1254
1264
  };
1255
- declare const bindAgentSchedule: (scheduleApi: AgentScheduleApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
1256
- get(): Promise<{
1257
- agentId: string;
1258
- isEnabled: boolean;
1259
- timezone: string;
1260
- outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
1261
- outOfHoursMessage?: string | null;
1262
- rules: components["schemas"]["AgentScheduleRule"][];
1263
- metadata?: {
1264
- [key: string]: unknown;
1265
- };
1266
- createdAt: string;
1267
- updatedAt: string;
1268
- }>;
1269
- create(payload: UpdateAgentScheduleRequest): Promise<{
1270
- agentId: string;
1271
- isEnabled: boolean;
1272
- timezone: string;
1273
- outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
1274
- outOfHoursMessage?: string | null;
1275
- rules: components["schemas"]["AgentScheduleRule"][];
1276
- metadata?: {
1277
- [key: string]: unknown;
1278
- };
1279
- createdAt: string;
1280
- updatedAt: string;
1281
- }>;
1282
- update(payload: UpdateAgentScheduleRequest): Promise<{
1283
- agentId: string;
1284
- isEnabled: boolean;
1285
- timezone: string;
1286
- outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
1287
- outOfHoursMessage?: string | null;
1288
- rules: components["schemas"]["AgentScheduleRule"][];
1289
- metadata?: {
1290
- [key: string]: unknown;
1291
- };
1292
- createdAt: string;
1293
- updatedAt: string;
1294
- }>;
1265
+ declare const bindAgentSchedules: (scheduleApi: AgentSchedulesApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
1266
+ list(options?: ListAgentSchedulesOptions): Promise<PaginatedResult<AgentScheduleListResponse, Partial<{
1267
+ page: number;
1268
+ limit: number;
1269
+ sort: string | string[];
1270
+ fields: string | string[];
1271
+ include: string | string[];
1272
+ search: string;
1273
+ filter: QueryFilters | QueryBuilderInput;
1274
+ or: QueryOrGroups | QueryBuilderInput;
1275
+ }>>>;
1276
+ get(scheduleId: string): Promise<AgentSchedule>;
1277
+ create(payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1278
+ update(scheduleId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1279
+ exceptions: {
1280
+ list(opts?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<{
1281
+ data: components["schemas"]["AgentScheduleException"][];
1282
+ meta: components["schemas"]["PaginationMeta"];
1283
+ }, Partial<{
1284
+ page: number;
1285
+ limit: number;
1286
+ sort: string | string[];
1287
+ fields: string | string[];
1288
+ include: string | string[];
1289
+ search: string;
1290
+ filter: QueryFilters | QueryBuilderInput;
1291
+ or: QueryOrGroups | QueryBuilderInput;
1292
+ }>>>;
1293
+ get(exceptionId: string): Promise<{
1294
+ id: string;
1295
+ agentId: string;
1296
+ exceptionDate: string;
1297
+ isClosed: boolean;
1298
+ startTime?: string | null;
1299
+ endTime?: string | null;
1300
+ reason?: string | null;
1301
+ createdAt: string;
1302
+ }>;
1303
+ create(payload: CreateAgentScheduleExceptionRequest): Promise<{
1304
+ id: string;
1305
+ agentId: string;
1306
+ exceptionDate: string;
1307
+ isClosed: boolean;
1308
+ startTime?: string | null;
1309
+ endTime?: string | null;
1310
+ reason?: string | null;
1311
+ createdAt: string;
1312
+ }>;
1313
+ update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<{
1314
+ id: string;
1315
+ agentId: string;
1316
+ exceptionDate: string;
1317
+ isClosed: boolean;
1318
+ startTime?: string | null;
1319
+ endTime?: string | null;
1320
+ reason?: string | null;
1321
+ createdAt: string;
1322
+ }>;
1323
+ delete(exceptionId: string): Promise<void>;
1324
+ };
1325
+ };
1326
+ declare const bindAgentSchedule: (scheduleApi: AgentSchedulesApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
1327
+ list(options?: ListAgentSchedulesOptions): Promise<PaginatedResult<AgentScheduleListResponse, Partial<{
1328
+ page: number;
1329
+ limit: number;
1330
+ sort: string | string[];
1331
+ fields: string | string[];
1332
+ include: string | string[];
1333
+ search: string;
1334
+ filter: QueryFilters | QueryBuilderInput;
1335
+ or: QueryOrGroups | QueryBuilderInput;
1336
+ }>>>;
1337
+ get(scheduleId: string): Promise<AgentSchedule>;
1338
+ create(payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1339
+ update(scheduleId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1295
1340
  exceptions: {
1296
1341
  list(opts?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<{
1297
1342
  data: components["schemas"]["AgentScheduleException"][];
@@ -1624,11 +1669,16 @@ declare function createClient(initialCfg: ClientConfig & {
1624
1669
  connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
1625
1670
  disconnect(agentId: string, phoneId: string): Promise<void>;
1626
1671
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
1627
- schedule: {
1628
- get(agentId: string): Promise<AgentSchedule>;
1629
- create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1630
- update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1631
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
1672
+ schedule: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1673
+ exceptions: {
1674
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1675
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
1676
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1677
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1678
+ delete(agentId: string, exceptionId: string): Promise<void>;
1679
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
1680
+ };
1681
+ schedules: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1632
1682
  exceptions: {
1633
1683
  list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1634
1684
  get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
@@ -1726,11 +1776,16 @@ declare function createClient(initialCfg: ClientConfig & {
1726
1776
  connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
1727
1777
  disconnect(agentId: string, phoneId: string): Promise<void>;
1728
1778
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
1729
- schedule: {
1730
- get(agentId: string): Promise<AgentSchedule>;
1731
- create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1732
- update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1733
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
1779
+ schedule: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1780
+ exceptions: {
1781
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1782
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
1783
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1784
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1785
+ delete(agentId: string, exceptionId: string): Promise<void>;
1786
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
1787
+ };
1788
+ schedules: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1734
1789
  exceptions: {
1735
1790
  list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1736
1791
  get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
@@ -1842,4 +1897,4 @@ declare function createHttp(cfg: ClientConfig & {
1842
1897
  resolveAccessToken: () => string;
1843
1898
  };
1844
1899
 
1845
- 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 };
1900
+ 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 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 ListAgentSchedulesOptions, 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, bindAgentSchedules, 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
@@ -469,7 +469,6 @@ type components = {
469
469
  };
470
470
  };
471
471
  ExecuteToolRequest: {
472
- workspaceId: string;
473
472
  agentId: string;
474
473
  action: string;
475
474
  args?: {
@@ -844,7 +843,14 @@ type CreateApiKeyRequest = {
844
843
  type CreateApiKeyResponse = ApiKeySummary & {
845
844
  key: string;
846
845
  };
847
- type AgentSchedule = components['schemas']['AgentSchedule'];
846
+ type AgentScheduleSchema = components['schemas']['AgentSchedule'];
847
+ type AgentSchedule = AgentScheduleSchema & {
848
+ id: string;
849
+ };
850
+ type AgentScheduleListResponse = {
851
+ data: AgentSchedule[];
852
+ meta: PaginationMeta;
853
+ };
848
854
  type UpdateAgentScheduleRequest = components['schemas']['UpdateAgentScheduleRequest'];
849
855
  type AgentScheduleException = components['schemas']['AgentScheduleException'];
850
856
  type AgentScheduleExceptionListResponse = components['schemas']['AgentScheduleExceptionListResponse'];
@@ -1023,13 +1029,16 @@ declare function createAgentScheduleExceptionsApi(cfg: ClientConfig & {
1023
1029
  delete(agentId: string, exceptionId: string): Promise<void>;
1024
1030
  };
1025
1031
 
1026
- declare function createAgentScheduleApi(cfg: ClientConfig & {
1027
- retry?: RetryPolicy;
1028
- }): {
1029
- get(agentId: string): Promise<AgentSchedule>;
1032
+ type ListAgentSchedulesOptions = ListQueryOptions;
1033
+ type AgentScheduleApi = {
1034
+ list(agentId: string, options?: ListAgentSchedulesOptions): Promise<PaginatedResult<AgentScheduleListResponse, ListAgentSchedulesOptions>>;
1035
+ get(agentId: string, scheduleId: string): Promise<AgentSchedule>;
1030
1036
  create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1031
- update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1037
+ update(agentId: string, scheduleId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1032
1038
  };
1039
+ declare function createAgentScheduleApi(cfg: ClientConfig & {
1040
+ retry?: RetryPolicy;
1041
+ }): AgentScheduleApi;
1033
1042
 
1034
1043
  type ListAgentStageTriggersOptions = ListQueryOptions;
1035
1044
  type AgentStageTriggersApi$1 = {
@@ -1082,15 +1091,15 @@ declare function createAgentVersionsApi(cfg: ClientConfig & {
1082
1091
 
1083
1092
  type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
1084
1093
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
1085
- type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
1086
1094
  type AgentScheduleExceptionsApi = ReturnType<typeof createAgentScheduleExceptionsApi>;
1095
+ type AgentSchedulesApi = AgentScheduleApi;
1087
1096
  type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
1088
1097
  type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
1089
1098
  type AgentStagesApi = ReturnType<typeof createAgentStagesApi>;
1090
1099
  type AgentStageTriggersApi = ReturnType<typeof createAgentStageTriggersApi>;
1091
1100
  type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
1092
1101
  type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
1093
- type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
1102
+ type AgentSchedulesHelper = ReturnType<typeof bindAgentSchedules>;
1094
1103
  type AgentVersionsHelper = ReturnType<typeof bindAgentVersions>;
1095
1104
  type AgentBlueprintsHelper = ReturnType<typeof bindAgentBlueprints>;
1096
1105
  type AgentStageTriggersHelper = ReturnType<typeof bindAgentStageTriggers>;
@@ -1100,7 +1109,8 @@ interface AgentEntity extends AgentBase {
1100
1109
  agentId: string;
1101
1110
  tagAssignments: AgentTagsHelper;
1102
1111
  phones: AgentPhonesHelper;
1103
- schedule: AgentScheduleHelper;
1112
+ schedule: AgentSchedulesHelper;
1113
+ schedules: AgentSchedulesHelper;
1104
1114
  versions: AgentVersionsHelper;
1105
1115
  blueprints: AgentBlueprintsHelper;
1106
1116
  stages: AgentStagesHelper;
@@ -1111,7 +1121,7 @@ interface AgentEntity extends AgentBase {
1111
1121
  type AgentEntityFactoryOptions = {
1112
1122
  tagsApi: AgentTagsApi;
1113
1123
  phonesApi: AgentPhonesApi;
1114
- scheduleApi: AgentScheduleApi;
1124
+ scheduleApi: AgentSchedulesApi;
1115
1125
  scheduleExceptionsApi: AgentScheduleExceptionsApi;
1116
1126
  versionsApi: AgentVersionsApi;
1117
1127
  blueprintsApi: AgentBlueprintsApi;
@@ -1252,46 +1262,81 @@ declare const bindAgentScheduleExceptions: (api: AgentScheduleExceptionsApi, age
1252
1262
  }>;
1253
1263
  delete(exceptionId: string): Promise<void>;
1254
1264
  };
1255
- declare const bindAgentSchedule: (scheduleApi: AgentScheduleApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
1256
- get(): Promise<{
1257
- agentId: string;
1258
- isEnabled: boolean;
1259
- timezone: string;
1260
- outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
1261
- outOfHoursMessage?: string | null;
1262
- rules: components["schemas"]["AgentScheduleRule"][];
1263
- metadata?: {
1264
- [key: string]: unknown;
1265
- };
1266
- createdAt: string;
1267
- updatedAt: string;
1268
- }>;
1269
- create(payload: UpdateAgentScheduleRequest): Promise<{
1270
- agentId: string;
1271
- isEnabled: boolean;
1272
- timezone: string;
1273
- outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
1274
- outOfHoursMessage?: string | null;
1275
- rules: components["schemas"]["AgentScheduleRule"][];
1276
- metadata?: {
1277
- [key: string]: unknown;
1278
- };
1279
- createdAt: string;
1280
- updatedAt: string;
1281
- }>;
1282
- update(payload: UpdateAgentScheduleRequest): Promise<{
1283
- agentId: string;
1284
- isEnabled: boolean;
1285
- timezone: string;
1286
- outOfHoursBehavior: "offline" | "limited-service" | "auto-message";
1287
- outOfHoursMessage?: string | null;
1288
- rules: components["schemas"]["AgentScheduleRule"][];
1289
- metadata?: {
1290
- [key: string]: unknown;
1291
- };
1292
- createdAt: string;
1293
- updatedAt: string;
1294
- }>;
1265
+ declare const bindAgentSchedules: (scheduleApi: AgentSchedulesApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
1266
+ list(options?: ListAgentSchedulesOptions): Promise<PaginatedResult<AgentScheduleListResponse, Partial<{
1267
+ page: number;
1268
+ limit: number;
1269
+ sort: string | string[];
1270
+ fields: string | string[];
1271
+ include: string | string[];
1272
+ search: string;
1273
+ filter: QueryFilters | QueryBuilderInput;
1274
+ or: QueryOrGroups | QueryBuilderInput;
1275
+ }>>>;
1276
+ get(scheduleId: string): Promise<AgentSchedule>;
1277
+ create(payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1278
+ update(scheduleId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1279
+ exceptions: {
1280
+ list(opts?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<{
1281
+ data: components["schemas"]["AgentScheduleException"][];
1282
+ meta: components["schemas"]["PaginationMeta"];
1283
+ }, Partial<{
1284
+ page: number;
1285
+ limit: number;
1286
+ sort: string | string[];
1287
+ fields: string | string[];
1288
+ include: string | string[];
1289
+ search: string;
1290
+ filter: QueryFilters | QueryBuilderInput;
1291
+ or: QueryOrGroups | QueryBuilderInput;
1292
+ }>>>;
1293
+ get(exceptionId: string): Promise<{
1294
+ id: string;
1295
+ agentId: string;
1296
+ exceptionDate: string;
1297
+ isClosed: boolean;
1298
+ startTime?: string | null;
1299
+ endTime?: string | null;
1300
+ reason?: string | null;
1301
+ createdAt: string;
1302
+ }>;
1303
+ create(payload: CreateAgentScheduleExceptionRequest): Promise<{
1304
+ id: string;
1305
+ agentId: string;
1306
+ exceptionDate: string;
1307
+ isClosed: boolean;
1308
+ startTime?: string | null;
1309
+ endTime?: string | null;
1310
+ reason?: string | null;
1311
+ createdAt: string;
1312
+ }>;
1313
+ update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<{
1314
+ id: string;
1315
+ agentId: string;
1316
+ exceptionDate: string;
1317
+ isClosed: boolean;
1318
+ startTime?: string | null;
1319
+ endTime?: string | null;
1320
+ reason?: string | null;
1321
+ createdAt: string;
1322
+ }>;
1323
+ delete(exceptionId: string): Promise<void>;
1324
+ };
1325
+ };
1326
+ declare const bindAgentSchedule: (scheduleApi: AgentSchedulesApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
1327
+ list(options?: ListAgentSchedulesOptions): Promise<PaginatedResult<AgentScheduleListResponse, Partial<{
1328
+ page: number;
1329
+ limit: number;
1330
+ sort: string | string[];
1331
+ fields: string | string[];
1332
+ include: string | string[];
1333
+ search: string;
1334
+ filter: QueryFilters | QueryBuilderInput;
1335
+ or: QueryOrGroups | QueryBuilderInput;
1336
+ }>>>;
1337
+ get(scheduleId: string): Promise<AgentSchedule>;
1338
+ create(payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1339
+ update(scheduleId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1295
1340
  exceptions: {
1296
1341
  list(opts?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<{
1297
1342
  data: components["schemas"]["AgentScheduleException"][];
@@ -1624,11 +1669,16 @@ declare function createClient(initialCfg: ClientConfig & {
1624
1669
  connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
1625
1670
  disconnect(agentId: string, phoneId: string): Promise<void>;
1626
1671
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
1627
- schedule: {
1628
- get(agentId: string): Promise<AgentSchedule>;
1629
- create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1630
- update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1631
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
1672
+ schedule: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1673
+ exceptions: {
1674
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1675
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
1676
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1677
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1678
+ delete(agentId: string, exceptionId: string): Promise<void>;
1679
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
1680
+ };
1681
+ schedules: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1632
1682
  exceptions: {
1633
1683
  list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1634
1684
  get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
@@ -1726,11 +1776,16 @@ declare function createClient(initialCfg: ClientConfig & {
1726
1776
  connect(agentId: string, payload: ConnectPhoneRequest): Promise<PhoneAssignmentResponse>;
1727
1777
  disconnect(agentId: string, phoneId: string): Promise<void>;
1728
1778
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
1729
- schedule: {
1730
- get(agentId: string): Promise<AgentSchedule>;
1731
- create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1732
- update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
1733
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
1779
+ schedule: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1780
+ exceptions: {
1781
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1782
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
1783
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1784
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
1785
+ delete(agentId: string, exceptionId: string): Promise<void>;
1786
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
1787
+ };
1788
+ schedules: AgentScheduleApi & ((agentId: string) => ReturnType<typeof bindAgentSchedules>) & {
1734
1789
  exceptions: {
1735
1790
  list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
1736
1791
  get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
@@ -1842,4 +1897,4 @@ declare function createHttp(cfg: ClientConfig & {
1842
1897
  resolveAccessToken: () => string;
1843
1898
  };
1844
1899
 
1845
- 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 };
1900
+ 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 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 ListAgentSchedulesOptions, 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, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };