Driftwatch

Square / Square API /

Breakingdirection flip: their tools call this safe

value can now return "HANDHELD"

What changed

Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.

Affects this value on DeviceAttributesDeviceType reachable from 2 operations.

New value: HANDHELD.

can now return "HANDHELD"

Who is affected

Code that reads Square's DeviceAttributesDeviceType objects, used by 2 Square operations.

Before and after

WhereBeforeAfter
DeviceAttributesDeviceType"TERMINAL""HANDHELD", "TERMINAL"

Code that breaks

switch (response) {
  // existing branches …
  // no branch for "HANDHELD"
  default:
    throw new Error("unexpected value");
}

Based on Square’s published API specification. How severity is decided.