@t0.labs/daxta 0.5.5 → 1.0.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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="https://cdn.jsdelivr.net/npm/@t0.labs/daxta@0.5.4/assets/logo.png" width="88" alt="DAxTA" />
2
+ <img src="https://cdn.jsdelivr.net/npm/@t0.labs/daxta@1.0.0/assets/logo.png" width="88" alt="DAxTA" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">DAxTA</h1>
package/assets/empty.html CHANGED
@@ -24,6 +24,11 @@
24
24
  }
25
25
  * { box-sizing: border-box; }
26
26
  html, body { height: 100%; }
27
+ :focus { outline: none; }
28
+ :focus-visible {
29
+ outline: 2px solid #c6c6c6;
30
+ outline-offset: 2px;
31
+ }
27
32
  body {
28
33
  margin: 0;
29
34
  background: var(--canvas);
@@ -37,6 +37,11 @@
37
37
  }
38
38
  * { box-sizing: border-box; }
39
39
  html, body { height: 100%; }
40
+ :focus { outline: none; }
41
+ :focus-visible {
42
+ outline: 2px solid #c6c6c6;
43
+ outline-offset: 2px;
44
+ }
40
45
  body {
41
46
  margin: 0;
42
47
  background: var(--canvas);
@@ -1308,7 +1313,7 @@
1308
1313
  <div class="ex-dock" id="ex-dock"></div>
1309
1314
  </div>
1310
1315
  <script>
1311
- window.__SPEC__ = {"openapi":"3.0.3","info":{"title":"Lumen Library API","version":"2.1.0","description":"Generated from observed test execution","x-workspace":"lumen"},"x-viewer":{"workspace":"lumen","baseUrl":"http://localhost:3000","docsPath":"/api-docs","treeLayout":"role-resource","treeSkipParams":true,"exampleLabelStyle":"status-title-case","envPresets":{"local":{"baseUrl":"http://localhost:3000"},"staging":{"baseUrl":"https://api.staging.lumen.example"},"production":{"baseUrl":"https://api.lumen.example"}}},"servers":[{"url":"http://localhost:3000"}],"tags":[{"name":"titles"},{"name":"copies"},{"name":"holds"},{"name":"loans"},{"name":"rooms"}],"components":{"securitySchemes":{"staffId":{"type":"apiKey","in":"header","name":"x-staff-id"},"patronId":{"type":"apiKey","in":"header","name":"x-patron-id"},"authorization":{"type":"apiKey","in":"header","name":"authorization"}}},"paths":{"/v1/staff/titles":{"post":{"tags":["titles"],"summary":"Create Title","security":[{"staffId":[]}],"x-tree-segments":["v1","titles","staff"],"x-docs":{"title":"Create Title","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"isbn","in":"body","type":"string","required":true},{"name":"name","in":"body","type":"string","required":true},{"name":"copies","in":"body","type":"array\u003cobject>","required":false},{"name":"copies[].count","in":"body","type":"integer","required":false},{"name":"copies[].binding","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Creates title when counted paperback copies are provided","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice","copies":[{"count":4}]},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":null,"data":{"id":"ttl_01PP","isbn":"9780141439518","copyCount":4}}},{"name":"Creates title when hardcover binding specs are provided","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice","copies":[{"count":2,"binding":"hardcover"}]},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":null,"data":{"id":"ttl_01PP","bindings":["hardcover"]}}},{"name":"Returns error when isbn already exists","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"ISBN already exists"}},{"name":"Returns error when publisher catalog has no match","group":"SEMANTIC ERROR CASES","status":404,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"0000000000000","name":"Unknown Volume"},"resBody":{"statusCode":404,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"Publisher catalog has no match"}},{"name":"Returns error when isbn is an array","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":["9780141439518"],"name":"Pride and Prejudice"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"isbn should not be array"}},{"name":"Returns error when isbn has invalid format","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"abc","name":"Pride and Prejudice"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"isbn has invalid format"}},{"name":"Creates title when copies are omitted","group":"OMITTED CASES","status":201,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780061120084","name":"To Kill a Mockingbird"},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":null,"data":{"id":"ttl_01MK","copyCount":0}}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{"content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice"},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"Unauthorized"}}]}},"/v1/staff/copies":{"get":{"tags":["copies"],"summary":"List Copies","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"List Copies","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"status","in":"query","type":"string","required":false},{"name":"page","in":"query","type":"integer","required":false},{"name":"limit","in":"query","type":"integer","required":false}]},"x-scenarios":[{"name":"Lists copies when query is valid","group":"POSITIVE CASES","status":200,"pathParams":{},"query":{"status":"SHELVED","page":"1","limit":"20"},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":[{"id":"cpy_01AA","barcode":"LUM-1001","binding":"paperback","status":"SHELVED"},{"id":"cpy_01AB","barcode":"LUM-1002","binding":"hardcover","status":"SHELVED"}],"meta":{"page":1,"limit":20,"total":2}}},{"name":"Lists copies when filters are omitted","group":"OMITTED CASES","status":200,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":[],"meta":{"page":1,"limit":20,"total":0}}},{"name":"Returns error when page is not a number","group":"INVALID CASES","status":400,"pathParams":{},"query":{"page":"first"},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"page must be an integer"}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/staff/copies/{copyId}":{"get":{"tags":["copies"],"summary":"Get Copy","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"Get Copy","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"copyId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Returns copy when id exists","group":"POSITIVE CASES","status":200,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"cpy_01AA","barcode":"LUM-1001","binding":"paperback","status":"SHELVED","branch":"river-north"}}},{"name":"Returns error when copy does not exist","group":"SEMANTIC ERROR CASES","status":404,"pathParams":{"copyId":"cpy_missing"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":404,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Copy not found"}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]},"patch":{"tags":["copies"],"summary":"Update Copy","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"Update Copy","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"copyId","in":"path","type":"string","required":true},{"name":"status","in":"body","type":"string","required":false},{"name":"shelf","in":"body","type":"string","required":false},{"name":"condition.notes","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Updates copy when status is valid","group":"POSITIVE CASES","status":200,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"status":"REPAIR","shelf":"B-14","condition":{"notes":"loose spine"}},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"cpy_01AA","status":"REPAIR","shelf":"B-14"}}},{"name":"Returns error when status is unknown","group":"INVALID CASES","status":400,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"status":"LOST-IN-SPACE"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"status must be one of SHELVED, LOANED, REPAIR, WITHDRAWN"}},{"name":"Returns error when copy is already withdrawn","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{"copyId":"cpy_withdrawn"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"status":"SHELVED"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Withdrawn copies cannot be reshelved"}}]},"delete":{"tags":["copies"],"summary":"Delete Copy","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"Delete Copy","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"copyId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Deletes copy when it is unused","group":"POSITIVE CASES","status":204,"pathParams":{"copyId":"cpy_01AB"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"}},{"name":"Returns error when copy is on loan","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Copy is on loan"}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{"copyId":"cpy_01AB"},"query":{},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/patron/holds":{"post":{"tags":["holds"],"summary":"Create Hold","security":[{"patronId":[]}],"x-tree-segments":["v1","holds","patron"],"x-docs":{"title":"Create Hold","fields":[{"name":"x-patron-id","in":"header","type":"string","required":true},{"name":"titleId","in":"body","type":"string","required":true},{"name":"pickup.branch","in":"body","type":"string","required":true},{"name":"pickup.by","in":"body","type":"string","required":false},{"name":"notes","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Creates hold when pickup branch is open","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"river-north","by":"2026-09-01"},"notes":"large print if available"},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"hld_01PP","status":"QUEUED","position":2}}},{"name":"Returns error when patron already holds this title","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"river-north"}},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"A hold already exists for this title"}},{"name":"Returns error when branch code is invalid","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"moon-base"}},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"pickup.branch must be a known branch"}},{"name":"Returns error when titleId is omitted","group":"OMITTED CASES","status":400,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"pickup":{"branch":"river-north"}},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"titleId should not be empty"}},{"name":"Returns error when x-patron-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{"content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"river-north"}},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/patron/holds/{holdId}":{"get":{"tags":["holds"],"summary":"Get Hold","security":[{"patronId":[]}],"x-tree-segments":["v1","holds","patron"],"x-docs":{"title":"Get Hold","fields":[{"name":"x-patron-id","in":"header","type":"string","required":true},{"name":"holdId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Returns hold when it belongs to patron","group":"POSITIVE CASES","status":200,"pathParams":{"holdId":"hld_01PP"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"hld_01PP","status":"QUEUED","titleId":"ttl_01PP"}}},{"name":"Returns error when hold belongs to another patron","group":"SEMANTIC ERROR CASES","status":403,"pathParams":{"holdId":"hld_other"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6"},"resBody":{"statusCode":403,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Forbidden"}}]},"put":{"tags":["holds"],"summary":"Replace Hold","security":[{"patronId":[]}],"x-tree-segments":["v1","holds","patron"],"x-docs":{"title":"Replace Hold","fields":[{"name":"x-patron-id","in":"header","type":"string","required":true},{"name":"holdId","in":"path","type":"string","required":true},{"name":"titleId","in":"body","type":"string","required":true},{"name":"pickup.branch","in":"body","type":"string","required":true},{"name":"pickup.by","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Replaces hold when pickup branch is valid","group":"POSITIVE CASES","status":200,"pathParams":{"holdId":"hld_01PP"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"west-end","by":"2026-09-08"}},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"hld_01PP","pickup":{"branch":"west-end"},"status":"QUEUED"}}},{"name":"Returns error when hold is already ready","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{"holdId":"hld_ready"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"west-end"}},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Ready holds cannot be replaced"}}]}},"/v1/loans":{"get":{"tags":["loans"],"summary":"List Loans","security":[{"authorization":[]}],"x-tree-segments":["v1","loans"],"x-docs":{"title":"List Loans","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"from","in":"query","type":"string","required":false},{"name":"to","in":"query","type":"string","required":false},{"name":"status","in":"query","type":"string","required":false},{"name":"cursor","in":"query","type":"string","required":false}]},"x-scenarios":[{"name":"Lists loans when date range is valid","group":"POSITIVE CASES","status":200,"pathParams":{},"query":{"from":"2026-08-01","to":"2026-08-22","status":"OPEN"},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":[{"id":"lon_9f2a","copyId":"cpy_01AA","dueOn":"2026-09-05","status":"OPEN"}],"nextCursor":null}},{"name":"Returns error when from is after to","group":"INVALID CASES","status":400,"pathParams":{},"query":{"from":"2026-08-22","to":"2026-08-01"},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"from must be before to"}},{"name":"Returns error when authorization is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{"from":"2026-08-01","to":"2026-08-22"},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]},"post":{"tags":["loans"],"summary":"Create Loan","security":[{"authorization":[]}],"x-tree-segments":["v1","loans"],"x-docs":{"title":"Create Loan","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"copyId","in":"body","type":"string","required":true},{"name":"patronId","in":"body","type":"string","required":true},{"name":"days","in":"body","type":"integer","required":true},{"name":"idempotencyKey","in":"body","type":"string","required":true},{"name":"notice.email","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Creates loan when copy is shelved","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":21,"idempotencyKey":"chk_88","notice":{"email":"reader@example.com"}},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"lon_9f2a","status":"OPEN","dueOn":"2026-09-12"}}},{"name":"Returns open loan when idempotency key is reused","group":"POSITIVE CASES","status":200,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":21,"idempotencyKey":"chk_88"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"lon_9f2a","status":"OPEN","dueOn":"2026-09-12"}}},{"name":"Returns error when copy is in repair","group":"SEMANTIC ERROR CASES","status":422,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_repair","patronId":"ptr_3b18d0f6","days":14,"idempotencyKey":"chk_89"},"resBody":{"statusCode":422,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Copy is not available for loan"}},{"name":"Returns error when days is negative","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":-1,"idempotencyKey":"chk_90"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"days must be a positive integer"}},{"name":"Returns error when patronId is omitted","group":"OMITTED CASES","status":400,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","days":21,"idempotencyKey":"chk_91"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"patronId should not be empty"}},{"name":"Returns error when authorization is expired","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{"authorization":"Bearer expired","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":21,"idempotencyKey":"chk_92"},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/loans/{loanId}":{"get":{"tags":["loans"],"summary":"Get Loan","security":[{"authorization":[]}],"x-tree-segments":["v1","loans"],"x-docs":{"title":"Get Loan","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"loanId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Returns loan when it exists","group":"POSITIVE CASES","status":200,"pathParams":{"loanId":"lon_9f2a"},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"lon_9f2a","copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","status":"OPEN","dueOn":"2026-09-12"}}},{"name":"Returns error when loan does not exist","group":"SEMANTIC ERROR CASES","status":404,"pathParams":{"loanId":"lon_missing"},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":404,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Loan not found"}}]}},"/v1/rooms/bookings":{"post":{"tags":["rooms"],"summary":"Create Booking","security":[{"authorization":[]}],"x-tree-segments":["v1","rooms","bookings"],"x-docs":{"title":"Create Booking","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"roomId","in":"body","type":"string","required":true},{"name":"slot","in":"body","type":"string","required":true},{"name":"seats","in":"body","type":"integer","required":false}]},"x-scenarios":[{"name":"Creates booking when room is free","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_quiet","slot":"2026-08-24T10:00:00Z","seats":4},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"bkg_9f2a","roomId":"rm_quiet","status":"CONFIRMED"}}},{"name":"Returns error when slot overlaps an existing booking","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_quiet","slot":"2026-08-24T10:00:00Z"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Room is already booked for this slot"}},{"name":"Returns error when slot is not ISO-8601","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_quiet","slot":"tomorrow-morning"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"slot must be an ISO-8601 datetime"}},{"name":"Creates booking when seats are omitted","group":"OMITTED CASES","status":201,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_map","slot":"2026-08-24T15:00:00Z"},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"bkg_map","roomId":"rm_map","seats":1,"status":"CONFIRMED"}}}]}}}};
1316
+ window.__SPEC__ = {"openapi":"3.0.3","info":{"title":"DAxTA","version":"2.1.0","description":"Generated from observed test execution","x-workspace":"daxta"},"x-viewer":{"workspace":"daxta","baseUrl":"http://localhost:3000","docsPath":"/api-docs","treeLayout":"role-resource","treeSkipParams":true,"exampleLabelStyle":"status-title-case","envPresets":{"local":{"baseUrl":"http://localhost:3000"},"staging":{"baseUrl":"https://api.staging.daxta.example"},"production":{"baseUrl":"https://api.daxta.example"}}},"servers":[{"url":"http://localhost:3000"}],"tags":[{"name":"titles"},{"name":"copies"},{"name":"holds"},{"name":"loans"},{"name":"rooms"}],"components":{"securitySchemes":{"staffId":{"type":"apiKey","in":"header","name":"x-staff-id"},"patronId":{"type":"apiKey","in":"header","name":"x-patron-id"},"authorization":{"type":"apiKey","in":"header","name":"authorization"}}},"paths":{"/v1/staff/titles":{"post":{"tags":["titles"],"summary":"Create Title","security":[{"staffId":[]}],"x-tree-segments":["v1","titles","staff"],"x-docs":{"title":"Create Title","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"isbn","in":"body","type":"string","required":true},{"name":"name","in":"body","type":"string","required":true},{"name":"copies","in":"body","type":"array\u003cobject>","required":false},{"name":"copies[].count","in":"body","type":"integer","required":false},{"name":"copies[].binding","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Creates title when counted paperback copies are provided","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice","copies":[{"count":4}]},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":null,"data":{"id":"ttl_01PP","isbn":"9780141439518","copyCount":4}}},{"name":"Creates title when hardcover binding specs are provided","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice","copies":[{"count":2,"binding":"hardcover"}]},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":null,"data":{"id":"ttl_01PP","bindings":["hardcover"]}}},{"name":"Returns error when isbn already exists","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"ISBN already exists"}},{"name":"Returns error when publisher catalog has no match","group":"SEMANTIC ERROR CASES","status":404,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"0000000000000","name":"Unknown Volume"},"resBody":{"statusCode":404,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"Publisher catalog has no match"}},{"name":"Returns error when isbn is an array","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":["9780141439518"],"name":"Pride and Prejudice"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"isbn should not be array"}},{"name":"Returns error when isbn has invalid format","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"abc","name":"Pride and Prejudice"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"isbn has invalid format"}},{"name":"Creates title when copies are omitted","group":"OMITTED CASES","status":201,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"isbn":"9780061120084","name":"To Kill a Mockingbird"},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":null,"data":{"id":"ttl_01MK","copyCount":0}}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{"content-type":"application/json"},"reqBody":{"isbn":"9780141439518","name":"Pride and Prejudice"},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","path":"/v1/staff/titles","error":"Unauthorized"}}]}},"/v1/staff/copies":{"get":{"tags":["copies"],"summary":"List Copies","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"List Copies","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"status","in":"query","type":"string","required":false},{"name":"page","in":"query","type":"integer","required":false},{"name":"limit","in":"query","type":"integer","required":false}]},"x-scenarios":[{"name":"Lists copies when query is valid","group":"POSITIVE CASES","status":200,"pathParams":{},"query":{"status":"SHELVED","page":"1","limit":"20"},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":[{"id":"cpy_01AA","barcode":"LUM-1001","binding":"paperback","status":"SHELVED"},{"id":"cpy_01AB","barcode":"LUM-1002","binding":"hardcover","status":"SHELVED"}],"meta":{"page":1,"limit":20,"total":2}}},{"name":"Lists copies when filters are omitted","group":"OMITTED CASES","status":200,"pathParams":{},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":[],"meta":{"page":1,"limit":20,"total":0}}},{"name":"Returns error when page is not a number","group":"INVALID CASES","status":400,"pathParams":{},"query":{"page":"first"},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"page must be an integer"}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/staff/copies/{copyId}":{"get":{"tags":["copies"],"summary":"Get Copy","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"Get Copy","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"copyId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Returns copy when id exists","group":"POSITIVE CASES","status":200,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"cpy_01AA","barcode":"LUM-1001","binding":"paperback","status":"SHELVED","branch":"river-north"}}},{"name":"Returns error when copy does not exist","group":"SEMANTIC ERROR CASES","status":404,"pathParams":{"copyId":"cpy_missing"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":404,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Copy not found"}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]},"patch":{"tags":["copies"],"summary":"Update Copy","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"Update Copy","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"copyId","in":"path","type":"string","required":true},{"name":"status","in":"body","type":"string","required":false},{"name":"shelf","in":"body","type":"string","required":false},{"name":"condition.notes","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Updates copy when status is valid","group":"POSITIVE CASES","status":200,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"status":"REPAIR","shelf":"B-14","condition":{"notes":"loose spine"}},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"cpy_01AA","status":"REPAIR","shelf":"B-14"}}},{"name":"Returns error when status is unknown","group":"INVALID CASES","status":400,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"status":"LOST-IN-SPACE"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"status must be one of SHELVED, LOANED, REPAIR, WITHDRAWN"}},{"name":"Returns error when copy is already withdrawn","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{"copyId":"cpy_withdrawn"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4","content-type":"application/json"},"reqBody":{"status":"SHELVED"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Withdrawn copies cannot be reshelved"}}]},"delete":{"tags":["copies"],"summary":"Delete Copy","security":[{"staffId":[]}],"x-tree-segments":["v1","copies","staff"],"x-docs":{"title":"Delete Copy","fields":[{"name":"x-staff-id","in":"header","type":"string","required":true},{"name":"copyId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Deletes copy when it is unused","group":"POSITIVE CASES","status":204,"pathParams":{"copyId":"cpy_01AB"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"}},{"name":"Returns error when copy is on loan","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{"copyId":"cpy_01AA"},"query":{},"headers":{"x-staff-id":"stf_7c91e2a4"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Copy is on loan"}},{"name":"Returns error when x-staff-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{"copyId":"cpy_01AB"},"query":{},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/patron/holds":{"post":{"tags":["holds"],"summary":"Create Hold","security":[{"patronId":[]}],"x-tree-segments":["v1","holds","patron"],"x-docs":{"title":"Create Hold","fields":[{"name":"x-patron-id","in":"header","type":"string","required":true},{"name":"titleId","in":"body","type":"string","required":true},{"name":"pickup.branch","in":"body","type":"string","required":true},{"name":"pickup.by","in":"body","type":"string","required":false},{"name":"notes","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Creates hold when pickup branch is open","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"river-north","by":"2026-09-01"},"notes":"large print if available"},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"hld_01PP","status":"QUEUED","position":2}}},{"name":"Returns error when patron already holds this title","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"river-north"}},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"A hold already exists for this title"}},{"name":"Returns error when branch code is invalid","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"moon-base"}},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"pickup.branch must be a known branch"}},{"name":"Returns error when titleId is omitted","group":"OMITTED CASES","status":400,"pathParams":{},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"pickup":{"branch":"river-north"}},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"titleId should not be empty"}},{"name":"Returns error when x-patron-id is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{"content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"river-north"}},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/patron/holds/{holdId}":{"get":{"tags":["holds"],"summary":"Get Hold","security":[{"patronId":[]}],"x-tree-segments":["v1","holds","patron"],"x-docs":{"title":"Get Hold","fields":[{"name":"x-patron-id","in":"header","type":"string","required":true},{"name":"holdId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Returns hold when it belongs to patron","group":"POSITIVE CASES","status":200,"pathParams":{"holdId":"hld_01PP"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"hld_01PP","status":"QUEUED","titleId":"ttl_01PP"}}},{"name":"Returns error when hold belongs to another patron","group":"SEMANTIC ERROR CASES","status":403,"pathParams":{"holdId":"hld_other"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6"},"resBody":{"statusCode":403,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Forbidden"}}]},"put":{"tags":["holds"],"summary":"Replace Hold","security":[{"patronId":[]}],"x-tree-segments":["v1","holds","patron"],"x-docs":{"title":"Replace Hold","fields":[{"name":"x-patron-id","in":"header","type":"string","required":true},{"name":"holdId","in":"path","type":"string","required":true},{"name":"titleId","in":"body","type":"string","required":true},{"name":"pickup.branch","in":"body","type":"string","required":true},{"name":"pickup.by","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Replaces hold when pickup branch is valid","group":"POSITIVE CASES","status":200,"pathParams":{"holdId":"hld_01PP"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"west-end","by":"2026-09-08"}},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"hld_01PP","pickup":{"branch":"west-end"},"status":"QUEUED"}}},{"name":"Returns error when hold is already ready","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{"holdId":"hld_ready"},"query":{},"headers":{"x-patron-id":"ptr_3b18d0f6","content-type":"application/json"},"reqBody":{"titleId":"ttl_01PP","pickup":{"branch":"west-end"}},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Ready holds cannot be replaced"}}]}},"/v1/loans":{"get":{"tags":["loans"],"summary":"List Loans","security":[{"authorization":[]}],"x-tree-segments":["v1","loans"],"x-docs":{"title":"List Loans","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"from","in":"query","type":"string","required":false},{"name":"to","in":"query","type":"string","required":false},{"name":"status","in":"query","type":"string","required":false},{"name":"cursor","in":"query","type":"string","required":false}]},"x-scenarios":[{"name":"Lists loans when date range is valid","group":"POSITIVE CASES","status":200,"pathParams":{},"query":{"from":"2026-08-01","to":"2026-08-22","status":"OPEN"},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":[{"id":"lon_9f2a","copyId":"cpy_01AA","dueOn":"2026-09-05","status":"OPEN"}],"nextCursor":null}},{"name":"Returns error when from is after to","group":"INVALID CASES","status":400,"pathParams":{},"query":{"from":"2026-08-22","to":"2026-08-01"},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"from must be before to"}},{"name":"Returns error when authorization is missing","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{"from":"2026-08-01","to":"2026-08-22"},"headers":{},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]},"post":{"tags":["loans"],"summary":"Create Loan","security":[{"authorization":[]}],"x-tree-segments":["v1","loans"],"x-docs":{"title":"Create Loan","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"copyId","in":"body","type":"string","required":true},{"name":"patronId","in":"body","type":"string","required":true},{"name":"days","in":"body","type":"integer","required":true},{"name":"idempotencyKey","in":"body","type":"string","required":true},{"name":"notice.email","in":"body","type":"string","required":false}]},"x-scenarios":[{"name":"Creates loan when copy is shelved","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":21,"idempotencyKey":"chk_88","notice":{"email":"reader@example.com"}},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"lon_9f2a","status":"OPEN","dueOn":"2026-09-12"}}},{"name":"Returns open loan when idempotency key is reused","group":"POSITIVE CASES","status":200,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":21,"idempotencyKey":"chk_88"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"lon_9f2a","status":"OPEN","dueOn":"2026-09-12"}}},{"name":"Returns error when copy is in repair","group":"SEMANTIC ERROR CASES","status":422,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_repair","patronId":"ptr_3b18d0f6","days":14,"idempotencyKey":"chk_89"},"resBody":{"statusCode":422,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Copy is not available for loan"}},{"name":"Returns error when days is negative","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":-1,"idempotencyKey":"chk_90"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"days must be a positive integer"}},{"name":"Returns error when patronId is omitted","group":"OMITTED CASES","status":400,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","days":21,"idempotencyKey":"chk_91"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"patronId should not be empty"}},{"name":"Returns error when authorization is expired","group":"SEMANTIC ERROR CASES - AUTH","status":401,"pathParams":{},"query":{},"headers":{"authorization":"Bearer expired","content-type":"application/json"},"reqBody":{"copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","days":21,"idempotencyKey":"chk_92"},"resBody":{"statusCode":401,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Unauthorized"}}]}},"/v1/loans/{loanId}":{"get":{"tags":["loans"],"summary":"Get Loan","security":[{"authorization":[]}],"x-tree-segments":["v1","loans"],"x-docs":{"title":"Get Loan","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"loanId","in":"path","type":"string","required":true}]},"x-scenarios":[{"name":"Returns loan when it exists","group":"POSITIVE CASES","status":200,"pathParams":{"loanId":"lon_9f2a"},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":200,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"lon_9f2a","copyId":"cpy_01AA","patronId":"ptr_3b18d0f6","status":"OPEN","dueOn":"2026-09-12"}}},{"name":"Returns error when loan does not exist","group":"SEMANTIC ERROR CASES","status":404,"pathParams":{"loanId":"lon_missing"},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…"},"resBody":{"statusCode":404,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Loan not found"}}]}},"/v1/rooms/bookings":{"post":{"tags":["rooms"],"summary":"Create Booking","security":[{"authorization":[]}],"x-tree-segments":["v1","rooms","bookings"],"x-docs":{"title":"Create Booking","fields":[{"name":"authorization","in":"header","type":"string","required":true},{"name":"roomId","in":"body","type":"string","required":true},{"name":"slot","in":"body","type":"string","required":true},{"name":"seats","in":"body","type":"integer","required":false}]},"x-scenarios":[{"name":"Creates booking when room is free","group":"POSITIVE CASES","status":201,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_quiet","slot":"2026-08-24T10:00:00Z","seats":4},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"bkg_9f2a","roomId":"rm_quiet","status":"CONFIRMED"}}},{"name":"Returns error when slot overlaps an existing booking","group":"SEMANTIC ERROR CASES","status":409,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_quiet","slot":"2026-08-24T10:00:00Z"},"resBody":{"statusCode":409,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"Room is already booked for this slot"}},{"name":"Returns error when slot is not ISO-8601","group":"INVALID CASES","status":400,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_quiet","slot":"tomorrow-morning"},"resBody":{"statusCode":400,"success":false,"timestamp":"2026-08-22T14:08:03.120Z","error":"slot must be an ISO-8601 datetime"}},{"name":"Creates booking when seats are omitted","group":"OMITTED CASES","status":201,"pathParams":{},"query":{},"headers":{"authorization":"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…","content-type":"application/json"},"reqBody":{"roomId":"rm_map","slot":"2026-08-24T15:00:00Z"},"resBody":{"statusCode":201,"success":true,"timestamp":"2026-08-22T14:08:03.120Z","data":{"id":"bkg_map","roomId":"rm_map","seats":1,"status":"CONFIRMED"}}}]}}}};
1312
1317
  </script>
1313
1318
  <script>
1314
1319
  const spec = window.__SPEC__ || {};
@@ -37,6 +37,11 @@
37
37
  }
38
38
  * { box-sizing: border-box; }
39
39
  html, body { height: 100%; }
40
+ :focus { outline: none; }
41
+ :focus-visible {
42
+ outline: 2px solid #c6c6c6;
43
+ outline-offset: 2px;
44
+ }
40
45
  body {
41
46
  margin: 0;
42
47
  background: var(--canvas);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t0.labs/daxta",
3
- "version": "0.5.5",
3
+ "version": "1.0.0",
4
4
  "description": "DAxTA — Tested behavior. Trusted API docs. Generate API documentation from observed test execution.",
5
5
  "license": "MIT",
6
6
  "author": {