@getsupervisor/agents-studio-sdk 1.41.1-beta.167 → 1.41.1-beta.169
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.cjs +36 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -10
- package/dist/index.d.ts +71 -10
- package/dist/index.js +35 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -823,6 +823,36 @@ type components = {
|
|
|
823
823
|
data: components['schemas']['UsageAgentRow'][];
|
|
824
824
|
meta: components['schemas']['UsageAgentsMeta'];
|
|
825
825
|
};
|
|
826
|
+
MessageTemplateResponse: {
|
|
827
|
+
id: string;
|
|
828
|
+
channel: 'whatsapp';
|
|
829
|
+
name: string;
|
|
830
|
+
category: 'utility' | 'marketing' | 'authentication';
|
|
831
|
+
status: string;
|
|
832
|
+
language: string;
|
|
833
|
+
body: string;
|
|
834
|
+
};
|
|
835
|
+
WhatsAppButtonRequest: {
|
|
836
|
+
type: 'quick_reply' | 'url' | 'phone';
|
|
837
|
+
text: string;
|
|
838
|
+
value?: string;
|
|
839
|
+
};
|
|
840
|
+
WhatsAppMetadataRequest: {
|
|
841
|
+
category?: 'utility' | 'marketing' | 'authentication';
|
|
842
|
+
language?: 'es_MX' | 'es_ES';
|
|
843
|
+
header?: string;
|
|
844
|
+
footer?: string;
|
|
845
|
+
buttons?: components['schemas']['WhatsAppButtonRequest'][];
|
|
846
|
+
};
|
|
847
|
+
CreateMessageTemplateRequest: {
|
|
848
|
+
channel: 'whatsapp';
|
|
849
|
+
name: string;
|
|
850
|
+
body: string;
|
|
851
|
+
metadata?: components['schemas']['WhatsAppMetadataRequest'];
|
|
852
|
+
};
|
|
853
|
+
MessageTemplateConnectionResponse: {
|
|
854
|
+
phoneNumber: string;
|
|
855
|
+
} | null;
|
|
826
856
|
ForkAgentFromTemplateRequest: {
|
|
827
857
|
templateId: string;
|
|
828
858
|
templateVersionId?: string;
|
|
@@ -1481,6 +1511,34 @@ type EventSubscriptionDetail = components['schemas']['EventSubscriptionDetail'];
|
|
|
1481
1511
|
type EventSubscriptionListResponse = components['schemas']['EventSubscriptionListResponse'];
|
|
1482
1512
|
type CreateEventSubscriptionRequest = components['schemas']['CreateEventSubscriptionRequest'];
|
|
1483
1513
|
type UpdateEventSubscriptionRequest = components['schemas']['UpdateEventSubscriptionRequest'];
|
|
1514
|
+
type WhatsAppConnectionResponse = {
|
|
1515
|
+
phoneNumber: string;
|
|
1516
|
+
} | null;
|
|
1517
|
+
type MessageTemplateResponse = {
|
|
1518
|
+
id: string;
|
|
1519
|
+
channel: string;
|
|
1520
|
+
name: string;
|
|
1521
|
+
category: string;
|
|
1522
|
+
status: string;
|
|
1523
|
+
language: string;
|
|
1524
|
+
body: string;
|
|
1525
|
+
};
|
|
1526
|
+
type CreateMessageTemplatePayload = {
|
|
1527
|
+
channel: string;
|
|
1528
|
+
name: string;
|
|
1529
|
+
body: string;
|
|
1530
|
+
metadata?: {
|
|
1531
|
+
category?: string;
|
|
1532
|
+
language?: string;
|
|
1533
|
+
header?: string;
|
|
1534
|
+
footer?: string;
|
|
1535
|
+
buttons?: {
|
|
1536
|
+
type: string;
|
|
1537
|
+
text: string;
|
|
1538
|
+
value?: string;
|
|
1539
|
+
}[];
|
|
1540
|
+
};
|
|
1541
|
+
};
|
|
1484
1542
|
|
|
1485
1543
|
declare class HttpError<TBody = unknown> extends Error {
|
|
1486
1544
|
status: number;
|
|
@@ -2151,6 +2209,16 @@ declare function createDocumentsApi(cfg: ClientConfig & {
|
|
|
2151
2209
|
retry?: RetryPolicy;
|
|
2152
2210
|
}): DocumentsApi;
|
|
2153
2211
|
|
|
2212
|
+
type MessageTemplatesApi = {
|
|
2213
|
+
getConnection(): Promise<WhatsAppConnectionResponse>;
|
|
2214
|
+
list(channel?: string): Promise<MessageTemplateResponse[]>;
|
|
2215
|
+
create(payload: CreateMessageTemplatePayload): Promise<MessageTemplateResponse>;
|
|
2216
|
+
remove(id: string): Promise<void>;
|
|
2217
|
+
};
|
|
2218
|
+
declare function createMessageTemplatesApi(cfg: ClientConfig & {
|
|
2219
|
+
retry?: RetryPolicy;
|
|
2220
|
+
}): MessageTemplatesApi;
|
|
2221
|
+
|
|
2154
2222
|
declare function createSipTrunksApi(cfg: ClientConfig & {
|
|
2155
2223
|
retry?: RetryPolicy;
|
|
2156
2224
|
}): {
|
|
@@ -2180,11 +2248,9 @@ declare function createToolsApi(cfg: ClientConfig & {
|
|
|
2180
2248
|
connections: {
|
|
2181
2249
|
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
2182
2250
|
readonly create: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
2183
|
-
readonly delete: (toolAgentConnectionId: string) => Promise<void>;
|
|
2184
2251
|
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
2185
2252
|
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
2186
2253
|
readonly createConnection: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
2187
|
-
readonly deleteConnection: (toolAgentConnectionId: string) => Promise<void>;
|
|
2188
2254
|
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
2189
2255
|
};
|
|
2190
2256
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
@@ -2197,7 +2263,6 @@ declare function createToolsApi(cfg: ClientConfig & {
|
|
|
2197
2263
|
connect(toolId: string, payload: ToolConnectionRequest, options?: IdempotentRequestOptions): Promise<ToolConnectionResponse>;
|
|
2198
2264
|
createConnection(payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions): Promise<ToolConnectionResponse>;
|
|
2199
2265
|
executeConnection(toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions): Promise<ExecuteToolResponse>;
|
|
2200
|
-
deleteConnection(toolAgentConnectionId: string): Promise<void>;
|
|
2201
2266
|
};
|
|
2202
2267
|
|
|
2203
2268
|
type ListUsageAgentsOptions = ListQueryOptions & Partial<{
|
|
@@ -2363,7 +2428,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2363
2428
|
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
2364
2429
|
idempotencyKey?: string;
|
|
2365
2430
|
}) => Promise<ToolConnectionResponse>;
|
|
2366
|
-
readonly delete: (toolAgentConnectionId: string) => Promise<void>;
|
|
2367
2431
|
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2368
2432
|
idempotencyKey?: string;
|
|
2369
2433
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2371,7 +2435,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2371
2435
|
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
2372
2436
|
idempotencyKey?: string;
|
|
2373
2437
|
}) => Promise<ToolConnectionResponse>;
|
|
2374
|
-
readonly deleteConnection: (toolAgentConnectionId: string) => Promise<void>;
|
|
2375
2438
|
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2376
2439
|
idempotencyKey?: string;
|
|
2377
2440
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2403,7 +2466,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2403
2466
|
executeConnection(toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2404
2467
|
idempotencyKey?: string;
|
|
2405
2468
|
}): Promise<ExecuteToolResponse>;
|
|
2406
|
-
deleteConnection(toolAgentConnectionId: string): Promise<void>;
|
|
2407
2469
|
};
|
|
2408
2470
|
catalogs: {
|
|
2409
2471
|
templates: {
|
|
@@ -2416,6 +2478,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2416
2478
|
remove(itemId: string): Promise<void>;
|
|
2417
2479
|
};
|
|
2418
2480
|
documents: DocumentsApi;
|
|
2481
|
+
messageTemplates: MessageTemplatesApi;
|
|
2419
2482
|
campaigns: {
|
|
2420
2483
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2421
2484
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2539,7 +2602,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2539
2602
|
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
2540
2603
|
idempotencyKey?: string;
|
|
2541
2604
|
}) => Promise<ToolConnectionResponse>;
|
|
2542
|
-
readonly delete: (toolAgentConnectionId: string) => Promise<void>;
|
|
2543
2605
|
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2544
2606
|
idempotencyKey?: string;
|
|
2545
2607
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2547,7 +2609,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2547
2609
|
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
2548
2610
|
idempotencyKey?: string;
|
|
2549
2611
|
}) => Promise<ToolConnectionResponse>;
|
|
2550
|
-
readonly deleteConnection: (toolAgentConnectionId: string) => Promise<void>;
|
|
2551
2612
|
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2552
2613
|
idempotencyKey?: string;
|
|
2553
2614
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2579,7 +2640,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2579
2640
|
executeConnection(toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2580
2641
|
idempotencyKey?: string;
|
|
2581
2642
|
}): Promise<ExecuteToolResponse>;
|
|
2582
|
-
deleteConnection(toolAgentConnectionId: string): Promise<void>;
|
|
2583
2643
|
};
|
|
2584
2644
|
catalogs: {
|
|
2585
2645
|
templates: {
|
|
@@ -2592,6 +2652,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2592
2652
|
remove(itemId: string): Promise<void>;
|
|
2593
2653
|
};
|
|
2594
2654
|
documents: DocumentsApi;
|
|
2655
|
+
messageTemplates: MessageTemplatesApi;
|
|
2595
2656
|
campaigns: {
|
|
2596
2657
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2597
2658
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2669,4 +2730,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2669
2730
|
resolveAccessToken: () => string;
|
|
2670
2731
|
};
|
|
2671
2732
|
|
|
2672
|
-
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 ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BillingBalanceResponse, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Call, type CallsListMeta, type CallsListResponse, type CallsStreamMeta, type CallsStreamResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type CloneAgentComponent, type CloneAgentPayload, type CloneAgentRequest, type CloneAgentSelection, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateSipTrunkRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type DocumentRef, type DocumentsApi, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, 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 ListCallsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListUsageAgentsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PresignDocumentItem, type PresignDocumentsRequest, type PresignDocumentsResponse, type PresignedDocument, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type ResourceBalance, type ResourceProjection, type RetryPolicy, type RuntimeCompleteEvent, type RuntimeErrorEvent, type RuntimeProgressEvent, type RuntimeSseEvent, type RuntimeUsage, type SipTrunk, type SipTrunkWithPassword, type SseCallbacks, type StreamCallsOptions, type SubscriptionInfo, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, 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 UpdateSipTrunkRequest, type UpdateWebhookRequest, type UsageAgentRow, type UsageAgentsAggregations, type UsageAgentsMeta, type UsageAgentsResponse, type VoiceListResponse, type VoiceSummary, type WebhookDeliveryDetail, type WebhookDeliveryListResponse, type WebhookDeliverySummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceCreateRequest, type WorkspaceCreateResponse, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createBillingApi, createCallsApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createDocumentsApi, createHttp, createSipTrunksApi, createToolsApi, createUsageApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
|
|
2733
|
+
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 ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BillingBalanceResponse, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Call, type CallsListMeta, type CallsListResponse, type CallsStreamMeta, type CallsStreamResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type CloneAgentComponent, type CloneAgentPayload, type CloneAgentRequest, type CloneAgentSelection, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateMessageTemplatePayload, type CreateSipTrunkRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type DocumentRef, type DocumentsApi, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, 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 ListCallsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListUsageAgentsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, type MessageTemplateResponse, type MessageTemplatesApi, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PresignDocumentItem, type PresignDocumentsRequest, type PresignDocumentsResponse, type PresignedDocument, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type ResourceBalance, type ResourceProjection, type RetryPolicy, type RuntimeCompleteEvent, type RuntimeErrorEvent, type RuntimeProgressEvent, type RuntimeSseEvent, type RuntimeUsage, type SipTrunk, type SipTrunkWithPassword, type SseCallbacks, type StreamCallsOptions, type SubscriptionInfo, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, 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 UpdateSipTrunkRequest, type UpdateWebhookRequest, type UsageAgentRow, type UsageAgentsAggregations, type UsageAgentsMeta, type UsageAgentsResponse, type VoiceListResponse, type VoiceSummary, type WebhookDeliveryDetail, type WebhookDeliveryListResponse, type WebhookDeliverySummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WhatsAppConnectionResponse, type WorkspaceCreateRequest, type WorkspaceCreateResponse, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createBillingApi, createCallsApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createDocumentsApi, createHttp, createMessageTemplatesApi, createSipTrunksApi, createToolsApi, createUsageApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
|
package/dist/index.d.ts
CHANGED
|
@@ -823,6 +823,36 @@ type components = {
|
|
|
823
823
|
data: components['schemas']['UsageAgentRow'][];
|
|
824
824
|
meta: components['schemas']['UsageAgentsMeta'];
|
|
825
825
|
};
|
|
826
|
+
MessageTemplateResponse: {
|
|
827
|
+
id: string;
|
|
828
|
+
channel: 'whatsapp';
|
|
829
|
+
name: string;
|
|
830
|
+
category: 'utility' | 'marketing' | 'authentication';
|
|
831
|
+
status: string;
|
|
832
|
+
language: string;
|
|
833
|
+
body: string;
|
|
834
|
+
};
|
|
835
|
+
WhatsAppButtonRequest: {
|
|
836
|
+
type: 'quick_reply' | 'url' | 'phone';
|
|
837
|
+
text: string;
|
|
838
|
+
value?: string;
|
|
839
|
+
};
|
|
840
|
+
WhatsAppMetadataRequest: {
|
|
841
|
+
category?: 'utility' | 'marketing' | 'authentication';
|
|
842
|
+
language?: 'es_MX' | 'es_ES';
|
|
843
|
+
header?: string;
|
|
844
|
+
footer?: string;
|
|
845
|
+
buttons?: components['schemas']['WhatsAppButtonRequest'][];
|
|
846
|
+
};
|
|
847
|
+
CreateMessageTemplateRequest: {
|
|
848
|
+
channel: 'whatsapp';
|
|
849
|
+
name: string;
|
|
850
|
+
body: string;
|
|
851
|
+
metadata?: components['schemas']['WhatsAppMetadataRequest'];
|
|
852
|
+
};
|
|
853
|
+
MessageTemplateConnectionResponse: {
|
|
854
|
+
phoneNumber: string;
|
|
855
|
+
} | null;
|
|
826
856
|
ForkAgentFromTemplateRequest: {
|
|
827
857
|
templateId: string;
|
|
828
858
|
templateVersionId?: string;
|
|
@@ -1481,6 +1511,34 @@ type EventSubscriptionDetail = components['schemas']['EventSubscriptionDetail'];
|
|
|
1481
1511
|
type EventSubscriptionListResponse = components['schemas']['EventSubscriptionListResponse'];
|
|
1482
1512
|
type CreateEventSubscriptionRequest = components['schemas']['CreateEventSubscriptionRequest'];
|
|
1483
1513
|
type UpdateEventSubscriptionRequest = components['schemas']['UpdateEventSubscriptionRequest'];
|
|
1514
|
+
type WhatsAppConnectionResponse = {
|
|
1515
|
+
phoneNumber: string;
|
|
1516
|
+
} | null;
|
|
1517
|
+
type MessageTemplateResponse = {
|
|
1518
|
+
id: string;
|
|
1519
|
+
channel: string;
|
|
1520
|
+
name: string;
|
|
1521
|
+
category: string;
|
|
1522
|
+
status: string;
|
|
1523
|
+
language: string;
|
|
1524
|
+
body: string;
|
|
1525
|
+
};
|
|
1526
|
+
type CreateMessageTemplatePayload = {
|
|
1527
|
+
channel: string;
|
|
1528
|
+
name: string;
|
|
1529
|
+
body: string;
|
|
1530
|
+
metadata?: {
|
|
1531
|
+
category?: string;
|
|
1532
|
+
language?: string;
|
|
1533
|
+
header?: string;
|
|
1534
|
+
footer?: string;
|
|
1535
|
+
buttons?: {
|
|
1536
|
+
type: string;
|
|
1537
|
+
text: string;
|
|
1538
|
+
value?: string;
|
|
1539
|
+
}[];
|
|
1540
|
+
};
|
|
1541
|
+
};
|
|
1484
1542
|
|
|
1485
1543
|
declare class HttpError<TBody = unknown> extends Error {
|
|
1486
1544
|
status: number;
|
|
@@ -2151,6 +2209,16 @@ declare function createDocumentsApi(cfg: ClientConfig & {
|
|
|
2151
2209
|
retry?: RetryPolicy;
|
|
2152
2210
|
}): DocumentsApi;
|
|
2153
2211
|
|
|
2212
|
+
type MessageTemplatesApi = {
|
|
2213
|
+
getConnection(): Promise<WhatsAppConnectionResponse>;
|
|
2214
|
+
list(channel?: string): Promise<MessageTemplateResponse[]>;
|
|
2215
|
+
create(payload: CreateMessageTemplatePayload): Promise<MessageTemplateResponse>;
|
|
2216
|
+
remove(id: string): Promise<void>;
|
|
2217
|
+
};
|
|
2218
|
+
declare function createMessageTemplatesApi(cfg: ClientConfig & {
|
|
2219
|
+
retry?: RetryPolicy;
|
|
2220
|
+
}): MessageTemplatesApi;
|
|
2221
|
+
|
|
2154
2222
|
declare function createSipTrunksApi(cfg: ClientConfig & {
|
|
2155
2223
|
retry?: RetryPolicy;
|
|
2156
2224
|
}): {
|
|
@@ -2180,11 +2248,9 @@ declare function createToolsApi(cfg: ClientConfig & {
|
|
|
2180
2248
|
connections: {
|
|
2181
2249
|
readonly connect: (toolId: string, payload: ToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
2182
2250
|
readonly create: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
2183
|
-
readonly delete: (toolAgentConnectionId: string) => Promise<void>;
|
|
2184
2251
|
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
2185
2252
|
readonly list: (options?: ListToolConnectionsOptions) => Promise<PaginatedResult<ToolConnectionListResponse, ListToolConnectionsOptions>>;
|
|
2186
2253
|
readonly createConnection: (payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ToolConnectionResponse>;
|
|
2187
|
-
readonly deleteConnection: (toolAgentConnectionId: string) => Promise<void>;
|
|
2188
2254
|
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions) => Promise<ExecuteToolResponse>;
|
|
2189
2255
|
};
|
|
2190
2256
|
list(options?: ListToolsOptions): Promise<PaginatedResult<ToolListResponse, ListToolsOptions>>;
|
|
@@ -2197,7 +2263,6 @@ declare function createToolsApi(cfg: ClientConfig & {
|
|
|
2197
2263
|
connect(toolId: string, payload: ToolConnectionRequest, options?: IdempotentRequestOptions): Promise<ToolConnectionResponse>;
|
|
2198
2264
|
createConnection(payload: CreateToolConnectionRequest, options?: IdempotentRequestOptions): Promise<ToolConnectionResponse>;
|
|
2199
2265
|
executeConnection(toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: IdempotentRequestOptions): Promise<ExecuteToolResponse>;
|
|
2200
|
-
deleteConnection(toolAgentConnectionId: string): Promise<void>;
|
|
2201
2266
|
};
|
|
2202
2267
|
|
|
2203
2268
|
type ListUsageAgentsOptions = ListQueryOptions & Partial<{
|
|
@@ -2363,7 +2428,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2363
2428
|
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
2364
2429
|
idempotencyKey?: string;
|
|
2365
2430
|
}) => Promise<ToolConnectionResponse>;
|
|
2366
|
-
readonly delete: (toolAgentConnectionId: string) => Promise<void>;
|
|
2367
2431
|
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2368
2432
|
idempotencyKey?: string;
|
|
2369
2433
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2371,7 +2435,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2371
2435
|
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
2372
2436
|
idempotencyKey?: string;
|
|
2373
2437
|
}) => Promise<ToolConnectionResponse>;
|
|
2374
|
-
readonly deleteConnection: (toolAgentConnectionId: string) => Promise<void>;
|
|
2375
2438
|
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2376
2439
|
idempotencyKey?: string;
|
|
2377
2440
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2403,7 +2466,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2403
2466
|
executeConnection(toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2404
2467
|
idempotencyKey?: string;
|
|
2405
2468
|
}): Promise<ExecuteToolResponse>;
|
|
2406
|
-
deleteConnection(toolAgentConnectionId: string): Promise<void>;
|
|
2407
2469
|
};
|
|
2408
2470
|
catalogs: {
|
|
2409
2471
|
templates: {
|
|
@@ -2416,6 +2478,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2416
2478
|
remove(itemId: string): Promise<void>;
|
|
2417
2479
|
};
|
|
2418
2480
|
documents: DocumentsApi;
|
|
2481
|
+
messageTemplates: MessageTemplatesApi;
|
|
2419
2482
|
campaigns: {
|
|
2420
2483
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2421
2484
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2539,7 +2602,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2539
2602
|
readonly create: (payload: CreateToolConnectionRequest, options?: {
|
|
2540
2603
|
idempotencyKey?: string;
|
|
2541
2604
|
}) => Promise<ToolConnectionResponse>;
|
|
2542
|
-
readonly delete: (toolAgentConnectionId: string) => Promise<void>;
|
|
2543
2605
|
readonly execute: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2544
2606
|
idempotencyKey?: string;
|
|
2545
2607
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2547,7 +2609,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2547
2609
|
readonly createConnection: (payload: CreateToolConnectionRequest, options?: {
|
|
2548
2610
|
idempotencyKey?: string;
|
|
2549
2611
|
}) => Promise<ToolConnectionResponse>;
|
|
2550
|
-
readonly deleteConnection: (toolAgentConnectionId: string) => Promise<void>;
|
|
2551
2612
|
readonly executeConnection: (toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2552
2613
|
idempotencyKey?: string;
|
|
2553
2614
|
}) => Promise<ExecuteToolResponse>;
|
|
@@ -2579,7 +2640,6 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2579
2640
|
executeConnection(toolAgentConnectionId: string, payload: ExecuteToolConnectionRequest, options?: {
|
|
2580
2641
|
idempotencyKey?: string;
|
|
2581
2642
|
}): Promise<ExecuteToolResponse>;
|
|
2582
|
-
deleteConnection(toolAgentConnectionId: string): Promise<void>;
|
|
2583
2643
|
};
|
|
2584
2644
|
catalogs: {
|
|
2585
2645
|
templates: {
|
|
@@ -2592,6 +2652,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2592
2652
|
remove(itemId: string): Promise<void>;
|
|
2593
2653
|
};
|
|
2594
2654
|
documents: DocumentsApi;
|
|
2655
|
+
messageTemplates: MessageTemplatesApi;
|
|
2595
2656
|
campaigns: {
|
|
2596
2657
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2597
2658
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2669,4 +2730,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2669
2730
|
resolveAccessToken: () => string;
|
|
2670
2731
|
};
|
|
2671
2732
|
|
|
2672
|
-
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 ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BillingBalanceResponse, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Call, type CallsListMeta, type CallsListResponse, type CallsStreamMeta, type CallsStreamResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type CloneAgentComponent, type CloneAgentPayload, type CloneAgentRequest, type CloneAgentSelection, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateSipTrunkRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type DocumentRef, type DocumentsApi, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, 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 ListCallsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListUsageAgentsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PresignDocumentItem, type PresignDocumentsRequest, type PresignDocumentsResponse, type PresignedDocument, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type ResourceBalance, type ResourceProjection, type RetryPolicy, type RuntimeCompleteEvent, type RuntimeErrorEvent, type RuntimeProgressEvent, type RuntimeSseEvent, type RuntimeUsage, type SipTrunk, type SipTrunkWithPassword, type SseCallbacks, type StreamCallsOptions, type SubscriptionInfo, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, 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 UpdateSipTrunkRequest, type UpdateWebhookRequest, type UsageAgentRow, type UsageAgentsAggregations, type UsageAgentsMeta, type UsageAgentsResponse, type VoiceListResponse, type VoiceSummary, type WebhookDeliveryDetail, type WebhookDeliveryListResponse, type WebhookDeliverySummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WorkspaceCreateRequest, type WorkspaceCreateResponse, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createBillingApi, createCallsApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createDocumentsApi, createHttp, createSipTrunksApi, createToolsApi, createUsageApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
|
|
2733
|
+
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 ApiErrorBody, type ApiHttpError, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type BillingBalanceResponse, type BlueprintStage, type BlueprintStageListResponse, type BlueprintStageReorderRequest, type BlueprintStageTrigger, type BlueprintStageTriggerListResponse, type Call, type CallsListMeta, type CallsListResponse, type CallsStreamMeta, type CallsStreamResponse, type Campaign, type CampaignExecution, type CampaignExecutionListResponse, type CampaignListResponse, type CampaignStatus, type CatalogItemCreateRequest, type CatalogItemDetail, type CatalogItemLinks, type CatalogItemListResponse, type CatalogItemSummary, type CatalogTemplateDetail, type CatalogTemplateListResponse, type CatalogTemplateSummary, type CatalogTemplateVisibility, type ClientConfig, type CloneAgentComponent, type CloneAgentPayload, type CloneAgentRequest, type CloneAgentSelection, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentScheduleExceptionRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateBlueprintStageRequest, type CreateBlueprintStageTriggerRequest, type CreateCampaignPayload, type CreateEventSubscriptionRequest, type CreateInstructionRequest, type CreateMessageTemplatePayload, type CreateSipTrunkRequest, type CreateToolConnectionRequest, type CreateWebhookRequest, type DocumentRef, type DocumentsApi, type ErrorResponse, type EventSubscriptionDetail, type EventSubscriptionListResponse, type EventSubscriptionSummary, type ExecuteToolConnectionRequest, 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 ListCallsOptions, type ListCampaignExecutionsOptions, type ListCampaignsOptions, type ListCatalogItemsOptions, type ListCatalogTemplatesOptions, type ListQueryOptions, type ListToolConnectionsOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListUsageAgentsOptions, type ListVoicesOptions, type ListWebhooksOptions, type ListWorkspacePhonesOptions, type ListWorkspacesOptions, type MessageTemplateResponse, type MessageTemplatesApi, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type PresignDocumentItem, type PresignDocumentsRequest, type PresignDocumentsResponse, type PresignedDocument, type PublishAgentVersionRequest, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type ResourceBalance, type ResourceProjection, type RetryPolicy, type RuntimeCompleteEvent, type RuntimeErrorEvent, type RuntimeProgressEvent, type RuntimeSseEvent, type RuntimeUsage, type SipTrunk, type SipTrunkWithPassword, type SseCallbacks, type StreamCallsOptions, type SubscriptionInfo, TimeoutError, type ToolConnectionAuth, type ToolConnectionListItem, type ToolConnectionListResponse, 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 UpdateSipTrunkRequest, type UpdateWebhookRequest, type UsageAgentRow, type UsageAgentsAggregations, type UsageAgentsMeta, type UsageAgentsResponse, type VoiceListResponse, type VoiceSummary, type WebhookDeliveryDetail, type WebhookDeliveryListResponse, type WebhookDeliverySummary, type WebhookDetail, type WebhookListResponse, type WebhookSummary, type WhatsAppConnectionResponse, type WorkspaceCreateRequest, type WorkspaceCreateResponse, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspaceListResponse, WorkspaceNotSelectedError, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, type WorkspaceSummary, bindAgentBlueprints, bindAgentPhones, bindAgentSchedule, bindAgentScheduleExceptions, bindAgentSchedules, bindAgentStageTriggers, bindAgentStages, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentPhonesApi, createAgentScheduleApi, createAgentScheduleExceptionsApi, createAgentStageTriggersApi, createAgentStagesApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createBillingApi, createCallsApi, createCampaignsApi, createCatalogTemplatesApi, createCatalogsApi, createClient, createDocumentsApi, createHttp, createMessageTemplatesApi, createSipTrunksApi, createToolsApi, createUsageApi, createVoicesApi, createWebhooksApi, createWorkspacesApi, isApiErrorBody, isApiHttpError };
|
package/dist/index.js
CHANGED
|
@@ -1778,6 +1778,39 @@ function createDocumentsApi(cfg) {
|
|
|
1778
1778
|
};
|
|
1779
1779
|
}
|
|
1780
1780
|
|
|
1781
|
+
// src/api/message-templates.ts
|
|
1782
|
+
function createMessageTemplatesApi(cfg) {
|
|
1783
|
+
const { base, doFetch } = createHttp(cfg);
|
|
1784
|
+
const jsonHeaders = { "content-type": "application/json" };
|
|
1785
|
+
return {
|
|
1786
|
+
async getConnection() {
|
|
1787
|
+
const res = await doFetch(`${base}/message-templates/connection`, {
|
|
1788
|
+
method: "GET"
|
|
1789
|
+
});
|
|
1790
|
+
return res.json();
|
|
1791
|
+
},
|
|
1792
|
+
async list(channel) {
|
|
1793
|
+
const query = buildSearchParams([["channel", channel]]);
|
|
1794
|
+
const res = await doFetch(`${base}/message-templates`, {
|
|
1795
|
+
method: "GET",
|
|
1796
|
+
query
|
|
1797
|
+
});
|
|
1798
|
+
return res.json();
|
|
1799
|
+
},
|
|
1800
|
+
async create(payload) {
|
|
1801
|
+
const res = await doFetch(`${base}/message-templates`, {
|
|
1802
|
+
method: "POST",
|
|
1803
|
+
body: JSON.stringify(payload),
|
|
1804
|
+
headers: jsonHeaders
|
|
1805
|
+
});
|
|
1806
|
+
return res.json();
|
|
1807
|
+
},
|
|
1808
|
+
async remove(id) {
|
|
1809
|
+
await doFetch(`${base}/message-templates/${id}`, { method: "DELETE" });
|
|
1810
|
+
}
|
|
1811
|
+
};
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1781
1814
|
// src/api/sip-trunks.ts
|
|
1782
1815
|
function createSipTrunksApi(cfg) {
|
|
1783
1816
|
const { base, doFetch } = createHttp(cfg);
|
|
@@ -1987,21 +2020,14 @@ function createToolsApi(cfg) {
|
|
|
1987
2020
|
}
|
|
1988
2021
|
);
|
|
1989
2022
|
return res.json();
|
|
1990
|
-
},
|
|
1991
|
-
async deleteConnection(toolAgentConnectionId) {
|
|
1992
|
-
await doFetch(`${base}/tools/connections/${toolAgentConnectionId}`, {
|
|
1993
|
-
method: "DELETE"
|
|
1994
|
-
});
|
|
1995
2023
|
}
|
|
1996
2024
|
};
|
|
1997
2025
|
const connections = {
|
|
1998
2026
|
connect: api.connect,
|
|
1999
2027
|
create: api.createConnection,
|
|
2000
|
-
delete: api.deleteConnection,
|
|
2001
2028
|
execute: api.executeConnection,
|
|
2002
2029
|
list: api.listConnections,
|
|
2003
2030
|
createConnection: api.createConnection,
|
|
2004
|
-
deleteConnection: api.deleteConnection,
|
|
2005
2031
|
executeConnection: api.executeConnection
|
|
2006
2032
|
};
|
|
2007
2033
|
return {
|
|
@@ -2597,6 +2623,7 @@ function createClient(initialCfg) {
|
|
|
2597
2623
|
templates: catalogTemplatesApi
|
|
2598
2624
|
},
|
|
2599
2625
|
documents: createDocumentsApi(runtimeCfg),
|
|
2626
|
+
messageTemplates: createMessageTemplatesApi(runtimeCfg),
|
|
2600
2627
|
campaigns: createCampaignsApi(runtimeCfg),
|
|
2601
2628
|
voices: voicesApi,
|
|
2602
2629
|
apiKeys: apiKeysApi,
|
|
@@ -2694,6 +2721,7 @@ export {
|
|
|
2694
2721
|
createClient,
|
|
2695
2722
|
createDocumentsApi,
|
|
2696
2723
|
createHttp,
|
|
2724
|
+
createMessageTemplatesApi,
|
|
2697
2725
|
createSipTrunksApi,
|
|
2698
2726
|
createToolsApi,
|
|
2699
2727
|
createUsageApi,
|