@spotto/contract 1.0.70-alpha.33 → 1.0.70-alpha.34
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 +33 -33
- package/dist/actions/[id]/index.d.ts +1 -1
- package/dist/actions/[id]/index.js +17 -17
- package/dist/actions/[id]/patch/index.d.ts +2 -2
- package/dist/actions/[id]/patch/index.js +18 -18
- package/dist/actions/[id]/patch/request.d.ts +16 -16
- package/dist/actions/[id]/patch/request.js +2 -2
- package/dist/actions/[id]/patch/response.d.ts +1 -1
- package/dist/actions/[id]/patch/response.js +2 -2
- package/dist/actions/get/index.d.ts +2 -2
- package/dist/actions/get/index.js +18 -18
- package/dist/actions/get/query.d.ts +14 -14
- package/dist/actions/get/query.js +2 -2
- package/dist/actions/get/response.d.ts +29 -29
- package/dist/actions/get/response.js +2 -2
- package/dist/actions/index.d.ts +4 -4
- package/dist/actions/index.js +20 -20
- package/dist/actions/post/index.d.ts +2 -2
- package/dist/actions/post/index.js +18 -18
- package/dist/actions/post/request.d.ts +15 -15
- package/dist/actions/post/request.js +2 -2
- package/dist/actions/post/response.d.ts +1 -1
- package/dist/actions/post/response.js +2 -2
- package/dist/actions/shared.d.ts +51 -51
- package/dist/actions/shared.js +12 -12
- package/dist/ai/chat/index.d.ts +2 -2
- package/dist/ai/chat/index.js +18 -18
- package/dist/ai/chat/request.d.ts +42 -42
- package/dist/ai/chat/request.js +2 -2
- package/dist/ai/chat/response.d.ts +74 -74
- package/dist/ai/chat/response.js +10 -10
- package/dist/ai/expression/index.d.ts +2 -2
- package/dist/ai/expression/index.js +18 -18
- package/dist/ai/expression/request.d.ts +29 -29
- package/dist/ai/expression/request.js +2 -2
- package/dist/ai/expression/response.d.ts +23 -23
- package/dist/ai/expression/response.js +2 -2
- package/dist/ai/index.d.ts +4 -4
- package/dist/ai/index.js +20 -20
- package/dist/ai/semantic-query/index.d.ts +2 -2
- package/dist/ai/semantic-query/index.js +18 -18
- package/dist/ai/semantic-query/request.d.ts +43 -43
- package/dist/ai/semantic-query/request.js +2 -2
- package/dist/ai/semantic-query/response.d.ts +40 -40
- package/dist/ai/semantic-query/response.js +2 -2
- package/dist/ai/shared.d.ts +22 -22
- package/dist/ai/shared.js +10 -10
- package/dist/assets/[id]/get.d.ts +86 -86
- package/dist/assets/[id]/get.js +2 -2
- package/dist/assets/[id]/index.d.ts +4 -4
- package/dist/assets/[id]/index.js +20 -20
- package/dist/assets/[id]/location.d.ts +6 -6
- package/dist/assets/[id]/location.js +2 -2
- package/dist/assets/[id]/patch/index.d.ts +2 -2
- package/dist/assets/[id]/patch/index.js +18 -18
- package/dist/assets/[id]/patch/request.d.ts +16 -16
- package/dist/assets/[id]/patch/request.js +2 -2
- package/dist/assets/[id]/patch/response.d.ts +7 -7
- package/dist/assets/[id]/patch/response.js +2 -2
- package/dist/assets/[id]/readers.d.ts +9 -9
- package/dist/assets/[id]/readers.js +2 -2
- package/dist/assets/count/index.d.ts +2 -2
- package/dist/assets/count/index.js +18 -18
- package/dist/assets/count/query.d.ts +16 -16
- package/dist/assets/count/query.js +2 -2
- package/dist/assets/count/response.d.ts +15 -15
- package/dist/assets/count/response.js +2 -2
- package/dist/assets/count-filtered/index.d.ts +1 -1
- package/dist/assets/count-filtered/index.js +17 -17
- package/dist/assets/count-filtered/response.d.ts +5 -5
- package/dist/assets/count-filtered/response.js +2 -2
- package/dist/assets/download/index.d.ts +2 -2
- package/dist/assets/download/index.js +18 -18
- package/dist/assets/download/query.d.ts +17 -17
- package/dist/assets/download/query.js +2 -2
- package/dist/assets/download/response.d.ts +3 -3
- package/dist/assets/download/response.js +2 -2
- package/dist/assets/errors.d.ts +3 -3
- package/dist/assets/errors.js +2 -2
- package/dist/assets/get/index.d.ts +2 -2
- package/dist/assets/get/index.js +18 -18
- package/dist/assets/get/query.d.ts +95 -95
- package/dist/assets/get/query.js +2 -2
- package/dist/assets/get/response.d.ts +12 -12
- package/dist/assets/get/response.js +2 -2
- package/dist/assets/index.d.ts +14 -14
- package/dist/assets/index.js +30 -30
- package/dist/assets/location/index.d.ts +2 -2
- package/dist/assets/location/index.js +18 -18
- package/dist/assets/location/request.d.ts +23 -23
- package/dist/assets/location/request.js +2 -2
- package/dist/assets/location/response.d.ts +2 -2
- package/dist/assets/location/response.js +2 -2
- package/dist/assets/partitions/index.d.ts +2 -2
- package/dist/assets/partitions/index.js +18 -18
- package/dist/assets/partitions/query.d.ts +9 -9
- package/dist/assets/partitions/query.js +2 -2
- package/dist/assets/partitions/response.d.ts +10 -10
- package/dist/assets/partitions/response.js +2 -2
- package/dist/assets/post/index.d.ts +2 -2
- package/dist/assets/post/index.js +18 -18
- package/dist/assets/post/request.d.ts +15 -15
- package/dist/assets/post/request.js +9 -9
- package/dist/assets/post/response.d.ts +11 -11
- package/dist/assets/post/response.js +2 -2
- package/dist/assets/readiness/index.d.ts +2 -2
- package/dist/assets/readiness/index.js +18 -18
- package/dist/assets/readiness/query.d.ts +7 -7
- package/dist/assets/readiness/query.js +2 -2
- package/dist/assets/readiness/response.d.ts +24 -24
- package/dist/assets/readiness/response.js +2 -2
- package/dist/assets/rollup/index.d.ts +2 -2
- package/dist/assets/rollup/index.js +18 -18
- package/dist/assets/rollup/query.d.ts +12 -12
- package/dist/assets/rollup/query.js +4 -4
- package/dist/assets/rollup/response.d.ts +58 -58
- package/dist/assets/rollup/response.js +2 -2
- package/dist/assets/suggestions/index.d.ts +2 -2
- package/dist/assets/suggestions/index.js +18 -18
- package/dist/assets/suggestions/query.d.ts +5 -5
- package/dist/assets/suggestions/query.js +2 -2
- package/dist/assets/suggestions/response.d.ts +15 -15
- package/dist/assets/suggestions/response.js +2 -2
- package/dist/assets/summary/index.d.ts +2 -2
- package/dist/assets/summary/index.js +18 -18
- package/dist/assets/summary/response.d.ts +7 -7
- package/dist/assets/summary/response.js +2 -2
- package/dist/assets/summary/summary.d.ts +9 -9
- package/dist/assets/summary/summary.js +2 -2
- package/dist/assets/upload/index.d.ts +2 -2
- package/dist/assets/upload/index.js +18 -18
- package/dist/assets/upload/request.d.ts +3 -3
- package/dist/assets/upload/request.js +2 -2
- package/dist/assets/upload/response.d.ts +7 -7
- package/dist/assets/upload/response.js +2 -2
- package/dist/errors.d.ts +4 -4
- package/dist/errors.js +2 -2
- package/dist/events/constants.d.ts +32 -24
- package/dist/events/constants.js +62 -53
- package/dist/events/constants.js.map +1 -1
- package/dist/events/count/index.d.ts +2 -2
- package/dist/events/count/index.js +18 -18
- package/dist/events/count/query.d.ts +5 -5
- package/dist/events/count/query.js +2 -2
- package/dist/events/count/response.d.ts +18 -18
- package/dist/events/count/response.js +2 -2
- package/dist/events/download/index.d.ts +2 -2
- package/dist/events/download/index.js +18 -18
- package/dist/events/download/query.d.ts +9 -9
- package/dist/events/download/query.js +2 -2
- package/dist/events/download/response.d.ts +3 -3
- package/dist/events/download/response.js +2 -2
- package/dist/events/get/index.d.ts +2 -2
- package/dist/events/get/index.js +18 -18
- package/dist/events/get/query.d.ts +40 -40
- package/dist/events/get/query.js +2 -2
- package/dist/events/get/response.d.ts +195 -160
- package/dist/events/get/response.js +2 -2
- package/dist/events/index.d.ts +5 -5
- package/dist/events/index.js +21 -21
- package/dist/events/post.d.ts +9 -9
- package/dist/events/post.js +2 -2
- package/dist/fields/[id]/get.d.ts +31 -25
- package/dist/fields/[id]/get.js +2 -2
- package/dist/fields/[id]/index.d.ts +2 -2
- package/dist/fields/[id]/index.js +18 -18
- package/dist/fields/[id]/patch/index.d.ts +2 -2
- package/dist/fields/[id]/patch/index.js +18 -18
- package/dist/fields/[id]/patch/request.d.ts +36 -23
- package/dist/fields/[id]/patch/request.js +2 -2
- package/dist/fields/[id]/patch/response.d.ts +1 -1
- package/dist/fields/[id]/patch/response.js +2 -2
- package/dist/fields/constants.d.ts +72 -32
- package/dist/fields/constants.js +55 -55
- package/dist/fields/get/index.d.ts +2 -2
- package/dist/fields/get/index.js +18 -18
- package/dist/fields/get/query.d.ts +9 -9
- package/dist/fields/get/query.js +2 -2
- package/dist/fields/get/response.d.ts +5 -5
- package/dist/fields/get/response.js +2 -2
- package/dist/fields/index.d.ts +5 -5
- package/dist/fields/index.js +21 -21
- package/dist/fields/post/index.d.ts +2 -2
- package/dist/fields/post/index.js +18 -18
- package/dist/fields/post/request.d.ts +24 -22
- package/dist/fields/post/request.js +8 -8
- package/dist/fields/post/request.js.map +1 -1
- package/dist/fields/post/response.d.ts +5 -5
- package/dist/fields/post/response.js +2 -2
- package/dist/fields/suggestions/index.d.ts +2 -2
- package/dist/fields/suggestions/index.js +18 -18
- package/dist/fields/suggestions/query.d.ts +5 -5
- package/dist/fields/suggestions/query.js +2 -2
- package/dist/fields/suggestions/response.d.ts +15 -15
- package/dist/fields/suggestions/response.js +2 -2
- package/dist/forms/[id]/index.d.ts +1 -1
- package/dist/forms/[id]/index.js +17 -17
- package/dist/forms/[id]/patch/index.d.ts +2 -2
- package/dist/forms/[id]/patch/index.js +18 -18
- package/dist/forms/[id]/patch/request.d.ts +14 -14
- package/dist/forms/[id]/patch/request.js +2 -2
- package/dist/forms/[id]/patch/response.d.ts +1 -1
- package/dist/forms/[id]/patch/response.js +2 -2
- package/dist/forms/constants.d.ts +19 -19
- package/dist/forms/constants.js +32 -32
- package/dist/forms/get/index.d.ts +2 -2
- package/dist/forms/get/index.js +18 -18
- package/dist/forms/get/query.d.ts +18 -18
- package/dist/forms/get/query.js +2 -2
- package/dist/forms/get/response.d.ts +23 -23
- package/dist/forms/get/response.js +2 -2
- package/dist/forms/index.d.ts +6 -6
- package/dist/forms/index.js +22 -22
- package/dist/forms/post/index.d.ts +2 -2
- package/dist/forms/post/index.js +18 -18
- package/dist/forms/post/request.d.ts +9 -9
- package/dist/forms/post/request.js +2 -2
- package/dist/forms/post/response.d.ts +1 -1
- package/dist/forms/post/response.js +2 -2
- package/dist/forms/shared.d.ts +136 -127
- package/dist/forms/shared.js +2 -2
- package/dist/forms/versions/index.d.ts +2 -2
- package/dist/forms/versions/index.js +18 -18
- package/dist/forms/versions/path.d.ts +8 -8
- package/dist/forms/versions/path.js +2 -2
- package/dist/forms/versions/response.d.ts +1 -1
- package/dist/forms/versions/response.js +2 -2
- package/dist/index.d.ts +29 -29
- package/dist/index.js +45 -45
- package/dist/integrations/constants.d.ts +43 -43
- package/dist/integrations/constants.js +7 -7
- package/dist/integrations/index.d.ts +3 -3
- package/dist/integrations/index.js +19 -19
- package/dist/integrations/mqtt/get.d.ts +1 -1
- package/dist/integrations/mqtt/get.js +2 -2
- package/dist/integrations/mqtt/index.d.ts +2 -2
- package/dist/integrations/mqtt/index.js +18 -18
- package/dist/integrations/mqtt/patch/index.d.ts +2 -2
- package/dist/integrations/mqtt/patch/index.js +18 -18
- package/dist/integrations/mqtt/patch/request.d.ts +3 -3
- package/dist/integrations/mqtt/patch/request.js +2 -2
- package/dist/integrations/mqtt/patch/response.d.ts +1 -1
- package/dist/integrations/mqtt/patch/response.js +2 -2
- package/dist/integrations/oneblink/index.d.ts +2 -2
- package/dist/integrations/oneblink/index.js +18 -18
- package/dist/integrations/oneblink/patch/index.d.ts +1 -1
- package/dist/integrations/oneblink/patch/index.js +17 -17
- package/dist/integrations/oneblink/patch/request.d.ts +8 -8
- package/dist/integrations/oneblink/patch/request.js +2 -2
- package/dist/integrations/oneblink/token.d.ts +6 -6
- package/dist/integrations/oneblink/token.js +2 -2
- package/dist/labels/[id]/get.d.ts +6 -6
- package/dist/labels/[id]/get.js +2 -2
- package/dist/labels/[id]/index.d.ts +2 -2
- package/dist/labels/[id]/index.js +18 -18
- package/dist/labels/[id]/patch/index.d.ts +2 -2
- package/dist/labels/[id]/patch/index.js +18 -18
- package/dist/labels/[id]/patch/request.d.ts +3 -3
- package/dist/labels/[id]/patch/request.js +2 -2
- package/dist/labels/[id]/patch/response.d.ts +1 -1
- package/dist/labels/[id]/patch/response.js +2 -2
- package/dist/labels/constants.d.ts +4 -4
- package/dist/labels/constants.js +2 -2
- package/dist/labels/get/index.d.ts +2 -2
- package/dist/labels/get/index.js +18 -18
- package/dist/labels/get/query.d.ts +11 -11
- package/dist/labels/get/query.js +2 -2
- package/dist/labels/get/response.d.ts +7 -7
- package/dist/labels/get/response.js +2 -2
- package/dist/labels/index.d.ts +4 -4
- package/dist/labels/index.js +20 -20
- package/dist/labels/post/index.d.ts +2 -2
- package/dist/labels/post/index.js +18 -18
- package/dist/labels/post/request.d.ts +4 -4
- package/dist/labels/post/request.js +2 -2
- package/dist/labels/post/response.d.ts +5 -5
- package/dist/labels/post/response.js +2 -2
- package/dist/locations/[id]/get.d.ts +39 -39
- package/dist/locations/[id]/get.js +2 -2
- package/dist/locations/[id]/index.d.ts +4 -4
- package/dist/locations/[id]/index.js +20 -20
- package/dist/locations/[id]/inventory.d.ts +9 -9
- package/dist/locations/[id]/inventory.js +2 -2
- package/dist/locations/[id]/patch/index.d.ts +2 -2
- package/dist/locations/[id]/patch/index.js +18 -18
- package/dist/locations/[id]/patch/request.d.ts +12 -12
- package/dist/locations/[id]/patch/request.js +2 -2
- package/dist/locations/[id]/patch/response.d.ts +7 -7
- package/dist/locations/[id]/patch/response.js +2 -2
- package/dist/locations/[id]/status.d.ts +4 -4
- package/dist/locations/[id]/status.js +2 -2
- package/dist/locations/constants.d.ts +4 -4
- package/dist/locations/constants.js +14 -14
- package/dist/locations/count/index.d.ts +2 -2
- package/dist/locations/count/index.js +18 -18
- package/dist/locations/count/query.d.ts +1 -1
- package/dist/locations/count/query.js +2 -2
- package/dist/locations/count/response.d.ts +6 -6
- package/dist/locations/count/response.js +2 -2
- package/dist/locations/download/index.d.ts +2 -2
- package/dist/locations/download/index.js +18 -18
- package/dist/locations/download/query.d.ts +10 -10
- package/dist/locations/download/query.js +2 -2
- package/dist/locations/download/response.d.ts +3 -3
- package/dist/locations/download/response.js +2 -2
- package/dist/locations/errors.d.ts +3 -3
- package/dist/locations/errors.js +2 -2
- package/dist/locations/get/index.d.ts +2 -2
- package/dist/locations/get/index.js +18 -18
- package/dist/locations/get/query.d.ts +46 -46
- package/dist/locations/get/query.js +2 -2
- package/dist/locations/get/response.d.ts +7 -7
- package/dist/locations/get/response.js +2 -2
- package/dist/locations/index.d.ts +8 -8
- package/dist/locations/index.js +24 -24
- package/dist/locations/post/index.d.ts +2 -2
- package/dist/locations/post/index.js +18 -18
- package/dist/locations/post/request.d.ts +13 -13
- package/dist/locations/post/request.js +2 -2
- package/dist/locations/post/response.d.ts +11 -11
- package/dist/locations/post/response.js +2 -2
- package/dist/locations/suggestions/index.d.ts +2 -2
- package/dist/locations/suggestions/index.js +18 -18
- package/dist/locations/suggestions/query.d.ts +7 -7
- package/dist/locations/suggestions/query.js +2 -2
- package/dist/locations/suggestions/response.d.ts +15 -15
- package/dist/locations/suggestions/response.js +2 -2
- package/dist/manifests/[id]/get.d.ts +35 -35
- package/dist/manifests/[id]/get.js +38 -38
- package/dist/manifests/[id]/index.d.ts +2 -2
- package/dist/manifests/[id]/index.js +18 -18
- package/dist/manifests/[id]/patch/index.d.ts +2 -2
- package/dist/manifests/[id]/patch/index.js +18 -18
- package/dist/manifests/[id]/patch/request.d.ts +8 -8
- package/dist/manifests/[id]/patch/request.js +45 -45
- package/dist/manifests/[id]/patch/response.d.ts +1 -1
- package/dist/manifests/[id]/patch/response.js +2 -2
- package/dist/manifests/get/index.d.ts +2 -2
- package/dist/manifests/get/index.js +18 -18
- package/dist/manifests/get/query.d.ts +11 -11
- package/dist/manifests/get/query.js +2 -2
- package/dist/manifests/get/response.d.ts +7 -7
- package/dist/manifests/get/response.js +2 -2
- package/dist/manifests/index.d.ts +4 -4
- package/dist/manifests/index.js +20 -20
- package/dist/manifests/post/index.d.ts +2 -2
- package/dist/manifests/post/index.js +18 -18
- package/dist/manifests/post/request.d.ts +16 -16
- package/dist/manifests/post/request.js +51 -51
- package/dist/manifests/post/response.d.ts +5 -5
- package/dist/manifests/post/response.js +2 -2
- package/dist/manifests/suggestions/index.d.ts +2 -2
- package/dist/manifests/suggestions/index.js +18 -18
- package/dist/manifests/suggestions/query.d.ts +5 -5
- package/dist/manifests/suggestions/query.js +2 -2
- package/dist/manifests/suggestions/response.d.ts +15 -15
- package/dist/manifests/suggestions/response.js +2 -2
- package/dist/networks/constants.d.ts +6 -6
- package/dist/networks/constants.js +2 -2
- package/dist/networks/index.d.ts +1 -1
- package/dist/networks/index.js +17 -17
- package/dist/organisations/[id]/delete/index.d.ts +2 -2
- package/dist/organisations/[id]/delete/index.js +18 -18
- package/dist/organisations/[id]/delete/query.d.ts +3 -3
- package/dist/organisations/[id]/delete/query.js +2 -2
- package/dist/organisations/[id]/delete/response.d.ts +13 -13
- package/dist/organisations/[id]/delete/response.js +2 -2
- package/dist/organisations/[id]/get.d.ts +29 -29
- package/dist/organisations/[id]/get.js +2 -2
- package/dist/organisations/[id]/index.d.ts +4 -4
- package/dist/organisations/[id]/index.js +20 -20
- package/dist/organisations/[id]/patch/index.d.ts +2 -2
- package/dist/organisations/[id]/patch/index.js +18 -18
- package/dist/organisations/[id]/patch/request.d.ts +11 -11
- package/dist/organisations/[id]/patch/request.js +2 -2
- package/dist/organisations/[id]/patch/response.d.ts +1 -1
- package/dist/organisations/[id]/patch/response.js +2 -2
- package/dist/organisations/[id]/wifi/index.d.ts +2 -2
- package/dist/organisations/[id]/wifi/index.js +18 -18
- package/dist/organisations/[id]/wifi/query.d.ts +3 -3
- package/dist/organisations/[id]/wifi/query.js +2 -2
- package/dist/organisations/[id]/wifi/response.d.ts +4 -4
- package/dist/organisations/[id]/wifi/response.js +2 -2
- package/dist/organisations/constants.d.ts +46 -46
- package/dist/organisations/constants.js +2 -2
- package/dist/organisations/get/index.d.ts +2 -2
- package/dist/organisations/get/index.js +18 -18
- package/dist/organisations/get/query.d.ts +11 -11
- package/dist/organisations/get/query.js +2 -2
- package/dist/organisations/get/response.d.ts +7 -7
- package/dist/organisations/get/response.js +2 -2
- package/dist/organisations/index.d.ts +5 -5
- package/dist/organisations/index.js +21 -21
- package/dist/organisations/post/index.d.ts +2 -2
- package/dist/organisations/post/index.js +18 -18
- package/dist/organisations/post/request.d.ts +6 -6
- package/dist/organisations/post/request.js +2 -2
- package/dist/organisations/post/response.d.ts +1 -1
- package/dist/organisations/post/response.js +2 -2
- package/dist/organisations/sso/constants.d.ts +63 -63
- package/dist/organisations/sso/constants.js +65 -65
- package/dist/organisations/sso/index.d.ts +2 -2
- package/dist/organisations/sso/index.js +18 -18
- package/dist/organisations/sso/types.d.ts +162 -162
- package/dist/organisations/sso/types.js +12 -12
- package/dist/readers/[id]/get.d.ts +41 -41
- package/dist/readers/[id]/get.js +2 -2
- package/dist/readers/[id]/index.d.ts +4 -4
- package/dist/readers/[id]/index.js +20 -20
- package/dist/readers/[id]/inventory/index.d.ts +1 -1
- package/dist/readers/[id]/inventory/index.js +17 -17
- package/dist/readers/[id]/inventory/response.d.ts +5 -5
- package/dist/readers/[id]/inventory/response.js +2 -2
- package/dist/readers/[id]/patch/index.d.ts +2 -2
- package/dist/readers/[id]/patch/index.js +18 -18
- package/dist/readers/[id]/patch/request.d.ts +13 -13
- package/dist/readers/[id]/patch/request.js +2 -2
- package/dist/readers/[id]/patch/response.d.ts +1 -1
- package/dist/readers/[id]/patch/response.js +2 -2
- package/dist/readers/[id]/status.d.ts +4 -4
- package/dist/readers/[id]/status.js +2 -2
- package/dist/readers/constants/deviceTypes.d.ts +43 -43
- package/dist/readers/constants/deviceTypes.js +198 -198
- package/dist/readers/constants/index.d.ts +2 -2
- package/dist/readers/constants/index.js +18 -18
- package/dist/readers/constants/types.d.ts +10 -10
- package/dist/readers/constants/types.js +24 -24
- package/dist/readers/count/index.d.ts +2 -2
- package/dist/readers/count/index.js +18 -18
- package/dist/readers/count/query.d.ts +1 -1
- package/dist/readers/count/query.js +2 -2
- package/dist/readers/count/response.d.ts +5 -5
- package/dist/readers/count/response.js +2 -2
- package/dist/readers/download/index.d.ts +2 -2
- package/dist/readers/download/index.js +18 -18
- package/dist/readers/download/query.d.ts +10 -10
- package/dist/readers/download/query.js +2 -2
- package/dist/readers/download/response.d.ts +3 -3
- package/dist/readers/download/response.js +2 -2
- package/dist/readers/get/index.d.ts +2 -2
- package/dist/readers/get/index.js +18 -18
- package/dist/readers/get/query.d.ts +36 -36
- package/dist/readers/get/query.js +2 -2
- package/dist/readers/get/response.d.ts +7 -7
- package/dist/readers/get/response.js +2 -2
- package/dist/readers/index.d.ts +8 -8
- package/dist/readers/index.js +24 -24
- package/dist/readers/post/index.d.ts +2 -2
- package/dist/readers/post/index.js +18 -18
- package/dist/readers/post/request.d.ts +14 -14
- package/dist/readers/post/request.js +2 -2
- package/dist/readers/post/response.d.ts +5 -5
- package/dist/readers/post/response.js +2 -2
- package/dist/readers/suggestions/index.d.ts +2 -2
- package/dist/readers/suggestions/index.js +18 -18
- package/dist/readers/suggestions/query.d.ts +5 -5
- package/dist/readers/suggestions/query.js +2 -2
- package/dist/readers/suggestions/response.d.ts +15 -15
- package/dist/readers/suggestions/response.js +2 -2
- package/dist/readers/user/index.d.ts +2 -2
- package/dist/readers/user/index.js +18 -18
- package/dist/readers/user/request.d.ts +3 -3
- package/dist/readers/user/request.js +2 -2
- package/dist/readers/user/response.d.ts +8 -8
- package/dist/readers/user/response.js +2 -2
- package/dist/reports.d.ts +38 -38
- package/dist/reports.js +2 -2
- package/dist/roles/[id]/get.d.ts +6 -6
- package/dist/roles/[id]/get.js +2 -2
- package/dist/roles/[id]/index.d.ts +1 -1
- package/dist/roles/[id]/index.js +17 -17
- package/dist/roles/get/index.d.ts +2 -2
- package/dist/roles/get/index.js +18 -18
- package/dist/roles/get/query.d.ts +7 -7
- package/dist/roles/get/query.js +2 -2
- package/dist/roles/get/response.d.ts +7 -7
- package/dist/roles/get/response.js +2 -2
- package/dist/roles/index.d.ts +3 -3
- package/dist/roles/index.js +19 -19
- package/dist/roles/post/index.d.ts +2 -2
- package/dist/roles/post/index.js +18 -18
- package/dist/roles/post/request.d.ts +6 -6
- package/dist/roles/post/request.js +2 -2
- package/dist/roles/post/response.d.ts +1 -1
- package/dist/roles/post/response.js +2 -2
- package/dist/semantic-queries/[id]/index.d.ts +1 -1
- package/dist/semantic-queries/[id]/index.js +17 -17
- package/dist/semantic-queries/[id]/patch/index.d.ts +2 -2
- package/dist/semantic-queries/[id]/patch/index.js +18 -18
- package/dist/semantic-queries/[id]/patch/request.d.ts +20 -20
- package/dist/semantic-queries/[id]/patch/request.js +2 -2
- package/dist/semantic-queries/[id]/patch/response.d.ts +1 -1
- package/dist/semantic-queries/[id]/patch/response.js +2 -2
- package/dist/semantic-queries/get/index.d.ts +2 -2
- package/dist/semantic-queries/get/index.js +18 -18
- package/dist/semantic-queries/get/query.d.ts +18 -18
- package/dist/semantic-queries/get/query.js +2 -2
- package/dist/semantic-queries/get/response.d.ts +40 -40
- package/dist/semantic-queries/get/response.js +2 -2
- package/dist/semantic-queries/index.d.ts +4 -4
- package/dist/semantic-queries/index.js +20 -20
- package/dist/semantic-queries/post/index.d.ts +2 -2
- package/dist/semantic-queries/post/index.js +18 -18
- package/dist/semantic-queries/post/request.d.ts +56 -56
- package/dist/semantic-queries/post/request.js +2 -2
- package/dist/semantic-queries/post/response.d.ts +1 -1
- package/dist/semantic-queries/post/response.js +2 -2
- package/dist/semantic-queries/shared.d.ts +853 -853
- package/dist/semantic-queries/shared.js +317 -317
- package/dist/shared/attachments.d.ts +29 -29
- package/dist/shared/attachments.js +10 -10
- package/dist/shared/body.d.ts +6 -6
- package/dist/shared/body.js +2 -2
- package/dist/shared/delete.d.ts +3 -3
- package/dist/shared/delete.js +2 -2
- package/dist/shared/embed.d.ts +22 -22
- package/dist/shared/embed.js +2 -2
- package/dist/shared/errors.d.ts +3 -3
- package/dist/shared/errors.js +2 -2
- package/dist/shared/headers.d.ts +3 -3
- package/dist/shared/headers.js +2 -2
- package/dist/shared/index.d.ts +13 -13
- package/dist/shared/index.js +29 -29
- package/dist/shared/path.d.ts +3 -3
- package/dist/shared/path.js +2 -2
- package/dist/shared/query.d.ts +12 -12
- package/dist/shared/query.js +2 -2
- package/dist/shared/readiness.d.ts +81 -81
- package/dist/shared/readiness.js +10 -10
- package/dist/shared/relative-date.d.ts +17 -17
- package/dist/shared/relative-date.js +11 -11
- package/dist/shared/sort.d.ts +12 -12
- package/dist/shared/sort.js +13 -13
- package/dist/shared/timestamp.d.ts +2 -2
- package/dist/shared/timestamp.js +4 -4
- package/dist/shared/timezone.d.ts +4 -4
- package/dist/shared/timezone.js +357 -357
- package/dist/snapshots/[id]/get.d.ts +256 -256
- package/dist/snapshots/[id]/get.js +34 -34
- package/dist/snapshots/[id]/index.d.ts +1 -1
- package/dist/snapshots/[id]/index.js +17 -17
- package/dist/snapshots/get/index.d.ts +2 -2
- package/dist/snapshots/get/index.js +18 -18
- package/dist/snapshots/get/query.d.ts +64 -64
- package/dist/snapshots/get/query.js +26 -26
- package/dist/snapshots/get/response.d.ts +7 -7
- package/dist/snapshots/get/response.js +2 -2
- package/dist/snapshots/index.d.ts +3 -3
- package/dist/snapshots/index.js +19 -19
- package/dist/snapshots/post/index.d.ts +2 -2
- package/dist/snapshots/post/index.js +18 -18
- package/dist/snapshots/post/request.d.ts +54 -54
- package/dist/snapshots/post/request.js +239 -239
- package/dist/snapshots/post/response.d.ts +5 -5
- package/dist/snapshots/post/response.js +2 -2
- package/dist/sso/discover/index.d.ts +2 -2
- package/dist/sso/discover/index.js +18 -18
- package/dist/sso/discover/request.d.ts +9 -9
- package/dist/sso/discover/request.js +2 -2
- package/dist/sso/discover/response.d.ts +17 -17
- package/dist/sso/discover/response.js +2 -2
- package/dist/sso/get/index.d.ts +1 -1
- package/dist/sso/get/index.js +17 -17
- package/dist/sso/get/response.d.ts +22 -22
- package/dist/sso/get/response.js +2 -2
- package/dist/sso/idp-setup.d.ts +32 -32
- package/dist/sso/idp-setup.js +2 -2
- package/dist/sso/index.d.ts +7 -7
- package/dist/sso/index.js +23 -23
- package/dist/sso/offboard/index.d.ts +1 -1
- package/dist/sso/offboard/index.js +17 -17
- package/dist/sso/offboard/response.d.ts +9 -9
- package/dist/sso/offboard/response.js +2 -2
- package/dist/sso/onboard/index.d.ts +2 -2
- package/dist/sso/onboard/index.js +18 -18
- package/dist/sso/onboard/request.d.ts +70 -70
- package/dist/sso/onboard/request.js +2 -2
- package/dist/sso/onboard/response.d.ts +25 -25
- package/dist/sso/onboard/response.js +2 -2
- package/dist/sso/revert/index.d.ts +1 -1
- package/dist/sso/revert/index.js +17 -17
- package/dist/sso/revert/response.d.ts +33 -33
- package/dist/sso/revert/response.js +2 -2
- package/dist/sso/sso-mappings/index.d.ts +2 -2
- package/dist/sso/sso-mappings/index.js +18 -18
- package/dist/sso/sso-mappings/request.d.ts +19 -19
- package/dist/sso/sso-mappings/request.js +2 -2
- package/dist/sso/sso-mappings/response.d.ts +9 -9
- package/dist/sso/sso-mappings/response.js +2 -2
- package/dist/submissions/[id]/index.d.ts +1 -1
- package/dist/submissions/[id]/index.js +17 -17
- package/dist/submissions/[id]/void/post.d.ts +6 -6
- package/dist/submissions/[id]/void/post.js +2 -2
- package/dist/submissions/constants.d.ts +14 -14
- package/dist/submissions/constants.js +20 -20
- package/dist/submissions/get/index.d.ts +2 -2
- package/dist/submissions/get/index.js +18 -18
- package/dist/submissions/get/query.d.ts +14 -14
- package/dist/submissions/get/query.js +2 -2
- package/dist/submissions/get/response.d.ts +6 -6
- package/dist/submissions/get/response.js +2 -2
- package/dist/submissions/index.d.ts +6 -6
- package/dist/submissions/index.js +22 -22
- package/dist/submissions/post/index.d.ts +2 -2
- package/dist/submissions/post/index.js +18 -18
- package/dist/submissions/post/request.d.ts +17 -17
- package/dist/submissions/post/request.js +2 -2
- package/dist/submissions/post/response.d.ts +22 -22
- package/dist/submissions/post/response.js +2 -2
- package/dist/submissions/shared.d.ts +133 -133
- package/dist/submissions/shared.js +2 -2
- package/dist/submissions/uploads/[fileId]/get.d.ts +11 -11
- package/dist/submissions/uploads/[fileId]/get.js +2 -2
- package/dist/submissions/uploads/[fileId]/index.d.ts +1 -1
- package/dist/submissions/uploads/[fileId]/index.js +17 -17
- package/dist/submissions/uploads/index.d.ts +2 -2
- package/dist/submissions/uploads/index.js +18 -18
- package/dist/submissions/uploads/post/index.d.ts +2 -2
- package/dist/submissions/uploads/post/index.js +18 -18
- package/dist/submissions/uploads/post/request.d.ts +9 -9
- package/dist/submissions/uploads/post/request.js +2 -2
- package/dist/submissions/uploads/post/response.d.ts +18 -18
- package/dist/submissions/uploads/post/response.js +2 -2
- package/dist/system/index.d.ts +5 -5
- package/dist/system/index.js +2 -2
- package/dist/tags/constants.d.ts +9 -9
- package/dist/tags/constants.js +2 -2
- package/dist/tags/errors.d.ts +19 -19
- package/dist/tags/errors.js +2 -2
- package/dist/tags/get/index.d.ts +2 -2
- package/dist/tags/get/index.js +18 -18
- package/dist/tags/get/query.d.ts +3 -3
- package/dist/tags/get/query.js +2 -2
- package/dist/tags/get/response.d.ts +7 -7
- package/dist/tags/get/response.js +2 -2
- package/dist/tags/index.d.ts +3 -3
- package/dist/tags/index.js +19 -19
- package/dist/telemetry.d.ts +10 -10
- package/dist/telemetry.js +2 -2
- package/dist/types/[id]/get.d.ts +69 -54
- package/dist/types/[id]/get.js +2 -2
- package/dist/types/[id]/index.d.ts +2 -2
- package/dist/types/[id]/index.js +18 -18
- package/dist/types/[id]/patch/index.d.ts +2 -2
- package/dist/types/[id]/patch/index.js +18 -18
- package/dist/types/[id]/patch/request.d.ts +33 -33
- package/dist/types/[id]/patch/request.js +2 -2
- package/dist/types/[id]/patch/response.d.ts +1 -1
- package/dist/types/[id]/patch/response.js +2 -2
- package/dist/types/constants.d.ts +9 -9
- package/dist/types/constants.js +12 -12
- package/dist/types/get/index.d.ts +2 -2
- package/dist/types/get/index.js +18 -18
- package/dist/types/get/query.d.ts +10 -10
- package/dist/types/get/query.js +2 -2
- package/dist/types/get/response.d.ts +7 -7
- package/dist/types/get/response.js +2 -2
- package/dist/types/hierarchy/index.d.ts +1 -1
- package/dist/types/hierarchy/index.js +17 -17
- package/dist/types/hierarchy/response.d.ts +8 -8
- package/dist/types/hierarchy/response.js +27 -27
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.js +22 -22
- package/dist/types/post/index.d.ts +2 -2
- package/dist/types/post/index.js +18 -18
- package/dist/types/post/request.d.ts +110 -102
- package/dist/types/post/request.js +24 -24
- package/dist/types/post/request.js.map +1 -1
- package/dist/types/post/response.d.ts +5 -5
- package/dist/types/post/response.js +2 -2
- package/dist/types/suggestions/index.d.ts +2 -2
- package/dist/types/suggestions/index.js +18 -18
- package/dist/types/suggestions/query.d.ts +5 -5
- package/dist/types/suggestions/query.js +2 -2
- package/dist/types/suggestions/response.d.ts +15 -15
- package/dist/types/suggestions/response.js +2 -2
- package/dist/usergroups/[id]/index.d.ts +1 -1
- package/dist/usergroups/[id]/index.js +17 -17
- package/dist/usergroups/[id]/patch/index.d.ts +2 -2
- package/dist/usergroups/[id]/patch/index.js +18 -18
- package/dist/usergroups/[id]/patch/request.d.ts +20 -20
- package/dist/usergroups/[id]/patch/request.js +2 -2
- package/dist/usergroups/[id]/patch/response.d.ts +1 -1
- package/dist/usergroups/[id]/patch/response.js +2 -2
- package/dist/usergroups/get/index.d.ts +2 -2
- package/dist/usergroups/get/index.js +18 -18
- package/dist/usergroups/get/query.d.ts +12 -12
- package/dist/usergroups/get/query.js +2 -2
- package/dist/usergroups/get/response.d.ts +44 -44
- package/dist/usergroups/get/response.js +2 -2
- package/dist/usergroups/index.d.ts +4 -4
- package/dist/usergroups/index.js +20 -20
- package/dist/usergroups/post/index.d.ts +2 -2
- package/dist/usergroups/post/index.js +18 -18
- package/dist/usergroups/post/request.d.ts +14 -14
- package/dist/usergroups/post/request.js +2 -2
- package/dist/usergroups/post/response.d.ts +1 -1
- package/dist/usergroups/post/response.js +2 -2
- package/dist/usergroups/shared.d.ts +25 -25
- package/dist/usergroups/shared.js +10 -10
- package/dist/users/[id]/disable.d.ts +7 -7
- package/dist/users/[id]/disable.js +2 -2
- package/dist/users/[id]/enable.d.ts +6 -6
- package/dist/users/[id]/enable.js +2 -2
- package/dist/users/[id]/get/index.d.ts +2 -2
- package/dist/users/[id]/get/index.js +18 -18
- package/dist/users/[id]/get/query.d.ts +3 -3
- package/dist/users/[id]/get/query.js +2 -2
- package/dist/users/[id]/get/response.d.ts +39 -39
- package/dist/users/[id]/get/response.js +2 -2
- package/dist/users/[id]/index.d.ts +5 -5
- package/dist/users/[id]/index.js +21 -21
- package/dist/users/[id]/key.d.ts +3 -3
- package/dist/users/[id]/key.js +2 -2
- package/dist/users/[id]/patch/index.d.ts +2 -2
- package/dist/users/[id]/patch/index.js +18 -18
- package/dist/users/[id]/patch/request.d.ts +10 -10
- package/dist/users/[id]/patch/request.js +2 -2
- package/dist/users/[id]/patch/response.d.ts +1 -1
- package/dist/users/[id]/patch/response.js +2 -2
- package/dist/users/console.d.ts +15 -15
- package/dist/users/console.js +4 -4
- package/dist/users/constants.d.ts +2 -2
- package/dist/users/constants.js +4 -4
- package/dist/users/current.d.ts +87 -87
- package/dist/users/current.js +2 -2
- package/dist/users/get/index.d.ts +2 -2
- package/dist/users/get/index.js +18 -18
- package/dist/users/get/query.d.ts +15 -15
- package/dist/users/get/query.js +2 -2
- package/dist/users/get/response.d.ts +7 -7
- package/dist/users/get/response.js +2 -2
- package/dist/users/home-layout/index.d.ts +3 -3
- package/dist/users/home-layout/index.js +19 -19
- package/dist/users/home-layout/request.d.ts +5 -5
- package/dist/users/home-layout/request.js +2 -2
- package/dist/users/home-layout/response.d.ts +5 -5
- package/dist/users/home-layout/response.js +2 -2
- package/dist/users/home-layout/shared.d.ts +288 -288
- package/dist/users/home-layout/shared.js +29 -29
- package/dist/users/index.d.ts +9 -9
- package/dist/users/index.js +25 -25
- package/dist/users/invites.d.ts +19 -19
- package/dist/users/invites.js +2 -2
- package/dist/users/password-reset.d.ts +33 -33
- package/dist/users/password-reset.js +2 -2
- package/dist/users/post/index.d.ts +2 -2
- package/dist/users/post/index.js +18 -18
- package/dist/users/post/request.d.ts +25 -25
- package/dist/users/post/request.js +2 -2
- package/dist/users/post/response.d.ts +1 -1
- package/dist/users/post/response.js +2 -2
- package/dist/views/[id]/index.d.ts +1 -1
- package/dist/views/[id]/index.js +17 -17
- package/dist/views/[id]/patch/index.d.ts +2 -2
- package/dist/views/[id]/patch/index.js +18 -18
- package/dist/views/[id]/patch/request.d.ts +9 -9
- package/dist/views/[id]/patch/request.js +2 -2
- package/dist/views/[id]/patch/response.d.ts +1 -1
- package/dist/views/[id]/patch/response.js +2 -2
- package/dist/views/get/index.d.ts +2 -2
- package/dist/views/get/index.js +18 -18
- package/dist/views/get/query.d.ts +12 -12
- package/dist/views/get/query.js +2 -2
- package/dist/views/get/response.d.ts +20 -20
- package/dist/views/get/response.js +2 -2
- package/dist/views/index.d.ts +4 -4
- package/dist/views/index.js +20 -20
- package/dist/views/post/index.d.ts +2 -2
- package/dist/views/post/index.js +18 -18
- package/dist/views/post/request.d.ts +10 -10
- package/dist/views/post/request.js +2 -2
- package/dist/views/post/response.d.ts +1 -1
- package/dist/views/post/response.js +2 -2
- package/dist/views/shared.d.ts +27 -27
- package/dist/views/shared.js +2 -2
- package/dist/workflows/index.d.ts +44 -44
- package/dist/workflows/index.js +2 -2
- package/package.json +2 -2
|
@@ -1,288 +1,288 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-user Home screen layouts — a personal, server-persisted set of named
|
|
3
|
-
* arrangements of Home widgets. Stored directly on the user document (like
|
|
4
|
-
* `homeLocationId`), returned on `GET /users/current`, and written wholesale
|
|
5
|
-
* via `POST /users/current/home-layout`.
|
|
6
|
-
*
|
|
7
|
-
* Since v5 a user has SEVERAL named layouts and switches between them — the
|
|
8
|
-
* same want saved views answer for a list, applied to the Home. They exist
|
|
9
|
-
* because the thing that changes what a Home should show is the TASK (admin
|
|
10
|
-
* this morning, dispatch this afternoon), not the hardware; a layout that
|
|
11
|
-
* differs by device splits when the task doesn't and fails to split when it
|
|
12
|
-
* does. What device legitimately owns is per-widget (`showOn`).
|
|
13
|
-
*
|
|
14
|
-
* Each layout is a flat, ordered list of widgets, every one pinned to a rect on
|
|
15
|
-
* a 4-column grid (`gridPos`). The widget `type` is a closed union (below):
|
|
16
|
-
* adding a new kind is a contract change + republish + client bump. Per-widget
|
|
17
|
-
* `config` carries widget *behaviour* only (a saved-view id, an action id, a
|
|
18
|
-
* heading's text) — never geometry. Since 2026-07-30 the API validates each
|
|
19
|
-
* kind's KNOWN config keys on write (the per-kind `*WidgetConfig` shapes below)
|
|
20
|
-
* while tolerating unknown keys, so the client can still add config keys
|
|
21
|
-
* without an API deploy ordering — only changing a known key's meaning needs
|
|
22
|
-
* one.
|
|
23
|
-
*
|
|
24
|
-
* `version` discriminates stored layouts so the client can detect and
|
|
25
|
-
* reset/migrate an older one on read — including the pre-v5 single-layout
|
|
26
|
-
* shape, which is still readable as `LegacyHomeLayout`.
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* The kinds of Home widget. Closed set — adding one is a contract change.
|
|
30
|
-
* - `tile-link` — a link card (a saved view or a nav destination); may show a live count.
|
|
31
|
-
* - `summary-list` — top-N rows of a saved view's results.
|
|
32
|
-
* - `recent-activity` — the account's latest activity feed.
|
|
33
|
-
* - `recent-assets` / `recent-locations` — most-recently-updated entities.
|
|
34
|
-
* - `needs-attention` — assets flagged not-ready / partially-ready.
|
|
35
|
-
* - `kit-spotlight` — kit readiness summary.
|
|
36
|
-
* - `hero` — the fleet-readiness hero (overview + inline needs-attention legend),
|
|
37
|
-
* carrying its own mark and label so several can share a Home.
|
|
38
|
-
* - `heading` — a text heading to label a run of widgets (heading text lives in `config`).
|
|
39
|
-
*
|
|
40
|
-
* `heading` is a full-width structural widget: the client renders it spanning the
|
|
41
|
-
* whole row at every breakpoint. `hero` was one too until it learned to render at
|
|
42
|
-
* a quarter, a half or a full row; its width is now the user's, like any other
|
|
43
|
-
* widget's. As with all widgets, width is expressed through `gridPos.w`, not
|
|
44
|
-
* enforced by the API.
|
|
45
|
-
*/
|
|
46
|
-
export declare type HomeWidgetType = 'tile-link' | 'summary-list' | 'recent-activity' | 'recent-assets' | 'recent-locations' | 'needs-attention' | 'kit-spotlight' | 'hero' | 'heading';
|
|
47
|
-
/**
|
|
48
|
-
* Per-kind `config` shapes — the authoritative form of each configurable
|
|
49
|
-
* kind's KNOWN keys, which the API enforces on write (unknown keys pass, so
|
|
50
|
-
* these can grow client-first). The feed kinds define no config keys. `config`
|
|
51
|
-
* itself stays loosely typed on `HomeWidget`; the client parses defensively at
|
|
52
|
-
* the render boundary regardless (stored data may predate validation).
|
|
53
|
-
*/
|
|
54
|
-
/** A `tile-link`'s target: a registered app action or a saved view — never a
|
|
55
|
-
* free URL (the client resolves targets to internal routes by design). */
|
|
56
|
-
export declare type TileLinkWidgetConfig = {
|
|
57
|
-
source: 'action';
|
|
58
|
-
actionId: string;
|
|
59
|
-
} | {
|
|
60
|
-
source: 'view';
|
|
61
|
-
viewId: string;
|
|
62
|
-
};
|
|
63
|
-
/** A `summary-list` renders the top matches of one saved view. */
|
|
64
|
-
export interface SummaryListWidgetConfig {
|
|
65
|
-
viewId: string;
|
|
66
|
-
}
|
|
67
|
-
/** A `heading`'s user-editable label — empty while freshly added. */
|
|
68
|
-
export interface HeadingWidgetConfig {
|
|
69
|
-
text: string;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* How a hero card presents itself. Both keys are optional: with neither, the
|
|
73
|
-
* client renders its default mark and derives the label from the data source
|
|
74
|
-
* (the saved view's name, or the whole account). They exist because several
|
|
75
|
-
* heroes now share one Home — over different saved views, at different widths —
|
|
76
|
-
* and identical cards would be indistinguishable at a glance.
|
|
77
|
-
*/
|
|
78
|
-
export interface HeroWidgetPresentation {
|
|
79
|
-
/**
|
|
80
|
-
* Icon NAME from the client's curated set (kebab-case, e.g. `ambulance`) —
|
|
81
|
-
* never a URL or markup. The client resolves the name to a component and
|
|
82
|
-
* falls back to its default mark on one it doesn't recognise, which is why
|
|
83
|
-
* the API bounds the string rather than enumerating the set: adding an icon
|
|
84
|
-
* is then a client release, not an API deploy.
|
|
85
|
-
*/
|
|
86
|
-
icon?: string;
|
|
87
|
-
/** Label override. Empty or absent means the client derives it. */
|
|
88
|
-
title?: string;
|
|
89
|
-
}
|
|
90
|
-
/** The `hero`'s data source — the whole account's assets, or one saved view's
|
|
91
|
-
* matches — plus how the card presents itself. The source is always present on
|
|
92
|
-
* a stored hero (the kind shipped with it); the presentation keys are not. */
|
|
93
|
-
export declare type HeroWidgetConfig = HeroWidgetPresentation & ({
|
|
94
|
-
source: 'account';
|
|
95
|
-
} | {
|
|
96
|
-
source: 'view';
|
|
97
|
-
viewId: string;
|
|
98
|
-
});
|
|
99
|
-
/**
|
|
100
|
-
* A widget's cell on the Home grid: top-left position (`x`/`y`) and size
|
|
101
|
-
* (`w`/`h`), in grid units. The grid is 4 columns wide, so `x + w <= 4`, and
|
|
102
|
-
* `h` is a whole number of row-units. Below the desktop breakpoint the client
|
|
103
|
-
* collapses to a single column, so `x`/`w` only bind on wide viewports.
|
|
104
|
-
*/
|
|
105
|
-
export interface HomeWidgetGridPos {
|
|
106
|
-
/** Column of the top-left corner (0-based; `x + w <= 4`). */
|
|
107
|
-
x: number;
|
|
108
|
-
/** Row of the top-left corner (0-based), in row-units. */
|
|
109
|
-
y: number;
|
|
110
|
-
/** Width in columns (1–4). */
|
|
111
|
-
w: number;
|
|
112
|
-
/** Height in row-units (>= 1). */
|
|
113
|
-
h: number;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Which form factors a widget appears on. Absent means every width — the
|
|
117
|
-
* normal case, and the only shape stored layouts carried before 2026-08-18.
|
|
118
|
-
*
|
|
119
|
-
* `mobile` means every NARROW layout, tablets included: they share the same
|
|
120
|
-
* two-column grid, so there is no third thing to name. This exists because a
|
|
121
|
-
* device genuinely owns one question a layout cannot answer for it — whether a
|
|
122
|
-
* widget is usable at all in the room a phone gives it. It deliberately does
|
|
123
|
-
* NOT let a widget sit in a different PLACE per device; a layout that reorders
|
|
124
|
-
* itself by hardware is two layouts to keep in sync, which is what named
|
|
125
|
-
* layouts are for.
|
|
126
|
-
*/
|
|
127
|
-
export declare type HomeWidgetShowOn = 'desktop' | 'mobile';
|
|
128
|
-
export interface HomeWidget {
|
|
129
|
-
/** Stable client-generated id (ulid) — the reorder / remove key. */
|
|
130
|
-
id: string;
|
|
131
|
-
/** Widget kind (closed union). The client registry maps it to a renderer + config shape. */
|
|
132
|
-
type: HomeWidgetType;
|
|
133
|
-
/** Position + size on the 4-column grid. */
|
|
134
|
-
gridPos: HomeWidgetGridPos;
|
|
135
|
-
/** Restrict the widget to one form factor; absent means every width. */
|
|
136
|
-
showOn?: HomeWidgetShowOn;
|
|
137
|
-
/** Widget-specific *behaviour* config (e.g. a saved-view id, a heading's text) — never geometry. Known keys are validated per kind (see the `*WidgetConfig` shapes); unknown keys pass through. */
|
|
138
|
-
config?: Record<string, unknown>;
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* One named layout — a user-authored arrangement they can switch to.
|
|
142
|
-
*
|
|
143
|
-
* Layouts are INDEPENDENT: each owns its widgets outright, the way a saved view
|
|
144
|
-
* owns its query. A widget placed in two layouts is two records, and diverging
|
|
145
|
-
* is the point — the alternative (one widget set with per-layout placement)
|
|
146
|
-
* buys "rename the hero once" at the price of splitting a widget's lifetime
|
|
147
|
-
* from its placement everywhere else in the system.
|
|
148
|
-
*/
|
|
149
|
-
export interface NamedHomeLayout {
|
|
150
|
-
/** Stable client-generated id (ulid). */
|
|
151
|
-
id: string;
|
|
152
|
-
/** User-authored name, shown in the Home's layout switcher. */
|
|
153
|
-
name: string;
|
|
154
|
-
/**
|
|
155
|
-
* Icon NAME from the client's curated set (kebab-case, e.g. `ambulance`) —
|
|
156
|
-
* never a URL or markup, exactly as `HeroWidgetPresentation.icon` works. The
|
|
157
|
-
* client resolves the name to a component and falls back to a default mark on
|
|
158
|
-
* one it doesn't recognise, which is why the API bounds the string rather
|
|
159
|
-
* than enumerating the set: adding an icon is then a client release, not an
|
|
160
|
-
* API deploy.
|
|
161
|
-
*
|
|
162
|
-
* A layout's mark is how it is recognised in the switcher, ahead of reading
|
|
163
|
-
* its name — a set of task layouts very often shares a shape (scan-shaped
|
|
164
|
-
* work looks like scan-shaped work), so what distinguishes them has to be
|
|
165
|
-
* chosen rather than derived. Absent on every layout stored before this
|
|
166
|
-
* shipped, so readers need a fallback.
|
|
167
|
-
*/
|
|
168
|
-
icon?: string;
|
|
169
|
-
/**
|
|
170
|
-
* Colour NAME from the client's curated set (e.g. `amber`), on the same terms
|
|
171
|
-
* as `icon`: a name resolved client-side against a known vocabulary, not a
|
|
172
|
-
* hex value. Bounding a name rather than accepting a colour keeps a user from
|
|
173
|
-
* choosing something illegible, keeps light and dark mode in the client's
|
|
174
|
-
* hands, and keeps adding a colour a client release.
|
|
175
|
-
*/
|
|
176
|
-
colour?: string;
|
|
177
|
-
/** Flat, ordered widget list; geometry lives on each widget's `gridPos`. */
|
|
178
|
-
widgets: HomeWidget[];
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* The size of screen a Home is being opened on.
|
|
182
|
-
*
|
|
183
|
-
* Three classes, where `showOn` has two, and the difference is deliberate: they
|
|
184
|
-
* answer different questions. Whether a widget is USABLE in the room it gets is
|
|
185
|
-
* a question about the grid, and a tablet's grid is a phone's (two columns) —
|
|
186
|
-
* hence `desktop | mobile` there. Which layout you want to LAND on is a
|
|
187
|
-
* question about what you are doing, and someone carrying a tablet round a yard
|
|
188
|
-
* is doing neither of the other two jobs.
|
|
189
|
-
*/
|
|
190
|
-
export declare type HomeDeviceClass = 'mobile' | 'tablet' | 'desktop';
|
|
191
|
-
/**
|
|
192
|
-
* Which layout each size of screen opens on — the user's own explicit "land me
|
|
193
|
-
* here" per device, keyed class → layout id.
|
|
194
|
-
*
|
|
195
|
-
* This is the ONE place device legitimately picks a layout, and it does so
|
|
196
|
-
* without splitting anything: the layouts themselves are still task-shaped and
|
|
197
|
-
* available on every device, and this only decides which one is in front of you
|
|
198
|
-
* when you arrive. A class with no entry falls back to whatever that device was
|
|
199
|
-
* last switched to, then to the first layout.
|
|
200
|
-
*
|
|
201
|
-
* A class maps to exactly one layout BY CONSTRUCTION (that is why this is a map
|
|
202
|
-
* and not a flag on each layout — two layouts claiming the phone is not a state
|
|
203
|
-
* worth being able to represent). An id naming a layout that has since been
|
|
204
|
-
* deleted is harmless and deliberately not rejected: the set is edited from
|
|
205
|
-
* several devices, and the client falls through as if the entry were absent.
|
|
206
|
-
*/
|
|
207
|
-
export interface HomeLayoutDeviceDefaults {
|
|
208
|
-
mobile?: string;
|
|
209
|
-
tablet?: string;
|
|
210
|
-
desktop?: string;
|
|
211
|
-
}
|
|
212
|
-
export interface HomeLayout {
|
|
213
|
-
/** Layout schema version, so the client can detect + migrate/reset older stored layouts. */
|
|
214
|
-
version: number;
|
|
215
|
-
/**
|
|
216
|
-
* The user's layouts, in their own order — at least one, never empty.
|
|
217
|
-
*
|
|
218
|
-
* WHICH one is showing is deliberately not stored here: it is remembered per
|
|
219
|
-
* device by the client, so switching to a scanning layout on a phone doesn't
|
|
220
|
-
* change what the same user's desk opens on. `deviceDefaults` is the one
|
|
221
|
-
* stored part of that answer, and it is a landing preference, not a state.
|
|
222
|
-
*/
|
|
223
|
-
layouts: NamedHomeLayout[];
|
|
224
|
-
/** Per-device landing preference. Absent means "no preference" — the client's
|
|
225
|
-
* per-device memory decides, as it did before this existed. */
|
|
226
|
-
deviceDefaults?: HomeLayoutDeviceDefaults;
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* A layout PROVISIONED BY A USERGROUP, as stored on the group document.
|
|
230
|
-
*
|
|
231
|
-
* Deliberately not a `NamedHomeLayout`. It carries no `id` because the group's
|
|
232
|
-
* id identifies it — one layout per group, so the group IS the identity — and
|
|
233
|
-
* no `name` because the group's name labels it; a second name would be a name
|
|
234
|
-
* inside a name, free to drift from the one members actually see.
|
|
235
|
-
*
|
|
236
|
-
* It is otherwise the same thing: the same widgets, validated by the same
|
|
237
|
-
* rules, rendered by the same canvas. The member sees it alongside their own
|
|
238
|
-
* layouts and can switch to it, but not edit, rename or delete it — it is
|
|
239
|
-
* provisioning, on the same footing as a location scope or a field grant. The
|
|
240
|
-
* escape hatch is duplicating it into their own set, where it becomes theirs
|
|
241
|
-
* and stops tracking the group's.
|
|
242
|
-
*/
|
|
243
|
-
export interface GroupHomeLayout {
|
|
244
|
-
/** Icon name, on the same terms as `NamedHomeLayout.icon`. */
|
|
245
|
-
icon?: string;
|
|
246
|
-
/** Colour name, on the same terms as `NamedHomeLayout.colour`. */
|
|
247
|
-
colour?: string;
|
|
248
|
-
/** Flat, ordered widget list; geometry lives on each widget's `gridPos`. */
|
|
249
|
-
widgets: HomeWidget[];
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* One group's layout as delivered to a member on `GET /users/current`,
|
|
253
|
-
* resolved server-side from the groups they belong to.
|
|
254
|
-
*
|
|
255
|
-
* Emitted SEPARATELY from `homeLayout` and never inside it. That separation is
|
|
256
|
-
* load-bearing, not tidiness: `homeLayout` is the field the client writes back
|
|
257
|
-
* wholesale, so a provisioned layout arriving inside it would be copied into
|
|
258
|
-
* the member's own set by their next save — silently, permanently, and without
|
|
259
|
-
* anyone asking for it.
|
|
260
|
-
*
|
|
261
|
-
* The client renders these from the group's identity: `groupId` is the layout's
|
|
262
|
-
* id (which is what a per-device landing preference stores, and what stops
|
|
263
|
-
* naming one once you leave the group), and `groupName` is its label.
|
|
264
|
-
*/
|
|
265
|
-
export interface ProvisionedHomeLayout {
|
|
266
|
-
/** The group's id — also the layout's id, client-side. */
|
|
267
|
-
groupId: string;
|
|
268
|
-
/** The group's name, which is what the member sees the layout called. */
|
|
269
|
-
groupName: string;
|
|
270
|
-
layout: GroupHomeLayout;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* The pre-v5 shape: a single, unnamed layout.
|
|
274
|
-
*
|
|
275
|
-
* Read-only. A current client never writes it, but stored documents keep
|
|
276
|
-
* carrying it until each user's next save rewrites them, so anything that READS
|
|
277
|
-
* a persisted layout must still accept it. Delete once no stored document has
|
|
278
|
-
* it.
|
|
279
|
-
*/
|
|
280
|
-
export interface LegacyHomeLayout {
|
|
281
|
-
/** Layout schema version (< 5). */
|
|
282
|
-
version: number;
|
|
283
|
-
/** Flat, ordered widget list. */
|
|
284
|
-
widgets: HomeWidget[];
|
|
285
|
-
}
|
|
286
|
-
/** A layout as it may arrive FROM storage — current shape or legacy. Writes are
|
|
287
|
-
* always `HomeLayout`; the client migrates a legacy one on read. */
|
|
288
|
-
export declare type StoredHomeLayout = HomeLayout | LegacyHomeLayout;
|
|
1
|
+
/**
|
|
2
|
+
* Per-user Home screen layouts — a personal, server-persisted set of named
|
|
3
|
+
* arrangements of Home widgets. Stored directly on the user document (like
|
|
4
|
+
* `homeLocationId`), returned on `GET /users/current`, and written wholesale
|
|
5
|
+
* via `POST /users/current/home-layout`.
|
|
6
|
+
*
|
|
7
|
+
* Since v5 a user has SEVERAL named layouts and switches between them — the
|
|
8
|
+
* same want saved views answer for a list, applied to the Home. They exist
|
|
9
|
+
* because the thing that changes what a Home should show is the TASK (admin
|
|
10
|
+
* this morning, dispatch this afternoon), not the hardware; a layout that
|
|
11
|
+
* differs by device splits when the task doesn't and fails to split when it
|
|
12
|
+
* does. What device legitimately owns is per-widget (`showOn`).
|
|
13
|
+
*
|
|
14
|
+
* Each layout is a flat, ordered list of widgets, every one pinned to a rect on
|
|
15
|
+
* a 4-column grid (`gridPos`). The widget `type` is a closed union (below):
|
|
16
|
+
* adding a new kind is a contract change + republish + client bump. Per-widget
|
|
17
|
+
* `config` carries widget *behaviour* only (a saved-view id, an action id, a
|
|
18
|
+
* heading's text) — never geometry. Since 2026-07-30 the API validates each
|
|
19
|
+
* kind's KNOWN config keys on write (the per-kind `*WidgetConfig` shapes below)
|
|
20
|
+
* while tolerating unknown keys, so the client can still add config keys
|
|
21
|
+
* without an API deploy ordering — only changing a known key's meaning needs
|
|
22
|
+
* one.
|
|
23
|
+
*
|
|
24
|
+
* `version` discriminates stored layouts so the client can detect and
|
|
25
|
+
* reset/migrate an older one on read — including the pre-v5 single-layout
|
|
26
|
+
* shape, which is still readable as `LegacyHomeLayout`.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The kinds of Home widget. Closed set — adding one is a contract change.
|
|
30
|
+
* - `tile-link` — a link card (a saved view or a nav destination); may show a live count.
|
|
31
|
+
* - `summary-list` — top-N rows of a saved view's results.
|
|
32
|
+
* - `recent-activity` — the account's latest activity feed.
|
|
33
|
+
* - `recent-assets` / `recent-locations` — most-recently-updated entities.
|
|
34
|
+
* - `needs-attention` — assets flagged not-ready / partially-ready.
|
|
35
|
+
* - `kit-spotlight` — kit readiness summary.
|
|
36
|
+
* - `hero` — the fleet-readiness hero (overview + inline needs-attention legend),
|
|
37
|
+
* carrying its own mark and label so several can share a Home.
|
|
38
|
+
* - `heading` — a text heading to label a run of widgets (heading text lives in `config`).
|
|
39
|
+
*
|
|
40
|
+
* `heading` is a full-width structural widget: the client renders it spanning the
|
|
41
|
+
* whole row at every breakpoint. `hero` was one too until it learned to render at
|
|
42
|
+
* a quarter, a half or a full row; its width is now the user's, like any other
|
|
43
|
+
* widget's. As with all widgets, width is expressed through `gridPos.w`, not
|
|
44
|
+
* enforced by the API.
|
|
45
|
+
*/
|
|
46
|
+
export declare type HomeWidgetType = 'tile-link' | 'summary-list' | 'recent-activity' | 'recent-assets' | 'recent-locations' | 'needs-attention' | 'kit-spotlight' | 'hero' | 'heading';
|
|
47
|
+
/**
|
|
48
|
+
* Per-kind `config` shapes — the authoritative form of each configurable
|
|
49
|
+
* kind's KNOWN keys, which the API enforces on write (unknown keys pass, so
|
|
50
|
+
* these can grow client-first). The feed kinds define no config keys. `config`
|
|
51
|
+
* itself stays loosely typed on `HomeWidget`; the client parses defensively at
|
|
52
|
+
* the render boundary regardless (stored data may predate validation).
|
|
53
|
+
*/
|
|
54
|
+
/** A `tile-link`'s target: a registered app action or a saved view — never a
|
|
55
|
+
* free URL (the client resolves targets to internal routes by design). */
|
|
56
|
+
export declare type TileLinkWidgetConfig = {
|
|
57
|
+
source: 'action';
|
|
58
|
+
actionId: string;
|
|
59
|
+
} | {
|
|
60
|
+
source: 'view';
|
|
61
|
+
viewId: string;
|
|
62
|
+
};
|
|
63
|
+
/** A `summary-list` renders the top matches of one saved view. */
|
|
64
|
+
export interface SummaryListWidgetConfig {
|
|
65
|
+
viewId: string;
|
|
66
|
+
}
|
|
67
|
+
/** A `heading`'s user-editable label — empty while freshly added. */
|
|
68
|
+
export interface HeadingWidgetConfig {
|
|
69
|
+
text: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* How a hero card presents itself. Both keys are optional: with neither, the
|
|
73
|
+
* client renders its default mark and derives the label from the data source
|
|
74
|
+
* (the saved view's name, or the whole account). They exist because several
|
|
75
|
+
* heroes now share one Home — over different saved views, at different widths —
|
|
76
|
+
* and identical cards would be indistinguishable at a glance.
|
|
77
|
+
*/
|
|
78
|
+
export interface HeroWidgetPresentation {
|
|
79
|
+
/**
|
|
80
|
+
* Icon NAME from the client's curated set (kebab-case, e.g. `ambulance`) —
|
|
81
|
+
* never a URL or markup. The client resolves the name to a component and
|
|
82
|
+
* falls back to its default mark on one it doesn't recognise, which is why
|
|
83
|
+
* the API bounds the string rather than enumerating the set: adding an icon
|
|
84
|
+
* is then a client release, not an API deploy.
|
|
85
|
+
*/
|
|
86
|
+
icon?: string;
|
|
87
|
+
/** Label override. Empty or absent means the client derives it. */
|
|
88
|
+
title?: string;
|
|
89
|
+
}
|
|
90
|
+
/** The `hero`'s data source — the whole account's assets, or one saved view's
|
|
91
|
+
* matches — plus how the card presents itself. The source is always present on
|
|
92
|
+
* a stored hero (the kind shipped with it); the presentation keys are not. */
|
|
93
|
+
export declare type HeroWidgetConfig = HeroWidgetPresentation & ({
|
|
94
|
+
source: 'account';
|
|
95
|
+
} | {
|
|
96
|
+
source: 'view';
|
|
97
|
+
viewId: string;
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* A widget's cell on the Home grid: top-left position (`x`/`y`) and size
|
|
101
|
+
* (`w`/`h`), in grid units. The grid is 4 columns wide, so `x + w <= 4`, and
|
|
102
|
+
* `h` is a whole number of row-units. Below the desktop breakpoint the client
|
|
103
|
+
* collapses to a single column, so `x`/`w` only bind on wide viewports.
|
|
104
|
+
*/
|
|
105
|
+
export interface HomeWidgetGridPos {
|
|
106
|
+
/** Column of the top-left corner (0-based; `x + w <= 4`). */
|
|
107
|
+
x: number;
|
|
108
|
+
/** Row of the top-left corner (0-based), in row-units. */
|
|
109
|
+
y: number;
|
|
110
|
+
/** Width in columns (1–4). */
|
|
111
|
+
w: number;
|
|
112
|
+
/** Height in row-units (>= 1). */
|
|
113
|
+
h: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Which form factors a widget appears on. Absent means every width — the
|
|
117
|
+
* normal case, and the only shape stored layouts carried before 2026-08-18.
|
|
118
|
+
*
|
|
119
|
+
* `mobile` means every NARROW layout, tablets included: they share the same
|
|
120
|
+
* two-column grid, so there is no third thing to name. This exists because a
|
|
121
|
+
* device genuinely owns one question a layout cannot answer for it — whether a
|
|
122
|
+
* widget is usable at all in the room a phone gives it. It deliberately does
|
|
123
|
+
* NOT let a widget sit in a different PLACE per device; a layout that reorders
|
|
124
|
+
* itself by hardware is two layouts to keep in sync, which is what named
|
|
125
|
+
* layouts are for.
|
|
126
|
+
*/
|
|
127
|
+
export declare type HomeWidgetShowOn = 'desktop' | 'mobile';
|
|
128
|
+
export interface HomeWidget {
|
|
129
|
+
/** Stable client-generated id (ulid) — the reorder / remove key. */
|
|
130
|
+
id: string;
|
|
131
|
+
/** Widget kind (closed union). The client registry maps it to a renderer + config shape. */
|
|
132
|
+
type: HomeWidgetType;
|
|
133
|
+
/** Position + size on the 4-column grid. */
|
|
134
|
+
gridPos: HomeWidgetGridPos;
|
|
135
|
+
/** Restrict the widget to one form factor; absent means every width. */
|
|
136
|
+
showOn?: HomeWidgetShowOn;
|
|
137
|
+
/** Widget-specific *behaviour* config (e.g. a saved-view id, a heading's text) — never geometry. Known keys are validated per kind (see the `*WidgetConfig` shapes); unknown keys pass through. */
|
|
138
|
+
config?: Record<string, unknown>;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* One named layout — a user-authored arrangement they can switch to.
|
|
142
|
+
*
|
|
143
|
+
* Layouts are INDEPENDENT: each owns its widgets outright, the way a saved view
|
|
144
|
+
* owns its query. A widget placed in two layouts is two records, and diverging
|
|
145
|
+
* is the point — the alternative (one widget set with per-layout placement)
|
|
146
|
+
* buys "rename the hero once" at the price of splitting a widget's lifetime
|
|
147
|
+
* from its placement everywhere else in the system.
|
|
148
|
+
*/
|
|
149
|
+
export interface NamedHomeLayout {
|
|
150
|
+
/** Stable client-generated id (ulid). */
|
|
151
|
+
id: string;
|
|
152
|
+
/** User-authored name, shown in the Home's layout switcher. */
|
|
153
|
+
name: string;
|
|
154
|
+
/**
|
|
155
|
+
* Icon NAME from the client's curated set (kebab-case, e.g. `ambulance`) —
|
|
156
|
+
* never a URL or markup, exactly as `HeroWidgetPresentation.icon` works. The
|
|
157
|
+
* client resolves the name to a component and falls back to a default mark on
|
|
158
|
+
* one it doesn't recognise, which is why the API bounds the string rather
|
|
159
|
+
* than enumerating the set: adding an icon is then a client release, not an
|
|
160
|
+
* API deploy.
|
|
161
|
+
*
|
|
162
|
+
* A layout's mark is how it is recognised in the switcher, ahead of reading
|
|
163
|
+
* its name — a set of task layouts very often shares a shape (scan-shaped
|
|
164
|
+
* work looks like scan-shaped work), so what distinguishes them has to be
|
|
165
|
+
* chosen rather than derived. Absent on every layout stored before this
|
|
166
|
+
* shipped, so readers need a fallback.
|
|
167
|
+
*/
|
|
168
|
+
icon?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Colour NAME from the client's curated set (e.g. `amber`), on the same terms
|
|
171
|
+
* as `icon`: a name resolved client-side against a known vocabulary, not a
|
|
172
|
+
* hex value. Bounding a name rather than accepting a colour keeps a user from
|
|
173
|
+
* choosing something illegible, keeps light and dark mode in the client's
|
|
174
|
+
* hands, and keeps adding a colour a client release.
|
|
175
|
+
*/
|
|
176
|
+
colour?: string;
|
|
177
|
+
/** Flat, ordered widget list; geometry lives on each widget's `gridPos`. */
|
|
178
|
+
widgets: HomeWidget[];
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The size of screen a Home is being opened on.
|
|
182
|
+
*
|
|
183
|
+
* Three classes, where `showOn` has two, and the difference is deliberate: they
|
|
184
|
+
* answer different questions. Whether a widget is USABLE in the room it gets is
|
|
185
|
+
* a question about the grid, and a tablet's grid is a phone's (two columns) —
|
|
186
|
+
* hence `desktop | mobile` there. Which layout you want to LAND on is a
|
|
187
|
+
* question about what you are doing, and someone carrying a tablet round a yard
|
|
188
|
+
* is doing neither of the other two jobs.
|
|
189
|
+
*/
|
|
190
|
+
export declare type HomeDeviceClass = 'mobile' | 'tablet' | 'desktop';
|
|
191
|
+
/**
|
|
192
|
+
* Which layout each size of screen opens on — the user's own explicit "land me
|
|
193
|
+
* here" per device, keyed class → layout id.
|
|
194
|
+
*
|
|
195
|
+
* This is the ONE place device legitimately picks a layout, and it does so
|
|
196
|
+
* without splitting anything: the layouts themselves are still task-shaped and
|
|
197
|
+
* available on every device, and this only decides which one is in front of you
|
|
198
|
+
* when you arrive. A class with no entry falls back to whatever that device was
|
|
199
|
+
* last switched to, then to the first layout.
|
|
200
|
+
*
|
|
201
|
+
* A class maps to exactly one layout BY CONSTRUCTION (that is why this is a map
|
|
202
|
+
* and not a flag on each layout — two layouts claiming the phone is not a state
|
|
203
|
+
* worth being able to represent). An id naming a layout that has since been
|
|
204
|
+
* deleted is harmless and deliberately not rejected: the set is edited from
|
|
205
|
+
* several devices, and the client falls through as if the entry were absent.
|
|
206
|
+
*/
|
|
207
|
+
export interface HomeLayoutDeviceDefaults {
|
|
208
|
+
mobile?: string;
|
|
209
|
+
tablet?: string;
|
|
210
|
+
desktop?: string;
|
|
211
|
+
}
|
|
212
|
+
export interface HomeLayout {
|
|
213
|
+
/** Layout schema version, so the client can detect + migrate/reset older stored layouts. */
|
|
214
|
+
version: number;
|
|
215
|
+
/**
|
|
216
|
+
* The user's layouts, in their own order — at least one, never empty.
|
|
217
|
+
*
|
|
218
|
+
* WHICH one is showing is deliberately not stored here: it is remembered per
|
|
219
|
+
* device by the client, so switching to a scanning layout on a phone doesn't
|
|
220
|
+
* change what the same user's desk opens on. `deviceDefaults` is the one
|
|
221
|
+
* stored part of that answer, and it is a landing preference, not a state.
|
|
222
|
+
*/
|
|
223
|
+
layouts: NamedHomeLayout[];
|
|
224
|
+
/** Per-device landing preference. Absent means "no preference" — the client's
|
|
225
|
+
* per-device memory decides, as it did before this existed. */
|
|
226
|
+
deviceDefaults?: HomeLayoutDeviceDefaults;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* A layout PROVISIONED BY A USERGROUP, as stored on the group document.
|
|
230
|
+
*
|
|
231
|
+
* Deliberately not a `NamedHomeLayout`. It carries no `id` because the group's
|
|
232
|
+
* id identifies it — one layout per group, so the group IS the identity — and
|
|
233
|
+
* no `name` because the group's name labels it; a second name would be a name
|
|
234
|
+
* inside a name, free to drift from the one members actually see.
|
|
235
|
+
*
|
|
236
|
+
* It is otherwise the same thing: the same widgets, validated by the same
|
|
237
|
+
* rules, rendered by the same canvas. The member sees it alongside their own
|
|
238
|
+
* layouts and can switch to it, but not edit, rename or delete it — it is
|
|
239
|
+
* provisioning, on the same footing as a location scope or a field grant. The
|
|
240
|
+
* escape hatch is duplicating it into their own set, where it becomes theirs
|
|
241
|
+
* and stops tracking the group's.
|
|
242
|
+
*/
|
|
243
|
+
export interface GroupHomeLayout {
|
|
244
|
+
/** Icon name, on the same terms as `NamedHomeLayout.icon`. */
|
|
245
|
+
icon?: string;
|
|
246
|
+
/** Colour name, on the same terms as `NamedHomeLayout.colour`. */
|
|
247
|
+
colour?: string;
|
|
248
|
+
/** Flat, ordered widget list; geometry lives on each widget's `gridPos`. */
|
|
249
|
+
widgets: HomeWidget[];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* One group's layout as delivered to a member on `GET /users/current`,
|
|
253
|
+
* resolved server-side from the groups they belong to.
|
|
254
|
+
*
|
|
255
|
+
* Emitted SEPARATELY from `homeLayout` and never inside it. That separation is
|
|
256
|
+
* load-bearing, not tidiness: `homeLayout` is the field the client writes back
|
|
257
|
+
* wholesale, so a provisioned layout arriving inside it would be copied into
|
|
258
|
+
* the member's own set by their next save — silently, permanently, and without
|
|
259
|
+
* anyone asking for it.
|
|
260
|
+
*
|
|
261
|
+
* The client renders these from the group's identity: `groupId` is the layout's
|
|
262
|
+
* id (which is what a per-device landing preference stores, and what stops
|
|
263
|
+
* naming one once you leave the group), and `groupName` is its label.
|
|
264
|
+
*/
|
|
265
|
+
export interface ProvisionedHomeLayout {
|
|
266
|
+
/** The group's id — also the layout's id, client-side. */
|
|
267
|
+
groupId: string;
|
|
268
|
+
/** The group's name, which is what the member sees the layout called. */
|
|
269
|
+
groupName: string;
|
|
270
|
+
layout: GroupHomeLayout;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* The pre-v5 shape: a single, unnamed layout.
|
|
274
|
+
*
|
|
275
|
+
* Read-only. A current client never writes it, but stored documents keep
|
|
276
|
+
* carrying it until each user's next save rewrites them, so anything that READS
|
|
277
|
+
* a persisted layout must still accept it. Delete once no stored document has
|
|
278
|
+
* it.
|
|
279
|
+
*/
|
|
280
|
+
export interface LegacyHomeLayout {
|
|
281
|
+
/** Layout schema version (< 5). */
|
|
282
|
+
version: number;
|
|
283
|
+
/** Flat, ordered widget list. */
|
|
284
|
+
widgets: HomeWidget[];
|
|
285
|
+
}
|
|
286
|
+
/** A layout as it may arrive FROM storage — current shape or legacy. Writes are
|
|
287
|
+
* always `HomeLayout`; the client migrates a legacy one on read. */
|
|
288
|
+
export declare type StoredHomeLayout = HomeLayout | LegacyHomeLayout;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Per-user Home screen layouts — a personal, server-persisted set of named
|
|
4
|
-
* arrangements of Home widgets. Stored directly on the user document (like
|
|
5
|
-
* `homeLocationId`), returned on `GET /users/current`, and written wholesale
|
|
6
|
-
* via `POST /users/current/home-layout`.
|
|
7
|
-
*
|
|
8
|
-
* Since v5 a user has SEVERAL named layouts and switches between them — the
|
|
9
|
-
* same want saved views answer for a list, applied to the Home. They exist
|
|
10
|
-
* because the thing that changes what a Home should show is the TASK (admin
|
|
11
|
-
* this morning, dispatch this afternoon), not the hardware; a layout that
|
|
12
|
-
* differs by device splits when the task doesn't and fails to split when it
|
|
13
|
-
* does. What device legitimately owns is per-widget (`showOn`).
|
|
14
|
-
*
|
|
15
|
-
* Each layout is a flat, ordered list of widgets, every one pinned to a rect on
|
|
16
|
-
* a 4-column grid (`gridPos`). The widget `type` is a closed union (below):
|
|
17
|
-
* adding a new kind is a contract change + republish + client bump. Per-widget
|
|
18
|
-
* `config` carries widget *behaviour* only (a saved-view id, an action id, a
|
|
19
|
-
* heading's text) — never geometry. Since 2026-07-30 the API validates each
|
|
20
|
-
* kind's KNOWN config keys on write (the per-kind `*WidgetConfig` shapes below)
|
|
21
|
-
* while tolerating unknown keys, so the client can still add config keys
|
|
22
|
-
* without an API deploy ordering — only changing a known key's meaning needs
|
|
23
|
-
* one.
|
|
24
|
-
*
|
|
25
|
-
* `version` discriminates stored layouts so the client can detect and
|
|
26
|
-
* reset/migrate an older one on read — including the pre-v5 single-layout
|
|
27
|
-
* shape, which is still readable as `LegacyHomeLayout`.
|
|
28
|
-
*/
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Per-user Home screen layouts — a personal, server-persisted set of named
|
|
4
|
+
* arrangements of Home widgets. Stored directly on the user document (like
|
|
5
|
+
* `homeLocationId`), returned on `GET /users/current`, and written wholesale
|
|
6
|
+
* via `POST /users/current/home-layout`.
|
|
7
|
+
*
|
|
8
|
+
* Since v5 a user has SEVERAL named layouts and switches between them — the
|
|
9
|
+
* same want saved views answer for a list, applied to the Home. They exist
|
|
10
|
+
* because the thing that changes what a Home should show is the TASK (admin
|
|
11
|
+
* this morning, dispatch this afternoon), not the hardware; a layout that
|
|
12
|
+
* differs by device splits when the task doesn't and fails to split when it
|
|
13
|
+
* does. What device legitimately owns is per-widget (`showOn`).
|
|
14
|
+
*
|
|
15
|
+
* Each layout is a flat, ordered list of widgets, every one pinned to a rect on
|
|
16
|
+
* a 4-column grid (`gridPos`). The widget `type` is a closed union (below):
|
|
17
|
+
* adding a new kind is a contract change + republish + client bump. Per-widget
|
|
18
|
+
* `config` carries widget *behaviour* only (a saved-view id, an action id, a
|
|
19
|
+
* heading's text) — never geometry. Since 2026-07-30 the API validates each
|
|
20
|
+
* kind's KNOWN config keys on write (the per-kind `*WidgetConfig` shapes below)
|
|
21
|
+
* while tolerating unknown keys, so the client can still add config keys
|
|
22
|
+
* without an API deploy ordering — only changing a known key's meaning needs
|
|
23
|
+
* one.
|
|
24
|
+
*
|
|
25
|
+
* `version` discriminates stored layouts so the client can detect and
|
|
26
|
+
* reset/migrate an older one on read — including the pre-v5 single-layout
|
|
27
|
+
* shape, which is still readable as `LegacyHomeLayout`.
|
|
28
|
+
*/
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
//# sourceMappingURL=shared.js.map
|