Skip to content

Missing types in APIAuditLogChange union type #1339

@eduardozgz

Description

@eduardozgz

Issue description

I tried to filter the safety_alerts_channel_id key, but it seems that APIAuditLogChangeKeySafetyAlertsChannelId is not present in APIAuditLogChange

APIAuditLogChangeKeySnowflake is also missing, but I think this one is excluded on purpose as it would override all keys with key: string and break the discriminated union

Code sample

const change: APIAuditLogChange = {
  key: "safety_alerts_channel_id", // Error: Type '"safety_alerts_channel_id"' is not assignable to type '"$add" | "$remove" | "actions" | "afk_channel_id" | "afk_timeout" | "allow" | "application_id" | "archived" | "asset" | "auto_archive_duration" | "available" | "available_tags" | ... 75 more ... | "widget_enabled"'.ts(2322)
  new_value: "123",
  old_value: "456",
};

Package version

0.38.20

Runtime

Node.js

Runtime version

v22.16.0

Priority this issue should have

Low (slightly annoying)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions