Skip to content

Releases: flashcatcloud/go-flashduty

v0.13.1

Choose a tag to compare

@ysyneuysyneu released this 16 Aug 03:41
3c68812

Sync flashduty-docs OpenAPI (2026-08-16).

  • New: Diagnostics.QueryData (POST /monit/query/data) + query_result.v1 types (frames/records/samples).
  • QueryRows docstring marked deprecated; method kept for the migration period.
  • Vendored spec refreshed from flashduty-docs main.

v0.13.0

Choose a tag to compare

@ysyneuysyneu released this 12 Aug 10:17
833beff

Fixed

Optional request fields whose false / 0 carries meaning are now pointers.

Several request fields were generated as plain bool / int64 with omitempty. Go drops the
zero value of such fields, so the key never reached the wire and the API fell back to its
"unset" behaviour. Callers had no way to express the zero value:

  • POST /rum/application/updateis_private, no_ip, no_geo were one-way switches.
    You could turn a privacy setting on but never back off: sending false was indistinguishable
    from omitting the field, so the request was accepted and the setting stayed on.
  • POST /rum/application/create and /updatealerting.enabled. The alerting container
    is omitzero, so an alerting block whose only setting was enabled: false collapsed to nothing
    and was silently ignored.
  • POST /rum/field/listis_facet. Omitted means "all fields" and true means
    "facet-enabled only", so false ("fields that are not facets") was unreachable.
  • Schedule notify.advance_in_time0 means "notify exactly at shift start". It was
    dropped, which the server reads as "no advance notification at all", silently disabling the
    reminder for that schedule.

POST /template/create and /update: feishu_app_card_table_enabled is renamed to
feishu_app_card_v2_table_enabled.
The server only ever bound the v2 key, and unknown keys
are ignored, so the old field had no effect in either direction.

Breaking

Six request fields change from a value type to a pointer:

StructFieldWasNow
RUMApplicationUpdateRequestIsPrivate, NoIP, NoGeobool*bool
RUMApplicationAlertingEnabledbool*bool
RUMFieldListRequestIsFacetbool*bool
ScheduleNotifyAdvanceInTimeint64*int64

Wrap the value with the helper constructors:

req:= flashduty.RUMApplicationUpdateRequest{
ApplicationID: appID,
-NoIP: false,
+NoIP: flashduty.Bool(false),
}
notify:= flashduty.ScheduleNotify{
-AdvanceInTime: 0,
+AdvanceInTime: flashduty.Int64(0),
}

A nil pointer keeps the key off the wire, which preserves the previous "leave unchanged" default.

FeishuAppCardTableEnabled is renamed to FeishuAppCardV2TableEnabled on
TemplateCreateRequest, TemplateUpdateRequest and TemplateItem. Rename the field at call
sites; the type is unchanged.

Response structs keep value types — RUMApplicationItem.IsPrivate / NoIP / NoGeo,
RUMFieldItem.IsFacet and TemplateItem.FeishuAppCardV2TableEnabled are always populated by the
server and need no nil check.

Full changelog: v0.12.1...v0.13.0

v0.12.1

Choose a tag to compare

@ysyneuysyneu released this 12 Aug 08:51
078cb15

Fixed

Incident notification overrides can now force explicit channels.

follow_preference on assigned_to.notify / notify is a tri-state field — omitted means
"use each responder's personal preference", true means the same explicitly, and false means
"deliver over the personal_channels in this request". The field was generated as a plain bool
with omitempty, so Go dropped false from the payload and the SDK could never activate
personal_channels: those requests were accepted but still delivered over the responder's
personal preference.

It is now generated as *bool, and personal_channels works as documented on
POST /incident/create, POST /incident/responder/add and POST /incident/assign.
AssignedTo also gained the notify field, which the API already accepted.

Breaking

FollowPreference changes from bool to *bool on CreateIncidentRequestAssignedToNotify,
AddIncidentResponderRequestNotify and the new AssignedToNotify. Update keyed literals:

Notify: flashduty.AddIncidentResponderRequestNotify{
-FollowPreference: false,
+FollowPreference: flashduty.Bool(false),
PersonalChannels: []string{"sms"},
},

A nil pointer keeps the key off the wire, preserving the "follow personal preference" default.

Response-side structs (ScheduleNotifyBy, EscalateTargetBy, FeedDetailIncidentAssignNotify)
and the escalation-rule / schedule request structs are unchanged — their server-side counterparts
are plain booleans where an omitted field is equivalent to false.

Full changelog: v0.12.0...v0.12.1

v0.11.0

Choose a tag to compare

@ysyneuysyneu released this 11 Aug 09:15

What's Changed

  • chore: sync OpenAPI spec from flashduty-docs by @github-actions[bot] in #53

Full Changelog: v0.10.0...v0.11.0