@useairfoil/producer-incident-io

中文文档
0.0.3发布于 2026/11/03TypeScriptES Module构建来源已验证

Syncs incidents and everything around them from one incident.io organization: updates, timelines, follow-ups, on-call, the catalog, status pages, and settings. It backfills each resource, takes webhooks at POST /webhooks/incident-io, and polls as a back

原始使用文档
文档目录6 节
  1. Config
  2. Setup
  3. Data
  4. Limits
  5. Demo data
  6. Local development

incident.io producer

Syncs incidents and everything around them from one incident.io organization: updates, timelines, follow-ups, on-call, the catalog, status pages, and settings. It backfills each resource, takes webhooks at POST /webhooks/incident-io, and polls as a backup: every 5 minutes for incidents, follow-ups, actions, alerts, and escalations, and every hour for the rest.

ResourceWhat
incidentsIncidents in every mode
incident_updates, incident_timeline_items, incident_activity_log_entries, incident_participants, incident_relationships, incident_attachments, incident_alerts, incident_call_sessions, incident_participant_workloadsLists read for each incident
postmortem_documents, follow_ups, actionsPost-mortems and work items
alerts, alert_notes, alert_sources, alert_routes, alert_attributesAlerts and their setup
escalations, escalation_paths, schedules, schedule_shifts, schedule_overrides, on_call_notification_pauses, maintenance_windowsOn-call
catalog_types, catalog_entriesThe catalog
users, teamsPeople and teams
severities, incident_statuses, incident_types, incident_roles, incident_timestamps, custom_fields, custom_field_optionsIncident settings, to name IDs on rows
workflows, workflow_runsWorkflows and their runs
status_pages, status_page_components, status_page_incidents, status_page_maintenancesStatus pages
policies, policy_findingsPolicies and what breaks them

Config

VariableRequiredDefault
INCIDENT_IO_API_KEYyesnone
INCIDENT_IO_WEBHOOK_SECRETyesnone

Setup

The API and webhooks need the Team plan or above. Private incidents and policies need Pro.

  1. Create an API key under Settings → API keys with these permissions (API names):

    • viewer for incidents, follow-ups, actions, and settings
    • catalog_viewer, on_call_viewer, schedules_reader, workflows_viewer, status_page_viewer, and policies_viewer for those tables
    • incident_workload_viewer and incident_workload_private_viewer for incident_participant_workloads
    • call_transcripts_viewer for incident_call_sessions
    • global_access to include private incidents

    maintenance_windows needs on_call_editor, the only permission that covers maintenance windows. It can also change on-call setup, so leave the table out unless you're fine granting that.

    Use the key as INCIDENT_IO_API_KEY. A table whose role is missing fails its check, and the others keep syncing.

  2. Add a webhook endpoint under Settings → Webhooks at https://<host>/webhooks/incident-io. Pick both the public and private versions of these events:

    • incident_created_v2, incident_updated_v2, incident_status_updated_v2
    • follow_up_created_v2, follow_up_updated_v2
    • action_created_v1, action_updated_v1
    • postmortem_document_status_updated_v1
    • alert_created_v1, alert_resolved_v1
    • escalation_created_v1, escalation_status_updated_v1

    Also pick schedule.created_v1, schedule.updated_v1, schedule.deleted_v1, schedule.shift_change_v1, and status_page_incident.update_shared_v1. Use its signing secret as INCIDENT_IO_WEBHOOK_SECRET.

One key reads one organization, so run one connector per organization.

Data

  • Every webhook reads the record again, so rows always have the full, latest record. Private events only carry an ID, and are skipped when the key can't see the incident.
  • Incidents keep role assignments, custom field values, timestamps, and duration metrics as lists. A custom field with several values has one list element per value.
  • Test and tutorial incidents are included. Filter on mode to leave them out.
  • incident.io has no incident deletes. Declined, canceled, and merged incidents stay, with their status.
  • Follow-ups and actions marked deleted keep status = deleted. If incident.io drops them from its lists instead, the delete isn't seen.
  • Archived catalog entries keep archived_at. Deleted schedules get _deleted.
  • schedule_shifts has shifts that ended in the last 7 days, with overrides applied, keyed by the shift's fingerprint. It keeps older shifts it read before.
  • Deep config, such as workflow steps, escalation paths, and policy rules, is stored as JSON text.
  • Alert sources leave out their secret token. Users' phone numbers and notification rules, call transcripts, pay data, secrets, and API keys aren't synced.
  • Tables hold names, emails, Slack IDs, and incident text. Treat them as confidential.

Limits

  • An API key gets 1,200 requests a minute, and listing incidents 60 a minute. A 429 waits for Retry-After and tries again.
  • Lists for each incident are read again when the incident changes, and every 5 minutes while it's open (triage, active, or paused).
  • incident_call_sessions and incident_participant_workloads poll on their own every 5 minutes, and take no webhooks, so a key without their role only stops those tables.
  • Workload minutes on incidents can lag, because they grow without changing updated_at. incident_participant_workloads is read again while an incident is open, and for a day after its last change, because incident.io updates workload now and then.
  • Settings lists are read in full every hour. Removed items aren't seen.
  • Alert notes are read every hour, for the alerts that have notes. Notes on alert groups aren't synced, because the API can't list alert groups.
  • Removed attachments, relationships, participants, and alert links aren't seen.
  • A webhook that fails is retried for 24 hours. Polling covers longer outages.

Demo data

pnpm demo --size 128MiB writes made-up incident.io data without incident.io credentials. See the Connector Kit README for the flags and the variables it needs.

Each incident has the alert that started it, an escalation for serious ones, status updates with timeline items and activity log entries, participants with workloads, actions, and workflow runs. Serious incidents also get a post-mortem, follow-ups, a status page notice, and policy findings for late follow-ups. The workspace is written once and doesn't grow with the size: users, teams, the catalog, severities, statuses, types, roles, custom fields, alerting, on-call schedules with shifts, maintenance windows, workflows, the status page, and policies.

Local development

cd connectors/producer-incident-io
pnpm sandbox

pnpm start runs the hosted connector. It needs the Wings and PostgreSQL variables from the Connector Kit README.

To record the VCR cassette, put a key from a test organization in .env, and run pnpm test:ci. Check the new cassette for customer details before committing it.

版本与发布记录

@useairfoil/producer-incident-io 共发布 4 个版本,首次发布于 2026/10/29;过去 12 个月发布了 4 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.0.3latest2026/11/03今天
0.0.22026/10/295 天前
0.0.12026/10/295 天前
0.0.0-stage2026/10/295 天前

关于 @useairfoil/producer-incident-io 的常见问题

@useairfoil/producer-incident-io 是什么?

从一个事件中同步事件及其周围的一切。IO组织:更新、时间表、后续行动、随叫随到、目录、状态页和设置。它回填每个资源,获取webhook POST /webhooks/incident-io和民意调查作为后盾

如何安装 @useairfoil/producer-incident-io?

在项目目录运行 npm install @useairfoil/producer-incident-io,或使用 pnpm add / yarn add / bun add。

@useairfoil/producer-incident-io 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@useairfoil/producer-incident-io 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@useairfoil/producer-incident-io 可以商用吗?

@useairfoil/producer-incident-io 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@useairfoil/producer-incident-io 还在维护吗?

最新版本 0.0.3 发布于 2026/11/03(今天);至今共发布 4 个版本,其中过去 12 个月发布了 4 个;首次发布于 2026/10/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。