@getsupervisor/agents-studio-sdk 1.14.0 → 1.15.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
@@ -21,6 +21,10 @@ type components = {
21
21
  AgentScheduleRule: external['components/schemas.yaml']['AgentScheduleRule'];
22
22
  AgentSchedule: external['components/schemas.yaml']['AgentSchedule'];
23
23
  UpdateAgentScheduleRequest: external['components/schemas.yaml']['UpdateAgentScheduleRequest'];
24
+ AgentScheduleException: external['components/schemas.yaml']['AgentScheduleException'];
25
+ AgentScheduleExceptionListResponse: external['components/schemas.yaml']['AgentScheduleExceptionListResponse'];
26
+ CreateAgentScheduleExceptionRequest: external['components/schemas.yaml']['CreateAgentScheduleExceptionRequest'];
27
+ UpdateAgentScheduleExceptionRequest: external['components/schemas.yaml']['UpdateAgentScheduleExceptionRequest'];
24
28
  AgentVersionSummary: external['components/schemas.yaml']['AgentVersionSummary'];
25
29
  AgentVersionDetail: external['components/schemas.yaml']['AgentVersionDetail'];
26
30
  AgentVersionListResponse: external['components/schemas.yaml']['AgentVersionListResponse'];
@@ -57,6 +61,7 @@ type components = {
57
61
  AgentId: external['components/parameters.yaml']['AgentId'];
58
62
  PhoneId: external['components/parameters.yaml']['PhoneId'];
59
63
  InstructionId: external['components/parameters.yaml']['InstructionId'];
64
+ ExceptionId: external['components/parameters.yaml']['ExceptionId'];
60
65
  VersionId: external['components/parameters.yaml']['VersionId'];
61
66
  TagId: external['components/parameters.yaml']['TagId'];
62
67
  WorkspaceId: external['components/parameters.yaml']['WorkspaceId'];
@@ -102,9 +107,19 @@ type external = {
102
107
  'paths/agents/agent-phones.yaml': {
103
108
  post: unknown;
104
109
  };
110
+ 'paths/agents/agent-schedule-exception-by-id.yaml': {
111
+ get: unknown;
112
+ patch: unknown;
113
+ delete: unknown;
114
+ };
115
+ 'paths/agents/agent-schedule-exceptions.yaml': {
116
+ get: unknown;
117
+ post: unknown;
118
+ };
105
119
  'paths/agents/agent-schedule.yaml': {
106
120
  get: unknown;
107
121
  put: unknown;
122
+ post: unknown;
108
123
  };
109
124
  'paths/agents/agent-tag-by-id.yaml': {
110
125
  delete: unknown;
@@ -272,6 +287,10 @@ type CreateApiKeyResponse = ApiKeySummary & {
272
287
  };
273
288
  type AgentSchedule = components['schemas']['AgentSchedule'];
274
289
  type UpdateAgentScheduleRequest = components['schemas']['UpdateAgentScheduleRequest'];
290
+ type AgentScheduleException = components['schemas']['AgentScheduleException'];
291
+ type AgentScheduleExceptionListResponse = components['schemas']['AgentScheduleExceptionListResponse'];
292
+ type CreateAgentScheduleExceptionRequest = components['schemas']['CreateAgentScheduleExceptionRequest'];
293
+ type UpdateAgentScheduleExceptionRequest = components['schemas']['UpdateAgentScheduleExceptionRequest'];
275
294
  type AgentVersionSummary = components['schemas']['AgentVersionSummary'];
276
295
  type AgentVersionDetail = components['schemas']['AgentVersionDetail'];
277
296
  type AgentVersionListResponse = components['schemas']['AgentVersionListResponse'];
@@ -407,9 +426,21 @@ declare function createAgentScheduleApi(cfg: ClientConfig & {
407
426
  retry?: RetryPolicy;
408
427
  }): {
409
428
  get(agentId: string): Promise<AgentSchedule>;
429
+ create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
410
430
  update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
411
431
  };
412
432
 
433
+ type ListAgentScheduleExceptionsOptions = ListQueryOptions;
434
+ declare function createAgentScheduleExceptionsApi(cfg: ClientConfig & {
435
+ retry?: RetryPolicy;
436
+ }): {
437
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
438
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
439
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
440
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
441
+ delete(agentId: string, exceptionId: string): Promise<void>;
442
+ };
443
+
413
444
  declare function createAgentTagsApi(cfg: ClientConfig & {
414
445
  retry?: RetryPolicy;
415
446
  }): {
@@ -438,6 +469,7 @@ type AgentInstructionsApi = ReturnType<typeof createAgentInstructionsApi>;
438
469
  type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
439
470
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
440
471
  type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
472
+ type AgentScheduleExceptionsApi = ReturnType<typeof createAgentScheduleExceptionsApi>;
441
473
  type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
442
474
  type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
443
475
  type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
@@ -463,6 +495,7 @@ type AgentEntityFactoryOptions = {
463
495
  tagsApi: AgentTagsApi;
464
496
  phonesApi: AgentPhonesApi;
465
497
  scheduleApi: AgentScheduleApi;
498
+ scheduleExceptionsApi: AgentScheduleExceptionsApi;
466
499
  versionsApi: AgentVersionsApi;
467
500
  blueprintsApi: AgentBlueprintsApi;
468
501
  reload(agentId: string): Promise<AgentEntity>;
@@ -483,9 +516,24 @@ declare const bindAgentPhones: (api: AgentPhonesApi, agentId: string) => {
483
516
  connect(payload: ConnectPhoneRequest): Promise<any>;
484
517
  disconnect(phoneId: string): Promise<void>;
485
518
  };
486
- declare const bindAgentSchedule: (api: AgentScheduleApi, agentId: string) => {
519
+ declare const bindAgentScheduleExceptions: (api: AgentScheduleExceptionsApi, agentId: string) => {
520
+ list(opts?: ListAgentScheduleExceptionsOptions): Promise<any>;
521
+ get(exceptionId: string): Promise<any>;
522
+ create(payload: CreateAgentScheduleExceptionRequest): Promise<any>;
523
+ update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<any>;
524
+ delete(exceptionId: string): Promise<void>;
525
+ };
526
+ declare const bindAgentSchedule: (scheduleApi: AgentScheduleApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
487
527
  get(): Promise<any>;
528
+ create(payload: UpdateAgentScheduleRequest): Promise<any>;
488
529
  update(payload: UpdateAgentScheduleRequest): Promise<any>;
530
+ exceptions: {
531
+ list(opts?: ListAgentScheduleExceptionsOptions): Promise<any>;
532
+ get(exceptionId: string): Promise<any>;
533
+ create(payload: CreateAgentScheduleExceptionRequest): Promise<any>;
534
+ update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<any>;
535
+ delete(exceptionId: string): Promise<void>;
536
+ };
489
537
  };
490
538
  declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
491
539
  list(opts?: ListAgentVersionsOptions): Promise<any>;
@@ -517,6 +565,7 @@ type AgentEntityDependencies = {
517
565
  tagsApi: ReturnType<typeof createAgentTagsApi>;
518
566
  phonesApi: ReturnType<typeof createAgentPhonesApi>;
519
567
  scheduleApi: ReturnType<typeof createAgentScheduleApi>;
568
+ scheduleExceptionsApi: ReturnType<typeof createAgentScheduleExceptionsApi>;
520
569
  versionsApi: ReturnType<typeof createAgentVersionsApi>;
521
570
  blueprintsApi: ReturnType<typeof createAgentBlueprintsApi>;
522
571
  };
@@ -650,8 +699,17 @@ declare function createClient(initialCfg: ClientConfig & {
650
699
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
651
700
  schedule: {
652
701
  get(agentId: string): Promise<AgentSchedule>;
702
+ create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
653
703
  update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
654
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>);
704
+ } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
705
+ exceptions: {
706
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
707
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
708
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
709
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
710
+ delete(agentId: string, exceptionId: string): Promise<void>;
711
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
712
+ };
655
713
  versions: {
656
714
  list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
657
715
  get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
@@ -712,8 +770,17 @@ declare function createClient(initialCfg: ClientConfig & {
712
770
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
713
771
  schedule: {
714
772
  get(agentId: string): Promise<AgentSchedule>;
773
+ create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
715
774
  update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
716
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>);
775
+ } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
776
+ exceptions: {
777
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
778
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
779
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
780
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
781
+ delete(agentId: string, exceptionId: string): Promise<void>;
782
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
783
+ };
717
784
  versions: {
718
785
  list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
719
786
  get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
@@ -780,4 +847,4 @@ declare function createHttp(cfg: ClientConfig & {
780
847
  resolveAccessToken: () => string;
781
848
  };
782
849
 
783
- export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, 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 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 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 UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
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 };
package/dist/index.d.ts CHANGED
@@ -21,6 +21,10 @@ type components = {
21
21
  AgentScheduleRule: external['components/schemas.yaml']['AgentScheduleRule'];
22
22
  AgentSchedule: external['components/schemas.yaml']['AgentSchedule'];
23
23
  UpdateAgentScheduleRequest: external['components/schemas.yaml']['UpdateAgentScheduleRequest'];
24
+ AgentScheduleException: external['components/schemas.yaml']['AgentScheduleException'];
25
+ AgentScheduleExceptionListResponse: external['components/schemas.yaml']['AgentScheduleExceptionListResponse'];
26
+ CreateAgentScheduleExceptionRequest: external['components/schemas.yaml']['CreateAgentScheduleExceptionRequest'];
27
+ UpdateAgentScheduleExceptionRequest: external['components/schemas.yaml']['UpdateAgentScheduleExceptionRequest'];
24
28
  AgentVersionSummary: external['components/schemas.yaml']['AgentVersionSummary'];
25
29
  AgentVersionDetail: external['components/schemas.yaml']['AgentVersionDetail'];
26
30
  AgentVersionListResponse: external['components/schemas.yaml']['AgentVersionListResponse'];
@@ -57,6 +61,7 @@ type components = {
57
61
  AgentId: external['components/parameters.yaml']['AgentId'];
58
62
  PhoneId: external['components/parameters.yaml']['PhoneId'];
59
63
  InstructionId: external['components/parameters.yaml']['InstructionId'];
64
+ ExceptionId: external['components/parameters.yaml']['ExceptionId'];
60
65
  VersionId: external['components/parameters.yaml']['VersionId'];
61
66
  TagId: external['components/parameters.yaml']['TagId'];
62
67
  WorkspaceId: external['components/parameters.yaml']['WorkspaceId'];
@@ -102,9 +107,19 @@ type external = {
102
107
  'paths/agents/agent-phones.yaml': {
103
108
  post: unknown;
104
109
  };
110
+ 'paths/agents/agent-schedule-exception-by-id.yaml': {
111
+ get: unknown;
112
+ patch: unknown;
113
+ delete: unknown;
114
+ };
115
+ 'paths/agents/agent-schedule-exceptions.yaml': {
116
+ get: unknown;
117
+ post: unknown;
118
+ };
105
119
  'paths/agents/agent-schedule.yaml': {
106
120
  get: unknown;
107
121
  put: unknown;
122
+ post: unknown;
108
123
  };
109
124
  'paths/agents/agent-tag-by-id.yaml': {
110
125
  delete: unknown;
@@ -272,6 +287,10 @@ type CreateApiKeyResponse = ApiKeySummary & {
272
287
  };
273
288
  type AgentSchedule = components['schemas']['AgentSchedule'];
274
289
  type UpdateAgentScheduleRequest = components['schemas']['UpdateAgentScheduleRequest'];
290
+ type AgentScheduleException = components['schemas']['AgentScheduleException'];
291
+ type AgentScheduleExceptionListResponse = components['schemas']['AgentScheduleExceptionListResponse'];
292
+ type CreateAgentScheduleExceptionRequest = components['schemas']['CreateAgentScheduleExceptionRequest'];
293
+ type UpdateAgentScheduleExceptionRequest = components['schemas']['UpdateAgentScheduleExceptionRequest'];
275
294
  type AgentVersionSummary = components['schemas']['AgentVersionSummary'];
276
295
  type AgentVersionDetail = components['schemas']['AgentVersionDetail'];
277
296
  type AgentVersionListResponse = components['schemas']['AgentVersionListResponse'];
@@ -407,9 +426,21 @@ declare function createAgentScheduleApi(cfg: ClientConfig & {
407
426
  retry?: RetryPolicy;
408
427
  }): {
409
428
  get(agentId: string): Promise<AgentSchedule>;
429
+ create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
410
430
  update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
411
431
  };
412
432
 
433
+ type ListAgentScheduleExceptionsOptions = ListQueryOptions;
434
+ declare function createAgentScheduleExceptionsApi(cfg: ClientConfig & {
435
+ retry?: RetryPolicy;
436
+ }): {
437
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
438
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
439
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
440
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
441
+ delete(agentId: string, exceptionId: string): Promise<void>;
442
+ };
443
+
413
444
  declare function createAgentTagsApi(cfg: ClientConfig & {
414
445
  retry?: RetryPolicy;
415
446
  }): {
@@ -438,6 +469,7 @@ type AgentInstructionsApi = ReturnType<typeof createAgentInstructionsApi>;
438
469
  type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
439
470
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
440
471
  type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
472
+ type AgentScheduleExceptionsApi = ReturnType<typeof createAgentScheduleExceptionsApi>;
441
473
  type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
442
474
  type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
443
475
  type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
@@ -463,6 +495,7 @@ type AgentEntityFactoryOptions = {
463
495
  tagsApi: AgentTagsApi;
464
496
  phonesApi: AgentPhonesApi;
465
497
  scheduleApi: AgentScheduleApi;
498
+ scheduleExceptionsApi: AgentScheduleExceptionsApi;
466
499
  versionsApi: AgentVersionsApi;
467
500
  blueprintsApi: AgentBlueprintsApi;
468
501
  reload(agentId: string): Promise<AgentEntity>;
@@ -483,9 +516,24 @@ declare const bindAgentPhones: (api: AgentPhonesApi, agentId: string) => {
483
516
  connect(payload: ConnectPhoneRequest): Promise<any>;
484
517
  disconnect(phoneId: string): Promise<void>;
485
518
  };
486
- declare const bindAgentSchedule: (api: AgentScheduleApi, agentId: string) => {
519
+ declare const bindAgentScheduleExceptions: (api: AgentScheduleExceptionsApi, agentId: string) => {
520
+ list(opts?: ListAgentScheduleExceptionsOptions): Promise<any>;
521
+ get(exceptionId: string): Promise<any>;
522
+ create(payload: CreateAgentScheduleExceptionRequest): Promise<any>;
523
+ update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<any>;
524
+ delete(exceptionId: string): Promise<void>;
525
+ };
526
+ declare const bindAgentSchedule: (scheduleApi: AgentScheduleApi, exceptionsApi: AgentScheduleExceptionsApi, agentId: string) => {
487
527
  get(): Promise<any>;
528
+ create(payload: UpdateAgentScheduleRequest): Promise<any>;
488
529
  update(payload: UpdateAgentScheduleRequest): Promise<any>;
530
+ exceptions: {
531
+ list(opts?: ListAgentScheduleExceptionsOptions): Promise<any>;
532
+ get(exceptionId: string): Promise<any>;
533
+ create(payload: CreateAgentScheduleExceptionRequest): Promise<any>;
534
+ update(exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<any>;
535
+ delete(exceptionId: string): Promise<void>;
536
+ };
489
537
  };
490
538
  declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
491
539
  list(opts?: ListAgentVersionsOptions): Promise<any>;
@@ -517,6 +565,7 @@ type AgentEntityDependencies = {
517
565
  tagsApi: ReturnType<typeof createAgentTagsApi>;
518
566
  phonesApi: ReturnType<typeof createAgentPhonesApi>;
519
567
  scheduleApi: ReturnType<typeof createAgentScheduleApi>;
568
+ scheduleExceptionsApi: ReturnType<typeof createAgentScheduleExceptionsApi>;
520
569
  versionsApi: ReturnType<typeof createAgentVersionsApi>;
521
570
  blueprintsApi: ReturnType<typeof createAgentBlueprintsApi>;
522
571
  };
@@ -650,8 +699,17 @@ declare function createClient(initialCfg: ClientConfig & {
650
699
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
651
700
  schedule: {
652
701
  get(agentId: string): Promise<AgentSchedule>;
702
+ create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
653
703
  update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
654
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>);
704
+ } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
705
+ exceptions: {
706
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
707
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
708
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
709
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
710
+ delete(agentId: string, exceptionId: string): Promise<void>;
711
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
712
+ };
655
713
  versions: {
656
714
  list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
657
715
  get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
@@ -712,8 +770,17 @@ declare function createClient(initialCfg: ClientConfig & {
712
770
  } & ((agentId: string) => ReturnType<typeof bindAgentPhones>);
713
771
  schedule: {
714
772
  get(agentId: string): Promise<AgentSchedule>;
773
+ create(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
715
774
  update(agentId: string, payload: UpdateAgentScheduleRequest): Promise<AgentSchedule>;
716
- } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>);
775
+ } & ((agentId: string) => ReturnType<typeof bindAgentSchedule>) & {
776
+ exceptions: {
777
+ list(agentId: string, options?: ListAgentScheduleExceptionsOptions): Promise<PaginatedResult<AgentScheduleExceptionListResponse, ListAgentScheduleExceptionsOptions>>;
778
+ get(agentId: string, exceptionId: string): Promise<AgentScheduleException>;
779
+ create(agentId: string, payload: CreateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
780
+ update(agentId: string, exceptionId: string, payload: UpdateAgentScheduleExceptionRequest): Promise<AgentScheduleException>;
781
+ delete(agentId: string, exceptionId: string): Promise<void>;
782
+ } & ((agentId: string) => ReturnType<typeof bindAgentScheduleExceptions>);
783
+ };
717
784
  versions: {
718
785
  list(agentId: string, opts?: ListAgentVersionsOptions): Promise<PaginatedResult<AgentVersionListResponse, ListAgentVersionsOptions>>;
719
786
  get(agentId: string, versionId: string): Promise<AgentVersionDetail>;
@@ -780,4 +847,4 @@ declare function createHttp(cfg: ClientConfig & {
780
847
  resolveAccessToken: () => string;
781
848
  };
782
849
 
783
- export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, 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 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 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 UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
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 };
package/dist/index.js CHANGED
@@ -523,6 +523,14 @@ function createAgentScheduleApi(cfg) {
523
523
  });
524
524
  return res.json();
525
525
  },
526
+ async create(agentId, payload) {
527
+ const res = await doFetch(`${base}/v1/agents/${agentId}/schedule`, {
528
+ method: "POST",
529
+ headers: jsonHeaders,
530
+ body: JSON.stringify(payload)
531
+ });
532
+ return res.json();
533
+ },
526
534
  async update(agentId, payload) {
527
535
  const res = await doFetch(`${base}/v1/agents/${agentId}/schedule`, {
528
536
  method: "PUT",
@@ -534,6 +542,72 @@ function createAgentScheduleApi(cfg) {
534
542
  };
535
543
  }
536
544
 
545
+ // src/api/agent-schedule-exceptions.ts
546
+ function createAgentScheduleExceptionsApi(cfg) {
547
+ const { base, doFetch } = createHttp(cfg);
548
+ const jsonHeaders = { "content-type": "application/json" };
549
+ const fetchExceptionsPage = async (agentId, options = {}) => {
550
+ const query = serializeListOptions(options ?? {});
551
+ const res = await doFetch(
552
+ `${base}/v1/agents/${agentId}/schedule/exceptions`,
553
+ {
554
+ method: "GET",
555
+ query
556
+ }
557
+ );
558
+ return res.json();
559
+ };
560
+ return {
561
+ async list(agentId, options = {}) {
562
+ const normalizedOptions = {
563
+ ...options ?? {}
564
+ };
565
+ const fetchPage = (pageOptions) => fetchExceptionsPage(agentId, pageOptions);
566
+ const response = await fetchPage(normalizedOptions);
567
+ return attachPaginator(response, fetchPage, normalizedOptions);
568
+ },
569
+ async get(agentId, exceptionId) {
570
+ const res = await doFetch(
571
+ `${base}/v1/agents/${agentId}/schedule/exceptions/${exceptionId}`,
572
+ {
573
+ method: "GET"
574
+ }
575
+ );
576
+ return res.json();
577
+ },
578
+ async create(agentId, payload) {
579
+ const res = await doFetch(
580
+ `${base}/v1/agents/${agentId}/schedule/exceptions`,
581
+ {
582
+ method: "POST",
583
+ headers: jsonHeaders,
584
+ body: JSON.stringify(payload)
585
+ }
586
+ );
587
+ return res.json();
588
+ },
589
+ async update(agentId, exceptionId, payload) {
590
+ const res = await doFetch(
591
+ `${base}/v1/agents/${agentId}/schedule/exceptions/${exceptionId}`,
592
+ {
593
+ method: "PATCH",
594
+ headers: jsonHeaders,
595
+ body: JSON.stringify(payload)
596
+ }
597
+ );
598
+ return res.json();
599
+ },
600
+ async delete(agentId, exceptionId) {
601
+ await doFetch(
602
+ `${base}/v1/agents/${agentId}/schedule/exceptions/${exceptionId}`,
603
+ {
604
+ method: "DELETE"
605
+ }
606
+ );
607
+ }
608
+ };
609
+ }
610
+
537
611
  // src/api/agent-tags.ts
538
612
  function createAgentTagsApi(cfg) {
539
613
  const { base, doFetch } = createHttp(cfg);
@@ -702,13 +776,34 @@ var bindAgentPhones = (api, agentId) => ({
702
776
  return api.disconnect(agentId, phoneId);
703
777
  }
704
778
  });
705
- var bindAgentSchedule = (api, agentId) => ({
779
+ var bindAgentScheduleExceptions = (api, agentId) => ({
780
+ list(opts) {
781
+ return api.list(agentId, opts);
782
+ },
783
+ get(exceptionId) {
784
+ return api.get(agentId, exceptionId);
785
+ },
786
+ create(payload) {
787
+ return api.create(agentId, payload);
788
+ },
789
+ update(exceptionId, payload) {
790
+ return api.update(agentId, exceptionId, payload);
791
+ },
792
+ delete(exceptionId) {
793
+ return api.delete(agentId, exceptionId);
794
+ }
795
+ });
796
+ var bindAgentSchedule = (scheduleApi, exceptionsApi, agentId) => ({
706
797
  get() {
707
- return api.get(agentId);
798
+ return scheduleApi.get(agentId);
799
+ },
800
+ create(payload) {
801
+ return scheduleApi.create(agentId, payload);
708
802
  },
709
803
  update(payload) {
710
- return api.update(agentId, payload);
711
- }
804
+ return scheduleApi.update(agentId, payload);
805
+ },
806
+ exceptions: bindAgentScheduleExceptions(exceptionsApi, agentId)
712
807
  });
713
808
  var bindAgentVersions = (api, agentId) => ({
714
809
  list(opts) {
@@ -775,6 +870,7 @@ var createAgentEntity = (dto, options) => {
775
870
  tagsApi,
776
871
  phonesApi,
777
872
  scheduleApi,
873
+ scheduleExceptionsApi,
778
874
  versionsApi,
779
875
  blueprintsApi,
780
876
  reload,
@@ -786,7 +882,11 @@ var createAgentEntity = (dto, options) => {
786
882
  instructions: bindAgentInstructions(instructionsApi, dto.agentId),
787
883
  tagAssignments: bindAgentTags(tagsApi, dto.agentId),
788
884
  phones: bindAgentPhones(phonesApi, dto.agentId),
789
- schedule: bindAgentSchedule(scheduleApi, dto.agentId),
885
+ schedule: bindAgentSchedule(
886
+ scheduleApi,
887
+ scheduleExceptionsApi,
888
+ dto.agentId
889
+ ),
790
890
  versions: bindAgentVersions(versionsApi, dto.agentId),
791
891
  blueprints: bindAgentBlueprints(blueprintsApi, dto.agentId),
792
892
  async save(patch) {
@@ -870,6 +970,7 @@ function createAgentsApi(cfg, relatedApis) {
870
970
  tagsApi: relatedApis.tagsApi,
871
971
  phonesApi: relatedApis.phonesApi,
872
972
  scheduleApi: relatedApis.scheduleApi,
973
+ scheduleExceptionsApi: relatedApis.scheduleExceptionsApi,
873
974
  versionsApi: relatedApis.versionsApi,
874
975
  blueprintsApi: relatedApis.blueprintsApi,
875
976
  reload: async (agentId) => {
@@ -1160,6 +1261,7 @@ function createClient(initialCfg) {
1160
1261
  const tagsApi = createAgentTagsApi(runtimeCfg);
1161
1262
  const phonesApi = createAgentPhonesApi(runtimeCfg);
1162
1263
  const scheduleApi = createAgentScheduleApi(runtimeCfg);
1264
+ const scheduleExceptionsApi = createAgentScheduleExceptionsApi(runtimeCfg);
1163
1265
  const versionsApi = createAgentVersionsApi(runtimeCfg);
1164
1266
  const blueprintsApi = createAgentBlueprintsApi(runtimeCfg);
1165
1267
  const voicesApi = createVoicesApi(runtimeCfg);
@@ -1169,6 +1271,7 @@ function createClient(initialCfg) {
1169
1271
  tagsApi,
1170
1272
  phonesApi,
1171
1273
  scheduleApi,
1274
+ scheduleExceptionsApi,
1172
1275
  versionsApi,
1173
1276
  blueprintsApi
1174
1277
  });
@@ -1184,9 +1287,16 @@ function createClient(initialCfg) {
1184
1287
  (agentId) => bindAgentPhones(phonesApi, agentId),
1185
1288
  phonesApi
1186
1289
  );
1290
+ const scheduleExceptionsNamespace = Object.assign(
1291
+ (agentId) => bindAgentScheduleExceptions(scheduleExceptionsApi, agentId),
1292
+ scheduleExceptionsApi
1293
+ );
1187
1294
  const scheduleNamespace = Object.assign(
1188
- (agentId) => bindAgentSchedule(scheduleApi, agentId),
1189
- scheduleApi
1295
+ (agentId) => bindAgentSchedule(scheduleApi, scheduleExceptionsApi, agentId),
1296
+ {
1297
+ ...scheduleApi,
1298
+ exceptions: scheduleExceptionsNamespace
1299
+ }
1190
1300
  );
1191
1301
  const versionsNamespace = Object.assign(
1192
1302
  (agentId) => bindAgentVersions(versionsApi, agentId),
@@ -1274,6 +1384,7 @@ export {
1274
1384
  bindAgentInstructions,
1275
1385
  bindAgentPhones,
1276
1386
  bindAgentSchedule,
1387
+ bindAgentScheduleExceptions,
1277
1388
  bindAgentTags,
1278
1389
  bindAgentVersions,
1279
1390
  createAgentBlueprintsApi,
@@ -1281,6 +1392,7 @@ export {
1281
1392
  createAgentInstructionsApi,
1282
1393
  createAgentPhonesApi,
1283
1394
  createAgentScheduleApi,
1395
+ createAgentScheduleExceptionsApi,
1284
1396
  createAgentTagsApi,
1285
1397
  createAgentVersionsApi,
1286
1398
  createAgentsApi,