npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@autional/api-notification

v0.4.1

Published

Autional Notification API — auto-generated TypeScript client from notification-service

Readme

@autional/api-notification

Autional Notification API — auto-generated TypeScript client from notification-service (70 functions).

Auto-generated by python sdk/scripts/generate-api-packages.py. Do not edit by hand.

Functions

| Function | Method | Path | Description | |----------|--------|------|-------------| | getAdminAnnouncements(client, params?) | GET | /admin/announcements | 管理端列出公告 | | postAdminAnnouncements(client, data: CreateAnnouncementRequest) | POST | /admin/announcements | 创建公告 | | deleteAdminAnnouncementsByAnnouncements(client, announcementId: string) | DELETE | /admin/announcements/{announcement_id} | 删除公告 | | putAdminAnnouncementsByAnnouncements(client, announcementId: string, data: UpdateAnnouncementRequest) | PUT | /admin/announcements/{announcement_id} | 更新公告 | | postAdminAnnouncementsPublishByAnnouncements(client, announcementId: string) | POST | /admin/announcements/{announcement_id}/publish | 发布公告 | | postAdminAnnouncementsUnpublishByAnnouncements(client, announcementId: string) | POST | /admin/announcements/{announcement_id}/unpublish | 撤回公告 | | getAdminNotifications(client, params?) | GET | /admin/notifications | 管理员查看指定用户通知列表 | | postAdminNotificationsBroadcast(client, data: BroadcastNotificationRequest) | POST | /admin/notifications/broadcast | 广播通知 | | getAdminNotificationsEventMappings(client) | GET | /admin/notifications/event-mappings | 列出事件映射(管理端) | | postAdminNotificationsEventMappings(client, data: CreateEventMappingRequest) | POST | /admin/notifications/event-mappings | 创建事件映射 | | deleteAdminNotificationsEventMappingsByEventMappings(client, announcementId: string) | DELETE | /admin/notifications/event-mappings/{announcement_id} | 删除事件映射 | | getAdminNotificationsEventMappingsByEventMappings(client, announcementId: string) | GET | /admin/notifications/event-mappings/{announcement_id} | 获取事件映射详情(管理端) | | putAdminNotificationsEventMappingsByEventMappings(client, announcementId: string, data: UpdateEventMappingRequest) | PUT | /admin/notifications/event-mappings/{announcement_id} | 更新事件映射 | | getAdminNotificationsGlobalVariables(client) | GET | /admin/notifications/global-variables | 列出全局变量(管理端) | | postAdminNotificationsGlobalVariables(client, data: CreateGlobalVariableRequest) | POST | /admin/notifications/global-variables | 创建全局变量 | | deleteAdminNotificationsGlobalVariablesByGlobalVariables(client, announcementId: string) | DELETE | /admin/notifications/global-variables/{announcement_id} | 删除全局变量 | | getAdminNotificationsGlobalVariablesByGlobalVariables(client, announcementId: string) | GET | /admin/notifications/global-variables/{announcement_id} | 获取全局变量(管理端) | | putAdminNotificationsGlobalVariablesByGlobalVariables(client, announcementId: string, data: UpdateGlobalVariableRequest) | PUT | /admin/notifications/global-variables/{announcement_id} | 更新全局变量 | | getAdminNotificationsPlatformStats(client) | GET | /admin/notifications/platform-stats | 获取平台级通知统计 | | putAdminNotificationsPreferencesByPreferences(client, userId: string, data: NotificationPreferencesRequest) | PUT | /admin/notifications/preferences/{user_id} | 管理员覆盖用户通知偏好 | | getAdminNotificationsReadReport(client) | GET | /admin/notifications/read-report | 获取通知已读报告(管理端) | | postAdminNotificationsSecurityAdvisoryBroadcast(client, data: SecurityAdvisoryBroadcastRequest) | POST | /admin/notifications/security-advisory-broadcast | 广播安全公告(平台级) | | getAdminNotificationsStats(client) | GET | /admin/notifications/stats | 获取通知统计(管理端) | | getAdminNotificationsTemplates(client, params?) | GET | /admin/notifications/templates | 列出通知模板(管理端) | | postAdminNotificationsTemplates(client, data: CreateTemplateRequest) | POST | /admin/notifications/templates | 创建通知模板 | | getAdminNotificationsTemplatesAvailable(client) | GET | /admin/notifications/templates/available | 列出可用通知模板(管理端) | | deleteAdminNotificationsTemplatesByTemplates(client, announcementId: string) | DELETE | /admin/notifications/templates/{announcement_id} | 删除通知模板 | | getAdminNotificationsTemplatesByTemplates(client, announcementId: string) | GET | /admin/notifications/templates/{announcement_id} | 获取通知模板详情(管理端) | | putAdminNotificationsTemplatesByTemplates(client, announcementId: string, data: UpdateTemplateRequest) | PUT | /admin/notifications/templates/{announcement_id} | 更新通知模板 | | postAdminNotificationsTemplatesCloneToLocaleByTemplates(client, announcementId: string, data: CloneTemplateToLocaleRequest) | POST | /admin/notifications/templates/{announcement_id}/clone-to-locale | 跨 locale 复制模板 | | postAdminNotificationsTest(client, data: TestNotificationRequest) | POST | /admin/notifications/test | 发送测试通知(管理端) | | getAdminNotificationsTrend(client, params?) | GET | /admin/notifications/trend | 获取通知趋势(管理端) | | getAnnouncements(client, params?) | GET | /announcements | 列出公告 | | getAnnouncementsByAnnouncements(client, announcementId: string) | GET | /announcements/{announcement_id} | 获取公告详情 | | getAnnouncementsStatsByAnnouncements(client, announcementId: string) | GET | /announcements/{announcement_id}/stats | 获取公告统计 | | getNotifications(client, params?) | GET | /notifications | 获取通知列表 | | postNotifications(client, data: SendNotificationRequest) | POST | /notifications | 发送通知 | | getNotificationsEventMappings(client) | GET | /notifications/event-mappings | 列出事件映射 | | getNotificationsEventMappingsByEventMappings(client, announcementId: string) | GET | /notifications/event-mappings/{announcement_id} | 获取事件映射 | | getNotificationsGlobalVariables(client) | GET | /notifications/global-variables | 列出全局变量 | | getNotificationsGlobalVariablesByGlobalVariables(client, announcementId: string) | GET | /notifications/global-variables/{announcement_id} | 获取全局变量 | | getNotificationsPreferencesByPreferences(client, userId: string) | GET | /notifications/preferences/{user_id} | 获取通知偏好设置 | | putNotificationsPreferencesByPreferences(client, userId: string, data: NotificationPreferencesRequest) | PUT | /notifications/preferences/{user_id} | 更新通知偏好设置 | | getNotificationsPublicSecurityConfirm(client, params?) | GET | /notifications/public/security-confirm | 确认安全公告订阅 | | postNotificationsPublicSecuritySubscribe(client, data: SecuritySubscribeRequest) | POST | /notifications/public/security-subscribe | 订阅安全公告 | | postNotificationsPublicSecurityUnsubscribe(client, data: SecurityUnsubscribeRequest) | POST | /notifications/public/security-unsubscribe | 退订安全公告 | | putNotificationsReadAll(client) | PUT | /notifications/read-all | 标记全部通知已读 | | getNotificationsReadReport(client) | GET | /notifications/read-report | 获取通知已读/未读报告 | | postNotificationsSend(client, data: SendNotificationRequest) | POST | /notifications/send | 发送通知(兼容端点) | | postNotificationsSendBatch(client, data: BatchSendNotificationRequest) | POST | /notifications/send-batch | 批量发送通知 | | postNotificationsSendFromTemplate(client, data: SendFromTemplateRequest) | POST | /notifications/send-from-template | 使用模板发送通知 | | getNotificationsStats(client) | GET | /notifications/stats | 获取通知统计 | | getNotificationsStream(client, params?) | GET | /notifications/stream | SSE实时通知流 | | postNotificationsStreamTicket(client) | POST | /notifications/stream-ticket | 签发 SSE 短期票据 | | getNotificationsTemplates(client, params?) | GET | /notifications/templates | 列出通知模板 | | getNotificationsTemplatesAvailable(client) | GET | /notifications/templates/available | 列出可用模板 | | getNotificationsTemplatesByTemplates(client, announcementId: string) | GET | /notifications/templates/{announcement_id} | 获取通知模板 | | postNotificationsTest(client, data: TestNotificationRequest) | POST | /notifications/test | 发送测试通知 | | getNotificationsTrend(client, params?) | GET | /notifications/trend | 获取通知趋势 | | getNotificationsUnread(client) | GET | /notifications/unread | 获取未读通知列表 | | getNotificationsUnreadCount(client) | GET | /notifications/unread-count | 获取未读通知数量 | | deleteNotificationsByNotifications(client, notificationId: string, data: DeleteNotificationRequest) | DELETE | /notifications/{notification_id} | 删除通知 | | getNotificationsByNotifications(client, notificationId: string) | GET | /notifications/{notification_id} | 获取通知详情 | | putNotificationsReadByNotifications(client, notificationId: string) | PUT | /notifications/{notification_id}/read | 标记通知已读 | | putNotificationsUnreadByNotifications(client, notificationId: string) | PUT | /notifications/{notification_id}/unread | 标记通知未读 | | deletePushSubscriptions(client, params?) | DELETE | /push/subscriptions | 删除推送订阅 | | getPushSubscriptions(client) | GET | /push/subscriptions | 列出推送订阅 | | postPushSubscriptions(client, data: PushSubscriptionRequest) | POST | /push/subscriptions | 注册 Web Push 推送订阅 | | getPushSubscriptionsBySubscriptions(client, subscriptionId: string) | GET | /push/subscriptions/{subscription_id} | 获取推送订阅详情 | | getPushVapidPublicKey(client) | GET | /push/vapid-public-key | 获取 VAPID 公钥 |

Install

npm install @autional/core @autional/api-notification

Quick Start

import { Autional, browserPlatform } from '@autional/core';
import { getPushSubscriptions } from '@autional/api-notification';

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 getPushSubscriptions(autional.api);
console.log(result);

Conventions

  • Every function takes the ApiClient as its first argument (autional.api).
  • Field names convert automatically: camelCase at the call site, snake_case on the wire.
  • Return values are unwrapped payloads, not { code, data, message } envelopes.

See the root SDK README for tokens, refresh, and OAuth flows.