@getsupervisor/agents-studio-sdk 1.16.0 → 1.18.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
@@ -59,6 +59,16 @@ type components = {
59
59
  WorkspaceEnableRequest: external['components/schemas.yaml']['WorkspaceEnableRequest'];
60
60
  WorkspaceEnableResponse: external['components/schemas.yaml']['WorkspaceEnableResponse'];
61
61
  ErrorResponse: external['components/schemas.yaml']['ErrorResponse'];
62
+ WebhookSummary: external['components/schemas.yaml']['WebhookSummary'];
63
+ WebhookDetail: external['components/schemas.yaml']['WebhookDetail'];
64
+ WebhookListResponse: external['components/schemas.yaml']['WebhookListResponse'];
65
+ CreateWebhookRequest: external['components/schemas.yaml']['CreateWebhookRequest'];
66
+ UpdateWebhookRequest: external['components/schemas.yaml']['UpdateWebhookRequest'];
67
+ EventSubscriptionSummary: external['components/schemas.yaml']['EventSubscriptionSummary'];
68
+ EventSubscriptionDetail: external['components/schemas.yaml']['EventSubscriptionDetail'];
69
+ EventSubscriptionListResponse: external['components/schemas.yaml']['EventSubscriptionListResponse'];
70
+ CreateEventSubscriptionRequest: external['components/schemas.yaml']['CreateEventSubscriptionRequest'];
71
+ UpdateEventSubscriptionRequest: external['components/schemas.yaml']['UpdateEventSubscriptionRequest'];
62
72
  };
63
73
  responses: never;
64
74
  parameters: {
@@ -83,6 +93,8 @@ type components = {
83
93
  SearchParam: external['components/parameters.yaml']['SearchParam'];
84
94
  FilterParam: external['components/parameters.yaml']['FilterParam'];
85
95
  OrParam: external['components/parameters.yaml']['OrParam'];
96
+ WebhookId: external['components/parameters.yaml']['WebhookId'];
97
+ SubscriptionId: external['components/parameters.yaml']['SubscriptionId'];
86
98
  };
87
99
  requestBodies: never;
88
100
  headers: never;
@@ -206,6 +218,24 @@ type external = {
206
218
  'paths/voices/voices.yaml': {
207
219
  get: unknown;
208
220
  };
221
+ 'paths/webhooks/webhook-by-id.yaml': {
222
+ get: unknown;
223
+ patch: unknown;
224
+ delete: unknown;
225
+ };
226
+ 'paths/webhooks/webhook-subscription-by-id.yaml': {
227
+ get: unknown;
228
+ patch: unknown;
229
+ delete: unknown;
230
+ };
231
+ 'paths/webhooks/webhook-subscriptions.yaml': {
232
+ get: unknown;
233
+ post: unknown;
234
+ };
235
+ 'paths/webhooks/webhooks.yaml': {
236
+ get: unknown;
237
+ post: unknown;
238
+ };
209
239
  'paths/workspaces/workspace-enable.yaml': {
210
240
  post: unknown;
211
241
  };
@@ -386,6 +416,16 @@ type ToolResourceReloadResponse = components['schemas']['ToolResourceReloadRespo
386
416
  type ToolConnectionRequest = components['schemas']['ToolConnectionRequest'];
387
417
  type ToolConnectionResponse = components['schemas']['ToolConnectionResponse'];
388
418
  type ErrorResponse = components['schemas']['ErrorResponse'];
419
+ type WebhookSummary = components['schemas']['WebhookSummary'];
420
+ type WebhookDetail = components['schemas']['WebhookDetail'];
421
+ type WebhookListResponse = components['schemas']['WebhookListResponse'];
422
+ type CreateWebhookRequest = components['schemas']['CreateWebhookRequest'];
423
+ type UpdateWebhookRequest = components['schemas']['UpdateWebhookRequest'];
424
+ type EventSubscriptionSummary = components['schemas']['EventSubscriptionSummary'];
425
+ type EventSubscriptionDetail = components['schemas']['EventSubscriptionDetail'];
426
+ type EventSubscriptionListResponse = components['schemas']['EventSubscriptionListResponse'];
427
+ type CreateEventSubscriptionRequest = components['schemas']['CreateEventSubscriptionRequest'];
428
+ type UpdateEventSubscriptionRequest = components['schemas']['UpdateEventSubscriptionRequest'];
389
429
 
390
430
  declare class HttpError extends Error {
391
431
  status: number;
@@ -665,6 +705,22 @@ declare function createVoicesApi(cfg: ClientConfig & {
665
705
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
666
706
  };
667
707
 
708
+ type ListWebhooksOptions = Pick<ListQueryOptions, 'page' | 'limit' | 'sort' | 'fields' | 'include' | 'search' | 'filter'>;
709
+ declare function createWebhooksApi(cfg: ClientConfig & {
710
+ retry?: RetryPolicy;
711
+ }): {
712
+ list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
713
+ create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
714
+ get(webhookId: string): Promise<WebhookDetail>;
715
+ update(webhookId: string, payload: UpdateWebhookRequest): Promise<WebhookDetail>;
716
+ delete(webhookId: string): Promise<void>;
717
+ listSubscriptions(webhookId: string, options?: ListWebhooksOptions): Promise<PaginatedResult<EventSubscriptionListResponse, ListWebhooksOptions>>;
718
+ createSubscription(webhookId: string, payload: CreateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
719
+ getSubscription(webhookId: string, subscriptionId: string): Promise<EventSubscriptionDetail>;
720
+ updateSubscription(webhookId: string, subscriptionId: string, payload: UpdateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
721
+ deleteSubscription(webhookId: string, subscriptionId: string): Promise<void>;
722
+ };
723
+
668
724
  type ListWorkspacePhonesOptions = ListQueryOptions & {
669
725
  channel?: WorkspacePhoneChannel;
670
726
  };
@@ -786,6 +842,18 @@ declare function createClient(initialCfg: ClientConfig & {
786
842
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
787
843
  };
788
844
  apiKeys: ApiKeysApi;
845
+ webhooks: {
846
+ list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
847
+ create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
848
+ get(webhookId: string): Promise<WebhookDetail>;
849
+ update(webhookId: string, payload: UpdateWebhookRequest): Promise<WebhookDetail>;
850
+ delete(webhookId: string): Promise<void>;
851
+ listSubscriptions(webhookId: string, options?: ListWebhooksOptions): Promise<PaginatedResult<EventSubscriptionListResponse, ListWebhooksOptions>>;
852
+ createSubscription(webhookId: string, payload: CreateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
853
+ getSubscription(webhookId: string, subscriptionId: string): Promise<EventSubscriptionDetail>;
854
+ updateSubscription(webhookId: string, subscriptionId: string, payload: UpdateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
855
+ deleteSubscription(webhookId: string, subscriptionId: string): Promise<void>;
856
+ };
789
857
  };
790
858
  };
791
859
  agents: {
@@ -863,6 +931,18 @@ declare function createClient(initialCfg: ClientConfig & {
863
931
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
864
932
  };
865
933
  apiKeys: ApiKeysApi;
934
+ webhooks: {
935
+ list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
936
+ create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
937
+ get(webhookId: string): Promise<WebhookDetail>;
938
+ update(webhookId: string, payload: UpdateWebhookRequest): Promise<WebhookDetail>;
939
+ delete(webhookId: string): Promise<void>;
940
+ listSubscriptions(webhookId: string, options?: ListWebhooksOptions): Promise<PaginatedResult<EventSubscriptionListResponse, ListWebhooksOptions>>;
941
+ createSubscription(webhookId: string, payload: CreateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
942
+ getSubscription(webhookId: string, subscriptionId: string): Promise<EventSubscriptionDetail>;
943
+ updateSubscription(webhookId: string, subscriptionId: string, payload: UpdateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
944
+ deleteSubscription(webhookId: string, subscriptionId: string): Promise<void>;
945
+ };
866
946
  };
867
947
 
868
948
  type QueryParamPrimitive = string | number | boolean;
@@ -888,4 +968,4 @@ declare function createHttp(cfg: ClientConfig & {
888
968
  resolveAccessToken: () => string;
889
969
  };
890
970
 
891
- export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
971
+ export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type 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 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, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
package/dist/index.d.ts CHANGED
@@ -59,6 +59,16 @@ type components = {
59
59
  WorkspaceEnableRequest: external['components/schemas.yaml']['WorkspaceEnableRequest'];
60
60
  WorkspaceEnableResponse: external['components/schemas.yaml']['WorkspaceEnableResponse'];
61
61
  ErrorResponse: external['components/schemas.yaml']['ErrorResponse'];
62
+ WebhookSummary: external['components/schemas.yaml']['WebhookSummary'];
63
+ WebhookDetail: external['components/schemas.yaml']['WebhookDetail'];
64
+ WebhookListResponse: external['components/schemas.yaml']['WebhookListResponse'];
65
+ CreateWebhookRequest: external['components/schemas.yaml']['CreateWebhookRequest'];
66
+ UpdateWebhookRequest: external['components/schemas.yaml']['UpdateWebhookRequest'];
67
+ EventSubscriptionSummary: external['components/schemas.yaml']['EventSubscriptionSummary'];
68
+ EventSubscriptionDetail: external['components/schemas.yaml']['EventSubscriptionDetail'];
69
+ EventSubscriptionListResponse: external['components/schemas.yaml']['EventSubscriptionListResponse'];
70
+ CreateEventSubscriptionRequest: external['components/schemas.yaml']['CreateEventSubscriptionRequest'];
71
+ UpdateEventSubscriptionRequest: external['components/schemas.yaml']['UpdateEventSubscriptionRequest'];
62
72
  };
63
73
  responses: never;
64
74
  parameters: {
@@ -83,6 +93,8 @@ type components = {
83
93
  SearchParam: external['components/parameters.yaml']['SearchParam'];
84
94
  FilterParam: external['components/parameters.yaml']['FilterParam'];
85
95
  OrParam: external['components/parameters.yaml']['OrParam'];
96
+ WebhookId: external['components/parameters.yaml']['WebhookId'];
97
+ SubscriptionId: external['components/parameters.yaml']['SubscriptionId'];
86
98
  };
87
99
  requestBodies: never;
88
100
  headers: never;
@@ -206,6 +218,24 @@ type external = {
206
218
  'paths/voices/voices.yaml': {
207
219
  get: unknown;
208
220
  };
221
+ 'paths/webhooks/webhook-by-id.yaml': {
222
+ get: unknown;
223
+ patch: unknown;
224
+ delete: unknown;
225
+ };
226
+ 'paths/webhooks/webhook-subscription-by-id.yaml': {
227
+ get: unknown;
228
+ patch: unknown;
229
+ delete: unknown;
230
+ };
231
+ 'paths/webhooks/webhook-subscriptions.yaml': {
232
+ get: unknown;
233
+ post: unknown;
234
+ };
235
+ 'paths/webhooks/webhooks.yaml': {
236
+ get: unknown;
237
+ post: unknown;
238
+ };
209
239
  'paths/workspaces/workspace-enable.yaml': {
210
240
  post: unknown;
211
241
  };
@@ -386,6 +416,16 @@ type ToolResourceReloadResponse = components['schemas']['ToolResourceReloadRespo
386
416
  type ToolConnectionRequest = components['schemas']['ToolConnectionRequest'];
387
417
  type ToolConnectionResponse = components['schemas']['ToolConnectionResponse'];
388
418
  type ErrorResponse = components['schemas']['ErrorResponse'];
419
+ type WebhookSummary = components['schemas']['WebhookSummary'];
420
+ type WebhookDetail = components['schemas']['WebhookDetail'];
421
+ type WebhookListResponse = components['schemas']['WebhookListResponse'];
422
+ type CreateWebhookRequest = components['schemas']['CreateWebhookRequest'];
423
+ type UpdateWebhookRequest = components['schemas']['UpdateWebhookRequest'];
424
+ type EventSubscriptionSummary = components['schemas']['EventSubscriptionSummary'];
425
+ type EventSubscriptionDetail = components['schemas']['EventSubscriptionDetail'];
426
+ type EventSubscriptionListResponse = components['schemas']['EventSubscriptionListResponse'];
427
+ type CreateEventSubscriptionRequest = components['schemas']['CreateEventSubscriptionRequest'];
428
+ type UpdateEventSubscriptionRequest = components['schemas']['UpdateEventSubscriptionRequest'];
389
429
 
390
430
  declare class HttpError extends Error {
391
431
  status: number;
@@ -665,6 +705,22 @@ declare function createVoicesApi(cfg: ClientConfig & {
665
705
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
666
706
  };
667
707
 
708
+ type ListWebhooksOptions = Pick<ListQueryOptions, 'page' | 'limit' | 'sort' | 'fields' | 'include' | 'search' | 'filter'>;
709
+ declare function createWebhooksApi(cfg: ClientConfig & {
710
+ retry?: RetryPolicy;
711
+ }): {
712
+ list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
713
+ create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
714
+ get(webhookId: string): Promise<WebhookDetail>;
715
+ update(webhookId: string, payload: UpdateWebhookRequest): Promise<WebhookDetail>;
716
+ delete(webhookId: string): Promise<void>;
717
+ listSubscriptions(webhookId: string, options?: ListWebhooksOptions): Promise<PaginatedResult<EventSubscriptionListResponse, ListWebhooksOptions>>;
718
+ createSubscription(webhookId: string, payload: CreateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
719
+ getSubscription(webhookId: string, subscriptionId: string): Promise<EventSubscriptionDetail>;
720
+ updateSubscription(webhookId: string, subscriptionId: string, payload: UpdateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
721
+ deleteSubscription(webhookId: string, subscriptionId: string): Promise<void>;
722
+ };
723
+
668
724
  type ListWorkspacePhonesOptions = ListQueryOptions & {
669
725
  channel?: WorkspacePhoneChannel;
670
726
  };
@@ -786,6 +842,18 @@ declare function createClient(initialCfg: ClientConfig & {
786
842
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
787
843
  };
788
844
  apiKeys: ApiKeysApi;
845
+ webhooks: {
846
+ list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
847
+ create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
848
+ get(webhookId: string): Promise<WebhookDetail>;
849
+ update(webhookId: string, payload: UpdateWebhookRequest): Promise<WebhookDetail>;
850
+ delete(webhookId: string): Promise<void>;
851
+ listSubscriptions(webhookId: string, options?: ListWebhooksOptions): Promise<PaginatedResult<EventSubscriptionListResponse, ListWebhooksOptions>>;
852
+ createSubscription(webhookId: string, payload: CreateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
853
+ getSubscription(webhookId: string, subscriptionId: string): Promise<EventSubscriptionDetail>;
854
+ updateSubscription(webhookId: string, subscriptionId: string, payload: UpdateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
855
+ deleteSubscription(webhookId: string, subscriptionId: string): Promise<void>;
856
+ };
789
857
  };
790
858
  };
791
859
  agents: {
@@ -863,6 +931,18 @@ declare function createClient(initialCfg: ClientConfig & {
863
931
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
864
932
  };
865
933
  apiKeys: ApiKeysApi;
934
+ webhooks: {
935
+ list(options?: ListWebhooksOptions): Promise<PaginatedResult<WebhookListResponse, ListWebhooksOptions>>;
936
+ create(payload: CreateWebhookRequest): Promise<WebhookDetail>;
937
+ get(webhookId: string): Promise<WebhookDetail>;
938
+ update(webhookId: string, payload: UpdateWebhookRequest): Promise<WebhookDetail>;
939
+ delete(webhookId: string): Promise<void>;
940
+ listSubscriptions(webhookId: string, options?: ListWebhooksOptions): Promise<PaginatedResult<EventSubscriptionListResponse, ListWebhooksOptions>>;
941
+ createSubscription(webhookId: string, payload: CreateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
942
+ getSubscription(webhookId: string, subscriptionId: string): Promise<EventSubscriptionDetail>;
943
+ updateSubscription(webhookId: string, subscriptionId: string, payload: UpdateEventSubscriptionRequest): Promise<EventSubscriptionDetail>;
944
+ deleteSubscription(webhookId: string, subscriptionId: string): Promise<void>;
945
+ };
866
946
  };
867
947
 
868
948
  type QueryParamPrimitive = string | number | boolean;
@@ -888,4 +968,4 @@ declare function createHttp(cfg: ClientConfig & {
888
968
  resolveAccessToken: () => string;
889
969
  };
890
970
 
891
- export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleExceptionRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionNotesRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
971
+ export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentScheduleException, type AgentScheduleExceptionListResponse, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateWebhookRequest, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentScheduleExceptionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListCatalogItemsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type 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 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, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createCatalogsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWebhooksApi, createWorkspacesApi };
package/dist/index.js CHANGED
@@ -1232,6 +1232,117 @@ function createVoicesApi(cfg) {
1232
1232
  };
1233
1233
  }
1234
1234
 
1235
+ // src/api/webhooks.ts
1236
+ function createWebhooksApi(cfg) {
1237
+ const { base, doFetch } = createHttp(cfg);
1238
+ const jsonHeaders = { "content-type": "application/json" };
1239
+ const fetchWebhooksPage = async (options = {}) => {
1240
+ const query = serializeListOptions({
1241
+ page: options.page,
1242
+ limit: options.limit,
1243
+ sort: options.sort,
1244
+ fields: options.fields,
1245
+ include: options.include,
1246
+ search: options.search,
1247
+ filter: options.filter
1248
+ });
1249
+ const res = await doFetch(`${base}/v1/webhooks`, {
1250
+ method: "GET",
1251
+ query
1252
+ });
1253
+ return res.json();
1254
+ };
1255
+ return {
1256
+ async list(options = {}) {
1257
+ const normalized = { ...options ?? {} };
1258
+ const response = await fetchWebhooksPage(normalized);
1259
+ return attachPaginator(response, fetchWebhooksPage, normalized);
1260
+ },
1261
+ async create(payload) {
1262
+ const res = await doFetch(`${base}/v1/webhooks`, {
1263
+ method: "POST",
1264
+ headers: jsonHeaders,
1265
+ body: JSON.stringify(payload)
1266
+ });
1267
+ return res.json();
1268
+ },
1269
+ async get(webhookId) {
1270
+ const res = await doFetch(`${base}/v1/webhooks/${webhookId}`, {
1271
+ method: "GET"
1272
+ });
1273
+ return res.json();
1274
+ },
1275
+ async update(webhookId, payload) {
1276
+ const res = await doFetch(`${base}/v1/webhooks/${webhookId}`, {
1277
+ method: "PATCH",
1278
+ headers: jsonHeaders,
1279
+ body: JSON.stringify(payload)
1280
+ });
1281
+ return res.json();
1282
+ },
1283
+ async delete(webhookId) {
1284
+ await doFetch(`${base}/v1/webhooks/${webhookId}`, { method: "DELETE" });
1285
+ },
1286
+ // Subscriptions
1287
+ async listSubscriptions(webhookId, options = {}) {
1288
+ const fetchPage = async (opts) => {
1289
+ const query = serializeListOptions({
1290
+ page: opts.page,
1291
+ limit: opts.limit,
1292
+ sort: opts.sort,
1293
+ fields: opts.fields,
1294
+ include: opts.include,
1295
+ search: opts.search,
1296
+ filter: opts.filter
1297
+ });
1298
+ const res = await doFetch(
1299
+ `${base}/v1/webhooks/${webhookId}/subscriptions`,
1300
+ { method: "GET", query }
1301
+ );
1302
+ return res.json();
1303
+ };
1304
+ const normalized = { ...options ?? {} };
1305
+ const response = await fetchPage(normalized);
1306
+ return attachPaginator(response, fetchPage, normalized);
1307
+ },
1308
+ async createSubscription(webhookId, payload) {
1309
+ const res = await doFetch(
1310
+ `${base}/v1/webhooks/${webhookId}/subscriptions`,
1311
+ {
1312
+ method: "POST",
1313
+ headers: jsonHeaders,
1314
+ body: JSON.stringify(payload)
1315
+ }
1316
+ );
1317
+ return res.json();
1318
+ },
1319
+ async getSubscription(webhookId, subscriptionId) {
1320
+ const res = await doFetch(
1321
+ `${base}/v1/webhooks/${webhookId}/subscriptions/${subscriptionId}`,
1322
+ { method: "GET" }
1323
+ );
1324
+ return res.json();
1325
+ },
1326
+ async updateSubscription(webhookId, subscriptionId, payload) {
1327
+ const res = await doFetch(
1328
+ `${base}/v1/webhooks/${webhookId}/subscriptions/${subscriptionId}`,
1329
+ {
1330
+ method: "PATCH",
1331
+ headers: jsonHeaders,
1332
+ body: JSON.stringify(payload)
1333
+ }
1334
+ );
1335
+ return res.json();
1336
+ },
1337
+ async deleteSubscription(webhookId, subscriptionId) {
1338
+ await doFetch(
1339
+ `${base}/v1/webhooks/${webhookId}/subscriptions/${subscriptionId}`,
1340
+ { method: "DELETE" }
1341
+ );
1342
+ }
1343
+ };
1344
+ }
1345
+
1235
1346
  // src/api/workspaces.ts
1236
1347
  function createWorkspacesApi(cfg) {
1237
1348
  const { base, doFetch } = createHttp(cfg);
@@ -1313,6 +1424,7 @@ function createClient(initialCfg) {
1313
1424
  const voicesApi = createVoicesApi(runtimeCfg);
1314
1425
  const apiKeysApi = createApiKeysApi(runtimeCfg);
1315
1426
  const catalogsApi = createCatalogsApi(runtimeCfg);
1427
+ const webhooksApi = createWebhooksApi(runtimeCfg);
1316
1428
  const agentsApi = createAgentsApi(runtimeCfg, {
1317
1429
  instructionsApi,
1318
1430
  tagsApi,
@@ -1367,7 +1479,8 @@ function createClient(initialCfg) {
1367
1479
  tools: createToolsApi(runtimeCfg),
1368
1480
  catalogs: catalogsApi,
1369
1481
  voices: voicesApi,
1370
- apiKeys: apiKeysApi
1482
+ apiKeys: apiKeysApi,
1483
+ webhooks: webhooksApi
1371
1484
  };
1372
1485
  return {
1373
1486
  ...apis,
@@ -1450,6 +1563,7 @@ export {
1450
1563
  createHttp,
1451
1564
  createToolsApi,
1452
1565
  createVoicesApi,
1566
+ createWebhooksApi,
1453
1567
  createWorkspacesApi
1454
1568
  };
1455
1569
  //# sourceMappingURL=index.js.map