What changed
Producer-side tools call this additive. It breaks exhaustive switches, strict parsers and generated client enums.
Affects this value on InventoryState reachable from 13 operations.
New value: UNTRACKED.
can now return "UNTRACKED"
Who is affected
Code that reads Square's InventoryState objects, used by 13 Square operations.
Before and after
| Where | Before | After |
|---|---|---|
| InventoryState | "COMPOSED", "CUSTOM", "DECOMPOSED", "IN_STOCK", "IN_TRANSIT", "IN_TRANSIT_TO", "NONE", "ORDERED_FROM_VENDOR", "RECEIVED_FROM_VENDOR", "RESERVED_FOR_SALE", "RETURNED_BY_CUSTOMER", "SOLD", "SOLD_ONLINE", "SUPPORTED_BY_NEWER_VERSION", "UNLINKED_RETURN", "WASTE" | "COMPOSED", "CUSTOM", "DECOMPOSED", "IN_STOCK", "IN_TRANSIT", "IN_TRANSIT_TO", "NONE", "ORDERED_FROM_VENDOR", "RECEIVED_FROM_VENDOR", "RESERVED_FOR_SALE", "RETURNED_BY_CUSTOMER", "SOLD", "SOLD_ONLINE", "SUPPORTED_BY_NEWER_VERSION", "UNLINKED_RETURN", "UNTRACKED", "WASTE" |
Code that breaks
switch (response) {
// existing branches …
// no branch for "UNTRACKED"
default:
throw new Error("unexpected value");
}Based on Square’s published API specification. How severity is decided.