@autional/api-communication
v0.4.1
Published
Autional Communication API — auto-generated TypeScript client from communication-service
Readme
@autional/api-communication
Autional Communication API — auto-generated TypeScript client from communication-service (38 functions).
Auto-generated by
python sdk/scripts/generate-api-packages.py. Do not edit by hand.
Functions
| Function | Method | Path | Description |
|----------|--------|------|-------------|
| getAdminCommunicationDashboard(client, params?) | GET | /admin/communication/dashboard | 获取通信仪表盘(管理端) |
| getAdminCommunicationHealthByHealth(client, channel: string) | GET | /admin/communication/health/{channel} | 渠道连通性检查(管理端) |
| getAdminCommunicationLogs(client, params?) | GET | /admin/communication/logs | 管理员查询任意用户的通信日志 |
| getAdminCommunicationPlatformStats(client) | GET | /admin/communication/platform-stats | 获取平台级通信仪表盘(跨租户) |
| getAdminCommunicationProviders(client, params?) | GET | /admin/communication/providers | 获取服务商配置列表(管理端) |
| postAdminCommunicationProviders(client, data: CreateProviderConfigRequest) | POST | /admin/communication/providers | 创建服务商配置 |
| deleteAdminCommunicationProvidersByProviders(client, providerId: string) | DELETE | /admin/communication/providers/{provider_id} | 删除服务商配置 |
| putAdminCommunicationProvidersByProviders(client, providerId: string, data: UpdateProviderConfigRequest) | PUT | /admin/communication/providers/{provider_id} | 更新服务商配置 |
| getAdminCommunicationRateLimits(client, params?) | GET | /admin/communication/rate-limits | 管理员查看限流配置 |
| postAdminCommunicationResendByResend(client, messageId: string) | POST | /admin/communication/resend/{message_id} | 重发失败消息 |
| getAdminCommunicationTemplateStats(client, params?) | GET | /admin/communication/template-stats | 获取模板使用统计(近30天,管理端) |
| getAdminCommunicationTemplates(client, params?) | GET | /admin/communication/templates | 获取模板列表(管理端) |
| postAdminCommunicationTemplates(client, data: CreateTemplateRequest) | POST | /admin/communication/templates | 创建消息模板 |
| deleteAdminCommunicationTemplatesByTemplates(client, templateId: string) | DELETE | /admin/communication/templates/{template_id} | 删除(停用)模板 |
| putAdminCommunicationTemplatesByTemplates(client, templateId: string, data: UpdateTemplateRequest) | PUT | /admin/communication/templates/{template_id} | 更新消息模板 |
| postAdminCommunicationTemplatesCloneToLocaleByTemplates(client, templateId: string, data: CloneTemplateToLocaleRequest) | POST | /admin/communication/templates/{template_id}/clone-to-locale | 将模板复制到其他语言环境 |
| postAdminCommunicationTemplatesPreviewByTemplates(client, templateId: string, data: Record<string, unknown>) | POST | /admin/communication/templates/{template_id}/preview | 预览模板渲染效果 |
| getAdminCommunicationTemplatesVersionsByTemplates(client, templateId: string) | GET | /admin/communication/templates/{template_id}/versions | 查询模板版本历史 |
| postCommunicationBulk(client, data: BulkSendRequest) | POST | /communication/bulk | 批量发送消息 |
| postCommunicationCallbackByCallback(client, provider: string, data: Record<string, unknown>) | POST | /communication/callback/{provider} | 处理短信/邮件/推送服务商回调 |
| getCommunicationDashboard(client, params?) | GET | /communication/dashboard | 获取通信投递仪表盘 |
| postCommunicationEmail(client, data: EmailRequest) | POST | /communication/email | 发送邮件 |
| getCommunicationHealthByHealth(client, channel: string) | GET | /communication/health/{channel} | 渠道连通性检查 |
| getCommunicationLogs(client, params?) | GET | /communication/logs | 分页查询发送日志 |
| getCommunicationProviders(client, params?) | GET | /communication/providers | 查询服务商配置列表 |
| getCommunicationProvidersByProviders(client, providerId: string) | GET | /communication/providers/{provider_id} | 获取服务商配置详情 |
| postCommunicationPush(client, data: PushRequest) | POST | /communication/push | 发送推送通知 |
| getCommunicationPushTokens(client, params?) | GET | /communication/push-tokens | 查询推送令牌列表 |
| postCommunicationPushTokens(client, data: CreatePushTokenRequest) | POST | /communication/push-tokens | 注册设备推送令牌 |
| deleteCommunicationPushTokensByPushTokens(client, pushTokenId: string) | DELETE | /communication/push-tokens/{push_token_id} | 注销推送令牌 |
| putCommunicationPushTokensByPushTokens(client, pushTokenId: string, data: UpdatePushTokenRequest) | PUT | /communication/push-tokens/{push_token_id} | 更新推送令牌激活状态 |
| getCommunicationRateLimits(client, params?) | GET | /communication/rate-limits | 查询各渠道速率限制 |
| deleteCommunicationScheduledByScheduled(client, messageId: string) | DELETE | /communication/scheduled/{message_id} | 取消定时发送消息 |
| postCommunicationSms(client, data: SMSRequest) | POST | /communication/sms | 发送短信 |
| getCommunicationTemplateStats(client, params?) | GET | /communication/template-stats | 获取模板使用统计(近30天) |
| getCommunicationTemplates(client, params?) | GET | /communication/templates | 获取模板列表 |
| getCommunicationTemplatesAvailable(client, params?) | GET | /communication/templates/available | 获取可用模板列表(含平台默认模板) |
| getCommunicationTemplatesByTemplates(client, templateId: string) | GET | /communication/templates/{template_id} | 获取模板详情 |
Install
npm install @autional/core @autional/api-communicationQuick Start
import { Autional, browserPlatform } from '@autional/core';
import { getAdminCommunicationPlatformStats } from '@autional/api-communication';
const autional = new Autional({
appId: 'my-app',
issuer: 'https://auth.example.com', // your Autional server URL
platform: browserPlatform,
});
await autional.initialize();
// 返回值已由 ApiClient 解包为载荷(不是 { code, data, message } 信封)
const result = await getAdminCommunicationPlatformStats(autional.api);
console.log(result);Conventions
- Every function takes the
ApiClientas its first argument (autional.api). - Field names convert automatically:
camelCaseat the call site,snake_caseon the wire. - Return values are unwrapped payloads, not
{ code, data, message }envelopes.
See the root SDK README for tokens, refresh, and OAuth flows.
