@timbereye/sdk 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -438,7 +438,7 @@ export interface paths {
438
438
  put?: never;
439
439
  /**
440
440
  * Start a scan
441
- * @description Starts a scan: one sitting of capture. There are four methods: `qr_scale`, `ar_scale`, `qr_count` (with an `intent`) and `photo_count`. `qr_count` and `photo_count` scans need a `group_id` (400 `parameter_invalid` without one). The order of a capture sync is: create the scan, upload group images, post item batches (or observations), upload item images, submit. An item image needs its item, which only an item batch creates, so item images come after the batches; everything is uploaded before the submit. The canonical protocol is `docs/timbereye-sync-protocol.md`. A `photo_count` scan is group images and nothing else; server-side counting is not available in the current build: the count is the number of detections the client supplied on the scan's group images (`detections` on `POST /images`, or the `detections` part of the multipart upload), and the status ends at `estimated`. `scan.refined` is never sent for a `photo_count` scan. Accepts JSON or form encoding. **`client_id` is the scan's durable identity.** Posting a scan whose `client_id` already names a scan of the account returns that scan, with 200 and no new record, when the body's `method`, `intent`, `group_id` and `replaces_scan_id` equal the stored scan's; the other fields (`device`, `location`, `metadata`, `started_at`) may differ and are ignored, the stored scan is returned as it is. When one of the four differs it is 409 `client_id_conflict`. This holds without a time limit, so a client whose response was lost beyond the 24-hour idempotency window creates the scan again with the same `client_id`, or looks it up with `GET /scans?client_id=`. A scan is accepted into any group at any time: one captured offline and uploaded days later is one more scan, and its settle is the group's next `group.measured` revision.
441
+ * @description Starts a scan: one sitting of capture. There are four methods: `qr_scale`, `ar_scale`, `qr_count` (with an `intent`) and `photo_count`. `qr_count` and `photo_count` scans need a `group_id` (400 `parameter_invalid` without one). The order of a capture sync is: create the scan, upload group images, post item batches (or observations), upload item images, submit. An item image needs its item, which only an item batch creates, so item images come after the batches; everything is uploaded before the submit ([Working offline](https://www.timbereye.com/docs/working-offline/)). A `photo_count` scan is group images and nothing else; the server does not count the photo: the count is the number of detections the client supplied on the scan's group images (`detections` on `POST /images`, or the `detections` part of the multipart upload), and the status ends at `estimated`. `scan.refined` is never sent for a `photo_count` scan. Accepts JSON or form encoding. **`client_id` is the scan's durable identity.** Posting a scan whose `client_id` already names a scan of the account returns that scan, with 200 and no new record, when the body's `method`, `intent`, `group_id` and `replaces_scan_id` equal the stored scan's; the other fields (`device`, `location`, `metadata`, `started_at`) may differ and are ignored, the stored scan is returned as it is. When one of the four differs it is 409 `client_id_conflict`. This holds without a time limit, so a client whose response was lost beyond the 24-hour idempotency window creates the scan again with the same `client_id`, or looks it up with `GET /scans?client_id=`. A scan is accepted into any group at any time: one captured offline and uploaded days later is one more scan, and its settle is the group's next `group.measured` revision.
442
442
  */
443
443
  post: operations["createScan"];
444
444
  delete?: never;
@@ -502,7 +502,7 @@ export interface paths {
502
502
  put?: never;
503
503
  /**
504
504
  * Send QR count observations
505
- * @description For `qr_count` scans: the tag payloads the device saw, in batches of at most 500, each with an optional `sightings` count, reconciled against the group. Intent `add`: a tag already in the group is `matched`; a tag nobody has becomes an item with an `assigned` measurement from the group's `defaults` (`422 assignment_required` when the spec cannot supply one); a tag whose item is in another group moves it into this one, except with a publishable key, which cannot move items (409 `item_move_not_allowed`). Intent `remove` takes matched items out of the group and `verify` only reports (`matched`, `unknown`, and `missing` for the group's items not seen); a publishable key may use `add` only, so it never learns the group's other tags. **Idempotent by tag payload, not by the batch's `Idempotency-Key`**: a tag already recorded by this scan is not counted again, so a batch posted again under a new key leaves the results unchanged, and `sightings` keeps the highest count reported per tag. A scan that is no longer open refuses observations with 409 `state_conflict`.
505
+ * @description For `qr_count` scans: the tag payloads the device saw, in batches of at most 500, each with an optional `sightings` count, reconciled against the group. Intent `add`: a tag already in the group is `matched`; a tag nobody has becomes an item with an `assigned` measurement from the group's `defaults` (`422 assignment_required` when the spec cannot supply one); a tag whose item is in another group moves it into this one, except with a publishable key, which cannot move items (409 `item_move_not_allowed`), and a phone signed in to the app, which moves it once the worker confirmed (`allow_move` on the observation). Intent `remove` takes matched items out of the group and `verify` only reports (`matched`, `unknown`, and `missing` for the group's items not seen); a publishable key may use `add` only, so it never learns the group's other tags. **Idempotent by tag payload, not by the batch's `Idempotency-Key`**: a tag already recorded by this scan is not counted again, so a batch posted again under a new key leaves the results unchanged, and `sightings` keeps the highest count reported per tag. A scan that is no longer open refuses observations with 409 `state_conflict`.
506
506
  */
507
507
  post: operations["addScanObservations"];
508
508
  delete?: never;
@@ -522,7 +522,7 @@ export interface paths {
522
522
  put?: never;
523
523
  /**
524
524
  * Submit a scan
525
- * @description Closes capture and starts processing. For `qr_scale` and `ar_scale` the status moves `open`, `processing`, `estimated`, `refined`; follow it by polling or by the `scan.estimated` and `scan.refined` webhooks. Refinement is expected within an hour, not seconds. A `qr_count` scan never refines (its items carry `assigned` measurements): submitting it sets the status straight to `refined`, never `estimated`, and sends `scan.refined`. A `photo_count` scan has no refinement either: submitting totals the supplied detections, the status becomes `estimated` and stays there, and `scan.refined` is not sent. The optional `ended_at` records when capture ended on the device (default: now); it may not be before `started_at`. **Submitting is idempotent**: submitting a scan that is no longer `open` returns it as it is, with 200 and whatever status it has reached, and changes nothing (`ended_at` is ignored then). Submit after every item batch, observation batch and image upload; an image whose upload completes afterwards is still stored, but a `photo_count` total is not recomputed.
525
+ * @description Closes capture and starts processing. For `qr_scale` and `ar_scale` the status moves `open`, `processing`, `estimated`, `refined`; follow it by polling or by the `scan.estimated` and `scan.refined` webhooks. Refinement typically takes seconds after the image upload; the queue is picked up every minute. A `qr_count` scan never refines (its items carry `assigned` measurements): submitting it sets the status straight to `refined`, never `estimated`, and sends `scan.refined`. A `photo_count` scan has no refinement either: submitting totals the supplied detections, the status becomes `estimated` and stays there, and `scan.refined` is not sent. The optional `ended_at` records when capture ended on the device (default: now); it may not be before `started_at`. **Submitting is idempotent**: submitting a scan that is no longer `open` returns it as it is, with 200 and whatever status it has reached, and changes nothing (`ended_at` is ignored then). Submit after every item batch, observation batch and image upload; an image whose upload completes afterwards is still stored, but a `photo_count` total is not recomputed.
526
526
  */
527
527
  post: operations["submitScan"];
528
528
  delete?: never;
@@ -624,7 +624,7 @@ export interface paths {
624
624
  };
625
625
  /**
626
626
  * List places
627
- * @description Returns your places and shared ports, newest first.
627
+ * @description Returns your places and the ports Timbereye shares, newest first. `owner=account` returns only your own places; `owner=shared` only the shared ports.
628
628
  */
629
629
  get: operations["listPlaces"];
630
630
  put?: never;
@@ -1038,7 +1038,7 @@ export interface paths {
1038
1038
  put?: never;
1039
1039
  /**
1040
1040
  * Start adding a card
1041
- * @description Returns the payment provider's page where an owner saves a card. The page returns to `return_url` with `setup_session` in the query; then call `POST /billing/card_setup/confirm`. Timbereye never sees the card number. 503 `billing_unavailable` where online billing is not configured; 409 `contract_account` for an organisation billed under a contract. Owners only. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1041
+ * @description Returns the payment provider's page where an owner saves a card. The page returns to `return_url` with `setup_session` in the query; then call `POST /billing/card_setup/confirm`. Timbereye never sees the card number. 503 `billing_unavailable` where online billing is not configured; 409 `contract_account` for an organisation billed under a contract; 409 `billing_exempt` for an organisation that is billing exempt. Owners only. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1042
1042
  */
1043
1043
  post: operations["startBillingCardSetup"];
1044
1044
  delete?: never;
@@ -1136,7 +1136,7 @@ export interface paths {
1136
1136
  };
1137
1137
  /**
1138
1138
  * Current detector model
1139
- * @description Returns the current on-device detector for a platform with a signed download URL. `download_url` serves exactly one file per platform, and `size_bytes` and `sha256` describe exactly those bytes: for `ios` (`format: coreml_mlpackage_zip`) a ZIP archive of the `.mlpackage` directory, which the client unzips and compiles with Core ML; for `android` (`format: tflite`) the `.tflite` flatbuffer, used as downloaded. Check the SHA-256 after download and record `id@version` with measurements. This operation is in the contract but not built yet: it answers 501 `not_implemented` until a model is published.
1139
+ * @description Returns the current on-device detector for a platform with a signed download URL. `download_url` serves exactly one file per platform, and `size_bytes` and `sha256` describe exactly those bytes: for `ios` (`format: coreml_mlpackage_zip`) a ZIP archive of the `.mlpackage` directory, which the client unzips and compiles with Core ML; for `android` (`format: tflite`) the `.tflite` flatbuffer, used as downloaded. Check the SHA-256 after download and record `id@version` with measurements. The current release is `timbereye-log-detector` 1.0.0 (input 960 x 960; `variant=640` asks for the 640 x 640 fallback, `timbereye-log-detector-640`). The answer also states the pre-processing the model expects (letterbox: scale to fit, centre on a grey 114 square), its thresholds and, on Android, the output layout the decoder reads. 503 `model_unavailable` means this environment has no detector to offer yet (the file is not in its storage): run without on-device detection and ask again later.
1140
1140
  */
1141
1141
  get: operations["getDetectorModel"];
1142
1142
  put?: never;
@@ -1147,6 +1147,26 @@ export interface paths {
1147
1147
  patch?: never;
1148
1148
  trace?: never;
1149
1149
  };
1150
+ "/models/board-end-counter": {
1151
+ parameters: {
1152
+ query?: never;
1153
+ header?: never;
1154
+ path?: never;
1155
+ cookie?: never;
1156
+ };
1157
+ /**
1158
+ * Current board-end counter model
1159
+ * @description Returns the current on-device lumber board-end counter for a platform with a signed download URL, in the same shape as the detector (`GET /models/detector`) plus the counting recipe: `tiling` (resize the photo to a `photo_long_side` long side, cut a `grid` of tiles with `overlap`, letterbox each to `tile_input`, keep a box in the tile whose core holds its centre) and `count` (a dot per box centre at or above `thresholds.recommended_confidence`; check thin, dense boards closely when the median short side is below `check_if_median_short_side_px_below`). The current release is `timbereye-board-end-counter` 0.9.0: its count is a proposal the operator corrects and confirms, never a measurement on its own (`variant=s` asks for the smaller `timbereye-board-end-counter-s`). 503 `model_unavailable` means this environment has no counter to offer: count by hand and ask again later.
1160
+ */
1161
+ get: operations["getBoardEndCounterModel"];
1162
+ put?: never;
1163
+ post?: never;
1164
+ delete?: never;
1165
+ options?: never;
1166
+ head?: never;
1167
+ patch?: never;
1168
+ trace?: never;
1169
+ };
1150
1170
  "/webhook_endpoints/{id}/roll_secret": {
1151
1171
  parameters: {
1152
1172
  query?: never;
@@ -1187,6 +1207,54 @@ export interface paths {
1187
1207
  patch?: never;
1188
1208
  trace?: never;
1189
1209
  };
1210
+ "/account/lumber": {
1211
+ parameters: {
1212
+ query?: never;
1213
+ header?: never;
1214
+ path?: never;
1215
+ cookie?: never;
1216
+ };
1217
+ get?: never;
1218
+ put?: never;
1219
+ post?: never;
1220
+ delete?: never;
1221
+ options?: never;
1222
+ head?: never;
1223
+ /**
1224
+ * Change the lumber settings
1225
+ * @description Changes the organisation's lumber settings in the request's mode (`GET /account` `lumber`): whether phones may open lumber and panel groups and which of the two (`products`), the default board-foot method of hardwood bundles tallied board by board, and whether new bundles need photos. Fields left out keep their value. Applies to groups created afterwards; no tally already submitted changes. Secret keys and console sessions of owners (`account.settings`); phones are refused.
1226
+ */
1227
+ patch: operations["updateAccountLumber"];
1228
+ trace?: never;
1229
+ };
1230
+ "/account/logo": {
1231
+ parameters: {
1232
+ query?: never;
1233
+ header?: never;
1234
+ path?: never;
1235
+ cookie?: never;
1236
+ };
1237
+ /**
1238
+ * Retrieve the logo
1239
+ * @description The organisation's logo, printed top left on the documents read from its groups (the packing list PDF), in both modes: what it is and the image itself (`data`, base64). 404 when the organisation has none; its documents then set its name. See https://www.timbereye.com/docs/lumber-and-panels/#the-packing-list-as-a-pdf.
1240
+ */
1241
+ get: operations["getAccountLogo"];
1242
+ /**
1243
+ * Set the logo
1244
+ * @description Sets the organisation's logo, replacing any: a PNG or JPEG, base64-encoded in `data`, at most 256 KB, each side 16 to 4,000 pixels. SVG is not accepted. A PNG is kept re-encoded, without its metadata. One logo for the organisation, in both modes; documents made afterwards carry it. Secret keys and console sessions of owners (`account.settings`); phones are refused.
1245
+ */
1246
+ put: operations["setAccountLogo"];
1247
+ post?: never;
1248
+ /**
1249
+ * Remove the logo
1250
+ * @description Removes the organisation's logo; documents set its name again. Removing a logo that is not there changes nothing. Secret keys and console sessions of owners (`account.settings`).
1251
+ */
1252
+ delete: operations["deleteAccountLogo"];
1253
+ options?: never;
1254
+ head?: never;
1255
+ patch?: never;
1256
+ trace?: never;
1257
+ };
1190
1258
  "/api_keys": {
1191
1259
  parameters: {
1192
1260
  query?: never;
@@ -1394,7 +1462,7 @@ export interface paths {
1394
1462
  put?: never;
1395
1463
  /**
1396
1464
  * Invite by email
1397
- * @description Invites an email address to the organisation with a role. Owners only. The response carries the accept `token` once (Timbereye does not email it yet: send the dashboard's accept link yourself); a replay of the same `Idempotency-Key` returns `token: null`. The invitation expires after 7 days. The address must not belong to a member (409 `already_member`) or have an open invitation (409 `invitation_exists`; resend that one). Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1465
+ * @description Invites an email address to the organisation with a role, and emails the invitation to that address. Owners only. `emailed` says whether the email went out (it does not where mail is not configured); the response also carries the accept `token` once, so the dashboard can offer the link to copy. A replay of the same `Idempotency-Key` returns `token: null` and sends nothing. The invitation expires after 7 days. The address must not belong to a member (409 `already_member`) or have an open invitation (409 `invitation_exists`; resend that one). An organisation may send 20 invitations (creates and resends) an hour (429 `rate_limited`). Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1398
1466
  */
1399
1467
  post: operations["createInvitation"];
1400
1468
  delete?: never;
@@ -1434,7 +1502,7 @@ export interface paths {
1434
1502
  put?: never;
1435
1503
  /**
1436
1504
  * Resend an invitation
1437
- * @description Issues a new accept token for an open (pending or expired) invitation and restarts its 7 days; the earlier link stops working. Owners only. The token is in the response once. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1505
+ * @description Issues a new accept token for an open (pending or expired) invitation, emails it again and restarts its 7 days; the earlier link stops working. Owners only. The token is in the response once, and `emailed` says whether the email went out. Counts towards the 20 invitations an organisation may send an hour (429 `rate_limited`). Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1438
1506
  */
1439
1507
  post: operations["resendInvitation"];
1440
1508
  delete?: never;
@@ -1443,6 +1511,26 @@ export interface paths {
1443
1511
  patch?: never;
1444
1512
  trace?: never;
1445
1513
  };
1514
+ "/team/invitations/{id}/link": {
1515
+ parameters: {
1516
+ query?: never;
1517
+ header?: never;
1518
+ path?: never;
1519
+ cookie?: never;
1520
+ };
1521
+ /**
1522
+ * Retrieve an invitation's link
1523
+ * @description Returns a pending invitation with its current accept `token`, so an owner can send the link themselves. Nothing is emailed and the token does not change. An expired, accepted or revoked invitation has no link to give (409 `invitation_unusable`; resend it for a new one). Owners only. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1524
+ */
1525
+ get: operations["retrieveInvitationLink"];
1526
+ put?: never;
1527
+ post?: never;
1528
+ delete?: never;
1529
+ options?: never;
1530
+ head?: never;
1531
+ patch?: never;
1532
+ trace?: never;
1533
+ };
1446
1534
  "/invitations/accept": {
1447
1535
  parameters: {
1448
1536
  query?: never;
@@ -1472,7 +1560,7 @@ export interface paths {
1472
1560
  };
1473
1561
  /**
1474
1562
  * List audit log entries
1475
- * @description Lists who did what to the team, the API keys and the webhook secrets, newest first. Entries are never changed or deleted. Owners and developers. An action by a Timbereye staff member acting as the account is attributed to them, with `actor.type: timbereye_staff`. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1563
+ * @description Lists who did what in the organisation (the team, the API keys, the webhook secrets, billing, data settings, scanners, deletions and moves), newest first. Entries are never changed or deleted. Owners and developers. An action by a Timbereye staff member acting as the account is attributed to them, with `actor.type: timbereye_staff`. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1476
1564
  */
1477
1565
  get: operations["listAuditLogEntries"];
1478
1566
  put?: never;
@@ -1514,7 +1602,7 @@ export interface paths {
1514
1602
  put?: never;
1515
1603
  /**
1516
1604
  * Save first-run onboarding
1517
- * @description Names the organisation, records the answers of first-run onboarding (about the person, the organisation, what it is building and what it measures: spec section 7, use-case capture) and the step reached, so a person who comes back resumes where they left off, and with `complete: true` marks onboarding done. Answers are stored as given: unknown values are dropped, and nothing optional blocks progress. A `name` in `about_you` also becomes the person's name in the team. Only the given fields change; `completed_at` is set once. Owners only (`account.settings`), or a Timbereye staff member acting as the account. An organisation a person signed up themselves needs their verified email (403 `email_unverified`). Renaming it counts against the limits on setting up organisations (429 `rate_limited`). While sign-up is closed (`TIMBEREYE_SIGNUP_MODE`), an organisation that a person's own sign-in created may do this only once admitted (an allow-listed email domain, or admitted by Timbereye); otherwise 403 `signup_closed`. A name another organisation has is 409 `name_taken`. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1605
+ * @description Names the organisation, records the answers of first-run onboarding (about the person, the organisation, what it is building and what it measures: spec section 7, use-case capture) and the step reached, so a person who comes back resumes where they left off, and with `complete: true` marks onboarding done. Answers are stored as given: unknown values are dropped, and nothing optional blocks progress. A `name` in `about_you` also becomes the person's name in the team. Only the given fields change; `completed_at` is set once. Owners only (`account.settings`), or a Timbereye staff member acting as the account. An organisation a person signed up themselves needs their verified email (403 `email_unverified`). Renaming it counts against the limits on setting up organisations (429 `rate_limited`). While sign-up is closed (`TIMBEREYE_SIGNUP_MODE`), an organisation that a person's own sign-in created may do this only once admitted (an allow-listed email domain, or admitted by Timbereye); otherwise 403 `signup_closed`. Names need not be unique: any number of organisations may share one. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1518
1606
  */
1519
1607
  post: operations["updateConsoleOnboarding"];
1520
1608
  delete?: never;
@@ -1567,6 +1655,30 @@ export interface paths {
1567
1655
  patch?: never;
1568
1656
  trace?: never;
1569
1657
  };
1658
+ "/console/support_requests": {
1659
+ parameters: {
1660
+ query?: never;
1661
+ header?: never;
1662
+ path?: never;
1663
+ cookie?: never;
1664
+ };
1665
+ /**
1666
+ * List your support requests
1667
+ * @description The signed-in person's own requests to Timbereye support in this organisation, newest first (at most 50). Every member may read their own. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1668
+ */
1669
+ get: operations["listConsoleSupportRequests"];
1670
+ put?: never;
1671
+ /**
1672
+ * Write to Timbereye support
1673
+ * @description The console's Contact us form. Records the message with who sent it, the organisation, the mode (from `Timbereye-Mode`) and the context the console attaches, and emails Timbereye support, which replies to the person by email. Recorded in the audit log (`support.requested`). Every member may, viewers included. Limited per organisation: 10 an hour and 30 a day (429 `rate_limited`). Retrying with the same idempotency key returns the same request. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1674
+ */
1675
+ post: operations["createConsoleSupportRequest"];
1676
+ delete?: never;
1677
+ options?: never;
1678
+ head?: never;
1679
+ patch?: never;
1680
+ trace?: never;
1681
+ };
1570
1682
  "/console/agreements": {
1571
1683
  parameters: {
1572
1684
  query?: never;
@@ -1598,7 +1710,7 @@ export interface paths {
1598
1710
  put?: never;
1599
1711
  /**
1600
1712
  * Start an organisation
1601
- * @description Starts a new organisation for a signed-in person who belongs to none (they left theirs, or were removed) and makes them its owner; first-run onboarding follows. A person's first sign-in starts one by itself, so this is only for later. A person may have at most `TIMBEREYE_SIGNUP_MAX_ORGANISATIONS_PER_USER` organisations (3 by default), counting the first; beyond that 403 `organisation_limit`. Refused with 403 `email_unverified` until the person's email is verified, with 403 `signup_closed` while sign-up is closed, with 409 `state_conflict` for a person already in an organisation, and with 429 `rate_limited` when one person or one network address sets up too many organisations in an hour. A name another organisation has is 409 `name_taken`. Repeating the request with the same `Idempotency-Key` returns the same organisation. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1713
+ * @description Starts a new organisation for a signed-in person who belongs to none (they left theirs, or were removed) and makes them its owner; first-run onboarding follows. A person's first sign-in starts one by itself, so this is only for later. A person may have at most `TIMBEREYE_SIGNUP_MAX_ORGANISATIONS_PER_USER` organisations (3 by default), counting the first; beyond that 403 `organisation_limit`. Refused with 403 `email_unverified` until the person's email is verified, with 403 `signup_closed` while sign-up is closed, with 409 `state_conflict` for a person already in an organisation, and with 429 `rate_limited` when one person or one network address sets up too many organisations in an hour. Names need not be unique: any number of organisations may share one. Repeating the request with the same `Idempotency-Key` returns the same organisation. Dashboard sessions only: a request with any API key or capture token is refused with 403 `session_required`.
1602
1714
  */
1603
1715
  post: operations["createConsoleOrganisation"];
1604
1716
  delete?: never;
@@ -1678,7 +1790,7 @@ export interface paths {
1678
1790
  put?: never;
1679
1791
  /**
1680
1792
  * Sign a worker in with the emailed code
1681
- * @description The second step: the worker types the code. A right code proves the address. If the person may scan for exactly one organisation (a `scanner` added on the Team page, or an owner, developer or editor), or `organisation_id` names one of theirs, the answer is a `device_sign_in` with its `secret`, shown once: the app keeps it in the Keychain (Android: the Keystore) and sends it as `Authorization: Bearer te_live_ds_…` with `Timbereye-Installation-Id` on every request. If they may scan for several, the answer is a `device_sign_in_choice`: the app shows the organisations and calls `POST /device_sign_in/choose`. A wrong or expired code is 401 `code_invalid`; an address that no organisation has added is 403 `not_a_member`. The mode is the organisation's: live once live mode is on for it, test before. Attempts are limited per address and per network address (429 `rate_limited`). For the phone only.
1793
+ * @description The second step: the worker types the code. A right code proves the address. If the person may scan for exactly one organisation (a `scanner` added on the Team page, or an owner, developer or editor), or `organisation_id` names one of theirs, the answer is a `device_sign_in` with its `secret`, shown once: the app keeps it in the Keychain (Android: the Keystore) and sends it as `Authorization: Bearer te_live_ds_…` with `Timbereye-Installation-Id` on every request. If they may scan for several, the answer is a `device_sign_in_choice`: the app shows the organisations and calls `POST /device_sign_in/choose`. A wrong or expired code is 401 `code_invalid`; an address that no organisation has added is 403 `not_a_member`, unless the app sends `offer_new_organisation`: then the answer is a `device_sign_in_no_organisation`, with the invitations waiting for the address or a token for `POST /device_sign_in/organisation`. The mode is the organisation's: live once live mode is on for it, test before. Attempts are limited per address and per network address (429 `rate_limited`). For the phone only.
1682
1794
  */
1683
1795
  post: operations["verifyDeviceSignInCode"];
1684
1796
  delete?: never;
@@ -1698,7 +1810,7 @@ export interface paths {
1698
1810
  put?: never;
1699
1811
  /**
1700
1812
  * Sign a worker in from the email's link
1701
- * @description The sign-in email's link opens the Timbereye app (`timbereye-capture://signed-in#access_token=…&refresh_token=…`) instead of the website, so tapping it on the phone signs the worker in without typing the code, and nothing is created on the website. The app sends the two values from the link here; the answer is the same as `POST /device_sign_in/verify`. A used or expired link is 401 `code_invalid`: the worker types the code instead (a link that was opened has used up the code; ask for a new one). For the phone only.
1813
+ * @description The sign-in email's link opens the Timbereye app (`timbereye-capture://signed-in#access_token=…&refresh_token=…`) instead of the website, so tapping it on the phone signs the worker in without typing the code, and nothing is created on the website. The app sends the two values from the link here; the answer is the same as `POST /device_sign_in/verify`, `device_sign_in_no_organisation` included. A used or expired link is 401 `code_invalid`: the worker types the code instead (a link that was opened has used up the code; ask for a new one). For the phone only.
1702
1814
  */
1703
1815
  post: operations["exchangeDeviceSignInLink"];
1704
1816
  delete?: never;
@@ -1727,6 +1839,46 @@ export interface paths {
1727
1839
  patch?: never;
1728
1840
  trace?: never;
1729
1841
  };
1842
+ "/device_sign_in/organisation": {
1843
+ parameters: {
1844
+ query?: never;
1845
+ header?: never;
1846
+ path?: never;
1847
+ cookie?: never;
1848
+ };
1849
+ get?: never;
1850
+ put?: never;
1851
+ /**
1852
+ * Start an organisation from the app
1853
+ * @description After a `device_sign_in_no_organisation` with a `new_organisation` token: starts an organisation in test mode with the person as its owner, exactly as signing up on the website does (the same limits: organisations per person, and per person and per network address an hour, 429 `rate_limited`), and signs the phone in to it. Answers a `device_sign_in` with its `secret`, shown once. The token is good for 30 minutes, for the same installation; a retry with the same token answers the same organisation. An expired or altered token is 401 `code_invalid`: sign in again. If the address was added to an organisation since, the answer is as for `POST /device_sign_in/verify`; if it was invited since, 409 `invitation_pending`. 403 `signup_closed` when sign-up is closed to the address. For the phone only.
1854
+ */
1855
+ post: operations["createDeviceSignInOrganisation"];
1856
+ delete?: never;
1857
+ options?: never;
1858
+ head?: never;
1859
+ patch?: never;
1860
+ trace?: never;
1861
+ };
1862
+ "/origin_choices": {
1863
+ parameters: {
1864
+ query?: never;
1865
+ header?: never;
1866
+ path?: never;
1867
+ cookie?: never;
1868
+ };
1869
+ /**
1870
+ * Tracts to tie a load to (app)
1871
+ * @description The organisation's tracts by name, for the Timbereye app's Tract choice on a new load, and the tract the phone's location lies inside (`suggested_place_id`), which the app pre-selects. Names only, never boundaries. For the phone only; a server lists tracts with `GET /places?type=tract`.
1872
+ */
1873
+ get: operations["listOriginChoices"];
1874
+ put?: never;
1875
+ post?: never;
1876
+ delete?: never;
1877
+ options?: never;
1878
+ head?: never;
1879
+ patch?: never;
1880
+ trace?: never;
1881
+ };
1730
1882
  "/device_sign_in": {
1731
1883
  parameters: {
1732
1884
  query?: never;
@@ -1760,7 +1912,7 @@ export interface paths {
1760
1912
  };
1761
1913
  /**
1762
1914
  * List the groups to scan into
1763
- * @description The groups of the organisation in the sign-in's mode, newest first: what the worker's app shows after sign-in. A slim `capture_group_summary` per group (name, reference, kind, spec and how many logs it holds), never its figures, weight, metadata or places. `q` searches name and reference (case-insensitive, anywhere in the text); `kind` filters. A test-mode sign-in of an organisation whose live mode has since been turned on is 403 `organisation_now_live`: uploads of what is on the phone keep working, and the worker signs in again to scan live. Device sign-ins only; for your server, `GET /groups`.
1915
+ * @description The groups of the organisation in the sign-in's mode, newest first: what the worker's app shows after sign-in. A slim `capture_group_summary` per group (name, reference, kind, spec and how many logs it holds, with their volume as the server has it), never its other figures, weight, metadata or places. `q` searches name and reference (case-insensitive, anywhere in the text); `kind` filters. A test-mode sign-in of an organisation whose live mode has since been turned on is 403 `organisation_now_live`: uploads of what is on the phone keep working, and the worker signs in again to scan live. Device sign-ins only; for your server, `GET /groups`.
1764
1916
  */
1765
1917
  get: operations["listCaptureGroups"];
1766
1918
  put?: never;
@@ -2053,7 +2205,11 @@ export interface paths {
2053
2205
  get: operations["getLabelTemplate"];
2054
2206
  put?: never;
2055
2207
  post?: never;
2056
- delete?: never;
2208
+ /**
2209
+ * Delete a label template
2210
+ * @description Deletes a label template. A template a tag batch was made with is kept: 409 `label_template_in_use` (the batch prints with it and names it). Duplicate it to make a changed one.
2211
+ */
2212
+ delete: operations["deleteLabelTemplate"];
2057
2213
  options?: never;
2058
2214
  head?: never;
2059
2215
  /**
@@ -2178,7 +2334,7 @@ export interface paths {
2178
2334
  put?: never;
2179
2335
  /**
2180
2336
  * Create groups in one call
2181
- * @description Creates up to 500 groups in one call and one transaction, optionally under a parent created in the same call (`parent`) or an existing one (`parent_id`): a packing list and its bundles, or more bundles for a list. Each entry takes the fields of `POST /groups`, including the lumber and panel fields `product`, `spec`, `bundle`, `rule` and `expected`; a bundle inherits the parent's `product`. `external_ref` must be unique within the batch. Each group gets its own `group.created`. Safe to retry with the same `Idempotency-Key`. Lumber and panels are in development: no phone app tallies them yet.
2337
+ * @description Creates up to 500 groups in one call and one transaction, optionally under a parent created in the same call (`parent`) or an existing one (`parent_id`): a container (or truck load, stack) and its bundles, or more bundles for a group. Read the result as a packing list with `GET /groups/{id}/packing_list`. Each entry takes the fields of `POST /groups`, including the lumber and panel fields `product`, `spec`, `bundle`, `rule` and `expected`; a bundle inherits the parent's `product`. `external_ref` must be unique within the batch. Each group gets its own `group.created`. Safe to retry with the same `Idempotency-Key`.
2182
2338
  */
2183
2339
  post: operations["createGroupBatch"];
2184
2340
  delete?: never;
@@ -2202,7 +2358,7 @@ export interface paths {
2202
2358
  put?: never;
2203
2359
  /**
2204
2360
  * Submit a bundle's tally
2205
- * @description Sends a bundle's tally in any of the three shapes the bundle's spec names (`uniform`: a count of identical pieces; `per_piece`: one line per board; `width_class`: a class width and a count per line), as a phone will when the worker confirms it. Replaces the bundle's lines atomically; the previous tally is kept as a revision (`retally`). Idempotent by `client_id`: the same tally sent again returns the same result, a different tally under the same `client_id` is 409 `client_id_conflict`. `replaces` (optional) must name the current tally or the call is 409 `tally_replaced`. Omitted thickness, length (and width for `uniform`) come from the spec with `source: group_default`. A submitted tally is final: it is the bundle's next revision and sends `group.measured`. Errors: 422 `tally_line_incomplete`, `rule_shape_mismatch`, `width_class_out_of_range`, `tally_not_allowed` (a packing list).
2361
+ * @description Sends a bundle's tally in any of the three shapes the bundle's spec names (`uniform`: a count of identical pieces; `per_piece`: one line per board; `width_class`: a class width and a count per line), as a phone will when the worker confirms it. Replaces the bundle's lines atomically; the previous tally is kept as a revision (`retally`). Idempotent by `client_id`: the same tally sent again returns the same result, a different tally under the same `client_id` is 409 `client_id_conflict`. `replaces` (optional) must name the current tally, and `replaces_revision` (optional) the revision the sender last saw (0 for none), or the call is 409 `tally_replaced`: a phone sends `replaces_revision` so a correction made in the office meanwhile is never silently overwritten. Omitted thickness, length (and width for `uniform`) come from the spec with `source: group_default`. A submitted tally is final: it is the bundle's next revision and sends `group.measured`. Errors: 422 `tally_line_incomplete`, `rule_shape_mismatch`, `width_class_out_of_range`, `tally_not_allowed` (a packing list).
2206
2362
  */
2207
2363
  post: operations["submitGroupTally"];
2208
2364
  delete?: never;
@@ -2260,7 +2416,7 @@ export interface paths {
2260
2416
  };
2261
2417
  /**
2262
2418
  * Get a bundle's tally sheet
2263
- * @description The tally sheet that travels with the bundle: the `group_tally` with its lines and a `document` block (`generated_at`, `content_sha256`). With `format=html`, a self-contained printable HTML page rendered from the same JSON (`object: document`, `content`). PDF output is a later addition.
2419
+ * @description The tally sheet that travels with the bundle: the `group_tally` with its lines and a `document` block (`generated_at`, `content_sha256`). With `format=html`, a self-contained printable HTML page rendered from the same JSON (`object: document`, `content`).
2264
2420
  */
2265
2421
  get: operations["getGroupTallySheet"];
2266
2422
  put?: never;
@@ -2280,7 +2436,7 @@ export interface paths {
2280
2436
  };
2281
2437
  /**
2282
2438
  * Get a packing list
2283
- * @description The packing list of a group whose children are bundles or units: one row per bundle with its pieces and figures (the flat layout of an export list, with the width-class histogram where bundles are width-class tallies), `width_classes`, the thickness × length `pivot`, `totals` under the list's convention and `totals_alternative` under the other (`exact`: the sum of unrounded bundle volumes, rounded once; `reported`: the sum of the printed bundle figures), and `complete` once every bundle has a final (submitted) tally. A bundle that leaves the list after its tally was submitted (moved on into a container or a vessel hold) stays on it, so the list remains the record of what was tallied on it. `include=tally_sheets` adds each bundle's tally sheet; `format=html` returns a printable page. Lists of up to 2,000 bundles are returned whole.
2439
+ * @description The packing list of a group whose children are bundles or units: one row per bundle with its pieces and figures (the flat layout of an export list, with the width-class histogram where bundles are width-class tallies), `width_classes`, the thickness × length `pivot`, `totals` under the list's convention and `totals_alternative` under the other (`exact`: the sum of unrounded bundle volumes, rounded once; `reported`: the sum of the printed bundle figures), `totals_by_product` (`lumber`, `panel`: `count`, `totals`, `totals_alternative`), and `complete` once every bundle has a final (submitted) tally. A bundle that leaves the list after its tally was submitted (moved on into a container or a vessel hold) stays on it, so the list remains the record of what was tallied on it. Any group can be read this way (a container, a truck load, a stack, a group a phone opened): the packing list is the document of what a group holds, not a kind of group to create. Bundles and units in the groups inside this one are rows too, at any depth: a shipment whose containers sit inside it (`parent_id`) has one packing list for all of them, each row naming its container in `in_group` (null for a row directly in this group), the rows grouped by container, and `groups` giving each container's `totals_by_product` (the printable page heads each container's rows with its totals). A group may hold bundles and units together, each row has its `product` and `kind`, and totals never add one product to another: `totals` are the list's own product's, or, for a group without a product, the one product it holds (null while it holds both). `include=tally_sheets` adds each bundle's tally sheet; `format=html` returns a printable page. Lists of up to 2,000 bundles are returned whole. `logs` lists the logs in the group and in the groups inside it (up to 5,000; `logs_has_more` beyond), each as stored: its tag, species, grade, length, small-end diameters (short and long) and JAS volume, with `totals_by_product.sawlog` (`logs`, `m3`); `weight` is the group's weighbridge net weight and each entry of `groups` has its own. `format=pdf` returns the packing list as a PDF (`application/pdf`), made from the same data on every request and never cached: the organisation's logo (`PUT /account/logo`) or its name top left, the group's shipping details as given when it has any (`shipping`; a group inside another takes that group's for any field it lacks, never its seal, and a shipment's summary shows each container's seal), a section per container for a shipment after a summary page, the totals per product, "Test mode" beside the title in test mode; `paper` is `a4` or `letter` (by default Letter when the lumber is measured in inches and feet, else A4) and `detail=tally` adds each bundle's tally lines. See https://www.timbereye.com/docs/lumber-and-panels/#the-packing-list-as-a-pdf.
2284
2440
  */
2285
2441
  get: operations["getPackingList"];
2286
2442
  put?: never;
@@ -2300,7 +2456,7 @@ export interface paths {
2300
2456
  };
2301
2457
  /**
2302
2458
  * List where a group has been
2303
- * @description The group's parents over time, oldest first, with when it joined and left each; the current parent last with `left_at` null. A tallied lumber bundle may move out of its packing list into a container or vessel hold; this is its record.
2459
+ * @description The group's parents over time, oldest first, with when it joined and left each; the current parent last with `left_at` null. A tallied lumber bundle may move from one group into another (a stack into a container, a container into a vessel hold); this is its record.
2304
2460
  */
2305
2461
  get: operations["listGroupParents"];
2306
2462
  put?: never;
@@ -2322,7 +2478,7 @@ export interface paths {
2322
2478
  put?: never;
2323
2479
  /**
2324
2480
  * Simulate a packing list (test mode)
2325
- * @description Test-mode keys only (403 `test_mode_only` otherwise). Creates a packing list and its bundles or units from a scenario, and submits each tally, so `group.measured` arrives for each bundle and, once every bundle is final, for the list: `hardwood_packing_list` (12 board-by-board 4/4 bundles), `metric_width_class_list` (150 bundles in 10 mm width classes, m³), `softwood_units` (three units of identical boards and a metric pack with a label), `panel_units` (six plywood, OSB, particleboard and MDF units). Deterministic for a `seed`. Nothing simulated is billed.
2481
+ * @description Test-mode keys only (403 `test_mode_only` otherwise). Creates a packing list and its bundles or units from a scenario (or, with `group_id`, puts them into an existing group, so it holds several products), and submits each tally, so `group.measured` arrives for each bundle and, once every bundle is final, for the list: `hardwood_packing_list` (12 board-by-board 4/4 bundles), `metric_width_class_list` (150 bundles in 10 mm width classes, m³), `softwood_units` (three units of identical boards and a metric pack with a label), `panel_units` (six plywood, OSB, particleboard and MDF units). Deterministic for a `seed`. Nothing simulated is billed.
2326
2482
  */
2327
2483
  post: operations["simulatePackingList"];
2328
2484
  delete?: never;
@@ -2839,7 +2995,7 @@ export interface components {
2839
2995
  Error: {
2840
2996
  type: components["schemas"]["ErrorType"];
2841
2997
  /**
2842
- * @description Stable machine-readable code. New codes may be added within v1, so treat unknown values as the generic case. Codes in use: `idempotency_key_reused` (same `Idempotency-Key` sent with a different request, 409), `idempotency_request_in_progress` (a request with the same key is still running, 409; retry later), `idempotency_key_missing` (400), `resource_missing` (404, including rows that belong to another account), `resource_exists` (409, for example a `client_id` or species code already in use), `place_name_taken` (409, `param: name`: another active place of the account has this name), `parameter_invalid`, `parameter_missing`, `parameter_unknown`, `unit_ambiguous` (422, a bare `ton` was sent), `invalid_cursor`, `group_not_empty` (409, a group that holds or held logs, scans, groups or photos, or that a phone may still capture into, cannot be deleted: it stays as the record of that work), `group_billed` (409, a live group on the ledger is kept for your records), `place_in_use` (409, groups use the place as their origin), `group_cycle` (422, the parent would make the group its own ancestor), `group_depth_exceeded` (422, groups nest at most 4 levels), `version_mismatch` (`If-Match` did not match, 412), `payload_too_large` (413), `invalid_api_key` (401), `key_mode_mismatch` (400, `Timbereye-Mode` disagrees with the key's mode), `scope_missing` (403), `secret_key_required` (403), `capture_token_not_allowed` (403, the operation is outside a capture token's reach), `group_not_allowed` (403, the group is outside a capture token's `group_ids`, or a publishable key with `group_access: opened_only` was given a group it did not open by reference; the same answer whether or not the id exists), `account_required` (403, dashboard sessions only: the session does not act for an account, the account has no account of the requested mode, or it is not active; a key never gets it), `shared_resource_read_only` (403), `authentication_required` (401, no `Authorization` header), `state_conflict` (409, the object's state does not allow the change), `permission_denied` (403), `role_required` (403, dashboard sessions only: the signed-in member's role cannot do this; the message names the roles that can), `last_owner` (409, the change would leave the organisation without an owner), `already_member` (409), `invitation_exists` (409), `invitation_invalid` (404), `invitation_unusable` (409, revoked, used or expired), `invitation_email_mismatch` (403), `limit_exceeded` (400, for example too many webhook endpoints (16 per account), or more than 500 items in one item write), `rate_limited` (429), `assignment_required` (422, unknown tags on a `qr_count` add need a group spec with species, length and diameter class), `upload_incomplete` (409, no bytes uploaded yet), `upload_hash_mismatch` (409, the bytes do not match `sha256`), `test_mode_only` (403, a test-mode operation such as `POST /test/scans/simulate` was called with a live key), `live_mode_not_enabled` (403, live mode is not on for the organisation; an owner turns it on under Billing in the console), `payment_overdue` (402, new live work is paused: an invoice is unpaid past its grace period), `spend_cap_reached` (402, new live work is paused: the month reached the spend cap set to pause), `client_id_conflict` (409, a `client_id` already names a scan, image or item of the account whose identity fields differ from the request's; the same `client_id` with the same identity returns the existing record instead), `not_implemented` (501), `isolation_unavailable` (503), `service_unavailable` (503), `storage_unavailable` (503, image storage is not configured in this environment), `internal_error` (500), `publishable_key_not_allowed` (403, the operation or option is outside what a publishable key may do), `installation_id_required` (400, no or a malformed `Timbereye-Installation-Id`), `app_not_allowed` (403, a publishable key restricted to other apps), `daily_cap_reached` (429, a daily cap of a publishable key; `param` names it), `item_move_not_allowed` (409, a scanned tag's item is in another group, and a publishable key cannot move items), `device_sign_in_not_allowed` (403, outside what a phone signed in to the Timbereye app may do), `device_sign_in_required` (403, an operation only the app calls), `code_invalid` (401, a wrong or expired sign-in code, or a stale organisation choice), `not_a_member` (403, no organisation added this email), `organisation_now_live` (403, a test-mode sign-in of an organisation that is live now), `organisation_not_ready` (403), `email_unavailable` (503, this environment cannot send sign-in emails).
2998
+ * @description Stable machine-readable code. New codes may be added within v1, so treat unknown values as the generic case. Codes in use: `idempotency_key_reused` (same `Idempotency-Key` sent with a different request, 409), `idempotency_request_in_progress` (a request with the same key is still running, 409; retry later), `idempotency_key_missing` (400), `resource_missing` (404, including rows that belong to another account), `resource_exists` (409, for example a `client_id` or species code already in use), `place_name_taken` (409, `param: name`: another active place of the account has this name), `parameter_invalid`, `parameter_missing`, `parameter_unknown`, `unit_ambiguous` (422, a bare `ton` was sent), `invalid_cursor`, `group_not_empty` (409, a group that holds or held logs, scans, groups or photos, or that a phone may still capture into, cannot be deleted: it stays as the record of that work), `group_billed` (409, a live group on the ledger is kept for your records), `place_in_use` (409, groups use the place as their origin), `group_cycle` (422, the parent would make the group its own ancestor), `group_depth_exceeded` (422, groups nest at most 4 levels), `version_mismatch` (`If-Match` did not match, 412), `payload_too_large` (413), `invalid_api_key` (401), `key_mode_mismatch` (400, `Timbereye-Mode` disagrees with the key's mode), `scope_missing` (403), `secret_key_required` (403), `capture_token_not_allowed` (403, the operation is outside a capture token's reach), `group_not_allowed` (403, the group is outside a capture token's `group_ids`, or a publishable key with `group_access: opened_only` was given a group it did not open by reference; the same answer whether or not the id exists), `account_required` (403, dashboard sessions only: the session does not act for an account, the account has no account of the requested mode, or it is not active; a key never gets it), `shared_resource_read_only` (403), `authentication_required` (401, no `Authorization` header), `state_conflict` (409, the object's state does not allow the change), `permission_denied` (403), `role_required` (403, dashboard sessions only: the signed-in member's role cannot do this; the message names the roles that can), `last_owner` (409, the change would leave the organisation without an owner), `already_member` (409), `invitation_exists` (409), `invitation_invalid` (404), `invitation_unusable` (409, revoked, used or expired), `invitation_email_mismatch` (403), `limit_exceeded` (400, for example too many webhook endpoints (16 per account), or more than 500 items in one item write), `rate_limited` (429), `assignment_required` (422, unknown tags on a `qr_count` add need a group spec with species, length and diameter class; not stored under the key, so the same request succeeds once the group's spec has them), `species_unknown` (400, a species code that is not on the account's species list, or was archived after a phone chose it; `param` names where it came from, such as `items.0.species` or `defaults.species`; not stored under the key: choose another species and send again), `organisation_now_live` (403, a test-mode device sign-in of an organisation that has gone live may upload what it captured, into test mode, but not open groups or list them; sign in again for a live sign-in; test data never becomes live data), `upload_incomplete` (409, no bytes uploaded yet), `upload_hash_mismatch` (409, the bytes do not match `sha256`), `test_mode_only` (403, a test-mode operation such as `POST /test/scans/simulate` was called with a live key), `live_mode_not_enabled` (403, live mode is not on for the organisation; an owner turns it on under Billing in the console), `payment_overdue` (402, new live work is paused: an invoice is unpaid past its grace period), `spend_cap_reached` (402, new live work is paused: the month reached the spend cap set to pause), `client_id_conflict` (409, a `client_id` already names a scan, image or item of the account whose identity fields differ from the request's; the same `client_id` with the same identity returns the existing record instead), `not_implemented` (501), `isolation_unavailable` (503), `service_unavailable` (503), `storage_unavailable` (503, image storage is not configured in this environment), `model_unavailable` (503, this environment has no on-device detector to offer yet), `internal_error` (500), `publishable_key_not_allowed` (403, the operation or option is outside what a publishable key may do), `installation_id_required` (400, no or a malformed `Timbereye-Installation-Id`), `app_not_allowed` (403, a publishable key restricted to other apps), `daily_cap_reached` (429, a daily cap of a publishable key; `param` names it), `item_move_not_allowed` (409, a scanned tag's item is in another group, and a publishable key cannot move items; a phone signed in to the app sends it again with `allow_move: true` once the worker confirmed, and its refusal names the group in `details`), `spec_required` (400, a scanned log has no species or no length and its group's spec does not have them; `param` names the item's missing field; not stored under the key, so the same request succeeds once the group's spec has them), `device_sign_in_not_allowed` (403, outside what a phone signed in to the Timbereye app may do), `device_sign_in_required` (403, an operation only the app calls), `code_invalid` (401, a wrong or expired sign-in code, or a stale organisation choice), `not_a_member` (403, no organisation added this email), `organisation_now_live` (403, a test-mode sign-in of an organisation that is live now), `organisation_not_ready` (403), `email_unavailable` (503, this environment cannot send sign-in emails).
2843
2999
  * @example idempotency_key_reused
2844
3000
  */
2845
3001
  code: string;
@@ -2851,6 +3007,10 @@ export interface components {
2851
3007
  request_id: string;
2852
3008
  /** @description Link to the documentation for this error code. */
2853
3009
  doc_url: string | null;
3010
+ /** @description What the caller needs to act on the refusal, for the codes that have some. `item_move_not_allowed` to a phone signed in to the Timbereye app: `tag` and `group`, the log's group in the same account (`id`, `name`, `external_ref`, `kind`), so the app can ask the worker to move it. Absent otherwise. */
3011
+ details?: {
3012
+ [key: string]: unknown;
3013
+ };
2854
3014
  };
2855
3015
  /**
2856
3016
  * @description Every non-2xx response has this body.
@@ -3127,6 +3287,8 @@ export interface components {
3127
3287
  * @description Creation time.
3128
3288
  */
3129
3289
  created_at: string;
3290
+ /** @description `true` for a port Timbereye shares with every account: readable and usable as an origin, but not yours to change or delete. `false` for your own places. */
3291
+ shared: boolean;
3130
3292
  };
3131
3293
  /** @description A page of places. */
3132
3294
  PlaceList: {
@@ -3318,7 +3480,8 @@ export interface components {
3318
3480
  measured: number;
3319
3481
  /** @description Items whose server refinement has succeeded (`refinement.status` of `succeeded` on the item). A manual override on its own does not count. Always at most `measured`. `measured` minus `refined` is the number of items that rest on a device estimate or an override only (`estimated_only` on a volume). */
3320
3482
  refined: number;
3321
- volume: components["schemas"]["VolumeSummary"];
3483
+ /** @description The logs' volume under the account's default rule. `null` for a lumber or panel group (a bundle, unit or packing list), which holds no logs: its figures are `tally`. */
3484
+ volume: components["schemas"]["VolumeSummary"] | null;
3322
3485
  /** @description Net weight divided by volume. A check on both numbers: a load far outside the species' usual range has a wrong count, length or ticket. Null without a weight or volume. */
3323
3486
  density_kg_m3: number | null;
3324
3487
  /** @description Net weight of the group in kg; null without a weight. */
@@ -3328,13 +3491,47 @@ export interface components {
3328
3491
  * @enum {string}
3329
3492
  */
3330
3493
  weight_allocation: "none" | "partial" | "full";
3331
- /** @description Pieces in the group and its children when it holds lumber or panel tally lines (logs one each, a line its count). Present for those groups. */
3494
+ /** @description Pieces of one product in the group and its children when it holds lumber or panel tally lines (a line its count, logs one each). Present only while the group holds one product: a group holding logs and bundles, or bundles and units, has no piece count across products (each product's count is in `products`). */
3332
3495
  pieces?: number;
3496
+ products?: components["schemas"]["GroupProducts"];
3333
3497
  /** @description A lumber or panel group's own tally figures under its rule (pieces, board_feet, mbf, m3, m2). */
3334
3498
  tally?: Record<string, never> | null;
3335
3499
  /** @description Items whose effective measurement is `assigned`: a nominal diameter class taken from the group spec, with no image behind it. These are never counted in `measured`. */
3336
3500
  assigned_count: number;
3337
3501
  };
3502
+ /** @description What the group and everything nested in it holds, product by product, each with its own figures and never one figure across products: `sawlog` (its logs: the same logs and volume as `items` and `volume`), `lumber` (its bundles, and the board feet and m³ of their final tallies) and `panel` (its units, sheets, m² and m³). Only the products it holds are present; an empty group has `{}`. Bundles and units are child groups (`parent_id` the group); a group a phone opened may hold all three. */
3503
+ GroupProducts: {
3504
+ sawlog?: {
3505
+ /** @description Active logs, as `summary.items`. */
3506
+ logs: number;
3507
+ volume: {
3508
+ /** @constant */
3509
+ rule: "jas";
3510
+ m3: number;
3511
+ };
3512
+ };
3513
+ lumber?: {
3514
+ /** @description Lumber bundles in the group and below it. */
3515
+ bundles: number;
3516
+ /** @description Of those, the bundles with a final (submitted) tally; the figures below are theirs. */
3517
+ tallied: number;
3518
+ pieces: number;
3519
+ /** @description The bundles' board feet as reported, added up; null when no tally has one. */
3520
+ board_feet: number | null;
3521
+ mbf: number | null;
3522
+ /** @description The bundles' cubic metres as reported, added up. */
3523
+ m3: number | null;
3524
+ };
3525
+ panel?: {
3526
+ /** @description Panel units in the group and below it. */
3527
+ units: number;
3528
+ /** @description Of those, the units with a final (submitted) tally; the figures below are theirs. */
3529
+ tallied: number;
3530
+ sheets: number;
3531
+ m2: number | null;
3532
+ m3: number | null;
3533
+ };
3534
+ };
3338
3535
  /** @description A labelled set of logs: a container, truck load, stack or load, or a parent your system places loads under (a yard row, a vessel hold). Volume, counts and weight reconciliation are computed over it. Fields you can request through `expand[]`: `origin_place`, `parent`. */
3339
3536
  Group: {
3340
3537
  /**
@@ -3365,14 +3562,19 @@ export interface components {
3365
3562
  external_ref: string | null;
3366
3563
  /** @description The one group this group sits inside, for example a truck load in a yard row. Nesting is at most 4 deep; cycles are rejected. */
3367
3564
  parent_id: string | null;
3368
- /** @description Place the wood came from. */
3565
+ /** @description The tract this group (a load) is tied to: where its wood was harvested. Every log first measured into this group traces to it, also after it moves on. Set it on create, open or update; when it is empty, the first scan whose location lies inside exactly one tract's boundary sets it (see `origin`). Setting it to null clears it. */
3369
3566
  origin_place_id: string | null;
3567
+ /** @description How `origin_place_id` was determined; null when it is empty. */
3568
+ origin: components["schemas"]["GroupOrigin"] | null;
3370
3569
  defaults: components["schemas"]["GroupDefaults"] | null;
3570
+ holds?: components["schemas"]["GroupHolds"] | null;
3371
3571
  weight: components["schemas"]["GroupWeight"] | null;
3372
3572
  summary: components["schemas"]["GroupSummary"];
3373
3573
  /** @description Increases on every change. Send it as `If-Match` on `PATCH` to avoid overwriting a concurrent edit. */
3374
3574
  version: number;
3375
3575
  metadata: components["schemas"]["Metadata"];
3576
+ /** @description Shipping details the packing list prints, as stored on this group; null when none are set. */
3577
+ shipping?: components["schemas"]["GroupShipping"] | null;
3376
3578
  /**
3377
3579
  * Format: date-time
3378
3580
  * @description Creation time.
@@ -3387,11 +3589,80 @@ export interface components {
3387
3589
  spec?: Record<string, never> | null;
3388
3590
  /** @description A lumber or panel group's bundle attributes and label. */
3389
3591
  bundle?: Record<string, never> | null;
3390
- /** @description A lumber or panel group's tally rule with its policies. */
3592
+ /** @description A lumber or panel group's tally rule with its policies and `method`, the named board-foot method it follows (`nhla_board_measure`, `nominal_piece_tally`, `width_length_tally`, `exact`, `mill_half_foot_down`, or null for none). */
3391
3593
  rule?: Record<string, never> | null;
3392
3594
  expected?: Record<string, never> | null;
3393
3595
  totals_convention?: string | null;
3394
3596
  };
3597
+ /** @description How a group's origin was determined. `assigned`: a person or an API call chose the tract (`assigned_by` says who; null for origins set before this was recorded). `location`: Timbereye derived it because a scan's location lay inside the tract's boundary by more than the fix's accuracy (`evidence`). A derived origin never replaces one that is set, and a person's choice is never overwritten. */
3598
+ GroupOrigin: {
3599
+ /** @description The tract, as `origin_place_id`. */
3600
+ place_id: string;
3601
+ /** @enum {string} */
3602
+ source: "assigned" | "location";
3603
+ /**
3604
+ * Format: date-time
3605
+ * @description When it was assigned or derived.
3606
+ */
3607
+ determined_at: string | null;
3608
+ assigned_by: {
3609
+ /**
3610
+ * @description A person in the organisation (`user`, also when signed in to the app), a scanner the organisation added for the app (`scanner`), or an API key (`key`).
3611
+ * @enum {string}
3612
+ */
3613
+ type: "user" | "scanner" | "key";
3614
+ /** @description The person (`usr_`), the scanner or the key id. */
3615
+ id: string | null;
3616
+ } | null;
3617
+ evidence: {
3618
+ scan_id: string | null;
3619
+ location: components["schemas"]["Location"] | null;
3620
+ /** @description How far inside the boundary the fix was, in metres. */
3621
+ inside_by_m: number | null;
3622
+ accuracy_m: number | null;
3623
+ /** @description The matching rule's version, `boundary_v1`. */
3624
+ rule: string | null;
3625
+ } | null;
3626
+ };
3627
+ /** @description Where a scan's location fell among your places, worked out once when the scan is created. Only places with a Polygon or MultiPolygon boundary match; a fix without an accuracy or less accurate than 50 m, or taken more than an hour from the scan's start, matches nothing. `result`: `matched` (inside exactly one tract by more than the accuracy), `other_tract` (matched a tract, but the group is tied to another; nothing changed), `ambiguous` (inside or near several tracts, or near one), `no_match`, `accuracy_poor`, `fix_stale`, `no_location`. */
3628
+ PlaceMatch: {
3629
+ /** @enum {string} */
3630
+ result: "matched" | "other_tract" | "ambiguous" | "no_match" | "accuracy_poor" | "fix_stale" | "no_location";
3631
+ tract_place_id: string | null;
3632
+ measured_place_id: string | null;
3633
+ inside_by_m: number | null;
3634
+ accuracy_m: number | null;
3635
+ /** @description Every place with a boundary the fix was inside or within its accuracy of. */
3636
+ candidates: {
3637
+ place_id?: string | null;
3638
+ type?: string | null;
3639
+ /** @enum {string|null} */
3640
+ relation?: "inside" | "uncertain" | null;
3641
+ distance_to_boundary_m?: number | null;
3642
+ }[];
3643
+ rule: string | null;
3644
+ /** Format: date-time */
3645
+ checked_at: string | null;
3646
+ };
3647
+ /** @description The tracts the Timbereye app offers when a worker ties a load to a tract, and the one the phone's location is inside. */
3648
+ OriginChoices: {
3649
+ /** @constant */
3650
+ object: "origin_choices";
3651
+ livemode: boolean;
3652
+ /** @description The tract the given location lies inside (the `matched` rule of `PlaceMatch`), or null. */
3653
+ suggested_place_id: string | null;
3654
+ /** @description The smallest place of any type the location lies inside, or null. */
3655
+ measured_place_id: string | null;
3656
+ /** @description The `PlaceMatch` result for the given location (`no_location` without one). */
3657
+ match: string;
3658
+ data: {
3659
+ id: string;
3660
+ name: string;
3661
+ external_ref: string | null;
3662
+ has_boundary: boolean;
3663
+ }[];
3664
+ has_more: boolean;
3665
+ };
3395
3666
  /** @description A publishable key's limits, counted per key (a rolled key starts fresh), daily caps in UTC days. Over a limit: 429 `rate_limited` (per second) or `daily_cap_reached` (daily, `Retry-After` until 00:00 UTC), with `param` naming the limit. Defaults: 10 requests per second, 2,000 scans, 50,000 items and observations, 5 GiB of images and 500 group opens a day. */
3396
3667
  PublishableKeyLimits: {
3397
3668
  /** @description Requests per second. Default 10. */
@@ -3480,6 +3751,10 @@ export interface components {
3480
3751
  */
3481
3752
  name?: string;
3482
3753
  defaults?: components["schemas"]["GroupDefaultsInput"];
3754
+ /** @description What the Timbereye apps scan into the group: set on a group this call creates, and on the group it continues when that group has none yet (never changed once set; use `PATCH /groups/{id}`). */
3755
+ holds?: components["schemas"]["GroupHolds"];
3756
+ /** @description Shipping details the packing list prints, set when this call creates the group (change them later with `PATCH /groups/{id}`). Secret and restricted keys and console sign-ins only: a publishable key, a capture token or a phone signed in to the app is refused with 403. */
3757
+ shipping?: components["schemas"]["GroupShippingInput"];
3483
3758
  /**
3484
3759
  * @description When `defaults` change the spec of a group that exists, which of its items take them, as in `PATCH /groups/{id}`.
3485
3760
  * @enum {string}
@@ -3489,6 +3764,17 @@ export interface components {
3489
3764
  parent_id?: string;
3490
3765
  /** @description Where the logs come from (a tract for a forest stack), set when this call creates the group. Any place of the account; a phone cannot list or read places, so your app passes an id your backend gave it. Refused with 404 `param: origin_place_id`, the same answer for any id it may not use. */
3491
3766
  origin_place_id?: string;
3767
+ /** @description `lumber` or `panel` opens a bundle (`kind: bundle`, `unit` for panels, with `parent_id` the container, truck load or stack it goes into) or a group of one product (`kind: packing_list`, kept for existing clients; a container opened without `product` holds any product). The lumber fields below apply only when this call creates the group, as in `POST /groups/batch`; an existing group keeps its own. Needs the organisation's lumber enabled in this mode (`GET /account` `lumber.enabled`) and the product among `lumber.products`, else 403 `product_not_enabled`. Omitted: `sawlog`. */
3768
+ product?: components["schemas"]["LumberProduct"];
3769
+ spec?: components["schemas"]["LumberSpecInput"];
3770
+ bundle?: components["schemas"]["BundleAttributes"];
3771
+ rule?: components["schemas"]["TallyRuleInput"];
3772
+ photos?: components["schemas"]["PhotoPolicyInput"];
3773
+ /**
3774
+ * @description A packing list's totals convention.
3775
+ * @enum {string}
3776
+ */
3777
+ totals?: "exact" | "reported";
3492
3778
  /**
3493
3779
  * @description When a group with this reference exists: `auto` continues the newest one if it was last active within 12 hours before `started_at`, else starts a new group; `continue` always continues the newest one; `new` always starts a new group. With no group for the reference, every value creates one.
3494
3780
  * @default auto
@@ -3544,9 +3830,26 @@ export interface components {
3544
3830
  external_ref: string | null;
3545
3831
  name: string | null;
3546
3832
  defaults: components["schemas"]["GroupDefaults"] | null;
3833
+ holds?: components["schemas"]["GroupHolds"] | null;
3547
3834
  version: number;
3548
3835
  /** @description The group's weighbridge ticket, or null. */
3549
3836
  weight: components["schemas"]["GroupWeight"] | null;
3837
+ product?: components["schemas"]["LumberProduct"];
3838
+ /** @description Lumber and panel groups only: the group this one sits in (a bundle's container, truck load or stack), or null. A sawlog group's placement is not shown to phones. */
3839
+ parent_id?: string | null;
3840
+ /** @description Lumber and panel groups only: the bundle's spec (`tally`, `species`, `grade`, `seasoning`, `thickness`, `width`, `length`), as on `GET /groups/{id}`. */
3841
+ spec?: Record<string, never>;
3842
+ /** @description Lumber and panel groups only: the bundle's trade attributes (`number`, `drying`, `spec_line`, `label`, ...). */
3843
+ bundle?: Record<string, never>;
3844
+ /** @description Lumber and panel groups only: the tally rule, its policies and `method`, the named board-foot method it follows (null for none). Omitted, a hardwood bundle tallied board by board gets the organisation's `board_foot_method`. */
3845
+ rule?: Record<string, never> | null;
3846
+ /** @description Only for the Timbereye app signed in as a worker (never a publishable key): the tract the group (a load) is tied to, by name, and whether a person chose it or a scan's location set it; null when it is not tied to a tract. */
3847
+ origin?: {
3848
+ place_id: string;
3849
+ name: string | null;
3850
+ /** @enum {string} */
3851
+ source: "assigned" | "location";
3852
+ } | null;
3550
3853
  };
3551
3854
  /** @description A page of groups. */
3552
3855
  GroupList: {
@@ -3572,6 +3875,8 @@ export interface components {
3572
3875
  origin_place_id?: string;
3573
3876
  defaults?: components["schemas"]["GroupDefaultsInput"];
3574
3877
  metadata?: components["schemas"]["Metadata"];
3878
+ holds?: components["schemas"]["GroupHolds"];
3879
+ shipping?: components["schemas"]["GroupShippingInput"];
3575
3880
  product?: components["schemas"]["LumberProduct"];
3576
3881
  spec?: components["schemas"]["LumberSpecInput"];
3577
3882
  bundle?: components["schemas"]["BundleAttributes"];
@@ -3594,6 +3899,8 @@ export interface components {
3594
3899
  parent_id?: string | null;
3595
3900
  origin_place_id?: string | null;
3596
3901
  defaults?: components["schemas"]["GroupDefaultsInput"];
3902
+ /** @description What the Timbereye apps scan into the group, or null to clear it. A phone may set it (no `spec: write` needed); it changes nothing the group holds. */
3903
+ holds?: components["schemas"]["GroupHolds"] | null;
3597
3904
  /**
3598
3905
  * @description Only meaningful together with `defaults`. Whether a changed default is applied to items already in the group. `defaulted` (the default) rewrites only items whose value still has `source: group_default`, so an operator's correction is never overwritten. `all` overwrites every item. `none` affects new items only.
3599
3906
  * @default defaulted
@@ -3601,6 +3908,7 @@ export interface components {
3601
3908
  */
3602
3909
  apply_to_existing?: "none" | "defaulted" | "all";
3603
3910
  metadata?: components["schemas"]["Metadata"];
3911
+ shipping?: components["schemas"]["GroupShippingInput"];
3604
3912
  };
3605
3913
  /**
3606
3914
  * @description Items to add or remove: by id, by tag payload, or both. At most 500 ids and tags together; send larger sets as several requests (`limit_exceeded`).
@@ -3773,13 +4081,32 @@ export interface components {
3773
4081
  weight: components["schemas"]["ItemWeight"] | null;
3774
4082
  /** @description The effective measurement. */
3775
4083
  measurement: components["schemas"]["Measurement"] | null;
4084
+ /** @description From the log's newest device estimate that carries one (kept when the log is refined or overridden): The log detector's own score, 0 to 1, for the box the phone measured the log in (the centre-log box of its last detection before measuring). How sure the detector was that the box is a log end: use it to rank logs or flag low ones for a look. It is not an accuracy of the diameters, not the probability that the measurement is right, and not comparable across detector versions (`provenance.detector`). Null when the phone sent none (counted tags, logs from app builds that did not send it, other clients). */
4085
+ detection_confidence?: number | null;
4086
+ /** @description The photo the effective measurement was made on and where the log is in it. Null when it has no photo. */
4087
+ photo_ref?: components["schemas"]["PhotoRef"] | null;
3776
4088
  /** @description Server refinement state; null when no refinement was ever queued for the item (legacy items, tag-only items). */
3777
4089
  refinement: {
3778
4090
  status: components["schemas"]["RefinementStatus"];
3779
4091
  } | null;
4092
+ /** @description The log end's outline traced by the segmentation model on its photo, with its state. Kept when an office edit follows the refinement. */
4093
+ outline: components["schemas"]["Outline"];
3780
4094
  status: components["schemas"]["ItemStatus"];
3781
4095
  /** @description Scan that created the item. Null for items created before the platform. */
3782
4096
  scan_id: string | null;
4097
+ origin: {
4098
+ /** @description The tract. */
4099
+ place_id: string;
4100
+ /** @description The group whose origin this is (usually the log's load). */
4101
+ group_id: string;
4102
+ } | null;
4103
+ measured: {
4104
+ scan_id: string;
4105
+ location: components["schemas"]["Location"] | null;
4106
+ place_id: string | null;
4107
+ } | null;
4108
+ /** @description The log's volume under the JAS rule (v1's only log rule), from its effective measurement and length: the `m3` that `GET /items/{id}/volume` returns, so a list of items needs no call per log. Null while the log has no measurement. */
4109
+ volume?: components["schemas"]["ItemVolume"] | null;
3783
4110
  metadata: components["schemas"]["Metadata"];
3784
4111
  /**
3785
4112
  * Format: date-time
@@ -3793,6 +4120,24 @@ export interface components {
3793
4120
  /** @description Present only when `expand[]=photo` was requested: the photo of the log's end its measurement was made on, with a 15-minute `download_url`; null when there is none. Draw the measurement's `perimeter` (the outline), `diameter_lines` and `tag_corners` over it: they are normalised to this photo. */
3794
4121
  photo?: components["schemas"]["ItemPhoto"] | null;
3795
4122
  };
4123
+ /** @description One log's volume under a rule (an item's `volume`). */
4124
+ ItemVolume: {
4125
+ /**
4126
+ * @description Rule applied, one of the `id` values of `GET /volume_rules`.
4127
+ * @example jas
4128
+ */
4129
+ rule: string;
4130
+ /**
4131
+ * @description Rule version.
4132
+ * @example 1
4133
+ */
4134
+ rule_version: string;
4135
+ /**
4136
+ * @description Volume in cubic metres, rounded as the rule rounds (JAS, 0.001).
4137
+ * @example 0.384
4138
+ */
4139
+ m3: number;
4140
+ };
3796
4141
  /** @description The photo of a log's end that its effective measurement was made on: the image the measurement names (`image_id`), else the log's newest uploaded `log_end` image. The measurement's `perimeter`, `diameter_lines`, `tag_corners` and `measured_rect` are normalised to it (0 to 1, origin top left, x to the right). */
3797
4142
  ItemPhoto: {
3798
4143
  image_id: string;
@@ -3805,6 +4150,13 @@ export interface components {
3805
4150
  /** @description Where the log end sits in that scene photo (the detection box), normalised to it. */
3806
4151
  box: components["schemas"]["NormalizedBox"] | null;
3807
4152
  };
4153
+ /** @description A durable reference to a log's photo: the image id and the log end's box in that image. It stays valid after the phone deletes its own copy. Read the image with `GET /images/{id}` (a fresh `download_url`), by the organisation that owns the log; another organisation gets 404. */
4154
+ PhotoRef: {
4155
+ /** @description The item image (`log_end`) the measurement was made on. */
4156
+ image_id: string;
4157
+ /** @description The log end's box in the image, normalised, origin top left, in the image as stored (the space of `perimeter` and `diameter_lines`): the bounding box of the outline when there is one, else of the two diameter lines. */
4158
+ region: components["schemas"]["NormalizedBox"];
4159
+ };
3808
4160
  /** @description A page of items. */
3809
4161
  ItemList: {
3810
4162
  /**
@@ -3842,6 +4194,34 @@ export interface components {
3842
4194
  * "refinement": {
3843
4195
  * "status": "succeeded"
3844
4196
  * },
4197
+ * "outline": {
4198
+ * "status": "ready",
4199
+ * "reason": null,
4200
+ * "source": "segmentation",
4201
+ * "points": [
4202
+ * [
4203
+ * 0.21,
4204
+ * 0.5
4205
+ * ],
4206
+ * [
4207
+ * 0.5,
4208
+ * 0.17
4209
+ * ],
4210
+ * [
4211
+ * 0.79,
4212
+ * 0.5
4213
+ * ],
4214
+ * [
4215
+ * 0.5,
4216
+ * 0.83
4217
+ * ]
4218
+ * ],
4219
+ * "measurement_id": "msr_8Rt4Vb",
4220
+ * "segmenter": {
4221
+ * "id": "vertex-sawlog-segmentation",
4222
+ * "version": "unknown"
4223
+ * }
4224
+ * },
3845
4225
  * "final": true
3846
4226
  * }
3847
4227
  */
@@ -3871,13 +4251,26 @@ export interface components {
3871
4251
  perimeter?: components["schemas"]["Perimeter"] | null;
3872
4252
  /** @description The lines the two diameters were measured along, normalised to the same photo. */
3873
4253
  diameter_lines?: components["schemas"]["DiameterLines"] | null;
4254
+ /** @description How the values were produced. Show `simulated: true` values as practice values, never as the server's final values. */
4255
+ provenance?: {
4256
+ /** @description `true` when test mode's simulator produced the values (only for scans a developer simulated with `POST /test/scans/simulate`): practice values, no outline. */
4257
+ simulated: boolean;
4258
+ diameter_source: components["schemas"]["DiameterSource"];
4259
+ detector?: components["schemas"]["ModelRef"] | null;
4260
+ segmenter?: components["schemas"]["ModelRef"] | null;
4261
+ };
3874
4262
  };
4263
+ outline: components["schemas"]["Outline"];
3875
4264
  /** @description The refinement of this scan's estimate; `null` when none was queued (no image yet). */
3876
4265
  refinement: {
3877
4266
  status: components["schemas"]["RefinementStatus"];
3878
4267
  } | null;
3879
4268
  /** @description `true` once refinement finished (succeeded, or failed so the estimate stands): the values will not change from this scan. */
3880
4269
  final: boolean;
4270
+ /** @description From this scan's device estimate: The log detector's own score, 0 to 1, for the box the phone measured the log in (the centre-log box of its last detection before measuring). How sure the detector was that the box is a log end: use it to rank logs or flag low ones for a look. It is not an accuracy of the diameters, not the probability that the measurement is right, and not comparable across detector versions (`provenance.detector`). Null when the phone sent none (counted tags, logs from app builds that did not send it, other clients). */
4271
+ detection_confidence?: number | null;
4272
+ /** @description The photo this scan's measurement was made on and where the log is in it. */
4273
+ photo_ref?: components["schemas"]["PhotoRef"] | null;
3881
4274
  };
3882
4275
  /** @description A page of a scan's logs. */
3883
4276
  ScanItemStatusList: {
@@ -3965,6 +4358,8 @@ export interface components {
3965
4358
  Quality: {
3966
4359
  /** @description Overall confidence, 0 to 1. */
3967
4360
  confidence?: number | null;
4361
+ /** @description Device estimates: The log detector's own score, 0 to 1, for the box the phone measured the log in (the centre-log box of its last detection before measuring). How sure the detector was that the box is a log end: use it to rank logs or flag low ones for a look. It is not an accuracy of the diameters, not the probability that the measurement is right, and not comparable across detector versions (`provenance.detector`). Null when the phone sent none (counted tags, logs from app builds that did not send it, other clients). */
4362
+ detection_confidence?: number | null;
3968
4363
  /** @description Scores from the capture quality gates, keyed by gate name. The keys below are the ones the SDK engines emit (all optional); other keys are allowed and kept. Values are numbers; a flag is 1 or 0. */
3969
4364
  rejection_gates?: {
3970
4365
  /** @description AR scale: the mean confidence, 0 to 1, of the four endpoint raycasts that measured the two diameters. Higher is better. */
@@ -4008,8 +4403,71 @@ export interface components {
4008
4403
  };
4009
4404
  /** @description `true` when the measurement was produced by the test-mode simulator (see `POST /test/scans/simulate`) instead of a device or the segmentation service. Simulated measurements exist only in test mode and are never billed. */
4010
4405
  simulated?: boolean;
4406
+ diameter_source?: components["schemas"]["DiameterSource"];
4407
+ };
4408
+ /**
4409
+ * @description What the diameters were measured from: `segmentation_outline`, across the outline the segmentation model traced on the server (live, and test mode for a real photo); `device`, the phone's own measurement (its detector with the tag or AR scale), which stands while the outline is pending or when it failed; `simulator`, test mode's simulator (practice values, only for scans a developer simulated); `assigned`, the group spec's nominal class; `manual`, entered by a person.
4410
+ * @enum {string}
4411
+ */
4412
+ DiameterSource: "segmentation_outline" | "device" | "simulator" | "assigned" | "manual";
4413
+ /**
4414
+ * @description The log end's outline, traced by the segmentation model on the server after the photo is uploaded, with its state. Draw `points` over the log's photo (`expand[]=photo`): they are normalised to it (0 to 1, origin top left). While `pending`, or when `failed` or `not_available`, draw the phone's own evidence (`measurement.diameter_lines`) instead and say why.
4415
+ * @example {
4416
+ * "status": "ready",
4417
+ * "reason": null,
4418
+ * "source": "segmentation",
4419
+ * "points": [
4420
+ * [
4421
+ * 0.21,
4422
+ * 0.5
4423
+ * ],
4424
+ * [
4425
+ * 0.24,
4426
+ * 0.38
4427
+ * ],
4428
+ * [
4429
+ * 0.31,
4430
+ * 0.27
4431
+ * ]
4432
+ * ],
4433
+ * "measurement_id": "msr_8Rt4Vb",
4434
+ * "segmenter": {
4435
+ * "id": "vertex-sawlog-segmentation",
4436
+ * "version": "unknown"
4437
+ * }
4438
+ * }
4439
+ * @example {
4440
+ * "status": "pending",
4441
+ * "reason": "segmentation_queued",
4442
+ * "source": null,
4443
+ * "points": null,
4444
+ * "measurement_id": null,
4445
+ * "segmenter": null
4446
+ * }
4447
+ */
4448
+ Outline: {
4449
+ /**
4450
+ * @description `ready`: `points` holds the outline. `pending`: the photo is awaited or the segmentation is queued or running (usually under two minutes after upload). `failed`: no outline, for good; the phone's values stand. `not_available`: this log is not measured from a photo (assigned or entered values), or its values are the simulator's.
4451
+ * @enum {string}
4452
+ */
4453
+ status: "pending" | "ready" | "failed" | "not_available";
4454
+ /**
4455
+ * @description Why it is not `ready`; `null` when it is. `test_limit_reached`: the organisation's test-mode segmentations for the day are used up (50 a day by default), so the phone's values stand. `test_mode_practice`: values from the simulator, which traces nothing. `photo_link_unsigned`: the server could not sign a read link to the photo. `photo_link_refused`: the segmentation service refused the photo's link. `segmentation_unavailable`: the segmentation service was busy or unreachable on every attempt. New reasons may be added: treat an unknown one as `segmentation_error`.
4456
+ * @enum {string|null}
4457
+ */
4458
+ reason: "awaiting_photo" | "segmentation_queued" | "segmentation_running" | "test_mode_practice" | "test_limit_reached" | "test_segmentation_off" | "not_measured_from_photo" | "segmentation_not_configured" | "no_outline_found" | "photo_unavailable" | "photo_link_unsigned" | "photo_link_refused" | "segmentation_unavailable" | "log_removed" | "segmentation_error" | null;
4459
+ /**
4460
+ * @description `segmentation` when `ready`.
4461
+ * @enum {string|null}
4462
+ */
4463
+ source: "segmentation" | null;
4464
+ /** @description The outline (50 points), when `ready`. */
4465
+ points: components["schemas"]["Perimeter"] | null;
4466
+ /** @description The `server_refined` measurement the outline belongs to. */
4467
+ measurement_id: string | null;
4468
+ segmenter: components["schemas"]["ModelRef"] | null;
4011
4469
  };
4012
- /** @description A normalised polygon outlining the log end: at least 3 `[x, y]` points. A server-refined perimeter has exactly 50 points; a device may send any number from 3 up, which is stored and returned as sent. Evidence only: nothing is computed from it. */
4470
+ /** @description A normalised polygon outlining the log end: at least 3 `[x, y]` points. A server-refined perimeter has exactly 50 points; a device may send any number from 3 up, which is stored and returned as sent. A server-refined measurement's diameters are measured across it. */
4013
4471
  Perimeter: number[][];
4014
4472
  /** @description One versioned measurement of an item. Measurements are immutable; a new one is added instead of editing. The newest measurement of the highest-precedence stage is the item's effective measurement. */
4015
4473
  Measurement: {
@@ -4125,6 +4583,8 @@ export interface components {
4125
4583
  grade?: string;
4126
4584
  measurement?: components["schemas"]["MeasurementInput"];
4127
4585
  metadata?: components["schemas"]["Metadata"];
4586
+ /** @description A tagged log already recorded in another group of the account is moved into this scan's group (the worker confirmed it after a 409 `item_move_not_allowed`). Honoured for phones signed in to the Timbereye app (device sign-in); secret and restricted keys and capture tokens move without it, and a publishable key never moves a log. The move keeps the log's measurements and history, emits `item.updated` and the old group's next `group.measured`, and is recorded in the audit log (`item.moved`). */
4587
+ allow_move?: boolean;
4128
4588
  };
4129
4589
  /**
4130
4590
  * @description Device estimates for a scan, at most 100 items. Idempotent per scan and item `client_id`: send a stable `Idempotency-Key` per batch (`<scan client id>:batch:<n>` in the SDK protocol), but a batch posted again under any key stores nothing twice.
@@ -4192,7 +4652,7 @@ export interface components {
4192
4652
  */
4193
4653
  output_unit: "m3" | "board_feet";
4194
4654
  /**
4195
- * @description What the rule tallies. Lumber and panel rules are in development.
4655
+ * @description What the rule tallies.
4196
4656
  * @enum {string}
4197
4657
  */
4198
4658
  applies_to?: "log" | "board" | "sheet";
@@ -4406,7 +4866,12 @@ export interface components {
4406
4866
  models: {
4407
4867
  detector?: components["schemas"]["ModelRef"] | null;
4408
4868
  } | null;
4869
+ /** @description Where and when the device took the scan, as it sent it. Kept as evidence of where the wood was measured, whether or not it matches a place. */
4409
4870
  location: components["schemas"]["Location"] | null;
4871
+ /** @description The place (any type, the smallest with a boundary) the scan's location lies inside, for example a yard or a landing; null when none. Where the wood was measured, not where it was harvested. */
4872
+ measured_place_id: string | null;
4873
+ /** @description How the location was matched to your places; null until the scan is matched. */
4874
+ place_match: components["schemas"]["PlaceMatch"] | null;
4410
4875
  results: components["schemas"]["ScanResults"] | null;
4411
4876
  /** @description For untagged rescans: the earlier scan whose items this scan replaced. */
4412
4877
  replaces_scan_id: string | null;
@@ -4488,6 +4953,8 @@ export interface components {
4488
4953
  location?: components["schemas"]["Location"];
4489
4954
  /** @description How many camera frames reported this tag, when the device counted them. Evidence: stored with the scan (the highest count reported per tag), never counted into `matched` or `unknown`. */
4490
4955
  sightings?: number;
4956
+ /** @description As an item's `allow_move`: the log with this tag, recorded in another group of the account, is moved into this scan's group (a phone signed in to the Timbereye app, after the worker confirmed). */
4957
+ allow_move?: boolean;
4491
4958
  };
4492
4959
  /** @description Tags read during a `qr_count` scan, at most 500 per request. The server reconciles them against the group on submit. Idempotent by tag payload: a tag the scan already recorded is not counted again, whatever the `Idempotency-Key`. */
4493
4960
  ObservationsRequest: {
@@ -4495,7 +4962,7 @@ export interface components {
4495
4962
  observations: components["schemas"]["Observation"][];
4496
4963
  };
4497
4964
  /**
4498
- * @description What a group image shows. `frame` is a camera frame that items were detected in. Lumber and panels (in development) add `bundle_end` (the squared end of a bundle), `bundle_far_end`, `label` (the bundle's or unit's tag or label), `tally_sheet` (a photo of a paper tally) and `unit_edge` (a panel unit's edge). For every product, `overview`, `weigh_ticket` (a weighbridge ticket, beside the group's weight) and `damage`. Photos can be added to a group at any time, also from a phone (publishable key, device sign-in or capture token) for a group it may capture into.
4965
+ * @description What a group image shows. `frame` is a camera frame that items were detected in. Lumber and panels add `bundle_end` (the squared end of a bundle), `bundle_far_end`, `label` (the bundle's or unit's tag or label), `tally_sheet` (a photo of a paper tally) and `unit_edge` (a panel unit's edge). For every product, `overview`, `weigh_ticket` (a weighbridge ticket, beside the group's weight) and `damage`. Photos can be added to a group at any time, also from a phone (publishable key, device sign-in or capture token) for a group it may capture into.
4499
4966
  * @enum {string}
4500
4967
  */
4501
4968
  GroupImageKind: "frame" | "load_face" | "container_door" | "pile" | "seal" | "other" | "bundle_end" | "bundle_far_end" | "label" | "tally_sheet" | "unit_edge" | "overview" | "weigh_ticket" | "damage";
@@ -5005,7 +5472,7 @@ export interface components {
5005
5472
  /** @description The key's id (`key_…`); null for a session. */
5006
5473
  key_id: string | null;
5007
5474
  };
5008
- /** @description A sawlog group's settled tally at one revision, sent as `group.measured`. */
5475
+ /** @description A group's tally at one revision, sent as `group.measured`. Read `totals` first, then `volume`: `totals` holds a lumber or panel tally's figures and is absent on a sawlog tally; `volume` holds a sawlog tally's figures and is `null` for lumber and panels. A lumber or panel tally also carries the fields of `LumberGroupTally` (without `lines`). */
5009
5476
  GroupTally: {
5010
5477
  /** @constant */
5011
5478
  object: "group_tally";
@@ -5023,10 +5490,10 @@ export interface components {
5023
5490
  /** @description The tally's revision for this group: 1 for the first, one higher for each later change. Handle the event idempotently on (`group_id`, `revision`) and keep the highest. */
5024
5491
  revision: number;
5025
5492
  /**
5026
- * @description Why this revision was sent: `scan_settled` (a scan's logs settled), `correction` (logs edited, given a manual measurement, or added through the API), `log_removed` (logs removed or moved out). Lumber and panels: `tally_submitted`, then `correction`.
5493
+ * @description Why this revision was sent: `scan_settled` (a scan's logs settled), `correction` (logs edited, given a manual measurement, or added through the API), `log_removed` (logs removed or moved out), `child_tallied` (a bundle or unit directly inside the group got a new final tally, or a tallied one was moved in). Lumber and panels: `tally_submitted`, then `correction`.
5027
5494
  * @enum {string}
5028
5495
  */
5029
- reason: "scan_settled" | "correction" | "log_removed" | "tally_submitted";
5496
+ reason: "scan_settled" | "correction" | "log_removed" | "child_tallied" | "tally_submitted";
5030
5497
  /**
5031
5498
  * Format: date-time
5032
5499
  * @description When this revision settled.
@@ -5034,8 +5501,9 @@ export interface components {
5034
5501
  settled_at: string;
5035
5502
  /** @description The group's own pieces in this revision: its active logs (a scan the phone is still uploading is not counted until it is submitted). A nested group sends its own tally. */
5036
5503
  pieces: number;
5504
+ /** @description Sawlogs: the logs' volume. `null` for a lumber or panel tally, which has no logs; its figures are in `totals`. */
5037
5505
  volume: {
5038
- /** @description The account's default rule, `jas` today. */
5506
+ /** @description The account's default rule, `jas`. */
5039
5507
  rule: string;
5040
5508
  rule_version: string;
5041
5509
  /** @description The volume of those pieces at their effective measurements when the event is sent: server-refined where refined, the device estimate where refinement failed or never ran. */
@@ -5047,9 +5515,65 @@ export interface components {
5047
5515
  estimated_only: number;
5048
5516
  /** @description Pieces whose refinement failed for good. */
5049
5517
  failed: number;
5050
- };
5518
+ } | null;
5051
5519
  /** @description Pieces with an `assigned` (nominal class) measurement. */
5052
5520
  assigned_count: number;
5521
+ /** @description A sawlog tally's pieces (its logs, oldest first, at most 1,000; see `logs_has_more`), each with the detector's confidence and its photo reference, so a receiver can store them without a read. The full records are `GET /groups/{id}/items`. Absent on lumber and panel tallies and on events sent before 28 November 2026. */
5522
+ logs?: components["schemas"]["GroupTallyLog"][];
5523
+ /** @description `true` when the group has more than the 1,000 logs listed in `logs`. */
5524
+ logs_has_more?: boolean;
5525
+ /** @description Lumber and panels: the tally's figures in its rule's units (`pieces` and, by rule, `board_feet`, `mbf`, `m3`, `m2`, each with an `*_exact` string). Absent on a sawlog tally, whose figures are `volume`. */
5526
+ totals?: ({
5527
+ pieces: number;
5528
+ board_feet?: number;
5529
+ board_feet_exact?: string;
5530
+ mbf?: number;
5531
+ m3?: number;
5532
+ m3_exact?: string;
5533
+ m2?: number;
5534
+ m2_exact?: string;
5535
+ /** @description MSF by thickness basis, such as `{ "3/4 in": 2.31 }`. */
5536
+ msf?: {
5537
+ [key: string]: number;
5538
+ };
5539
+ } & {
5540
+ [key: string]: unknown;
5541
+ }) | null;
5542
+ products?: components["schemas"]["GroupProducts"];
5543
+ /** @description A group holding bundles or units directly (a container, a truck load, a group a phone opened; any group but a bundle or unit): one row per bundle and unit, as `GET /groups/{id}/packing_list` `bundles`, each with its `product`. With `products`, which then lists its logs (`sawlog`, the same as `pieces` and `volume`) and its bundles' and units' figures, each product apart. Absent when the group holds no bundle or unit. A product packing list carries `children` and `totals` (its own product) and `totals_by_product`. */
5544
+ children?: {
5545
+ [key: string]: unknown;
5546
+ }[];
5547
+ /** @description `group.measured` only (sawlog groups): how many of the group's logs have a segmentation outline, by `item.outline.status`, and how many carry the simulator's practice values. */
5548
+ outlines?: {
5549
+ ready?: number;
5550
+ pending?: number;
5551
+ failed?: number;
5552
+ not_available?: number;
5553
+ simulated?: number;
5554
+ };
5555
+ /** @description The group's uploaded photos when this revision settled (removed photos are not counted). A photo added later does not send a new revision; `GET /groups/{id}/images` is the current list. Lumber and panels add their photo policy (`required`, `waived`, `missing`). Absent on older events (see the changelog). */
5556
+ photos?: {
5557
+ count: number;
5558
+ /** @description The count for each image kind (`load_face`, `label`, ...). */
5559
+ by_kind: {
5560
+ [key: string]: number;
5561
+ };
5562
+ /** @description The photos' ids (`img_...`). */
5563
+ ids: string[];
5564
+ };
5565
+ };
5566
+ /** @description One log of a sawlog tally (`group.measured` `logs`). */
5567
+ GroupTallyLog: {
5568
+ item_id: string;
5569
+ /** @description The capture client's id for the log (the SDK's `ScannedLog.id`). */
5570
+ client_id: string | null;
5571
+ /** @description The QR tag's payload; null for an untagged log. */
5572
+ tag: string | null;
5573
+ /** @description As the item's `detection_confidence`. */
5574
+ detection_confidence: number | null;
5575
+ /** @description As the item's `photo_ref`. */
5576
+ photo_ref: components["schemas"]["PhotoRef"] | null;
5053
5577
  };
5054
5578
  /** @description Event about a place. `place.deleted` carries the place as it was just before it was deleted. */
5055
5579
  PlaceEvent: {
@@ -5234,6 +5758,15 @@ export interface components {
5234
5758
  /** @constant */
5235
5759
  deleted: true;
5236
5760
  };
5761
+ /** @description Confirmation of deletion. */
5762
+ LabelTemplateDeleted: {
5763
+ /** @description Id. */
5764
+ id: string;
5765
+ /** @constant */
5766
+ object: "label_template";
5767
+ /** @constant */
5768
+ deleted: true;
5769
+ };
5237
5770
  /** @description Which event type to send as a test. Defaults to `scan.created`. */
5238
5771
  WebhookTestRequest: {
5239
5772
  type?: components["schemas"]["EventType"];
@@ -5308,9 +5841,9 @@ export interface components {
5308
5841
  refined_m3: number;
5309
5842
  /** @description Photos counted in the period: uploaded group images of completed `photo_count` scans. */
5310
5843
  photos: number;
5311
- /** @description Lumber in the period (in development): `m3` billed (nominal m³ of final tallies, at the same price per m³ as logs), and `board_feet`, `pieces` and `photos` counted for display, never charged. */
5844
+ /** @description Lumber in the period: `m3` billed (nominal m³ of final tallies, at the same price per m³ as logs), and `board_feet`, `pieces` and `photos` counted for display, never charged. */
5312
5845
  lumber?: Record<string, never>;
5313
- /** @description Panels in the period (in development): `m3` billed, and `m2`, `pieces` and `photos` counted for display, never charged. */
5846
+ /** @description Panels in the period: `m3` billed, and `m2`, `pieces` and `photos` counted for display, never charged. */
5314
5847
  panels?: Record<string, never>;
5315
5848
  /** @description Committed monthly volume, if the contract has one. */
5316
5849
  commitment_m3: number | null;
@@ -5331,7 +5864,7 @@ export interface components {
5331
5864
  /** @description Scan that produced the usage. */
5332
5865
  scan_id: string | null;
5333
5866
  /**
5334
- * @description What was counted. `refined_m3` is billed when an item's first `server_refined` measurement is created. `photo` is billed once per uploaded group image of a completed `photo_count` scan (one record per image, `quantity` 1). `lumber_m3` and `panel_m3` (in development) are a bundle's or unit's nominal m³ when its tally is final, billed at the same price per m³ as logs, once per bundle; a later final tally after a correction supersedes the record and is billed as an adjustment of the difference. The other lumber and panel units are counts for display and are never charged.
5867
+ * @description What was counted. `refined_m3` is billed when an item's first `server_refined` measurement is created. `photo` is recorded once per uploaded group image of a completed `photo_count` scan (one record per image, `quantity` 1); it is charged only where a price per image is set. `lumber_m3` and `panel_m3` are a bundle's or unit's nominal m³ when its tally is final, billed at the same price per m³ as logs, once per bundle; a later final tally after a correction supersedes the record and is billed as an adjustment of the difference. The other lumber and panel units are counts for display and are never charged.
5335
5868
  * @enum {string}
5336
5869
  */
5337
5870
  unit: "refined_m3" | "photo" | "lumber_m3" | "panel_m3" | "lumber_pieces" | "lumber_board_feet" | "lumber_photos" | "panel_pieces" | "panel_m2" | "panel_photos";
@@ -5416,31 +5949,146 @@ export interface components {
5416
5949
  * @enum {string}
5417
5950
  */
5418
5951
  format: "coreml_mlpackage_zip" | "tflite";
5952
+ /**
5953
+ * @description The model's input size, as asked for with `variant`.
5954
+ * @enum {string}
5955
+ */
5956
+ variant?: "960" | "640";
5957
+ /** @description How a frame becomes the model's input. `letterbox`: scale the frame to fit `input_size` keeping its aspect ratio, centre it on a square filled with `pad_value` (grey 114), and map boxes back the same way. `pixel_range`: `0_255` (iOS, Core ML takes the image) or `0_1` (Android, RGB divided by 255). */
5958
+ preprocessing?: {
5959
+ /** @example letterbox */
5960
+ resize?: string;
5961
+ pad_value?: number;
5962
+ /** @example rgb */
5963
+ color?: string;
5964
+ /** @example 0_255 */
5965
+ pixel_range?: string;
5966
+ };
5967
+ /** @description `nms_confidence` and `nms_iou`: the non-maximum suppression the model was evaluated with (built into the Core ML model; applied by the decoder on Android). `recommended_confidence`: the gate for choosing the log to measure. */
5968
+ thresholds?: {
5969
+ nms_confidence?: number;
5970
+ nms_iou?: number;
5971
+ recommended_confidence?: number;
5972
+ };
5973
+ /** @description Android only: the output layout of the `.tflite` file, in the form of the SDK's `<model>.tflite.spec.json` sidecar (`layout`, `box_format`, `objectness`, `coordinates`, `labels`, `input`, `input_range`). */
5974
+ layout?: {
5975
+ [key: string]: unknown;
5976
+ };
5419
5977
  };
5420
- /**
5421
- * @description `pending`: sent or retried soon (`next_attempt_at`). `succeeded`: a 2xx came back. `failed`: every attempt failed. `canceled`: not sent because the endpoint was disabled or deleted.
5422
- * @enum {string}
5423
- */
5424
- WebhookDeliveryStatus: "pending" | "succeeded" | "failed" | "canceled";
5425
- /** @description One event sent to one endpoint, with its attempts so far. */
5426
- WebhookDelivery: {
5427
- id: string;
5978
+ /** @description The current on-device lumber board-end counter: the detector's fields (`DetectorModel`) plus the counting recipe (`tiling`, `count`). The SDK downloads it, checks the hash and caches it. */
5979
+ BoardEndCounterModel: {
5428
5980
  /** @constant */
5429
- object: "webhook_delivery";
5430
- livemode: boolean;
5431
- endpoint_id: string;
5432
- /** @description The event, and the `webhook-id` header of every attempt. */
5433
- event_id: string;
5434
- event_type: components["schemas"]["EventType"];
5435
- /** @description A test event from `POST /webhook_endpoints/{id}/test`. */
5436
- test: boolean;
5437
- status: components["schemas"]["WebhookDeliveryStatus"];
5438
- /** @description Attempts since it was queued or last resent. */
5439
- attempts: number;
5440
- /** Format: date-time */
5441
- last_attempt_at: string | null;
5442
- /** @description The HTTP status of the last attempt, `null` when nothing came back. */
5443
- last_response_status: number | null;
5981
+ object: "model";
5982
+ /**
5983
+ * @description Model id.
5984
+ * @example timbereye-board-end-counter
5985
+ */
5986
+ id: string;
5987
+ /**
5988
+ * @description Model version.
5989
+ * @example 0.9.0
5990
+ */
5991
+ version: string;
5992
+ /** @description Size in bytes of exactly what `download_url` serves for this platform (the ZIP archive on iOS, the `.tflite` file on Android). */
5993
+ size_bytes: number;
5994
+ /** @description SHA-256 of exactly the bytes `download_url` serves for this platform (the ZIP archive on iOS, the `.tflite` file on Android), as downloaded and before any unzipping. Verify it after download. */
5995
+ sha256: string;
5996
+ /**
5997
+ * @description Licence the weights are released under.
5998
+ * @example Apache-2.0
5999
+ */
6000
+ licence?: string;
6001
+ /** @description Model input size. */
6002
+ input_size?: {
6003
+ /** @description Pixels. */
6004
+ width: number;
6005
+ /** @description Pixels. */
6006
+ height: number;
6007
+ };
6008
+ /**
6009
+ * Format: uri
6010
+ * @description Signed download URL for the file described by `format`, `size_bytes` and `sha256`. Send no `Authorization` header to it.
6011
+ */
6012
+ download_url: string;
6013
+ /**
6014
+ * Format: date-time
6015
+ * @description When the URL expires.
6016
+ */
6017
+ download_url_expires_at?: string;
6018
+ /**
6019
+ * @description The platform this description is for (the `platform` query parameter).
6020
+ * @enum {string}
6021
+ */
6022
+ platform: "ios" | "android";
6023
+ /**
6024
+ * @description What `download_url` serves. `coreml_mlpackage_zip`: a ZIP archive of the model's `.mlpackage` directory, for iOS (unzip, then compile with Core ML). `tflite`: the `.tflite` flatbuffer, for Android, used as downloaded. Unknown values: treat the model as unusable on this platform.
6025
+ * @enum {string}
6026
+ */
6027
+ format: "coreml_mlpackage_zip" | "tflite";
6028
+ /**
6029
+ * @description `m` (`timbereye-board-end-counter`) or `s`, the smaller model, as asked for with `variant`.
6030
+ * @enum {string}
6031
+ */
6032
+ variant?: "m" | "s";
6033
+ /** @description How a frame becomes the model's input. `letterbox`: scale the frame to fit `input_size` keeping its aspect ratio, centre it on a square filled with `pad_value` (grey 114), and map boxes back the same way. `pixel_range`: `0_255` (iOS, Core ML takes the image) or `0_1` (Android, RGB divided by 255). */
6034
+ preprocessing?: {
6035
+ /** @example letterbox */
6036
+ resize?: string;
6037
+ pad_value?: number;
6038
+ /** @example rgb */
6039
+ color?: string;
6040
+ /** @example 0_255 */
6041
+ pixel_range?: string;
6042
+ };
6043
+ /** @description `nms_confidence` and `nms_iou`: the non-maximum suppression the model was evaluated with (built into the Core ML model; applied by the decoder on Android). `recommended_confidence`: the score at or above which a box is a board end. */
6044
+ thresholds?: {
6045
+ nms_confidence?: number;
6046
+ nms_iou?: number;
6047
+ recommended_confidence?: number;
6048
+ };
6049
+ /** @description Android only: the output layout of the `.tflite` file, in the form of the SDK's `<model>.tflite.spec.json` sidecar (`layout`, `box_format`, `objectness`, `coordinates`, `labels`, `input`, `input_range`). */
6050
+ layout?: {
6051
+ [key: string]: unknown;
6052
+ };
6053
+ /** @description How a photo becomes the model's inputs: resize it to `photo_long_side` on its long side, cut `grid` (columns, rows) tiles overlapping by `overlap`, letterbox each to `tile_input`, keep at most `max_per_tile` boxes a tile and each box only in the tile whose core (`merge: core`) holds its centre. */
6054
+ tiling?: {
6055
+ photo_long_side?: number;
6056
+ grid?: number[];
6057
+ overlap?: number;
6058
+ tile_input?: number;
6059
+ merge?: string;
6060
+ max_per_tile?: number;
6061
+ };
6062
+ /** @description `dots: box_centres`: one dot per box at or above `thresholds.recommended_confidence`. `check_if_median_short_side_px_below`: thin, dense boards; ask the operator to check the count closely (never a reason to skip the check). */
6063
+ count?: {
6064
+ dots?: string;
6065
+ check_if_median_short_side_px_below?: number;
6066
+ };
6067
+ };
6068
+ /**
6069
+ * @description `pending`: sent or retried soon (`next_attempt_at`). `succeeded`: a 2xx came back. `failed`: every attempt failed. `canceled`: not sent because the endpoint was disabled or deleted.
6070
+ * @enum {string}
6071
+ */
6072
+ WebhookDeliveryStatus: "pending" | "succeeded" | "failed" | "canceled";
6073
+ /** @description One event sent to one endpoint, with its attempts so far. */
6074
+ WebhookDelivery: {
6075
+ id: string;
6076
+ /** @constant */
6077
+ object: "webhook_delivery";
6078
+ livemode: boolean;
6079
+ endpoint_id: string;
6080
+ /** @description The event, and the `webhook-id` header of every attempt. */
6081
+ event_id: string;
6082
+ event_type: components["schemas"]["EventType"];
6083
+ /** @description A test event from `POST /webhook_endpoints/{id}/test`. */
6084
+ test: boolean;
6085
+ status: components["schemas"]["WebhookDeliveryStatus"];
6086
+ /** @description Attempts since it was queued or last resent. */
6087
+ attempts: number;
6088
+ /** Format: date-time */
6089
+ last_attempt_at: string | null;
6090
+ /** @description The HTTP status of the last attempt, `null` when nothing came back. */
6091
+ last_response_status: number | null;
5444
6092
  /** @description How long the last attempt took, `null` when it never reached the endpoint. */
5445
6093
  last_duration_ms: number | null;
5446
6094
  /** @description Why the last attempt failed, for example `http_500`, `network_error`, `blocked_destination`. */
@@ -5529,7 +6177,7 @@ export interface components {
5529
6177
  */
5530
6178
  mode: "live" | "test";
5531
6179
  /**
5532
- * @description Units the SDK formatters and the Capture app display. `metric` until the account setting is configurable.
6180
+ * @description Units the SDK formatters and the Capture app display. Always `metric`.
5533
6181
  * @enum {string}
5534
6182
  */
5535
6183
  display_units: "metric" | "imperial";
@@ -5549,6 +6197,75 @@ export interface components {
5549
6197
  /** @description This month's live usage and estimated charge, and the billing status. `null` for publishable keys, capture tokens and the Timbereye app. */
5550
6198
  billing: components["schemas"]["AccountBilling"] | null;
5551
6199
  data_use: components["schemas"]["AccountDataUse"];
6200
+ /** @description The organisation's logo on its documents (`GET /account/logo` has the image); null when it has none. */
6201
+ logo?: {
6202
+ /** @enum {string} */
6203
+ content_type: "image/png" | "image/jpeg";
6204
+ width: number;
6205
+ height: number;
6206
+ size_bytes: number;
6207
+ sha256: string;
6208
+ /** Format: date-time */
6209
+ updated_at: string;
6210
+ } | null;
6211
+ lumber?: components["schemas"]["AccountLumberSettings"];
6212
+ };
6213
+ /** @description The organisation's logo on its documents. */
6214
+ AccountLogo: {
6215
+ /** @constant */
6216
+ object: "account_logo";
6217
+ /** @enum {string} */
6218
+ content_type: "image/png" | "image/jpeg";
6219
+ /** @description Pixels. */
6220
+ width: number;
6221
+ /** @description Pixels. */
6222
+ height: number;
6223
+ size_bytes: number;
6224
+ sha256: string;
6225
+ /** Format: date-time */
6226
+ updated_at: string;
6227
+ /** @description The image, base64-encoded (`GET /account/logo` only). */
6228
+ data?: string;
6229
+ };
6230
+ AccountLogoSet: {
6231
+ /** @description The PNG or JPEG image, base64-encoded: at most 256 KB, each side 16 to 4,000 pixels. */
6232
+ data: string;
6233
+ };
6234
+ AccountLogoDeleted: {
6235
+ /** @constant */
6236
+ object: "account_logo";
6237
+ /** @constant */
6238
+ deleted: true;
6239
+ };
6240
+ /** @description The organisation's lumber settings in this mode, for every caller including the Timbereye app (which offers "Lumber bundle" only when `enabled`, and only the `products` listed). Change them with `PATCH /account/lumber`. */
6241
+ AccountLumberSettings: {
6242
+ /** @description Whether lumber and panel groups can be opened from a phone (`POST /groups/open`). Default on in test mode, off in live mode. */
6243
+ enabled: boolean;
6244
+ /**
6245
+ * @description The named board-foot method of a lumber bundle tallied board by board (`per_piece`) when its request names no rule, and the policies a request naming that method's rule leaves out (a request naming `sm_round` gets the rest of the method that rounding belongs to). `nhla_board_measure` (the default; follows the NHLA board measure rule: surface measure per board = full width × length in whole feet ÷ 12, to the nearest whole foot, exact halves alternately up and down in tally order; board feet = Σ SM × thickness, under 4/4 as 4/4, shown with decimals for 5/4 and 6/4), `nominal_piece_tally` (nominal thickness × width × length ÷ 12 per piece, no rounding per piece; always the rule of imperial units of one size), `width_length_tally` (widths to whole inches, the export tally `lumber_bf_width_length_tally`, or metric width classes; always the rule of width-class bundles), `exact` (width × whole feet ÷ 12 unrounded, the bundle rounded once) or `mill_half_foot_down` (half-inch width sections and surface measure in half feet, both rounded down; the behaviour before 24 November 2026, formerly `per_board`). Each bundle records the method it was created with (`rule.method`) and keeps it.
6246
+ * @enum {string}
6247
+ */
6248
+ board_foot_method: "nhla_board_measure" | "nominal_piece_tally" | "width_length_tally" | "exact" | "mill_half_foot_down";
6249
+ /** @description Whether a new bundle or unit that states no `photos` policy needs its photos (the product's default kinds) before its tally is final. Default false: photos are optional, and a tally submitted without one is accepted (its `photos.no_photo` is true). An organisation may turn it on; a group created with its own `photos` keeps that. */
6250
+ photos_required: boolean;
6251
+ /** @description The products phones may open when `enabled` (`POST /groups/open` with `product`); another is 403 `product_not_enabled`. Default both: `[lumber, panel]`. Sawlogs are not affected. */
6252
+ products: ("lumber" | "panel")[];
6253
+ };
6254
+ AccountLumberSettingsUpdate: {
6255
+ enabled?: boolean;
6256
+ /**
6257
+ * @description The named board-foot method for bundles created from now on; bundles already created keep theirs.
6258
+ * @enum {string}
6259
+ */
6260
+ board_foot_method?: "nhla_board_measure" | "nominal_piece_tally" | "width_length_tally" | "exact" | "mill_half_foot_down";
6261
+ photos_required?: boolean;
6262
+ /** @description A non-empty list of distinct values; returned in the order lumber, panel. */
6263
+ products?: ("lumber" | "panel")[];
6264
+ };
6265
+ AccountLumberSettingsObject: components["schemas"]["AccountLumberSettings"] & {
6266
+ /** @constant */
6267
+ object: "account_lumber";
6268
+ livemode: boolean;
5552
6269
  };
5553
6270
  /**
5554
6271
  * @description What the calling phone credential may do (`GET /account`, `key`). Only the credential's own settings and today's use of its caps, nothing about the account's data.
@@ -5777,6 +6494,8 @@ export interface components {
5777
6494
  device_label?: string;
5778
6495
  /** @description The organisation chosen last time on this phone (`acct_…`). When it is one of the person's, the chooser is skipped. */
5779
6496
  organisation_id?: string;
6497
+ /** @description The app can start an organisation (the Timbereye app sends true). An address that belongs to no organisation then gets a `device_sign_in_no_organisation` instead of 403 `not_a_member`. */
6498
+ offer_new_organisation?: boolean;
5780
6499
  };
5781
6500
  DeviceSignInLink: {
5782
6501
  /** @description `access_token` from the link's fragment. Used once, here, and never kept. */
@@ -5786,6 +6505,8 @@ export interface components {
5786
6505
  installation_id: string;
5787
6506
  device_label?: string;
5788
6507
  organisation_id?: string;
6508
+ /** @description The app can start an organisation (the Timbereye app sends true). An address that belongs to no organisation then gets a `device_sign_in_no_organisation` instead of 403 `not_a_member`. */
6509
+ offer_new_organisation?: boolean;
5789
6510
  };
5790
6511
  DeviceSignInChoose: {
5791
6512
  /** @description The `choice_token` of the `device_sign_in_choice`. */
@@ -5795,6 +6516,45 @@ export interface components {
5795
6516
  installation_id: string;
5796
6517
  device_label?: string;
5797
6518
  };
6519
+ DeviceSignInNewOrganisation: {
6520
+ /** @description The `new_organisation.token` of the `device_sign_in_no_organisation`. */
6521
+ new_organisation_token: string;
6522
+ /** @description The person's name, as the team list shows it. */
6523
+ name: string;
6524
+ /** @description The new organisation's name. Names need not be unique. */
6525
+ organisation_name: string;
6526
+ installation_id: string;
6527
+ device_label?: string;
6528
+ };
6529
+ /** @description The address belongs to no organisation. Only when the app sent `offer_new_organisation`. */
6530
+ DeviceSignInNoOrganisation: {
6531
+ /**
6532
+ * @description discriminator enum property added by openapi-typescript
6533
+ * @enum {string}
6534
+ */
6535
+ object: "device_sign_in_no_organisation";
6536
+ livemode: boolean;
6537
+ email: string;
6538
+ /** @description Invitations waiting for the address, newest first. Accepted from the invitation email. */
6539
+ invitations: {
6540
+ organisation: components["schemas"]["DeviceSignInOrganisation"];
6541
+ /** @enum {string} */
6542
+ role: "owner" | "developer" | "editor" | "viewer";
6543
+ /** Format: date-time */
6544
+ expires_at: string;
6545
+ }[];
6546
+ /**
6547
+ * @description Why no organisation may be started here; null when it may.
6548
+ * @enum {string|null}
6549
+ */
6550
+ refusal: "invitation_pending" | "signup_closed" | null;
6551
+ /** @description For `POST /device_sign_in/organisation`; null when `refusal` is set. */
6552
+ new_organisation: null | {
6553
+ token: string;
6554
+ /** Format: date-time */
6555
+ expires_at: string;
6556
+ };
6557
+ };
5798
6558
  DeviceSignInOrganisation: {
5799
6559
  /** @description The organisation (its live account), prefixed `acct_`. */
5800
6560
  id: string;
@@ -5935,8 +6695,19 @@ export interface components {
5935
6695
  external_ref: string | null;
5936
6696
  name: string | null;
5937
6697
  defaults: components["schemas"]["GroupDefaults"] | null;
5938
- /** @description How many logs the group holds on the server. */
6698
+ holds?: components["schemas"]["GroupHolds"] | null;
6699
+ product?: components["schemas"]["LumberProduct"];
6700
+ /** @description Lumber and panel groups only: the group this one sits in (a bundle's container, truck load or stack), or null. A sawlog group's placement is not shown to phones. */
6701
+ parent_id?: string | null;
6702
+ /** @description How many logs the group holds on the server (logs taken out of the group or removed are not counted). */
5939
6703
  item_count: number;
6704
+ /** @description The server's volume of the group's logs, so the app can show the server's figures beside its own. Null for lumber and panel groups, which hold no logs (their figures are their tallies). */
6705
+ volume: {
6706
+ /** @constant */
6707
+ rule: "jas";
6708
+ /** @description Cubic metres by the JAS rule, of the same logs as `item_count` (as `GET /groups/{id}` `summary.volume`). */
6709
+ m3: number;
6710
+ } | null;
5940
6711
  /** Format: date-time */
5941
6712
  created_at: string;
5942
6713
  /** Format: date-time */
@@ -6108,8 +6879,10 @@ export interface components {
6108
6879
  * @description When it was revoked.
6109
6880
  */
6110
6881
  revoked_at: string | null;
6111
- /** @description The accept token (`tei_…`), present only in the response that creates or resends the invitation, once; `null` everywhere else, including a replay. Build the accept link as `https://<dashboard>/invitations/accept#token=<token>`. */
6882
+ /** @description The accept token (`tei_…`), present only in the responses that create or resend the invitation or retrieve its link; `null` everywhere else, including a replay. The emailed link is `https://www.timbereye.com/app/invitations/accept#token=<token>`. */
6112
6883
  token: string | null;
6884
+ /** @description Whether this request emailed the invitation to its address (create and resend); `false` where mail is not configured or the send failed, in which case send the link yourself. `null` in every other response. */
6885
+ emailed: boolean | null;
6113
6886
  };
6114
6887
  /** @description The organisation's invitations. Every invitation is on one page. */
6115
6888
  InvitationList: {
@@ -6170,7 +6943,7 @@ export interface components {
6170
6943
  /** @description The organisation's live account; null when the session acts for none. */
6171
6944
  account: components["schemas"]["ConsoleAccount"] | null;
6172
6945
  /**
6173
- * @description The person's role in the account (`docs/timbereye-team-roles.md`); `staff` for a Timbereye staff member acting as the account; null without an account.
6946
+ * @description The person's role in the account ([Your team](https://www.timbereye.com/docs/team/)); `staff` for a Timbereye staff member acting as the account; null without an account.
6174
6947
  * @enum {string|null}
6175
6948
  */
6176
6949
  role: "owner" | "developer" | "editor" | "viewer" | "staff" | null;
@@ -6233,10 +7006,12 @@ export interface components {
6233
7006
  /** @description A test scan reached `refined` (a refined measurement exists). */
6234
7007
  first_refined_scan: boolean;
6235
7008
  };
6236
- /** @description Platform admins only: active live accounts by name (at most 200). Null for everyone else. */
7009
+ /** @description Platform admins only: active live accounts by name (at most 200). Null for everyone else. Names need not be unique: an organisation is its id. */
6237
7010
  staff_accounts: {
6238
7011
  id: string;
6239
7012
  name: string;
7013
+ /** @description The email of the organisation's first owner, or null when it has none. With the id, it tells two organisations of the same name apart. */
7014
+ owner_email: string | null;
6240
7015
  }[] | null;
6241
7016
  /** @description The Terms of Service and Privacy Policy versions in force when this person first opened the console after signing up, or null (none recorded, for example a person who signed up before the Terms were published). See `POST /console/agreements`. */
6242
7017
  agreement: components["schemas"]["LegalAgreement"] | null;
@@ -6459,9 +7234,9 @@ export interface components {
6459
7234
  period: string;
6460
7235
  /** @description Refined cubic metres billed this month, net of credits. */
6461
7236
  refined_m3: number;
6462
- /** @description Lumber cubic metres (nominal) billed this month at the same price per m³, net of adjustments. In development. */
7237
+ /** @description Lumber cubic metres (nominal) billed this month at the same price per m³, net of adjustments. */
6463
7238
  lumber_m3?: number;
6464
- /** @description Panel cubic metres billed this month at the same price per m³, net of adjustments. In development. */
7239
+ /** @description Panel cubic metres billed this month at the same price per m³, net of adjustments. */
6465
7240
  panel_m3?: number;
6466
7241
  /** @description Counted photos this month. */
6467
7242
  photos: number;
@@ -6515,6 +7290,18 @@ export interface components {
6515
7290
  price_per_m3: string | null;
6516
7291
  days_until_due: number | null;
6517
7292
  } | null;
7293
+ /** @description Set only for an organisation that is billing exempt (Timbereye's own, first-party organisations), or in the grace period after its exemption ended. Live mode is on with no card; usage is metered and shown in `current_period` but never invoiced or charged; the organisation is never past due or paused for non-payment. Only Timbereye staff set or remove an exemption; nothing in the API sets it. `null` for every other organisation. */
7294
+ exemption: {
7295
+ /** @description `true`: the organisation is billing exempt (first-party). `false`: the exemption has ended and live mode keeps working until `grace_until`. */
7296
+ active: boolean;
7297
+ /**
7298
+ * Format: date-time
7299
+ * @description After an exemption ends for an organisation with no billing of its own: live mode keeps working, and nothing is charged, until then. Accept the terms and add a card before it to keep live mode on; usage is billed from that moment. `null` while exempt.
7300
+ */
7301
+ grace_until: string | null;
7302
+ /** @description What this month's exempt usage would cost at the list price, in US cents. Never charged. */
7303
+ value_cents: number;
7304
+ } | null;
6518
7305
  };
6519
7306
  /**
6520
7307
  * @description Whether new live work (scans, groups, capture tokens, live keys) may start now. `not_enabled`: live mode is off (403 `live_mode_not_enabled`). `payment_overdue`: an invoice is unpaid past the grace period (402 `payment_overdue`). `spend_cap_reached`: the monthly spend cap is reached and set to pause (402 `spend_cap_reached`). Reads, and finishing scans already started, always work.
@@ -6644,6 +7431,66 @@ export interface components {
6644
7431
  has_more: boolean;
6645
7432
  next_cursor: string | null;
6646
7433
  };
7434
+ /** @description A member's message to Timbereye support from the console. Support replies by email. */
7435
+ SupportRequest: {
7436
+ /** @description Request id, prefixed `sreq_`. */
7437
+ id: string;
7438
+ /** @constant */
7439
+ object: "support_request";
7440
+ category: components["schemas"]["SupportRequestCategory"];
7441
+ message: string;
7442
+ /**
7443
+ * @description `received`: support replies by email.
7444
+ * @enum {string}
7445
+ */
7446
+ status: "received";
7447
+ /** @description Whether the person was in live mode when they wrote. */
7448
+ livemode: boolean;
7449
+ /** @description The console page they came from. */
7450
+ page: string | null;
7451
+ /** @description The person's email. */
7452
+ requested_by: string;
7453
+ /** Format: date-time */
7454
+ created_at: string;
7455
+ };
7456
+ /**
7457
+ * @description `question`, `broken` (something is broken), `billing` or `other`.
7458
+ * @enum {string}
7459
+ */
7460
+ SupportRequestCategory: "question" | "broken" | "billing" | "other";
7461
+ SupportRequestCreate: {
7462
+ category: components["schemas"]["SupportRequestCategory"];
7463
+ message: string;
7464
+ /** @description The console path the person came from (no query string). */
7465
+ page?: string | null;
7466
+ context?: components["schemas"]["SupportRequestContext"];
7467
+ };
7468
+ /** @description What the console attaches so support need not ask. Never keys, request bodies or tokens. */
7469
+ SupportRequestContext: {
7470
+ /** @description The failing request the person came from. */
7471
+ request_id?: string;
7472
+ /** @description The session's last failed API requests. */
7473
+ recent_failures?: {
7474
+ request_id?: string | null;
7475
+ /** @description The HTTP status; 0 when the request never reached the API. */
7476
+ status: number;
7477
+ code?: string | null;
7478
+ path: string;
7479
+ /** Format: date-time */
7480
+ at: string;
7481
+ }[];
7482
+ browser?: string;
7483
+ /** @description Width x height in CSS pixels, `1440x900`. */
7484
+ viewport?: string;
7485
+ };
7486
+ /** @description The signed-in person's support requests, newest first (at most 50). */
7487
+ SupportRequestList: {
7488
+ /** @constant */
7489
+ object: "list";
7490
+ data: components["schemas"]["SupportRequest"][];
7491
+ has_more: boolean;
7492
+ next_cursor: string | null;
7493
+ };
6647
7494
  /** @description The Terms of Service and Privacy Policy versions in force when a person first opened the console after signing up. */
6648
7495
  LegalAgreement: {
6649
7496
  terms_version: string;
@@ -6747,7 +7594,7 @@ export interface components {
6747
7594
  * @description What happened. New actions may be added within v1.
6748
7595
  * @enum {string}
6749
7596
  */
6750
- action: "invitation.created" | "invitation.resent" | "invitation.revoked" | "invitation.accepted" | "member.role_changed" | "member.removed" | "member.left" | "ownership.transferred" | "api_key.created" | "api_key.rolled" | "api_key.revoked" | "api_key.updated" | "api_key.records_voided" | "api_key.revealed" | "webhook_endpoint.created" | "webhook_endpoint.secret_rolled" | "webhook_delivery.resent" | "account.live_access_changed" | "account.data_use_changed" | "account.export_requested" | "account.closure_requested" | "scanner.added" | "scanner.removed" | "device_sign_in.created" | "device_sign_in.revoked" | "billing.terms_accepted" | "billing.payment_method_added" | "billing.spend_cap_changed" | "billing.stopped" | "billing.plan_changed" | "group.deleted" | "place.deleted";
7597
+ action: "invitation.created" | "invitation.resent" | "invitation.revoked" | "invitation.accepted" | "member.role_changed" | "member.removed" | "member.left" | "ownership.transferred" | "api_key.created" | "api_key.rolled" | "api_key.revoked" | "api_key.updated" | "api_key.records_voided" | "api_key.revealed" | "webhook_endpoint.created" | "webhook_endpoint.secret_rolled" | "webhook_delivery.resent" | "account.live_access_changed" | "account.data_use_changed" | "account.export_requested" | "account.closure_requested" | "support.requested" | "scanner.added" | "scanner.removed" | "device_sign_in.created" | "device_sign_in.revoked" | "billing.terms_accepted" | "billing.payment_method_added" | "billing.spend_cap_changed" | "billing.stopped" | "billing.plan_changed" | "group.deleted" | "place.deleted" | "item.moved";
6751
7598
  /** @description Who did it. */
6752
7599
  actor: {
6753
7600
  /**
@@ -6885,8 +7732,80 @@ export interface components {
6885
7732
  item_id?: string | null;
6886
7733
  confidence?: number;
6887
7734
  }[];
7735
+ /** @description A party on the packing list (seller, buyer, consignee, notify party): its name, address lines and an optional reference, printed as given. */
7736
+ ShippingParty: {
7737
+ /** @example Example Timber Co */
7738
+ name: string;
7739
+ /**
7740
+ * @example [
7741
+ * "1200 Harbor Road",
7742
+ * "Savannah, GA 31401",
7743
+ * "United States"
7744
+ * ]
7745
+ */
7746
+ address_lines: string[];
7747
+ /** @description Your reference for the party (an account or customer number). */
7748
+ reference: string | null;
7749
+ };
7750
+ /** @description A party: `name` (required when the party has anything), up to 5 `address_lines` and an optional `reference`. Blank values are dropped; null removes the party. */
7751
+ ShippingPartyInput: {
7752
+ name?: string;
7753
+ address_lines?: string[];
7754
+ reference?: string | null;
7755
+ } | null;
7756
+ /** @description Shipping details the packing list PDF prints in its header, as you gave them (every field, null when not set). Display only: Timbereye stores and prints them, does not issue, validate or file shipping documents, and derives nothing from them. A group inside another prints the details of the group it sits in for any field it does not have, except `seal_number` (see https://www.timbereye.com/docs/create-groups/#shipping-details); the group itself returns only what is stored on it. */
7757
+ GroupShipping: {
7758
+ seller: components["schemas"]["ShippingParty"] | null;
7759
+ buyer: components["schemas"]["ShippingParty"] | null;
7760
+ consignee: components["schemas"]["ShippingParty"] | null;
7761
+ notify_party: components["schemas"]["ShippingParty"] | null;
7762
+ order_number: string | null;
7763
+ contract_number: string | null;
7764
+ booking_number: string | null;
7765
+ bill_of_lading_number: string | null;
7766
+ carrier: string | null;
7767
+ vessel: string | null;
7768
+ voyage: string | null;
7769
+ port_of_loading: string | null;
7770
+ port_of_discharge: string | null;
7771
+ place_of_delivery: string | null;
7772
+ /** @description Free text, as you write it (`FOB Savannah`). */
7773
+ incoterm: string | null;
7774
+ hs_code: string | null;
7775
+ country_of_origin: string | null;
7776
+ /** @description The container's seal; printed for this group only, never taken from the group it sits in. */
7777
+ seal_number: string | null;
7778
+ };
7779
+ /** @description Shipping details for the packing list, all optional, one line of plain text each (trimmed; no line breaks or HTML), at most 8 KB in all. On `PATCH` each field you send replaces that field (a party is replaced whole), null or a blank value removes it, fields you leave out are unchanged, and `shipping: null` removes them all. Only a secret or restricted key (`groups:write`) or a console sign-in may set them; a publishable key, a capture token or a phone signed in to the app is refused with 403. Timbereye prints them as given and does not issue, validate or file shipping documents. */
7780
+ GroupShippingInput: {
7781
+ seller?: components["schemas"]["ShippingPartyInput"];
7782
+ buyer?: components["schemas"]["ShippingPartyInput"];
7783
+ consignee?: components["schemas"]["ShippingPartyInput"];
7784
+ notify_party?: components["schemas"]["ShippingPartyInput"];
7785
+ order_number?: string | null;
7786
+ contract_number?: string | null;
7787
+ booking_number?: string | null;
7788
+ bill_of_lading_number?: string | null;
7789
+ carrier?: string | null;
7790
+ vessel?: string | null;
7791
+ voyage?: string | null;
7792
+ port_of_loading?: string | null;
7793
+ port_of_discharge?: string | null;
7794
+ place_of_delivery?: string | null;
7795
+ /** @description Free text (`FOB Savannah`); not checked against any list. */
7796
+ incoterm?: string | null;
7797
+ hs_code?: string | null;
7798
+ country_of_origin?: string | null;
7799
+ /** @description The container's seal number. */
7800
+ seal_number?: string | null;
7801
+ } | null;
7802
+ /**
7803
+ * @description What the Timbereye apps scan into a group: logs (`sawlog`), lumber bundles or panel units. The apps keep one product per group and ask for it when a group is made; null on a group nobody chose for. Recorded, never enforced: the API accepts any product in any group (https://www.timbereye.com/docs/lumber-and-panels/).
7804
+ * @enum {string}
7805
+ */
7806
+ GroupHolds: "sawlog" | "lumber" | "panel";
6888
7807
  /**
6889
- * @description What a group holds: logs (every existing group), lumber boards or panel sheets. Lumber and panels are in development.
7808
+ * @description What a group holds: logs (every existing group), lumber boards or panel sheets.
6890
7809
  * @enum {string}
6891
7810
  */
6892
7811
  LumberProduct: "sawlog" | "lumber" | "panel";
@@ -6921,6 +7840,8 @@ export interface components {
6921
7840
  quality_code?: string;
6922
7841
  drying?: string | null;
6923
7842
  width_spec?: string;
7843
+ /** @description A free-text spec line ("KD 6–8% MC · S2S"), printed on the tally sheet and the packing list as given; never used in a figure. */
7844
+ spec_line?: string | null;
6924
7845
  label?: {
6925
7846
  size?: string;
6926
7847
  width?: components["schemas"]["LumberDimension"];
@@ -6931,7 +7852,7 @@ export interface components {
6931
7852
  source?: "operator" | "ocr";
6932
7853
  };
6933
7854
  };
6934
- /** @description A tally rule and its policies (see `GET /volume_rules`). Omitted policies take the rule's defaults. */
7855
+ /** @description A tally rule and its policies (see `GET /volume_rules`). Omitted policies of a hardwood bundle tallied board by board come from the organisation's `board_foot_method` when it uses the same rule (or from the method whose `sm_round` was named); otherwise they take the rule's defaults. */
6935
7856
  TallyRuleInput: {
6936
7857
  id: string;
6937
7858
  version?: string;
@@ -6957,7 +7878,7 @@ export interface components {
6957
7878
  totals?: "exact" | "reported";
6958
7879
  photos?: components["schemas"]["PhotoPolicyInput"];
6959
7880
  };
6960
- /** @description Which photos a lumber bundle or panel unit needs before its tally can be final. Omitted: the product's defaults (lumber `bundle_end` and `label`; panels `label` and `unit_edge`). `{ required: false, reason }` turns them off for this group (the tally then records `no_photo`); `{ required: [kinds] }` names the kinds. A packing list's setting is inherited by the bundles created with it. */
7881
+ /** @description Which photos a lumber bundle or panel unit needs before its tally can be final. Omitted: none, unless the organisation requires photos (`GET /account`, `lumber.photos_required`), then the product's defaults (lumber `bundle_end` and `label`; panels `label` and `unit_edge`). `{ required: [kinds] }` names the kinds (`[]`: none); `{ required: false, reason }` waives them for this group with the reason recorded. A packing list's setting is inherited by the bundles created with it. */
6961
7882
  PhotoPolicyInput: {
6962
7883
  required?: false | ("bundle_end" | "bundle_far_end" | "label" | "tally_sheet" | "unit_edge" | "other")[];
6963
7884
  reason?: string;
@@ -7003,15 +7924,103 @@ export interface components {
7003
7924
  client_id: string;
7004
7925
  lines: components["schemas"]["TallyLineInput"][];
7005
7926
  replaces?: string;
7927
+ /** @description The bundle's revision the sender last saw: 0 when it has no final tally yet. Any other current revision is 409 `tally_replaced` (the message names it), so a re-tally never silently replaces a correction made meanwhile. */
7928
+ replaces_revision?: number;
7006
7929
  /** @description Photos of this tally (group images of the bundle). */
7007
7930
  image_ids?: string[];
7008
- /** @description A count of board ends (or sheets) on a photo: `counted_pieces`, the `image_id` it was counted on, per-piece `regions` on that image, the `model`, and whether the operator `confirmed` it. Lumber vision counts; it never sizes boards. The tally reports `counted_pieces`, `count_matches` and `count_difference` beside `pieces`; a mismatch blocks nothing. */
7931
+ /** @description A count of board ends (or sheets) on a photo: `counted_pieces`, the `image_id` it was counted on, per-piece `regions` on that image, the `model`, whether the operator `confirmed` it, and who counted (`method`). The count itself never sizes boards; `sizes` and `trimbacks` carry what a phone with depth measured, as proposals. The tally reports `counted_pieces`, `count_method`, `count_matches` and `count_difference` beside `pieces`; a mismatch blocks nothing. */
7009
7932
  vision_count?: {
7010
7933
  counted_pieces: number;
7011
7934
  image_id?: string;
7012
7935
  regions?: unknown[];
7013
7936
  model?: string;
7014
7937
  confirmed?: boolean;
7938
+ /**
7939
+ * @description Who counted: `model` (a counting model on the photo), `operator_taps` (the operator tapped each board end on the photo; `regions` are the taps, `{x, y}` in image pixels), `operator_label` (typed from the pack's label).
7940
+ * @default model
7941
+ * @enum {string}
7942
+ */
7943
+ method?: "model" | "operator_taps" | "operator_label";
7944
+ /** @description `method: model`: the model's own count before the operator corrected it; `counted_pieces` is the count after correction. Optional; reported back as recorded. Billing never reads it. */
7945
+ proposed_pieces?: number;
7946
+ /** @description The rectangle the pieces were counted in, `{x, y, width, height}` normalised to the image (0 to 1, origin top left); pieces outside it were not counted. Absent: the whole image. A rectangle that overhangs the image by up to 0.05 is clipped to it, not refused. */
7947
+ area?: {
7948
+ x: number;
7949
+ y: number;
7950
+ width: number;
7951
+ height: number;
7952
+ };
7953
+ /** @description `method: model`: everything the model found on the image, kept with the operator's corrections so each confirmed count is a labelled example for the next model version. Boxes are normalised to the image (0 to 1, origin top left); at most 5,000. A detector's box may overhang the image a little: coordinates from -0.05 to 1.05 are accepted and the box is clipped to the image (a score up to 1.05 is stored as 1); anything further out is refused. Billing never reads it. */
7954
+ proposal?: {
7955
+ boxes: {
7956
+ x: number;
7957
+ y: number;
7958
+ width: number;
7959
+ height: number;
7960
+ score: number;
7961
+ /** @description One board found as two halves either side of a strap, joined. */
7962
+ strap_merged?: boolean;
7963
+ }[];
7964
+ /** @description The model's own counting area (the subject bundle), `{x, y, width, height}` normalised. */
7965
+ area: {
7966
+ x: number;
7967
+ y: number;
7968
+ width: number;
7969
+ height: number;
7970
+ };
7971
+ /** @description False when the model found no bundle and proposed the whole image. */
7972
+ area_trusted?: boolean;
7973
+ /** @description Board ends on the whole image before strap splits were joined. */
7974
+ raw_count?: number;
7975
+ };
7976
+ /** @description `method: model`, with `proposal`: what the operator changed: board ends `added` (`{x, y}` normalised) and proposed boxes `removed` (indices into `proposal.boxes`). An added point up to 0.05 outside the image is moved onto its edge. */
7977
+ corrections?: {
7978
+ added?: {
7979
+ x: number;
7980
+ y: number;
7981
+ }[];
7982
+ removed?: number[];
7983
+ };
7984
+ /** @description `method: model`, with `proposal`: board sizes measured on the proposal's boxes (LiDAR on the phone): per box its width and thickness in inches, each with its ± (about 95 %), how far the end sits behind the bundle's face (`setback_in`), the reason when there is no size (`blank`) and the width put into the tally (`proposed_width_in`). A proposal, kept as sent so each tally is a labelled example; the confirmed sizes are the tally's `lines`. Billing never reads it. */
7985
+ sizes?: {
7986
+ /** @description `lidar`. */
7987
+ source?: string;
7988
+ distance_m?: number;
7989
+ tilt_degrees?: number;
7990
+ quality?: string;
7991
+ /** @description At most one per proposed box. */
7992
+ readings: {
7993
+ /** @description Index into `proposal.boxes`. */
7994
+ box: number;
7995
+ width_in?: number;
7996
+ width_plus_minus_in?: number;
7997
+ thickness_in?: number;
7998
+ thickness_plus_minus_in?: number;
7999
+ setback_in?: number;
8000
+ proposed_width_in?: number;
8001
+ blank?: string;
8002
+ }[];
8003
+ };
8004
+ /** @description `method: model`, with `proposal`: trimbacks (boards shorter than the bundle). `levels`: the lengths proposed from the board ends' setbacks, each with its median setback, its boxes and whether it was marked without asking. `marks`: the lengths the operator left marked, by proposed box (`box`) or, for a board end the operator added, by its normalised point (`x`, `y`). The confirmed lengths are the tally's `lines`. Billing never reads it. */
8005
+ trimbacks?: {
8006
+ /** @description `nearest_foot` or `rounded_down`: how a setback became a length. */
8007
+ rule?: string;
8008
+ threshold_in?: number;
8009
+ nominal_ft?: number;
8010
+ levels?: {
8011
+ length_ft: number;
8012
+ setback_in?: number;
8013
+ spread_in?: number;
8014
+ boxes: number[];
8015
+ confident?: boolean;
8016
+ }[];
8017
+ marks?: {
8018
+ box?: number;
8019
+ x?: number;
8020
+ y?: number;
8021
+ length_ft: number;
8022
+ }[];
8023
+ };
7015
8024
  };
7016
8025
  device?: Record<string, never>;
7017
8026
  sdk?: Record<string, never>;
@@ -7047,6 +8056,13 @@ export interface components {
7047
8056
  settled_at?: string | null;
7048
8057
  pieces: number;
7049
8058
  totals?: Record<string, never> | null;
8059
+ /** @description The pieces counted on the photo (`vision_count`), or null. */
8060
+ counted_pieces?: number | null;
8061
+ /**
8062
+ * @description Who counted (`vision_count.method`), or null when nothing was counted.
8063
+ * @enum {string|null}
8064
+ */
8065
+ count_method?: "model" | "operator_taps" | "operator_label" | null;
7050
8066
  lines?: Record<string, never>[];
7051
8067
  };
7052
8068
  /** @description A tally sheet or packing list as JSON (`object: tally_sheet` or `packing_list`, with a `document` block), or with `format=html` a printable page (`object: document`, `content`). */
@@ -7092,6 +8108,8 @@ export interface components {
7092
8108
  scenario: "hardwood_packing_list" | "metric_width_class_list" | "softwood_units" | "panel_units";
7093
8109
  seed?: number;
7094
8110
  bundles?: number;
8111
+ /** @description Put the bundles or units directly into this existing group (a container with logs, say), as a phone does, instead of a new packing list: one group then holds several products. `packing_list` is that group's packing list. */
8112
+ group_id?: string;
7095
8113
  };
7096
8114
  SimulatedPackingList: {
7097
8115
  /** @constant */
@@ -7225,7 +8243,7 @@ export interface components {
7225
8243
  "application/json": components["schemas"]["ErrorResponse"];
7226
8244
  };
7227
8245
  };
7228
- /** @description `api_error`: `isolation_unavailable` (the resource's account isolation is not in place) or `service_unavailable` (for example image storage not available in this environment). Retry later. */
8246
+ /** @description `api_error`: `isolation_unavailable` (the resource's account isolation is not in place), `service_unavailable` (for example image storage not available in this environment) or `model_unavailable` (no on-device detector to offer in this environment). Retry later. */
7229
8247
  ServiceUnavailable: {
7230
8248
  headers: {
7231
8249
  "Request-Id": components["headers"]["RequestId"];
@@ -8089,6 +9107,8 @@ export interface operations {
8089
9107
  kind?: components["schemas"]["GroupImageKind"];
8090
9108
  /** @description Include removed photos (with `removed_at` and `removed_by`). Secret and restricted keys and the console only. */
8091
9109
  include_removed?: boolean;
9110
+ /** @description Also the photos of the bundles and units in the group (its `GET /groups/{id}/packing_list` rows), after the group's own, child by child; each image's `group_id` says whose it is. A phone gets those of the children it may capture into; a capture token those of its groups. */
9111
+ include_children?: boolean;
8092
9112
  /** @description Page size, 1 to 100. */
8093
9113
  limit?: components["parameters"]["Limit"];
8094
9114
  /** @description Opaque cursor: pass the `next_cursor` of the previous page. Results are ordered by `(created_at, id)`. */
@@ -9205,6 +10225,8 @@ export interface operations {
9205
10225
  type?: components["schemas"]["PlaceType"];
9206
10226
  /** @description Filter by external reference. */
9207
10227
  external_ref?: string;
10228
+ /** @description `account` for only your own places, `shared` for only the ports Timbereye shares. Both when omitted. */
10229
+ owner?: "account" | "shared";
9208
10230
  /** @description Page size, 1 to 100. */
9209
10231
  limit?: components["parameters"]["Limit"];
9210
10232
  /** @description Opaque cursor: pass the `next_cursor` of the previous page. Results are ordered by `(created_at, id)`. */
@@ -9603,6 +10625,10 @@ export interface operations {
9603
10625
  query?: {
9604
10626
  /** @description Only events of this type. */
9605
10627
  type?: components["schemas"]["EventType"];
10628
+ /** @description Only events created at or after this time (ISO 8601), e.g. the `created_at` of the newest event you have processed, to catch up after downtime. Events older than 30 days are gone whatever you ask. */
10629
+ created_after?: string;
10630
+ /** @description Only events created before this time (ISO 8601). */
10631
+ created_before?: string;
9606
10632
  /** @description Page size, 1 to 100. */
9607
10633
  limit?: components["parameters"]["Limit"];
9608
10634
  /** @description Opaque cursor: pass the `next_cursor` of the previous page. Results are ordered by `(created_at, id)`. */
@@ -10532,6 +11558,8 @@ export interface operations {
10532
11558
  query: {
10533
11559
  /** @description Which build of the model to describe and serve: `ios` (Core ML) or `android` (TensorFlow Lite). */
10534
11560
  platform: "ios" | "android";
11561
+ /** @description Input size of the model: `960` (the default) or `640`, a smaller fallback for older devices with about 0.45 x the compute. */
11562
+ variant?: "960" | "640";
10535
11563
  };
10536
11564
  header?: {
10537
11565
  /** @description Required with a publishable key, ignored otherwise: a lowercase UUID the app generates once per installation and keeps (the SDKs do this). A publishable key reads back only what it wrote from the same installation, and its idempotency records are kept per installation. */
@@ -10564,7 +11592,49 @@ export interface operations {
10564
11592
  404: components["responses"]["NotFound"];
10565
11593
  429: components["responses"]["RateLimited"];
10566
11594
  500: components["responses"]["ServerError"];
10567
- 501: components["responses"]["NotImplemented"];
11595
+ 503: components["responses"]["ServiceUnavailable"];
11596
+ };
11597
+ };
11598
+ getBoardEndCounterModel: {
11599
+ parameters: {
11600
+ query: {
11601
+ /** @description Which build of the model to describe and serve: `ios` (Core ML) or `android` (TensorFlow Lite). */
11602
+ platform: "ios" | "android";
11603
+ /** @description `m` (the default, `timbereye-board-end-counter`) or `s`, a smaller fallback for slower phones (`timbereye-board-end-counter-s`). */
11604
+ variant?: "m" | "s";
11605
+ };
11606
+ header?: {
11607
+ /** @description Required with a publishable key, ignored otherwise: a lowercase UUID the app generates once per installation and keeps (the SDKs do this). A publishable key reads back only what it wrote from the same installation, and its idempotency records are kept per installation. */
11608
+ "Timbereye-Installation-Id"?: components["parameters"]["InstallationId"];
11609
+ /** @description The app's iOS bundle identifier or Android package name, sent by the SDKs. A publishable key restricted to `allowed_app_ids` refuses a request without one of them (403 `app_not_allowed`). The header can be set by anyone, so this is a speed bump against a copied key, not proof of the app. */
11610
+ "Timbereye-App-Id"?: components["parameters"]["AppId"];
11611
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
11612
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
11613
+ };
11614
+ path?: never;
11615
+ cookie?: never;
11616
+ };
11617
+ requestBody?: never;
11618
+ responses: {
11619
+ /** @description Success. */
11620
+ 200: {
11621
+ headers: {
11622
+ "Request-Id": components["headers"]["RequestId"];
11623
+ "RateLimit-Limit": components["headers"]["RateLimitLimit"];
11624
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
11625
+ [name: string]: unknown;
11626
+ };
11627
+ content: {
11628
+ "application/json": components["schemas"]["BoardEndCounterModel"];
11629
+ };
11630
+ };
11631
+ 400: components["responses"]["BadRequest"];
11632
+ 401: components["responses"]["Unauthorized"];
11633
+ 403: components["responses"]["Forbidden"];
11634
+ 404: components["responses"]["NotFound"];
11635
+ 429: components["responses"]["RateLimited"];
11636
+ 500: components["responses"]["ServerError"];
11637
+ 503: components["responses"]["ServiceUnavailable"];
10568
11638
  };
10569
11639
  };
10570
11640
  rollWebhookEndpointSecret: {
@@ -10648,26 +11718,23 @@ export interface operations {
10648
11718
  500: components["responses"]["ServerError"];
10649
11719
  };
10650
11720
  };
10651
- listApiKeys: {
11721
+ updateAccountLumber: {
10652
11722
  parameters: {
10653
- query?: {
10654
- /** @description Page size, 1 to 100. */
10655
- limit?: components["parameters"]["Limit"];
10656
- /** @description Opaque cursor: pass the `next_cursor` of the previous page. Results are ordered by `(created_at, id)`. */
10657
- starting_after?: components["parameters"]["StartingAfter"];
10658
- /** @description Also list revoked and expired keys. */
10659
- include_inactive?: boolean;
10660
- /** @description Also list capture tokens, which are short-lived and left out by default. */
10661
- include_capture_tokens?: boolean;
10662
- };
11723
+ query?: never;
10663
11724
  header?: {
11725
+ /** @description Optional on `PUT`, `PATCH` and `DELETE`, which are naturally repeatable. Same behaviour as on `POST`. */
11726
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKeyOptional"];
10664
11727
  /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
10665
11728
  "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
10666
11729
  };
10667
11730
  path?: never;
10668
11731
  cookie?: never;
10669
11732
  };
10670
- requestBody?: never;
11733
+ requestBody: {
11734
+ content: {
11735
+ "application/json": components["schemas"]["AccountLumberSettingsUpdate"];
11736
+ };
11737
+ };
10671
11738
  responses: {
10672
11739
  /** @description Success. */
10673
11740
  200: {
@@ -10678,36 +11745,170 @@ export interface operations {
10678
11745
  [name: string]: unknown;
10679
11746
  };
10680
11747
  content: {
10681
- "application/json": components["schemas"]["ApiKeyList"];
11748
+ "application/json": components["schemas"]["AccountLumberSettingsObject"];
10682
11749
  };
10683
11750
  };
10684
11751
  400: components["responses"]["BadRequest"];
10685
11752
  401: components["responses"]["Unauthorized"];
10686
11753
  403: components["responses"]["Forbidden"];
10687
- 404: components["responses"]["NotFound"];
10688
11754
  429: components["responses"]["RateLimited"];
10689
11755
  500: components["responses"]["ServerError"];
10690
11756
  };
10691
11757
  };
10692
- createApiKey: {
11758
+ getAccountLogo: {
10693
11759
  parameters: {
10694
11760
  query?: never;
10695
- header: {
10696
- /**
10697
- * @description Unique string you choose (a UUID works) for this logical request. A retry with the same key and body returns the original response; the same key with a different body returns 409 `idempotency_key_reused`. Keys are remembered for 24 hours. A replay carries the response header `Idempotent-Replayed: true`.
10698
- * @example 1b6f0c1e-9d1a-4b7e-a0e2-4c3f7e1d9a10
10699
- */
10700
- "Idempotency-Key": components["parameters"]["IdempotencyKey"];
11761
+ header?: {
10701
11762
  /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
10702
11763
  "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
10703
11764
  };
10704
11765
  path?: never;
10705
11766
  cookie?: never;
10706
11767
  };
10707
- requestBody: {
10708
- content: {
10709
- "application/json": components["schemas"]["ApiKeyCreate"];
10710
- };
11768
+ requestBody?: never;
11769
+ responses: {
11770
+ /** @description Success. */
11771
+ 200: {
11772
+ headers: {
11773
+ "Request-Id": components["headers"]["RequestId"];
11774
+ [name: string]: unknown;
11775
+ };
11776
+ content: {
11777
+ "application/json": components["schemas"]["AccountLogo"];
11778
+ };
11779
+ };
11780
+ 401: components["responses"]["Unauthorized"];
11781
+ 403: components["responses"]["Forbidden"];
11782
+ 404: components["responses"]["NotFound"];
11783
+ 429: components["responses"]["RateLimited"];
11784
+ 500: components["responses"]["ServerError"];
11785
+ };
11786
+ };
11787
+ setAccountLogo: {
11788
+ parameters: {
11789
+ query?: never;
11790
+ header?: {
11791
+ /** @description Optional on `PUT`, `PATCH` and `DELETE`, which are naturally repeatable. Same behaviour as on `POST`. */
11792
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKeyOptional"];
11793
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
11794
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
11795
+ };
11796
+ path?: never;
11797
+ cookie?: never;
11798
+ };
11799
+ requestBody: {
11800
+ content: {
11801
+ "application/json": components["schemas"]["AccountLogoSet"];
11802
+ };
11803
+ };
11804
+ responses: {
11805
+ /** @description Success. */
11806
+ 200: {
11807
+ headers: {
11808
+ "Request-Id": components["headers"]["RequestId"];
11809
+ [name: string]: unknown;
11810
+ };
11811
+ content: {
11812
+ "application/json": components["schemas"]["AccountLogo"];
11813
+ };
11814
+ };
11815
+ 400: components["responses"]["BadRequest"];
11816
+ 401: components["responses"]["Unauthorized"];
11817
+ 403: components["responses"]["Forbidden"];
11818
+ 429: components["responses"]["RateLimited"];
11819
+ 500: components["responses"]["ServerError"];
11820
+ };
11821
+ };
11822
+ deleteAccountLogo: {
11823
+ parameters: {
11824
+ query?: never;
11825
+ header?: {
11826
+ /** @description Optional on `PUT`, `PATCH` and `DELETE`, which are naturally repeatable. Same behaviour as on `POST`. */
11827
+ "Idempotency-Key"?: components["parameters"]["IdempotencyKeyOptional"];
11828
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
11829
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
11830
+ };
11831
+ path?: never;
11832
+ cookie?: never;
11833
+ };
11834
+ requestBody?: never;
11835
+ responses: {
11836
+ /** @description Success. */
11837
+ 200: {
11838
+ headers: {
11839
+ "Request-Id": components["headers"]["RequestId"];
11840
+ [name: string]: unknown;
11841
+ };
11842
+ content: {
11843
+ "application/json": components["schemas"]["AccountLogoDeleted"];
11844
+ };
11845
+ };
11846
+ 401: components["responses"]["Unauthorized"];
11847
+ 403: components["responses"]["Forbidden"];
11848
+ 429: components["responses"]["RateLimited"];
11849
+ 500: components["responses"]["ServerError"];
11850
+ };
11851
+ };
11852
+ listApiKeys: {
11853
+ parameters: {
11854
+ query?: {
11855
+ /** @description Page size, 1 to 100. */
11856
+ limit?: components["parameters"]["Limit"];
11857
+ /** @description Opaque cursor: pass the `next_cursor` of the previous page. Results are ordered by `(created_at, id)`. */
11858
+ starting_after?: components["parameters"]["StartingAfter"];
11859
+ /** @description Also list revoked and expired keys. */
11860
+ include_inactive?: boolean;
11861
+ /** @description Also list capture tokens, which are short-lived and left out by default. */
11862
+ include_capture_tokens?: boolean;
11863
+ };
11864
+ header?: {
11865
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
11866
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
11867
+ };
11868
+ path?: never;
11869
+ cookie?: never;
11870
+ };
11871
+ requestBody?: never;
11872
+ responses: {
11873
+ /** @description Success. */
11874
+ 200: {
11875
+ headers: {
11876
+ "Request-Id": components["headers"]["RequestId"];
11877
+ "RateLimit-Limit": components["headers"]["RateLimitLimit"];
11878
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
11879
+ [name: string]: unknown;
11880
+ };
11881
+ content: {
11882
+ "application/json": components["schemas"]["ApiKeyList"];
11883
+ };
11884
+ };
11885
+ 400: components["responses"]["BadRequest"];
11886
+ 401: components["responses"]["Unauthorized"];
11887
+ 403: components["responses"]["Forbidden"];
11888
+ 404: components["responses"]["NotFound"];
11889
+ 429: components["responses"]["RateLimited"];
11890
+ 500: components["responses"]["ServerError"];
11891
+ };
11892
+ };
11893
+ createApiKey: {
11894
+ parameters: {
11895
+ query?: never;
11896
+ header: {
11897
+ /**
11898
+ * @description Unique string you choose (a UUID works) for this logical request. A retry with the same key and body returns the original response; the same key with a different body returns 409 `idempotency_key_reused`. Keys are remembered for 24 hours. A replay carries the response header `Idempotent-Replayed: true`.
11899
+ * @example 1b6f0c1e-9d1a-4b7e-a0e2-4c3f7e1d9a10
11900
+ */
11901
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
11902
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
11903
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
11904
+ };
11905
+ path?: never;
11906
+ cookie?: never;
11907
+ };
11908
+ requestBody: {
11909
+ content: {
11910
+ "application/json": components["schemas"]["ApiKeyCreate"];
11911
+ };
10711
11912
  };
10712
11913
  responses: {
10713
11914
  /** @description Success. */
@@ -11336,6 +12537,44 @@ export interface operations {
11336
12537
  500: components["responses"]["ServerError"];
11337
12538
  };
11338
12539
  };
12540
+ retrieveInvitationLink: {
12541
+ parameters: {
12542
+ query?: never;
12543
+ header?: {
12544
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
12545
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
12546
+ };
12547
+ path: {
12548
+ /**
12549
+ * @description Invitation id, prefixed `inv_`.
12550
+ * @example inv_3kPq8sWz2mXc
12551
+ */
12552
+ id: components["parameters"]["InvitationId"];
12553
+ };
12554
+ cookie?: never;
12555
+ };
12556
+ requestBody?: never;
12557
+ responses: {
12558
+ /** @description Success. */
12559
+ 200: {
12560
+ headers: {
12561
+ "Request-Id": components["headers"]["RequestId"];
12562
+ "RateLimit-Limit": components["headers"]["RateLimitLimit"];
12563
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
12564
+ [name: string]: unknown;
12565
+ };
12566
+ content: {
12567
+ "application/json": components["schemas"]["Invitation"];
12568
+ };
12569
+ };
12570
+ 401: components["responses"]["Unauthorized"];
12571
+ 403: components["responses"]["Forbidden"];
12572
+ 404: components["responses"]["NotFound"];
12573
+ 409: components["responses"]["Conflict"];
12574
+ 429: components["responses"]["RateLimited"];
12575
+ 500: components["responses"]["ServerError"];
12576
+ };
12577
+ };
11339
12578
  acceptInvitation: {
11340
12579
  parameters: {
11341
12580
  query?: never;
@@ -11593,6 +12832,77 @@ export interface operations {
11593
12832
  500: components["responses"]["ServerError"];
11594
12833
  };
11595
12834
  };
12835
+ listConsoleSupportRequests: {
12836
+ parameters: {
12837
+ query?: never;
12838
+ header?: {
12839
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
12840
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
12841
+ };
12842
+ path?: never;
12843
+ cookie?: never;
12844
+ };
12845
+ requestBody?: never;
12846
+ responses: {
12847
+ /** @description Success. */
12848
+ 200: {
12849
+ headers: {
12850
+ "Request-Id": components["headers"]["RequestId"];
12851
+ "RateLimit-Limit": components["headers"]["RateLimitLimit"];
12852
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
12853
+ [name: string]: unknown;
12854
+ };
12855
+ content: {
12856
+ "application/json": components["schemas"]["SupportRequestList"];
12857
+ };
12858
+ };
12859
+ 400: components["responses"]["BadRequest"];
12860
+ 401: components["responses"]["Unauthorized"];
12861
+ 403: components["responses"]["Forbidden"];
12862
+ 429: components["responses"]["RateLimited"];
12863
+ 500: components["responses"]["ServerError"];
12864
+ };
12865
+ };
12866
+ createConsoleSupportRequest: {
12867
+ parameters: {
12868
+ query?: never;
12869
+ header: {
12870
+ /**
12871
+ * @description Unique string you choose (a UUID works) for this logical request. A retry with the same key and body returns the original response; the same key with a different body returns 409 `idempotency_key_reused`. Keys are remembered for 24 hours. A replay carries the response header `Idempotent-Replayed: true`.
12872
+ * @example 1b6f0c1e-9d1a-4b7e-a0e2-4c3f7e1d9a10
12873
+ */
12874
+ "Idempotency-Key": components["parameters"]["IdempotencyKey"];
12875
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
12876
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
12877
+ };
12878
+ path?: never;
12879
+ cookie?: never;
12880
+ };
12881
+ requestBody: {
12882
+ content: {
12883
+ "application/json": components["schemas"]["SupportRequestCreate"];
12884
+ };
12885
+ };
12886
+ responses: {
12887
+ /** @description Success. */
12888
+ 200: {
12889
+ headers: {
12890
+ "Request-Id": components["headers"]["RequestId"];
12891
+ "RateLimit-Limit": components["headers"]["RateLimitLimit"];
12892
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
12893
+ [name: string]: unknown;
12894
+ };
12895
+ content: {
12896
+ "application/json": components["schemas"]["SupportRequest"];
12897
+ };
12898
+ };
12899
+ 400: components["responses"]["BadRequest"];
12900
+ 401: components["responses"]["Unauthorized"];
12901
+ 403: components["responses"]["Forbidden"];
12902
+ 429: components["responses"]["RateLimited"];
12903
+ 500: components["responses"]["ServerError"];
12904
+ };
12905
+ };
11596
12906
  recordConsoleAgreement: {
11597
12907
  parameters: {
11598
12908
  query?: never;
@@ -11792,14 +13102,14 @@ export interface operations {
11792
13102
  };
11793
13103
  };
11794
13104
  responses: {
11795
- /** @description Signed in, or a choice of organisation. */
13105
+ /** @description Signed in, a choice of organisation, or (when asked) what an address with no organisation may do. */
11796
13106
  200: {
11797
13107
  headers: {
11798
13108
  "Request-Id": components["headers"]["RequestId"];
11799
13109
  [name: string]: unknown;
11800
13110
  };
11801
13111
  content: {
11802
- "application/json": components["schemas"]["DeviceSignIn"] | components["schemas"]["DeviceSignInChoice"];
13112
+ "application/json": components["schemas"]["DeviceSignIn"] | components["schemas"]["DeviceSignInChoice"] | components["schemas"]["DeviceSignInNoOrganisation"];
11803
13113
  };
11804
13114
  };
11805
13115
  400: components["responses"]["BadRequest"];
@@ -11822,14 +13132,14 @@ export interface operations {
11822
13132
  };
11823
13133
  };
11824
13134
  responses: {
11825
- /** @description Signed in, or a choice of organisation. */
13135
+ /** @description Signed in, a choice of organisation, or (when asked) what an address with no organisation may do. */
11826
13136
  200: {
11827
13137
  headers: {
11828
13138
  "Request-Id": components["headers"]["RequestId"];
11829
13139
  [name: string]: unknown;
11830
13140
  };
11831
13141
  content: {
11832
- "application/json": components["schemas"]["DeviceSignIn"] | components["schemas"]["DeviceSignInChoice"];
13142
+ "application/json": components["schemas"]["DeviceSignIn"] | components["schemas"]["DeviceSignInChoice"] | components["schemas"]["DeviceSignInNoOrganisation"];
11833
13143
  };
11834
13144
  };
11835
13145
  400: components["responses"]["BadRequest"];
@@ -11869,6 +13179,75 @@ export interface operations {
11869
13179
  500: components["responses"]["ServerError"];
11870
13180
  };
11871
13181
  };
13182
+ createDeviceSignInOrganisation: {
13183
+ parameters: {
13184
+ query?: never;
13185
+ header?: never;
13186
+ path?: never;
13187
+ cookie?: never;
13188
+ };
13189
+ requestBody: {
13190
+ content: {
13191
+ "application/json": components["schemas"]["DeviceSignInNewOrganisation"];
13192
+ };
13193
+ };
13194
+ responses: {
13195
+ /** @description Signed in to the new organisation (or, if the address was added to one since, as for verify). */
13196
+ 200: {
13197
+ headers: {
13198
+ "Request-Id": components["headers"]["RequestId"];
13199
+ [name: string]: unknown;
13200
+ };
13201
+ content: {
13202
+ "application/json": components["schemas"]["DeviceSignIn"] | components["schemas"]["DeviceSignInChoice"];
13203
+ };
13204
+ };
13205
+ 400: components["responses"]["BadRequest"];
13206
+ 401: components["responses"]["Unauthorized"];
13207
+ 403: components["responses"]["Forbidden"];
13208
+ 409: components["responses"]["Conflict"];
13209
+ 429: components["responses"]["RateLimited"];
13210
+ 500: components["responses"]["ServerError"];
13211
+ };
13212
+ };
13213
+ listOriginChoices: {
13214
+ parameters: {
13215
+ query?: {
13216
+ /** @description The phone's latitude, WGS84 degrees. */
13217
+ lat?: number;
13218
+ /** @description The phone's longitude, WGS84 degrees. */
13219
+ lon?: number;
13220
+ /** @description The fix's horizontal accuracy in metres. Without it nothing is suggested. */
13221
+ accuracy_m?: number;
13222
+ };
13223
+ header?: {
13224
+ /** @description Required with a publishable key, ignored otherwise: a lowercase UUID the app generates once per installation and keeps (the SDKs do this). A publishable key reads back only what it wrote from the same installation, and its idempotency records are kept per installation. */
13225
+ "Timbereye-Installation-Id"?: components["parameters"]["InstallationId"];
13226
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
13227
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
13228
+ };
13229
+ path?: never;
13230
+ cookie?: never;
13231
+ };
13232
+ requestBody?: never;
13233
+ responses: {
13234
+ /** @description Success. */
13235
+ 200: {
13236
+ headers: {
13237
+ "Request-Id": components["headers"]["RequestId"];
13238
+ [name: string]: unknown;
13239
+ };
13240
+ content: {
13241
+ "application/json": components["schemas"]["OriginChoices"];
13242
+ };
13243
+ };
13244
+ 400: components["responses"]["BadRequest"];
13245
+ 401: components["responses"]["Unauthorized"];
13246
+ 403: components["responses"]["Forbidden"];
13247
+ 429: components["responses"]["RateLimited"];
13248
+ 500: components["responses"]["ServerError"];
13249
+ };
13250
+ };
11872
13251
  getDeviceSignIn: {
11873
13252
  parameters: {
11874
13253
  query?: never;
@@ -11938,6 +13317,8 @@ export interface operations {
11938
13317
  q?: string;
11939
13318
  /** @description Only groups of this kind. */
11940
13319
  kind?: string;
13320
+ /** @description `sawlog` (the default: the groups waiting to be scanned), or `lumber` or `panel` for the bundles and units waiting to be tallied and the groups that hold them. */
13321
+ product?: "sawlog" | "lumber" | "panel";
11941
13322
  /** @description Page size, 1 to 100. */
11942
13323
  limit?: components["parameters"]["Limit"];
11943
13324
  /** @description Opaque cursor: pass the `next_cursor` of the previous page. Results are ordered by `(created_at, id)`. */
@@ -12572,6 +13953,45 @@ export interface operations {
12572
13953
  500: components["responses"]["ServerError"];
12573
13954
  };
12574
13955
  };
13956
+ deleteLabelTemplate: {
13957
+ parameters: {
13958
+ query?: never;
13959
+ header?: {
13960
+ /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
13961
+ "Timbereye-Mode"?: components["parameters"]["TimbereyeMode"];
13962
+ };
13963
+ path: {
13964
+ /**
13965
+ * @description Label template id.
13966
+ * @example lbt_8fR2kQ
13967
+ */
13968
+ id: components["parameters"]["LabelTemplateId"];
13969
+ };
13970
+ cookie?: never;
13971
+ };
13972
+ requestBody?: never;
13973
+ responses: {
13974
+ /** @description Success. */
13975
+ 200: {
13976
+ headers: {
13977
+ "Request-Id": components["headers"]["RequestId"];
13978
+ "RateLimit-Limit": components["headers"]["RateLimitLimit"];
13979
+ "RateLimit-Remaining": components["headers"]["RateLimitRemaining"];
13980
+ [name: string]: unknown;
13981
+ };
13982
+ content: {
13983
+ "application/json": components["schemas"]["LabelTemplateDeleted"];
13984
+ };
13985
+ };
13986
+ 400: components["responses"]["BadRequest"];
13987
+ 401: components["responses"]["Unauthorized"];
13988
+ 403: components["responses"]["Forbidden"];
13989
+ 404: components["responses"]["NotFound"];
13990
+ 409: components["responses"]["Conflict"];
13991
+ 429: components["responses"]["RateLimited"];
13992
+ 500: components["responses"]["ServerError"];
13993
+ };
13994
+ };
12575
13995
  updateLabelTemplate: {
12576
13996
  parameters: {
12577
13997
  query?: never;
@@ -12958,6 +14378,7 @@ export interface operations {
12958
14378
  401: components["responses"]["Unauthorized"];
12959
14379
  403: components["responses"]["Forbidden"];
12960
14380
  404: components["responses"]["NotFound"];
14381
+ 422: components["responses"]["Unprocessable"];
12961
14382
  429: components["responses"]["RateLimited"];
12962
14383
  500: components["responses"]["ServerError"];
12963
14384
  503: components["responses"]["ServiceUnavailable"];
@@ -13164,8 +14585,12 @@ export interface operations {
13164
14585
  totals?: "exact" | "reported";
13165
14586
  /** @description `tally_sheets` adds every bundle's tally sheet. */
13166
14587
  include?: "tally_sheets";
13167
- /** @description `json` (default) or `html`. */
13168
- format?: "json" | "html";
14588
+ /** @description `json` (default), `html` (a printable page as JSON) or `pdf` (the document itself, `application/pdf`). */
14589
+ format?: "json" | "html" | "pdf";
14590
+ /** @description With `format=pdf`: `a4` or `letter`. By default Letter when the group's lumber is measured in inches and feet, else A4. */
14591
+ paper?: "a4" | "letter";
14592
+ /** @description With `format=pdf`: `tally` adds each bundle's and unit's tally lines after the list. */
14593
+ detail?: "tally";
13169
14594
  };
13170
14595
  header?: {
13171
14596
  /** @description Dashboard sessions only: `test` runs the request against the account's test sibling. API keys carry their mode in the key; a key may send the header only with its own mode, and a different value is a 400 `key_mode_mismatch`. */
@@ -13192,6 +14617,7 @@ export interface operations {
13192
14617
  };
13193
14618
  content: {
13194
14619
  "application/json": components["schemas"]["LumberDocument"];
14620
+ "application/pdf": string;
13195
14621
  };
13196
14622
  };
13197
14623
  400: components["responses"]["BadRequest"];