github ulsklyc/yuvomi v2.93.0

2 hours ago

Changed

  • The inventory checks every request against the published API description. This is about
    your own API clients; the app sends nothing that is refused now (it sends location ids as
    numbers from this release on, also in the order of locations and child locations). Under
    /api/v1/inventory, input that used to be quietly accepted, reinterpreted or answered later
    is now refused with a 400:

    • everywhere: a path id that is not plain digits, such as 12abc, 5.0, 1e2 or 0x10
      (DELETE /inventory/items/12abc deleted item 12), a number, truth value, list or object in
      a text field (it was stored as text), and a number written as text, a truth value or a
      list in a number field ("12.5", true and [5] were read as numbers);
    • items: a condition, status or odometer_unit outside its list, and false or 0 for
      them (they meant the default; null, "" or leaving it out still do), a day that is not
      YYYY-MM-DD or is a list, a location id that is neither a whole number nor digit text,
      warranty_months outside 0 to 600, an odometer reading that is not a whole number - also
      for a category without one, where it was dropped silently - and a price that is not a
      number, also from an account without the price right (it was ignored);
    • tracked_dates and attachment_document_ids that are not a list: on a replace, null,
      text or an object REMOVED all tracked dates with their reminders, or all document links.
      Leaving the field out still leaves them as they are, and [] still clears them. Tracked
      date rows that are not objects, without label or day, or with numbers outside their range;
    • linking a booking: entry_id as text or left out, a role outside its list,
      amount_share as text or below zero; completing a tracked date and the service log: a day
      that is not YYYY-MM-DD, an odometer reading as text or below zero;
    • the list: status outside its list, location_id that is not plain digits, and a filter
      given twice (they were ignored or read as the first);
    • the order of locations, child locations and categories with entries that are not ids or
      keys ([{}] and [true] were a 500, other entries were skipped or stored), and an order
      of child locations without order (it was a silent no-op; [] still is).

    What stays allowed is in the description now too: null or "" for "no value" where the
    routes read it so, digit text for a location id (older app versions send it), a currency in
    any case, unknown fields. A PUT replaces the whole item, as before: left-out fields are
    cleared or take their default, only the name is required, and tracked_dates and
    attachment_document_ids stay untouched when left out. Rules the description cannot carry
    stay with the routes and their sentences: an empty name after trimming, a day that does not
    exist, a category or location that does not exist (inventory_selected_location_not_found
    as before, for a number and for digit text), the photo content, the odometer that must not
    fall below the current reading. The check runs before the entry is looked up, so a bad
    request for a missing entry is a 400, not a 404 or 409, and an account that may change only
    its own items gets 400 for a bad request on someone else's item and, as before, 403
    not_owner for a valid one. Text lengths count the value as sent.

  • Housekeeping and rewards check every request against the published API description.
    This is about your own API clients; the app sends nothing that is refused now (it sends the
    housekeeper id as a number from this release on). Under /api/v1/housekeeping and
    /api/v1/rewards, input that used to be quietly accepted, reinterpreted or answered later
    is now refused with a 400:

    • everywhere: a path id that is not plain digits, such as 12abc, 1.9, 0x10 or 1
      (they were read as numbers), a number, truth value, list or object in a text field (it was
      stored as text), and a number written as text, a truth value or a list in a number field
      ("60", true and [5] were read as numbers) - for amounts also from an account without
      the amounts right, where they were ignored;
    • PUT /rewards/participants/{userId} without enabled, or with anything but true or
      false ("true", 1, null): it SWITCHED THE PARTICIPATION OFF. enabled is required
      now. PATCH /rewards/catalog/{id} with is_active that is not true or false: it
      switched the reward off;
    • lists: payment_schedule and rate_type of a housekeeper, action of a redemption
      decision (missing or unknown, it was 400 only after the request was looked up), kind of a
      request, frequency of a pocket money plan and direction of a money entry outside their
      values; birth_year_unknown as 0, 1 or null;
    • ids in a body (housekeeper, receipt, person, reward) that are neither whole numbers nor
      digit text, and null for a person or reward in rewards; whole numbers outside the
      route's own bounds (a reward's cost and quantity, a bonus, a plan's anchor day, a task
      frequency below 1);
    • queries: ?month= outside 01 to 12 or before the year 1001 (2026-13 was a 500),
      worker_id, user_id, limit and timezone_offset_minutes that are not plain digits
      (?user_id=abc listed everybody), local_date that is not YYYY-MM-DD, status, kind
      and all outside their values, and any filter given twice.

    What stays allowed is in the description now too: null or "" for "no value" where the
    routes read it so, digit text for ids (the legacy form), unknown fields, a body on the routes
    that read none. Rules the description cannot carry stay with the routes and their sentences:
    an empty name after trimming, the username rule (housekeeping_username_invalid), a day that
    does not exist, amounts below zero, the money amount and currency of an account. Texts the
    rewards routes cut (icon, note, reason) are still cut, not refused. The check runs
    before the entry is looked up, so a bad request is a 400, not a 404, 403 or 409; a valid one
    meets those as before. The admin check of POST /housekeeping/worker and of the rewards
    admin routes, and the shopping right of POST /housekeeping/supply-requests, come first:
    403 stays 403, also for a bad request. Text lengths count the value as sent.

  • Waste collection and the shift schedule check every request against the published API
    description.
    This is about your own API clients; the app sends nothing that is refused
    now. Under /api/v1/waste and /api/v1/schedule, input that used to be quietly accepted,
    reinterpreted or answered later is now refused with a 400:

    • everywhere: a path id that is not plain digits, such as 12abc, 1.5 or 1e3 (they were
      read as 12, 1 and 1), a number, truth value, list or object in a text field, and a number
      written as text, a truth value or a list in a number field ("7" for a cycle length, ""
      or false for reminderOffsetMinutes, which meant 0 minutes);
    • PUT /waste/reminder-settings/{typeId} without enabled, offset_days and
      delivery_time: a body without enabled SWITCHED THE REMINDER OFF, and a missing lead
      time or time was reset to 1 day and 08:00. All three are required now;
    • switches that are not true or false (active, archived, ignored, enabled,
      is_active, overtimeEnabled): active: "false" kept a waste schedule running;
    • garbage that was a 500: type_id: true or {} for a waste schedule or pickup, a note
      that is not text on a moved or skipped pickup, mappings: [null] on an import commit, and
      color: "" for a waste type;
    • lists: a recurrence_kind or weekday code outside its values, weekdays as comma text
      ("MO,TH"; send a list), a mapping profile version
      other than 1, include_archived and include_inactive other than 1, true, 0 or
      false;
    • ids in a body that are neither whole numbers nor digit text (user_id, shift_type_id,
      custom_field_id, the type of a schedule or pickup); bounds the routes have on every
      value (cycle length 1-366, at most 500 cycle days, reminder minutes 0-1440, weekly hours
      1-168, waste reminder lead time 0-14 days);
    • queries: type_id, user_id, from and to that are not plain digits or YYYY-MM-DD
      (?type_id=abc listed every schedule, ?user_id=3abc read 3), and any filter given twice;
    • missing fields that were answered later: profile_digest of a mapping profile commit and
      expected_version of a re-import commit (a 409 before), and a day in the path of a waste
      override that is not YYYY-MM-DD (a 404 before).

    What stays allowed is in the description now too: null or "" for "no value" where the
    routes read it so, digit text for ids (the legacy form), weekdays as a list or one code,
    unknown fields, an empty body where every field is optional (skipping a pickup
    date), a URL source without ics. Rules the description cannot carry stay with the routes
    and their reasons: an empty name after trimming, a day that does not exist, the anchor day of
    a schedule, the interval bound per kind, a type, shift type or member that does not exist,
    the refresh interval of a URL source (with its bounds as params). The check runs before the
    entry is looked up, so a bad request is a 400, not a 404, 403 or 409; a valid one meets those
    as before. A member who names someone else in user_id of a pattern, override, extra shift
    or their range variants gets 403 first, also for a bad request, now with the plain sentence
    Forbidden.. Text lengths count the value as sent.

  • A path id beyond the safe integer range is refused with a 400. This is about your own
    API clients; the app never sends such an id. On the routes that check requests against the
    API description (notes, birthdays, quick links, reminders, notification channels,
    permissions, displays, profile pictures, recipes, recipe providers, pantry, inventory,
    housekeeping, rewards, waste collection, shift schedule), a
    path id above 9007199254740991 is now a 400 with the rule maximum, and a run of digits too
    long to be a number at all (hundreds of digits) a 400 with the rule type. Before, such an id
    answered 404 or 400 depending on the route. 9007199254740991 itself, 0 and a negative id
    are answered by the route as before. The API description gives every numeric path id this
    upper bound.

Don't miss a new yuvomi release

NewReleases is sending notifications on new releases.