@getsupervisor/agents-studio-sdk 1.41.1-beta.164 → 1.41.1-beta.166
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 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -1
- package/dist/index.d.ts +71 -1
- package/dist/index.js +35 -0
- 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' | 'phone_number';
|
|
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 | null;
|
|
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 | null;
|
|
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
|
}): {
|
|
@@ -2410,6 +2478,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2410
2478
|
remove(itemId: string): Promise<void>;
|
|
2411
2479
|
};
|
|
2412
2480
|
documents: DocumentsApi;
|
|
2481
|
+
messageTemplates: MessageTemplatesApi;
|
|
2413
2482
|
campaigns: {
|
|
2414
2483
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2415
2484
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2583,6 +2652,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2583
2652
|
remove(itemId: string): Promise<void>;
|
|
2584
2653
|
};
|
|
2585
2654
|
documents: DocumentsApi;
|
|
2655
|
+
messageTemplates: MessageTemplatesApi;
|
|
2586
2656
|
campaigns: {
|
|
2587
2657
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2588
2658
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2660,4 +2730,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2660
2730
|
resolveAccessToken: () => string;
|
|
2661
2731
|
};
|
|
2662
2732
|
|
|
2663
|
-
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' | 'phone_number';
|
|
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 | null;
|
|
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 | null;
|
|
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
|
}): {
|
|
@@ -2410,6 +2478,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2410
2478
|
remove(itemId: string): Promise<void>;
|
|
2411
2479
|
};
|
|
2412
2480
|
documents: DocumentsApi;
|
|
2481
|
+
messageTemplates: MessageTemplatesApi;
|
|
2413
2482
|
campaigns: {
|
|
2414
2483
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2415
2484
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2583,6 +2652,7 @@ declare function createClient(initialCfg: ClientConfig & {
|
|
|
2583
2652
|
remove(itemId: string): Promise<void>;
|
|
2584
2653
|
};
|
|
2585
2654
|
documents: DocumentsApi;
|
|
2655
|
+
messageTemplates: MessageTemplatesApi;
|
|
2586
2656
|
campaigns: {
|
|
2587
2657
|
list(options?: ListCampaignsOptions): Promise<PaginatedResult<CampaignListResponse, ListCampaignsOptions>>;
|
|
2588
2658
|
get(campaignId: string): Promise<Campaign>;
|
|
@@ -2660,4 +2730,4 @@ declare function createHttp(cfg: ClientConfig & {
|
|
|
2660
2730
|
resolveAccessToken: () => string;
|
|
2661
2731
|
};
|
|
2662
2732
|
|
|
2663
|
-
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);
|
|
@@ -2590,6 +2623,7 @@ function createClient(initialCfg) {
|
|
|
2590
2623
|
templates: catalogTemplatesApi
|
|
2591
2624
|
},
|
|
2592
2625
|
documents: createDocumentsApi(runtimeCfg),
|
|
2626
|
+
messageTemplates: createMessageTemplatesApi(runtimeCfg),
|
|
2593
2627
|
campaigns: createCampaignsApi(runtimeCfg),
|
|
2594
2628
|
voices: voicesApi,
|
|
2595
2629
|
apiKeys: apiKeysApi,
|
|
@@ -2687,6 +2721,7 @@ export {
|
|
|
2687
2721
|
createClient,
|
|
2688
2722
|
createDocumentsApi,
|
|
2689
2723
|
createHttp,
|
|
2724
|
+
createMessageTemplatesApi,
|
|
2690
2725
|
createSipTrunksApi,
|
|
2691
2726
|
createToolsApi,
|
|
2692
2727
|
createUsageApi,
|